File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -420,6 +420,36 @@ def test_other(self):
420420
421421 self .assertEqualConfig (o .intermediate_data ['netconf' ], expected )
422422
423+ def test_dhcp (self ):
424+ o = self .backend ({
425+ 'interfaces' : [
426+ {
427+ 'name' : 'eth0' ,
428+ 'type' : 'ethernet' ,
429+ 'addresses' : [
430+ {
431+ 'proto' : 'dhcp' ,
432+ 'family' : 'ipv4' ,
433+ },
434+ ]
435+ },
436+ ],
437+ })
438+ o .to_intermediate ()
439+ expected = [
440+ {
441+ '1.autoip.status' : 'enabled' ,
442+ '1.autoneg' : 'enabled' ,
443+ '1.devname' : 'eth0' ,
444+ '1.flowcontrol.rx.status' : 'enabled' ,
445+ '1.flowcontrol.tx.status' : 'enabled' ,
446+ '1.mtu' : 1500 ,
447+ '1.status' : 'enabled' ,
448+ '1.up' : 'enabled' ,
449+ },
450+ ]
451+ self .assertEqualConfig (o .intermediate_data ['netconf' ], expected )
452+
423453 def test_more_interfaces (self ):
424454 o = self .backend ({
425455 'interfaces' : [
You can’t perform that action at this time.
0 commit comments