NSX|V: Support tftp-server dhcp option
The DHCP option tftp-server-name is referred to upstream as tftp-server. This patch supports both names as the same backend option. Change-Id: Ied936532eafadcd11cb83c51d456509f9d5eedd6
This commit is contained in:
parent
2d19a0d927
commit
b754e5ffd5
@ -78,6 +78,7 @@ SUPPORTED_DHCP_OPTIONS = {
|
|||||||
'bootfile-name': 'option67',
|
'bootfile-name': 'option67',
|
||||||
'classless-static-route': 'option121',
|
'classless-static-route': 'option121',
|
||||||
'tftp-server-address': 'option150',
|
'tftp-server-address': 'option150',
|
||||||
|
'tftp-server': 'option150',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -942,7 +942,8 @@ class EdgeManager(object):
|
|||||||
net, ip = opt_val.split(',')
|
net, ip = opt_val.split(',')
|
||||||
opt121['staticRoutes'].append({'destinationSubnet': net,
|
opt121['staticRoutes'].append({'destinationSubnet': net,
|
||||||
'router': ip})
|
'router': ip})
|
||||||
elif opt_name == 'tftp-server-address':
|
elif (opt_name == 'tftp-server-address' or
|
||||||
|
opt_name == 'tftp-server'):
|
||||||
if 'option150' not in static_config['dhcpOptions']:
|
if 'option150' not in static_config['dhcpOptions']:
|
||||||
static_config['dhcpOptions']['option150'] = {
|
static_config['dhcpOptions']['option150'] = {
|
||||||
'tftpServers': []}
|
'tftpServers': []}
|
||||||
|
@ -5506,7 +5506,7 @@ class DHCPOptsTestCase(test_dhcpopts.TestExtraDhcpOpt,
|
|||||||
|
|
||||||
def test_update_port_with_blank_string_extradhcpopt(self):
|
def test_update_port_with_blank_string_extradhcpopt(self):
|
||||||
opt_list = [{'opt_name': 'bootfile-name', 'opt_value': 'pxelinux.0'},
|
opt_list = [{'opt_name': 'bootfile-name', 'opt_value': 'pxelinux.0'},
|
||||||
{'opt_name': 'tftp-server-address',
|
{'opt_name': 'tftp-server',
|
||||||
'opt_value': '123.123.123.123'}]
|
'opt_value': '123.123.123.123'}]
|
||||||
upd_opts = [{'opt_name': 'bootfile-name', 'opt_value': ' '}]
|
upd_opts = [{'opt_name': 'bootfile-name', 'opt_value': ' '}]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user