diff options
| author | Todd Willey <todd@ansolabs.com> | 2011-01-26 22:54:39 -0800 |
|---|---|---|
| committer | Todd Willey <todd@ansolabs.com> | 2011-01-26 22:54:39 -0800 |
| commit | d6c6d8115b9dda07716d85fb1201cde0e907a9bd (patch) | |
| tree | 09411e339d6b8f540896a1d30d9b0091bfb26fdf | |
| parent | be28eceff7b0a7a1dc33c3ade3ab221c6b1c8acd (diff) | |
A couple of bugfixes.
| -rw-r--r-- | nova/adminclient.py | 3 | ||||
| -rw-r--r-- | nova/api/ec2/admin.py | 3 | ||||
| -rw-r--r-- | nova/virt/libvirt_conn.py | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/nova/adminclient.py b/nova/adminclient.py index 9b43995fe..9652dcb9c 100644 --- a/nova/adminclient.py +++ b/nova/adminclient.py @@ -230,7 +230,8 @@ class InstanceType(object): class SimpleResponse(object): - def __init__(self): + def __init__(self, connection=None): + self.connection = connection self.status = None self.message = '' 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: diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index 453824d82..5b5b329ed 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -1171,7 +1171,7 @@ class NWFilterFirewall(FirewallDriver): 'nova-provider-rules' filter for each instance's firewall, and by changing that filter we update them all. """ - xml = self.provider_fw_to_nwfilter_xml(self) + xml = self.provider_fw_to_nwfilter_xml() return self._define_filter(xml) def security_group_to_nwfilter_xml(self, security_group_id): |
