From 5854f53cdcae5a80c54ec210ba04497d76ddd87c Mon Sep 17 00:00:00 2001 From: Capi Etheriel Date: Wed, 4 Feb 2015 18:20:11 -0200 Subject: [PATCH 1/3] add ec2 instance tags and groups info --- cloud/amazon/ec2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloud/amazon/ec2.py b/cloud/amazon/ec2.py index d34931c9914..630e665a277 100755 --- a/cloud/amazon/ec2.py +++ b/cloud/amazon/ec2.py @@ -590,7 +590,9 @@ def get_instance_info(inst): 'root_device_type': inst.root_device_type, 'root_device_name': inst.root_device_name, 'state': inst.state, - 'hypervisor': inst.hypervisor} + 'hypervisor': inst.hypervisor, + 'tags': inst.tags, + 'groups': {group.id: group.name for group in inst.groups}} try: instance_info['virtualization_type'] = getattr(inst,'virtualization_type') except AttributeError: From fa19753707ba93c4fa7c8abc953d3c647e21be25 Mon Sep 17 00:00:00 2001 From: "Oleg A. Mamontov" Date: Fri, 27 Feb 2015 14:39:18 +0300 Subject: [PATCH 2/3] On FreeBSD apply 'login_class' only if there is real change. --- system/user.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/system/user.py b/system/user.py index e4a52806718..4f96ab1e804 100755 --- a/system/user.py +++ b/system/user.py @@ -797,8 +797,17 @@ class FreeBsdUser(User): cmd.append(self.shell) if self.login_class is not None: - cmd.append('-L') - cmd.append(self.login_class) + # find current login class + user_login_class = None + if os.path.exists(self.SHADOWFILE) and os.access(self.SHADOWFILE, os.R_OK): + for line in open(self.SHADOWFILE).readlines(): + if line.startswith('%s:' % self.name): + user_login_class = line.split(':')[4] + + # act only if login_class change + if self.login_class != user_login_class: + cmd.append('-L') + cmd.append(self.login_class) if self.groups is not None: current_groups = self.user_group_membership() From 2e4091f31dd248d8f364b4e2a19b0a594c8e2d95 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 27 Feb 2015 07:05:03 -0500 Subject: [PATCH 3/3] One more OpenStack deprecation notice Fixes #858 --- cloud/openstack/_quantum_router.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cloud/openstack/_quantum_router.py b/cloud/openstack/_quantum_router.py index 38d479128f2..154eff84d90 100644 --- a/cloud/openstack/_quantum_router.py +++ b/cloud/openstack/_quantum_router.py @@ -30,6 +30,7 @@ DOCUMENTATION = ''' module: quantum_router version_added: "1.2" short_description: Create or Remove router from openstack +deprecated: Deprecated in 1.9. Use os_router instead description: - Create or Delete routers from OpenStack options: