[Freeipa-devel] [PATCH] 102 Fixed association facets.
The association config has been removed because it incorrectly assumes there is only one association between two entities. Now each association is defined separately using association facets. The service.py has been modified to specify the correct relationships. The API.txt has been updated. https://fedorahosted.org/freeipa/ticket/960 -- Endi S. Dewata From 7e69325296f112b398f0cfb737e91c12ec11c7a4 Mon Sep 17 00:00:00 2001 From: Endi S. Dewata Date: Fri, 11 Feb 2011 18:04:04 -0600 Subject: [PATCH] Fixed association facets. The association config has been removed because it incorrectly assumes there is only one association between two entities. Now each association is defined separately using association facets. The service.py has been modified to specify the correct relationships. The API.txt has been updated. https://fedorahosted.org/freeipa/ticket/960 --- API.txt|4 +- install/ui/aci.js | 71 ++ install/ui/associate.js| 128 install/ui/dialog.js |3 +- install/ui/entity.js | 70 +- install/ui/group.js| 33 +--- install/ui/hbacrule.js |2 +- install/ui/hbacsvcgroup.js |6 -- install/ui/host.js | 35 ++--- install/ui/hostgroup.js| 22 ++ install/ui/netgroup.js | 43 +++ install/ui/search.js |2 +- install/ui/service.js | 16 ++--- install/ui/sudocmdgroup.js |6 -- install/ui/test/association_tests.html |2 + install/ui/test/association_tests.js | 22 ++ install/ui/test/data/ipa_init.json | 21 + install/ui/user.js | 29 +-- ipalib/plugins/service.py |3 + 19 files changed, 281 insertions(+), 237 deletions(-) diff --git a/API.txt b/API.txt index fab224134343f789680050a5d04fea6560d44816..f4f312675e274b33c3763c26a407e459feff8c0e 100644 --- a/API.txt +++ b/API.txt @@ -2118,8 +2118,8 @@ option: Int('sizelimit?', autofill=False, flags=['no_display'], label=Gettext('S option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) -option: List('host?', cli_name='hosts',ist('host?', cli_name='hosts', doc='only services with member hosts', label='host', multivalue=True) -option: List('no_host?', cli_name='no_hosts',ist('no_host?', cli_name='no_hosts', doc='only services with no member hosts', label='host', multivalue=True) +option: List('man_by_host?', cli_name='man_by_hosts',ist('man_by_host?', cli_name='man_by_hosts', doc='only services with managed by hosts', label='host', multivalue=True) +option: List('not_man_by_host?', cli_name='not_man_by_hosts',ist('not_man_by_host?', cli_name='not_man_by_hosts', doc='only services with no managed by hosts', label='host', multivalue=True) output: Output('summary', (, ), 'User-friendly description of action performed') output: ListOfEntries('result', (, ), Gettext('A list of LDAP entries', domain='ipa', localedir=None)) output: Output('count', , 'Number of entries returned') diff --git a/install/ui/aci.js b/install/ui/aci.js index 89caec040ea28e97406f336832bb4c4f26793b7b..c72037605497212798f68f9bcf3efaa40875a9e7 100644 --- a/install/ui/aci.js +++ b/install/ui/aci.js @@ -559,8 +559,13 @@ IPA.entity_factories.permission = function() { IPA.stanza({name:'identity', label:'Identity'}). input({name: 'cn', 'read_only': true})). section(IPA.rights_section()). -section(IPA.target_section({name: 'target', label: 'Target'}))); - +section(IPA.target_section({name: 'target', label: 'Target'}))). +facet( +IPA.association_facet({ +name: 'member_privilege', +attribute_member: 'member', +other_entity: 'privilege'})). +standard_associations(); }; @@ -586,14 +591,25 @@ IPA.entity_factories.privilege = function() { IPA.stanza({name:'identity', label:'Privilege Settings'}). input({name:'cn'}). input({name: 'description'}))). -association({ -name: 'permission', -other_entity: 'privilege', -add_method: 'add_permission', -remove_method: 'remove_permission' -}). +facet( +IPA.association_facet({ +name: 'member_role', +attribute_member: 'member', +other_entity: 'role', +add_method: 'add_privilege', +remove_method: 'remove_privilege', +ass
Re: [Freeipa-devel] [PATCH] 102 Fixed association facets.
On 2/15/2011 1:39 PM, Endi Sukma Dewata wrote: The association config has been removed because it incorrectly assumes there is only one association between two entities. Now each association is defined separately using association facets. The service.py has been modified to specify the correct relationships. The API.txt has been updated. https://fedorahosted.org/freeipa/ticket/960 Attached is an updated patch. Redundant facet definitions have been removed. -- Endi S. Dewata From f1c8da3fa439e78f2ea5fe35445c3bc28d8b04fe Mon Sep 17 00:00:00 2001 From: Endi S. Dewata Date: Fri, 11 Feb 2011 18:04:04 -0600 Subject: [PATCH] Fixed association facets. The association config has been removed because it incorrectly assumes there is only one association between two entities. Now each association is defined separately using association facets. The service.py has been modified to specify the correct relationships. The API.txt has been updated. https://fedorahosted.org/freeipa/ticket/960 --- API.txt|4 +- install/ui/aci.js | 38 ++ install/ui/associate.js| 134 install/ui/dialog.js |3 +- install/ui/entity.js | 93 +++ install/ui/group.js| 31 install/ui/hbacrule.js |2 +- install/ui/hbacsvcgroup.js |6 -- install/ui/host.js | 32 +--- install/ui/hostgroup.js|6 ++ install/ui/netgroup.js |6 ++ install/ui/search.js |2 +- install/ui/service.js | 15 +--- install/ui/sudocmdgroup.js |6 -- install/ui/test/association_tests.html |2 + install/ui/test/association_tests.js | 22 ++ install/ui/test/data/ipa_init.json | 21 + install/ui/user.js | 23 -- ipalib/plugins/service.py |3 + 19 files changed, 188 insertions(+), 261 deletions(-) diff --git a/API.txt b/API.txt index fab224134343f789680050a5d04fea6560d44816..f4f312675e274b33c3763c26a407e459feff8c0e 100644 --- a/API.txt +++ b/API.txt @@ -2118,8 +2118,8 @@ option: Int('sizelimit?', autofill=False, flags=['no_display'], label=Gettext('S option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output']) option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output']) option: Str('version?', exclude='webui', flags=['no_option', 'no_output']) -option: List('host?', cli_name='hosts',ist('host?', cli_name='hosts', doc='only services with member hosts', label='host', multivalue=True) -option: List('no_host?', cli_name='no_hosts',ist('no_host?', cli_name='no_hosts', doc='only services with no member hosts', label='host', multivalue=True) +option: List('man_by_host?', cli_name='man_by_hosts',ist('man_by_host?', cli_name='man_by_hosts', doc='only services with managed by hosts', label='host', multivalue=True) +option: List('not_man_by_host?', cli_name='not_man_by_hosts',ist('not_man_by_host?', cli_name='not_man_by_hosts', doc='only services with no managed by hosts', label='host', multivalue=True) output: Output('summary', (, ), 'User-friendly description of action performed') output: ListOfEntries('result', (, ), Gettext('A list of LDAP entries', domain='ipa', localedir=None)) output: Output('count', , 'Number of entries returned') diff --git a/install/ui/aci.js b/install/ui/aci.js index 89caec040ea28e97406f336832bb4c4f26793b7b..4df65f3ffc345c3a11eccea895bbe9c3715f375c 100644 --- a/install/ui/aci.js +++ b/install/ui/aci.js @@ -559,8 +559,8 @@ IPA.entity_factories.permission = function() { IPA.stanza({name:'identity', label:'Identity'}). input({name: 'cn', 'read_only': true})). section(IPA.rights_section()). -section(IPA.target_section({name: 'target', label: 'Target'}))); - +section(IPA.target_section({name: 'target', label: 'Target'}))). +standard_associations(); }; @@ -586,15 +586,21 @@ IPA.entity_factories.privilege = function() { IPA.stanza({name:'identity', label:'Privilege Settings'}). input({name:'cn'}). input({name: 'description'}))). -association({ -name: 'permission', -other_entity: 'privilege', -add_method: 'add_permission', -remove_method: 'remove_permission' -}). - -standard_associations(); +facet( +IPA.association_facet({ +name: 'member_role', +add_method: 'add_privilege', +remove_method: 'remove_privilege', +associator: IPA.serial_associator +})). +facet( +IPA.association_facet({ +name: 'memberof_pe
Re: [Freeipa-devel] [PATCH] 102 Fixed association facets.
On 02/15/2011 04:23 PM, Endi Sukma Dewata wrote: On 2/15/2011 1:39 PM, Endi Sukma Dewata wrote: The association config has been removed because it incorrectly assumes there is only one association between two entities. Now each association is defined separately using association facets. The service.py has been modified to specify the correct relationships. The API.txt has been updated. https://fedorahosted.org/freeipa/ticket/960 Attached is an updated patch. Redundant facet definitions have been removed. ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel ACK. Pushed to master ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel