File tree Expand file tree Collapse file tree 3 files changed +23
-31
lines changed Expand file tree Collapse file tree 3 files changed +23
-31
lines changed Original file line number Diff line number Diff line change 1355
1355
"vni" : " 200" ,
1356
1356
"vlan" : " Vlan200"
1357
1357
},
1358
+ "VRF|Vrf1" : {
1359
+ "fallback" : " false" ,
1360
+ "vni" : " 1000"
1361
+ },
1358
1362
"BUFFER_POOL|egress_lossless_pool" : {
1359
1363
"mode" : " dynamic" ,
1360
1364
"size" : " 13945824" ,
Original file line number Diff line number Diff line change 31
31
32
32
"""
33
33
34
+ show_vxlan_vrfvnimap_output = """\
35
+ +-------+-------+
36
+ | VRF | VNI |
37
+ +=======+=======+
38
+ | Vrf1 | 1000 |
39
+ +-------+-------+
40
+ Total count : 1
41
+
42
+ """
43
+
44
+
34
45
show_vxlan_tunnel_output = """\
35
46
+---------+-------------+-------------------+--------------+
36
47
| SIP | DIP | Creation Source | OperStatus |
@@ -110,6 +121,14 @@ def test_show_vxlan_vlanvnimap(self):
110
121
assert result .exit_code == 0
111
122
assert result .output == show_vxlan_vlanvnimap_output
112
123
124
+ def test_show_vxlan_vrfvnimap (self ):
125
+ runner = CliRunner ()
126
+ result = runner .invoke (show .cli .commands ["vxlan" ].commands ["vrfvnimap" ], [])
127
+ print (result .exit_code )
128
+ print (result .output )
129
+ assert result .exit_code == 0
130
+ assert result .output == show_vxlan_vrfvnimap_output
131
+
113
132
def test_show_vxlan_tunnel (self ):
114
133
runner = CliRunner ()
115
134
result = runner .invoke (show .cli .commands ["vxlan" ].commands ["remotevtep" ], [])
Original file line number Diff line number Diff line change @@ -301,37 +301,6 @@ def is_port_mirror_dst_port(config_db, port):
301
301
302
302
return False
303
303
304
- #
305
- # Use this method to validate unicast IPv4 address
306
- #
307
- def is_ip4_addr_valid (addr , display ):
308
- v4_invalid_list = [ipaddress .IPv4Address (unicode ('0.0.0.0' )), ipaddress .IPv4Address (unicode ('255.255.255.255' ))]
309
- try :
310
- ip = ipaddress .ip_address (unicode (addr ))
311
- if (ip .version == 4 ):
312
- if (ip .is_reserved ):
313
- if display :
314
- click .echo ("{} Not Valid, Reason: IPv4 reserved address range." .format (addr ))
315
- return False
316
- elif (ip .is_multicast ):
317
- if display :
318
- click .echo ("{} Not Valid, Reason: IPv4 Multicast address range." .format (addr ))
319
- return False
320
- elif (ip in v4_invalid_list ):
321
- if display :
322
- click .echo ("{} Not Valid." .format (addr ))
323
- return False
324
- else :
325
- return True
326
-
327
- else :
328
- if display :
329
- click .echo ("{} Not Valid, Reason: Not an IPv4 address" .format (addr ))
330
- return False
331
-
332
- except ValueError :
333
- return False
334
-
335
304
def vni_id_is_valid (vni ):
336
305
"""Check if the vni id is in acceptable range (between 1 and 2^24)
337
306
"""
You can’t perform that action at this time.
0 commit comments