summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorin Hochstein <lorinh@gmail.com>2014-12-16 09:28:35 -0500
committerLorin Hochstein <lorinh@gmail.com>2014-12-16 09:28:35 -0500
commit089d2c828b9fed10e16a871652f2cd0ed5022530 (patch)
treebbab59f347de30caac40642d8de401efa13fa63b
parent4aeb1b66ef17bc7654108e3dcf5a8fa972a51627 (diff)
parent2927842c3fc8fb159aff0349ba95c8d6f867d003 (diff)
downloadopenstack-ansible-modules-089d2c828b9fed10e16a871652f2cd0ed5022530.tar.gz
Merge pull request #32 from cybercom-finland/neutron_sec_group_fix
Fix neutron_sec_group to work with str port ranges
-rw-r--r--neutron_sec_group4
1 files changed, 4 insertions, 0 deletions
diff --git a/neutron_sec_group b/neutron_sec_group
index ff56a41..ccbdc37 100644
--- a/neutron_sec_group
+++ b/neutron_sec_group
@@ -248,6 +248,10 @@ def _update_sg(module, network_client, sg):
for key in clean_old_rule.keys():
if key not in clean_new_rule:
clean_new_rule[key] = None
+ continue
+ value = clean_new_rule[key]
+ if isinstance(value, (str, unicode)) and value.isdigit():
+ clean_new_rule[key] = int(value)
if cmp(clean_old_rule, clean_new_rule) == 0:
matched_id = old_id
break