diff --git a/config.yaml b/config.yaml index f4bf404f..47dae983 100644 --- a/config.yaml +++ b/config.yaml @@ -98,6 +98,6 @@ options: traffic to the external public network. Valid values are either MAC addresses (in which case only MAC addresses for interfaces without an IP address already assigned will be used), or interfaces (eth0) - enable-metadata: + enable-local-dhcp-and-metadata: type: boolean default: false diff --git a/hooks/neutron_ovs_hooks.py b/hooks/neutron_ovs_hooks.py index 8c4b1a6b..2b31e3ce 100755 --- a/hooks/neutron_ovs_hooks.py +++ b/hooks/neutron_ovs_hooks.py @@ -94,9 +94,8 @@ def neutron_plugin_api_changed(): @hooks.hook('neutron-plugin-relation-joined') def neutron_plugin_joined(relation_id=None): print "Enable metadata: {}".format(enable_metadata()) - if config('enable-metadata'): - apt_install('neutron-metadata-agent', fatal=True) - apt_install('neutron-dhcp-agent', fatal=True) + if config('enable-local-dhcp-and-metadata'): + apt_install(['neutron-metadata-agent', 'neutron-dhcp-agent'] fatal=True) secret = get_shared_secret() if enable_metadata() else None rel_data = { 'metadata-shared-secret': secret, diff --git a/hooks/neutron_ovs_utils.py b/hooks/neutron_ovs_utils.py index 1e98c397..8ab4ad35 100644 --- a/hooks/neutron_ovs_utils.py +++ b/hooks/neutron_ovs_utils.py @@ -231,7 +231,7 @@ def use_dvr(): def enable_metadata(): - return use_dvr() or config('enable-metadata') + return use_dvr() or config('enable-local-dhcp-and-metadata') def git_install(projects_yaml):