diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-08-03 13:51:48 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-08-03 13:51:48 +0200 |
commit | b6dcb0a887a4fab89ca870d6142d6856cccc181f (patch) | |
tree | 32017afade2555e5b3ad16cd0a108d7021bc83bc /python/vyos/ifconfig/interface.py | |
parent | 84331764a81d7e31c5c4dd5466f347054283d377 (diff) | |
download | vyos-1x-b6dcb0a887a4fab89ca870d6142d6856cccc181f.tar.gz vyos-1x-b6dcb0a887a4fab89ca870d6142d6856cccc181f.zip |
ifconfig: T2653: unify DHCPv4 configuration
Pass the interface dictionary transparently to the DHCP module and render the
DHCP client config template directly from the same source instead of transcoding
it once more.
Diffstat (limited to 'python/vyos/ifconfig/interface.py')
-rw-r--r-- | python/vyos/ifconfig/interface.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index f5e43e172..214ece8cd 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -824,15 +824,7 @@ class Interface(Control): # DHCP options if 'dhcp_options' in config: - dhcp_options = config.get('dhcp_options') - if 'client_id' in dhcp_options: - self.dhcp.v4.options['client_id'] = dhcp_options.get('client_id') - - if 'host_name' in dhcp_options: - self.dhcp.v4.options['hostname'] = dhcp_options.get('host_name') - - if 'vendor_class_id' in dhcp_options: - self.dhcp.v4.options['vendor_class_id'] = dhcp_options.get('vendor_class_id') + self.dhcp.v4.options = config # DHCPv6 options if 'dhcpv6_options' in config: |