summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorin Hochstein <lorinh@gmail.com>2014-08-25 08:51:46 -0400
committerLorin Hochstein <lorinh@gmail.com>2014-08-25 08:51:46 -0400
commitf543bea8ab440129dfe0b848b4102395b63a5bc7 (patch)
tree72d830ea2fbdd6b16b24a5b0444b048dd31cc099
parent01ab665fbf8bb0b861672e910de2b74eb0a7fc06 (diff)
parentcb8f3c39695f31bc195747b6a60ca0ed58606897 (diff)
downloadopenstack-ansible-modules-f543bea8ab440129dfe0b848b4102395b63a5bc7.tar.gz
Merge pull request #13 from jorisroovers/master
Bugfix: Updating security group rules causes rules of other security rules to be deleted
-rw-r--r--neutron_sec_group5
1 files changed, 2 insertions, 3 deletions
diff --git a/neutron_sec_group b/neutron_sec_group
index 9e273ea..592310f 100644
--- a/neutron_sec_group
+++ b/neutron_sec_group
@@ -211,8 +211,7 @@ def _update_sg(module, network_client, sg):
# Security rules group update
# We keep things simple: first remove all rules, then insert the new
# rules. Not terribly efficient, but easy to implement.
- existing_rules = network_client.list_security_group_rules(sg['id'])
- existing_rules = existing_rules['security_group_rules']
+ existing_rules = sg['security_group_rules']
for rule in existing_rules:
network_client.delete_security_group_rule(rule['id'])
@@ -320,4 +319,4 @@ def _get_identity_client(module_params):
# Let's get the party started!
from ansible.module_utils.basic import *
-main() \ No newline at end of file
+main()