Access DB values as dict not as attributes. Part 3

We cannot assume nova.db.api will be returning sqlalchemy objects
attributes, instead treat return values as dicts

Part of blueprint db-api-cleanup

Change-Id: Icf45e5475b9d626f7e07efe953615dd82bb69ade
This commit is contained in:
Joe Gordon
2012-11-30 13:57:00 -08:00
parent 0fc6c8f0d2
commit 43a2e9ddc0
4 changed files with 74 additions and 79 deletions

View File

@@ -297,8 +297,8 @@ class IptablesFirewallDriver(FirewallDriver):
'-s %s/128 -p icmpv6 -j ACCEPT' % (gateway_v6,))
def _build_icmp_rule(self, rule, version):
icmp_type = rule.from_port
icmp_code = rule.to_port
icmp_type = rule['from_port']
icmp_code = rule['to_port']
if icmp_type == -1:
icmp_type_arg = None