File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ classless-static-route classless_static_route
17
17
default-ttl default_ttl
18
18
dns-server dns_server
19
19
domain-name domain_name
20
+ domain-search domain_search_list
20
21
ethernet-encap ethernet_encap
21
22
ip-forward-enable ip_forward_enable
22
23
lease-time lease_time
@@ -67,6 +68,7 @@ wpad wpad
67
68
59 T2
68
69
66 tftp_server
69
70
67 bootfile_name
71
+ 119 domain_search_list
70
72
121 classless_static_route
71
73
150 tftp_server_address
72
74
210 path_prefix
Original file line number Diff line number Diff line change 110
110
'log-server' : 'log_server' ,
111
111
'lpr-server' : 'lpr_server' ,
112
112
'domain-name' : 'domain_name' ,
113
+ 'domain-search' : 'domain_search_list' ,
113
114
'swap-server' : 'swap_server' ,
114
115
'policy-filter' : 'policy_filter' ,
115
116
'router-solicitation' : 'router_solicitation' ,
160
161
'58' : 'T1' ,
161
162
'59' : 'T2' ,
162
163
'67' : 'bootfile_name' ,
164
+ '119' : 'domain_search_list' ,
163
165
'252' : 'wpad' ,
164
166
'210' : 'path_prefix' ,
165
167
'150' : 'tftp_server_address' },
176
178
# OVN string type DHCP options
177
179
OVN_STR_TYPE_DHCP_OPTS = [
178
180
'domain_name' ,
181
+ 'domain_search_list' ,
179
182
'bootfile_name' ,
180
183
'path_prefix' ,
181
184
'wpad' ,
Original file line number Diff line number Diff line change @@ -372,6 +372,20 @@ def test_get_lsp_dhcp_opts(self):
372
372
'bootfile_name' : '"homer_simpson.bin"' }
373
373
self .assertEqual (expected_options , options )
374
374
375
+ def test_get_lsp_dhcp_opts_for_domain_search (self ):
376
+ opt = {'opt_name' : 'domain-search' ,
377
+ 'opt_value' : 'openstack.org,ovn.org' ,
378
+ 'ip_version' : 4 }
379
+ port = {portbindings .VNIC_TYPE : portbindings .VNIC_NORMAL ,
380
+ edo_ext .EXTRADHCPOPTS : [opt ]}
381
+
382
+ dhcp_disabled , options = utils .get_lsp_dhcp_opts (port , 4 )
383
+ self .assertFalse (dhcp_disabled )
384
+ # Assert option got translated to "domain_search_list" and
385
+ # the value is a string (double-quoted)
386
+ expected_options = {'domain_search_list' : '"openstack.org,ovn.org"' }
387
+ self .assertEqual (expected_options , options )
388
+
375
389
376
390
class TestGetDhcpDnsServers (base .BaseTestCase ):
377
391
You can’t perform that action at this time.
0 commit comments