diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-02-07 05:39:46 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-02-07 05:39:46 +0000 |
| commit | 5b47b85a579f30459944799e525dba0deedbb7e0 (patch) | |
| tree | 562d5b1bf71a2ef85c1b4d5974f9b3d35efe816b | |
| parent | b7a0a193f5ee5d9ad55f0c8a8d7b7da9692dbffb (diff) | |
| parent | c462de2ec4338f32469ea3a56232d601612db425 (diff) | |
| download | nova-5b47b85a579f30459944799e525dba0deedbb7e0.tar.gz nova-5b47b85a579f30459944799e525dba0deedbb7e0.tar.xz nova-5b47b85a579f30459944799e525dba0deedbb7e0.zip | |
Merge "Remove hardcoded topic strings in network manager"
| -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 58d8cc9c4..ce49f69e3 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): @@ -395,7 +396,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 4da821ffb..b88fe78fc 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 |
