From eefdeb1ffb9507f1c787e9a9087e8b7b0d57a0b2 Mon Sep 17 00:00:00 2001 From: Etrik Patricella Date: Thu, 26 Mar 2015 20:32:45 -0400 Subject: Add missing tenant_id arg, pass in name param correctly --- neutron_sec_group | 6 +++--- 1 file 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. """ -- cgit v1.2.1