diff options
| author | Hans Lindgren <hanlind@kth.se> | 2013-01-26 15:50:31 +0100 |
|---|---|---|
| committer | Hans Lindgren <hanlind@kth.se> | 2013-01-28 12:01:23 +0100 |
| commit | 16599c060f2fcc5f43cb8cc831a57afaeca2ad4f (patch) | |
| tree | c1c1ad9d9422faaef0dc6df675d35aac26f8da23 /nova/compute | |
| parent | 2f97345472a8bafa17c425bccfb7b81b46b8d6d5 (diff) | |
Refactoring/cleanup of compute and db apis
Refactor db call usage and remove some unused code.
Change-Id: I49466f7ab54dd6dbf0fc78bab3d2df44392ba3ee
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 06ce2e07e..6022e2730 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -91,7 +91,6 @@ compute_opts = [ CONF = cfg.CONF CONF.register_opts(compute_opts) CONF.import_opt('compute_topic', 'nova.compute.rpcapi') -CONF.import_opt('consoleauth_topic', 'nova.consoleauth') CONF.import_opt('enable', 'nova.cells.opts', group='cells') MAX_USERDATA_SIZE = 65535 @@ -877,9 +876,9 @@ class API(base.Base): def trigger_provider_fw_rules_refresh(self, context): """Called when a rule is added/removed from a provider firewall.""" - host_names = [x['host'] for (x, idx) - in self.db.service_get_all_compute_sorted(context)] - for host_name in host_names: + for service in self.db.service_get_all_by_topic(context, + CONF.compute_topic): + host_name = service['host'] self.compute_rpcapi.refresh_provider_fw_rules(context, host_name) def update_state(self, context, instance, new_state): |
