@@ -54,11 +54,11 @@ def test_add_del_interface_valid_ipv4(self):
54
54
assert result .exit_code == 0
55
55
assert ('Ethernet0.10' , '10.11.10.1/24' ) in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
56
56
57
- # config int ip add Eth32 .10 32.11.10.1/24
58
- result = runner .invoke (config .config .commands ["interface" ].commands ["ip" ].commands ["add" ], ["Eth32 .10" , "32.11.10.1/24" ], obj = obj )
57
+ # config int ip add Eth36 .10 32.11.10.1/24
58
+ result = runner .invoke (config .config .commands ["interface" ].commands ["ip" ].commands ["add" ], ["Eth36 .10" , "32.11.10.1/24" ], obj = obj )
59
59
print (result .exit_code , result .output )
60
60
assert result .exit_code == 0
61
- assert ('Eth32 .10' , '32.11.10.1/24' ) in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
61
+ assert ('Eth36 .10' , '32.11.10.1/24' ) in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
62
62
63
63
# config int ip remove Ethernet64 10.10.10.1/24
64
64
result = runner .invoke (config .config .commands ["interface" ].commands ["ip" ].commands ["remove" ], ["Ethernet64" , "10.10.10.1/24" ], obj = obj )
@@ -72,11 +72,11 @@ def test_add_del_interface_valid_ipv4(self):
72
72
assert result .exit_code != 0
73
73
assert ('Ethernet0.10' , '10.11.10.1/24' ) not in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
74
74
75
- # config int ip remove Eth32 .10 32.11.10.1/24
76
- result = runner .invoke (config .config .commands ["interface" ].commands ["ip" ].commands ["remove" ], ["Eth32 .10" , "32.11.10.1/24" ], obj = obj )
75
+ # config int ip remove Eth36 .10 32.11.10.1/24
76
+ result = runner .invoke (config .config .commands ["interface" ].commands ["ip" ].commands ["remove" ], ["Eth36 .10" , "32.11.10.1/24" ], obj = obj )
77
77
print (result .exit_code , result .output )
78
78
assert result .exit_code != 0
79
- assert ('Eth32 .10' , '32.11.10.1/24' ) not in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
79
+ assert ('Eth36 .10' , '32.11.10.1/24' ) not in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
80
80
81
81
def test_add_interface_invalid_ipv4 (self ):
82
82
db = Db ()
@@ -129,10 +129,10 @@ def test_add_del_interface_valid_ipv6(self):
129
129
assert result .exit_code == 0
130
130
assert ('Ethernet0.10' , '1010:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34' ) in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
131
131
132
- result = runner .invoke (config .config .commands ["interface" ].commands ["ip" ].commands ["add" ], ["Eth32 .10" , "3210:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34" ], obj = obj )
132
+ result = runner .invoke (config .config .commands ["interface" ].commands ["ip" ].commands ["add" ], ["Eth36 .10" , "3210:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34" ], obj = obj )
133
133
print (result .exit_code , result .output )
134
134
assert result .exit_code == 0
135
- assert ('Eth32 .10' , '3210:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34' ) in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
135
+ assert ('Eth36 .10' , '3210:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34' ) in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
136
136
137
137
# config int ip remove Ethernet72 2001:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34
138
138
result = runner .invoke (config .config .commands ["interface" ].commands ["ip" ].commands ["remove" ], ["Ethernet72" , "2001:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34" ], obj = obj )
@@ -145,10 +145,10 @@ def test_add_del_interface_valid_ipv6(self):
145
145
assert result .exit_code != 0
146
146
assert ('Ethernet0.10' , '1010:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34' ) not in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
147
147
148
- result = runner .invoke (config .config .commands ["interface" ].commands ["ip" ].commands ["remove" ], ["Eth32 .10" , "3210:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34" ], obj = obj )
148
+ result = runner .invoke (config .config .commands ["interface" ].commands ["ip" ].commands ["remove" ], ["Eth36 .10" , "3210:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34" ], obj = obj )
149
149
print (result .exit_code , result .output )
150
150
assert result .exit_code != 0
151
- assert ('Eth32 .10' , '3210:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34' ) not in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
151
+ assert ('Eth36 .10' , '3210:1db8:11a3:19d7:1f34:8a2e:17a0:765d/34' ) not in db .cfgdb .get_table ('VLAN_SUB_INTERFACE' )
152
152
153
153
def test_del_interface_case_sensitive_ipv6 (self ):
154
154
db = Db ()
0 commit comments