summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Roovers <jroovers@cisco.com>2014-08-25 13:34:01 +0200
committerJoris Roovers <jroovers@cisco.com>2014-08-25 13:34:01 +0200
commitcb8f3c39695f31bc195747b6a60ca0ed58606897 (patch)
tree72d830ea2fbdd6b16b24a5b0444b048dd31cc099
parent01ab665fbf8bb0b861672e910de2b74eb0a7fc06 (diff)
downloadopenstack-ansible-modules-cb8f3c39695f31bc195747b6a60ca0ed58606897.tar.gz
Bugfix: Updating security group rules caused rules of other security rules to be deleted
This bug was caused by an incorrect use of the neutron pythonclient.
-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()