From cb8f3c39695f31bc195747b6a60ca0ed58606897 Mon Sep 17 00:00:00 2001 From: Joris Roovers Date: Mon, 25 Aug 2014 13:34:01 +0200 Subject: 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. --- neutron_sec_group | 5 ++--- 1 file 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() -- cgit v1.2.1