diff options
author | Alexis Lee <alexisl@hp.com> | 2014-01-08 10:43:58 +0000 |
---|---|---|
committer | Alexis Lee <alexisl@hp.com> | 2014-01-23 09:42:06 +0000 |
commit | 94587d814f21fa0787dd5447c7581c2f0cfe7966 (patch) | |
tree | 7cad6d6c8ad577cc3dc54c2ef0a56f0256e533a1 /nova/network/manager.py | |
parent | a3d292fd2eefe4fd9020e29d26af9f733d272f19 (diff) | |
download | nova-94587d814f21fa0787dd5447c7581c2f0cfe7966.tar.gz |
Move fake_network config option to linux_net
Option 'fake_network' is used by nova/network/linux_net.py but not
imported from nova/network/manager.py. Both use it, but manager imports
linux_net (via nova/network/api.py + nova/network/floating_ips.py) so it
makes more sense to define the option in linux_net and import_opt in
manager.
Precise example import chain:
bin/nova-manage
nova/cmd/manage.py: import_opt('flat_network_bridge', 'nova.network.manager')
nova/network/manager.py: from nova.network import api as network_api
-- At this point, manager has started to import but not yet called
register_opts
nova/network/api.py: from nova.network import floating_ips
nova/nova/network/floating_ips.py: import_opt('public_interface', 'nova.network.linux_net')
nova/nova/network/linux_net.py: import_opt('fake_network', 'nova.network.manager')
-- BANG! Manager hasn't registered the option we want to import
Change-Id: I66f021b34aef650dca148a58203c249f6aa0e83e
Diffstat (limited to 'nova/network/manager.py')
-rw-r--r-- | nova/network/manager.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/nova/network/manager.py b/nova/network/manager.py index 9ade2b848f..635426e858 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -126,9 +126,6 @@ network_opts = [ cfg.IntOpt('create_unique_mac_address_attempts', default=5, help='Number of attempts to create unique mac address'), - cfg.BoolOpt('fake_network', - default=False, - help='If passed, use fake network devices and addresses'), cfg.BoolOpt('fake_call', default=False, help='If True, skip using the queue and make local calls'), @@ -168,6 +165,7 @@ 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') +CONF.import_opt('fake_network', 'nova.network.linux_net') class RPCAllocateFixedIP(object): |