diff options
author | Hans Lindgren <hanlind@kth.se> | 2013-01-28 12:46:29 +0100 |
---|---|---|
committer | Hans Lindgren <hanlind@kth.se> | 2013-02-02 17:05:17 +0100 |
commit | c462de2ec4338f32469ea3a56232d601612db425 (patch) | |
tree | 9990ffa5c3fc0b1c8fa17527a10289bfbb9e8597 | |
parent | 35ba1f88dfdc5fbef7b6208b2b4d8178e3cfa1ac (diff) | |
download | nova-c462de2ec4338f32469ea3a56232d601612db425.tar.gz nova-c462de2ec4338f32469ea3a56232d601612db425.tar.xz nova-c462de2ec4338f32469ea3a56232d601612db425.zip |
Remove hardcoded topic strings in network manager
Resolves bug 1107799.
Change-Id: I24e26fb53e9d4db709307280ef23241c6c4b09ae
-rw-r--r-- | nova/network/floating_ips.py | 3 | ||||
-rw-r--r-- | nova/network/manager.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/nova/network/floating_ips.py b/nova/network/floating_ips.py index 6d8606113..df38a5983 100644 --- a/nova/network/floating_ips.py +++ b/nova/network/floating_ips.py @@ -43,6 +43,7 @@ floating_opts = [ CONF = cfg.CONF CONF.register_opts(floating_opts) CONF.import_opt('public_interface', 'nova.network.linux_net') +CONF.import_opt('network_topic', 'nova.network.rpcapi') class FloatingIP(object): @@ -394,7 +395,7 @@ class FloatingIP(object): instance = self.db.instance_get_by_uuid(context, fixed_ip['instance_uuid']) service = self.db.service_get_by_host_and_topic( - context.elevated(), instance['host'], 'network') + context.elevated(), instance['host'], CONF.network_topic) if service and self.servicegroup_api.service_is_up(service): host = instance['host'] else: diff --git a/nova/network/manager.py b/nova/network/manager.py index 0bd652cdd..96a9050ef 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -178,6 +178,7 @@ CONF = cfg.CONF CONF.register_opts(network_opts) CONF.import_opt('use_ipv6', 'nova.netconf') CONF.import_opt('my_ip', 'nova.netconf') +CONF.import_opt('network_topic', 'nova.network.rpcapi') class RPCAllocateFixedIP(object): @@ -250,7 +251,7 @@ class RPCAllocateFixedIP(object): if network['multi_host']: service = self.db.service_get_by_host_and_topic(context, host, - 'network') + CONF.network_topic) if not service or not self.servicegroup_api.service_is_up(service): # NOTE(vish): deallocate the fixed ip locally but don't # teardown network devices |