From b0ffba472fee179870e5a17ae6da8ed3e40ee5bf Mon Sep 17 00:00:00 2001 From: Raul Melo Date: Tue, 27 Aug 2013 16:17:33 +0200 Subject: [PATCH 1/2] Fix issue 3908. There was some ilegal operations over the sets --- system/user | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/system/user b/system/user index 26b16f0ccf7..49dfcac9eca 100644 --- a/system/user +++ b/system/user @@ -1273,20 +1273,24 @@ class AIX(User): if self.groups is not None: current_groups = self.user_group_membership() - groups = self.get_groups_set() - group_diff = set(current_groups).symmetric_difference(groups) groups_need_mod = False + groups = [] - if group_diff: - if self.append: - for g in groups: - if g in group_diff: - groups.extend(current_groups) - set(groups) - groups_need_mod = True - break - else: + if self.groups == '': + if current_groups and not self.append: groups_need_mod = True + else: + groups = self.get_groups_set() + group_diff = set(current_groups).symmetric_difference(groups) + + if group_diff: + if self.append: + for g in groups: + if g in group_diff: + groups_need_mod = True + break + else: + groups_need_mod = True if groups_need_mod: cmd.append('-G') From 0033e06129999b363b3c7e926da8cca24b12a9ba Mon Sep 17 00:00:00 2001 From: Darragh O'Reilly Date: Wed, 28 Aug 2013 21:19:24 +0100 Subject: [PATCH 2/2] quantum_network: fix some doc mistakes - tenant_name was missing. - comments were on wrong tasks. - error message had a reference to glance. --- cloud/quantum_network | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/cloud/quantum_network b/cloud/quantum_network index 42261e1a0d7..c0e901197ff 100644 --- a/cloud/quantum_network +++ b/cloud/quantum_network @@ -44,6 +44,11 @@ options: - The tenant name of the login user required: true default: 'yes' + tenant_name: + description: + - The name of the tenant for whom the network is created + required: false + default: None auth_url: description: - The keystone url for authentication @@ -99,15 +104,15 @@ requirements: ["quantumclient", "keystoneclient"] ''' EXAMPLES = ''' -# Creates an external,public network -- quantum_network: state=present login_username=admin login_password=admin - provider_network_type=gre login_tenant_name=admin - provider_segmentation_id=1 tenant_name=tenant1 name=t1network" +# Create a GRE backed Quantum network with tunnel id 1 for tenant1 +- quantum_network: name=t1network tenant_name=tenant1 state=present + provider_network_type=gre provider_segmentation_id=1 + login_username=admin login_password=admin login_tenant_name=admin -# Createss a GRE nework with tunnel id of 1 for tenant 1 -- quantum_network: state=present login_username=admin login_password=admin - provider_network_type=local login_tenant_name=admin - provider_segmentation_id=1 router_external=yes name=external_network +# Create an external network +- quantum_network: name=external_network state=present + provider_network_type=local router_external=yes + login_username=admin login_password=admin login_tenant_name=admin ''' _os_keystone = None @@ -130,7 +135,7 @@ def _get_endpoint(module, ksclient): try: endpoint = ksclient.service_catalog.url_for(service_type='network', endpoint_type='publicURL') except Exception as e: - module.fail_json(msg = "Error getting endpoint for glance: %s " %e.message) + module.fail_json(msg = "Error getting endpoint for Quantum: %s " %e.message) return endpoint def _get_quantum_client(module, kwargs):