[Freeipa-devel] [PATCH] 030 Extending facet's mechanism of gathering changes

Endi Sukma Dewata edewata at redhat.com
Thu Nov 3 22:51:42 UTC 2011


On 11/3/2011 7:35 AM, Petr Vobornik wrote:
> https://fedorahosted.org/freeipa/ticket/2041
>
> I'm not sure if update_info and other new classes should be in details.js.

It's probably ok now, but in the future we might want to move them 
somewhere else. How about creating command.js and move all 
command-related code there?

Other issues:

1. In details.js:650 we don't use param_info anymore, it should be metadata.

2. The add_field_option(command, field_name, param_info, values, join) 
probably can be simplified into add_field_option(field, values). The 
IPA.command_builder can store the command internally:

   var command_builder = IPA.command_builder({
       command: command
   });

   ...

   command_builder.add_field_option(field_info.field, values);

The add_field_option() can get the name, metadata, and join from the 
field object.

3. The add_record_to_command() takes a list of sections, but it might 
not be necessary because (so far) it's only used to access the details 
facet's own list of sections. Do you expect this to be used differently?

4. The create_fields_update_command() is essentially the same as 
create_standard_update_command(). When the command_mode is 'save' is it 
possible to generate an update_info from records so we can just call 
create_fields_update_command()?

This patch I think can be ACKed after fixing #1, the rest can be dealt 
with later.

Some of the new codes are not used anywhere yet so it's a bit difficult 
to review and things might change again later. I'm curious to see how 
it's going to be used in HBAC/sudo rule and DNS zone that involves 
multiple commands: how the commands are going to be defined, how to 
associate certain fields with certain commands, how to assign 
priorities, etc. Do you have any preview patch for ticket #1515?

-- 
Endi S. Dewata




More information about the Freeipa-devel mailing list