From cb578ed9b94ff9a34b41d91ada94e3375436b60c Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Wed, 1 Jul 2015 17:18:49 -0400 Subject: Add support for dhclient_args This patch adds an optional flag that can be used to pass in args for dhclient when using DHCP. This use case for this is to be able to control which DHCP options dhclient listens for and we can thus disable specific options (like routing) for some network configurations. Change-Id: Ic21de0615ea0ef304843c55cc5abe43cb1771169 --- os_net_config/impl_ifcfg.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'os_net_config/impl_ifcfg.py') diff --git a/os_net_config/impl_ifcfg.py b/os_net_config/impl_ifcfg.py index daadd52..0fe8cc5 100644 --- a/os_net_config/impl_ifcfg.py +++ b/os_net_config/impl_ifcfg.py @@ -155,6 +155,8 @@ class IfcfgNetConfig(os_net_config.NetConfig): data += "OVS_EXTRA=\"%s\"\n" % " -- ".join(ovs_extra) if not base_opt.defroute: data += "DEFROUTE=no\n" + if base_opt.dhclient_args: + data += "DHCLIENTARGS=%s\n" % base_opt.dhclient_args return data def _add_routes(self, interface_name, routes=[]): -- cgit 1.2.3-korg