diff options
author | Toni Ylenius <toni.ylenius@cybercom.com> | 2014-12-16 09:28:28 +0200 |
---|---|---|
committer | Toni Ylenius <toni.ylenius@cybercom.com> | 2014-12-16 09:28:28 +0200 |
commit | 2927842c3fc8fb159aff0349ba95c8d6f867d003 (patch) | |
tree | bbab59f347de30caac40642d8de401efa13fa63b | |
parent | 4aeb1b66ef17bc7654108e3dcf5a8fa972a51627 (diff) | |
download | openstack-ansible-modules-2927842c3fc8fb159aff0349ba95c8d6f867d003.tar.gz |
Fix neutron_sec_group to work with str port ranges
-rw-r--r-- | neutron_sec_group | 4 |
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 |