diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-11-30 12:08:36 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-11-30 12:08:36 +0000 |
| commit | 651637ad5475153ef3f2bc15ff0037aebec414c3 (patch) | |
| tree | 74d8c20b5d196a742f6d57fcfb9d1488f0034322 /nova/virt | |
| parent | 37df2052d7b9666c72478de79b46a60b15c9f4fd (diff) | |
| parent | 03ae11664d6d42b02ea2996d0125bcdee87db754 (diff) | |
Merge "Access DB values as dict not as attributes. Part 2"
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/firewall.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nova/virt/firewall.py b/nova/virt/firewall.py index 11a8ea2bf..ee39b0b8c 100644 --- a/nova/virt/firewall.py +++ b/nova/virt/firewall.py @@ -360,20 +360,20 @@ class IptablesFirewallDriver(FirewallDriver): LOG.debug(_('Adding security group rule: %r'), rule, instance=instance) - if not rule.cidr: + if not rule['cidr']: version = 4 else: - version = netutils.get_ip_version(rule.cidr) + version = netutils.get_ip_version(rule['cidr']) if version == 4: fw_rules = ipv4_rules else: fw_rules = ipv6_rules - protocol = rule.protocol + protocol = rule['protocol'] if protocol: - protocol = rule.protocol.lower() + protocol = rule['protocol'].lower() if version == 6 and protocol == 'icmp': protocol = 'icmpv6' @@ -386,9 +386,9 @@ class IptablesFirewallDriver(FirewallDriver): args += self._build_tcp_udp_rule(rule, version) elif protocol == 'icmp': args += self._build_icmp_rule(rule, version) - if rule.cidr: - LOG.debug('Using cidr %r', rule.cidr, instance=instance) - args += ['-s', rule.cidr] + if rule['cidr']: + LOG.debug('Using cidr %r', rule['cidr'], instance=instance) + args += ['-s', rule['cidr']] fw_rules += [' '.join(args)] else: if rule['grantee_group']: |
