File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/sonic-config-engine/tests Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import os
22import subprocess
3- import ipaddress
3+ import ipaddr as ipaddress
44
55import tests .common_utils as utils
66
@@ -181,12 +181,12 @@ def test_parse_device_desc_xml_mgmt_interface(self):
181181 self .assertEqual (len (mgmt_intf .keys ()), 2 )
182182 self .assertTrue (('eth0' , '10.0.0.100/24' ) in mgmt_intf .keys ())
183183 self .assertTrue (('eth0' , 'FC00:1::32/64' ) in mgmt_intf .keys ())
184- self .assertTrue (ipaddress .ip_address ( u '10.0.0.1' ) == mgmt_intf [('eth0' , '10.0.0.100/24' )]['gwaddr' ])
185- self .assertTrue (ipaddress .ip_address ( u 'fc00:1::1' ) == mgmt_intf [('eth0' , 'FC00:1::32/64' )]['gwaddr' ])
184+ self .assertTrue (ipaddress .IPAddress ( '10.0.0.1' ) == mgmt_intf [('eth0' , '10.0.0.100/24' )]['gwaddr' ])
185+ self .assertTrue (ipaddress .IPAddress ( 'fc00:1::1' ) == mgmt_intf [('eth0' , 'FC00:1::32/64' )]['gwaddr' ])
186186
187187 # Special device_desc.xml with IPv6 mgmt address only
188188 result = minigraph .parse_device_desc_xml (self .sample_simple_device_desc_ipv6_only )
189189 mgmt_intf = result ['MGMT_INTERFACE' ]
190190 self .assertEqual (len (mgmt_intf .keys ()), 1 )
191191 self .assertTrue (('eth0' , 'FC00:1::32/64' ) in mgmt_intf .keys ())
192- self .assertTrue (ipaddress .ip_address ( u 'fc00:1::1' ) == mgmt_intf [('eth0' , 'FC00:1::32/64' )]['gwaddr' ])
192+ self .assertTrue (ipaddress .IPAddress ( 'fc00:1::1' ) == mgmt_intf [('eth0' , 'FC00:1::32/64' )]['gwaddr' ])
You can’t perform that action at this time.
0 commit comments