summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorTodd Willey <todd@ansolabs.com>2011-01-26 22:54:39 -0800
committerTodd Willey <todd@ansolabs.com>2011-01-26 22:54:39 -0800
commitd6c6d8115b9dda07716d85fb1201cde0e907a9bd (patch)
tree09411e339d6b8f540896a1d30d9b0091bfb26fdf /nova/api
parentbe28eceff7b0a7a1dc33c3ade3ab221c6b1c8acd (diff)
A couple of bugfixes.
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/admin.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/api/ec2/admin.py b/nova/api/ec2/admin.py
index 478032ce9..b019e8e8b 100644
--- a/nova/api/ec2/admin.py
+++ b/nova/api/ec2/admin.py
@@ -237,9 +237,10 @@ class AdminController(object):
return host_dict(db.host_get(name))
def _provider_fw_rule_exists(self, context, rule):
+ # TODO(todd): we call this repeatedly, can we filter by protocol?
for old_rule in db.provider_fw_rule_get_all(context):
+ dupe = True
for key in ('cidr', 'from_port', 'to_port', 'protocol'):
- dupe = True
if rule[key] != old_rule[key]:
dupe = False
if dupe: