From 7c82107f0aaee3e8624e3b3baddfe09b96b9d804 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Thu, 16 May 2013 11:44:06 +0000 Subject: [PATCH] Enable quantum-netns-cleanup to receive force as cli parameter Fixes bug 1180767 Change-Id: Icd58fbe995129806426b70ea54d98f213988dbe5 --- quantum/agent/netns_cleanup_util.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/quantum/agent/netns_cleanup_util.py b/quantum/agent/netns_cleanup_util.py index 66c7491868b..81c81b1c071 100644 --- a/quantum/agent/netns_cleanup_util.py +++ b/quantum/agent/netns_cleanup_util.py @@ -56,16 +56,20 @@ def setup_conf(): from the main config that do not apply during clean-up. """ - opts = [ - cfg.StrOpt('dhcp_driver', - default='quantum.agent.linux.dhcp.Dnsmasq', - help=_("The driver used to manage the DHCP server.")), + cli_opts = [ cfg.BoolOpt('force', default=False, help=_('Delete the namespace by removing all devices.')), ] + opts = [ + cfg.StrOpt('dhcp_driver', + default='quantum.agent.linux.dhcp.Dnsmasq', + help=_("The driver used to manage the DHCP server.")), + ] + conf = cfg.CONF + conf.register_cli_opts(cli_opts) conf.register_opts(opts) agent_config.register_root_helper(conf) conf.register_opts(dhcp.OPTS)