diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-01-03 21:24:55 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-01-03 21:24:55 +0000 |
commit | d929214c7a904da57a406dd56ac06f001fdc7d7b (patch) | |
tree | ccaf54bc78ee4c3df18acd320a5121bb2104a616 /os_net_config/impl_ifcfg.py | |
parent | d621022954195049c96b19064f2eddd46ec95fe4 (diff) | |
parent | 433a0f3cbe59fd5da183245bf7e6dcd4af4b8c88 (diff) |
Merge "Add support for enabling hotplug on interfaces"
Diffstat (limited to 'os_net_config/impl_ifcfg.py')
-rw-r--r-- | os_net_config/impl_ifcfg.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/os_net_config/impl_ifcfg.py b/os_net_config/impl_ifcfg.py index 41d5f8c..bcfc4dc 100644 --- a/os_net_config/impl_ifcfg.py +++ b/os_net_config/impl_ifcfg.py @@ -131,7 +131,10 @@ class IfcfgNetConfig(os_net_config.NetConfig): data = "# This file is autogenerated by os-net-config\n" data += "DEVICE=%s\n" % base_opt.name data += "ONBOOT=yes\n" - data += "HOTPLUG=no\n" + if isinstance(base_opt, objects.Interface) and base_opt.hotplug: + data += "HOTPLUG=yes\n" + else: + data += "HOTPLUG=no\n" data += "NM_CONTROLLED=no\n" if not base_opt.dns_servers and not base_opt.use_dhcp: data += "PEERDNS=no\n" |