diff options
author | Lorin Hochstein <lorinh@gmail.com> | 2015-03-26 20:42:15 -0400 |
---|---|---|
committer | Lorin Hochstein <lorinh@gmail.com> | 2015-03-26 20:42:15 -0400 |
commit | c95a0b8c9d619f5549541124a7cd947d52dcb8dd (patch) | |
tree | fa7a41f2fdb8e1ce6d314b978f991d0e2ca15c8f | |
parent | 8b0dea3b9f051cf38bbd9b2db7b90e70072d8507 (diff) | |
parent | eefdeb1ffb9507f1c787e9a9087e8b7b0d57a0b2 (diff) | |
download | openstack-ansible-modules-c95a0b8c9d619f5549541124a7cd947d52dcb8dd.tar.gz |
Merge pull request #41 from etrikp/master
Add missing tenant_id arg, pass in name param correctly
-rw-r--r-- | neutron_sec_group | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/neutron_sec_group b/neutron_sec_group index 52e57e3..c55c39a 100644 --- a/neutron_sec_group +++ b/neutron_sec_group @@ -149,7 +149,7 @@ def main(): sec_groups = network_client.list_security_groups(**params)['security_groups'] if len(sec_groups) > 1: - raise exceptions.NeutronClientNoUniqueMatch(resource='security_group', name=name) + raise exceptions.NeutronClientNoUniqueMatch(resource='security_group', name=params['name']) elif len(sec_groups) == 0: sec_group_exists = False else: @@ -253,13 +253,13 @@ def _update_sg(module, network_client, sg, tenant_id): if module.params['rules'] is not None: rules_changed = _update_sg_rules(module, network_client, sg, - module.params['rules']) + module.params['rules'], tenant_id) changed |= rules_changed return changed, sg -def _update_sg_rules(module, network_client, sg, wanted_rules): +def _update_sg_rules(module, network_client, sg, wanted_rules, tenant_id): """ Updates rules of a security group. """ |