@@ -66,19 +66,19 @@ def cli(self, output=None):
66
66
# Interface GigabitEthernet0/5 "", is administratively down, line protocol is up
67
67
# Interface "nlp_int_tap", is up, line protocol is up
68
68
p1 = re .compile (r'^Interface +((?P<interface>\S+) +)?"(?P<name>\S*)", +is +'
69
- '(?P<link_status>[\w\s]+), +line +protocol +is +(?P<line_protocol>\w+)$' )
69
+ r '(?P<link_status>[\w\s]+), +line +protocol +is +(?P<line_protocol>\w+)$' )
70
70
71
71
# MAC address aa11.bbff.ee55, MTU 1500
72
72
p2 = re .compile (r'^MAC address +(?P<mac_address>[\w\.]+), +MTU +(?P<mtu>\d+)$' )
73
73
74
74
# IP address 10.10.10.1, subnet mask 255.255.255.0
75
75
p3 = re .compile (r'^IP +address +(?P<ip>[a-z0-9\.]+)'
76
- '(\/(?P<prefix_length>[0-9]+))?, +subnet +mask '
77
- '+(?P<subnet>[\w\.]+)$' )
76
+ r '(\/(?P<prefix_length>[0-9]+))?, +subnet +mask '
77
+ r '+(?P<subnet>[\w\.]+)$' )
78
78
79
79
# Available but not configured via nameif
80
80
p4 = re .compile (r'^(?P<interface_state>Available) +but +'
81
- '(?P<config_status>not +configured) +via +(?P<config_issue>\S*)$' )
81
+ r '(?P<config_status>not +configured) +via +(?P<config_issue>\S*)$' )
82
82
83
83
for line in output .splitlines ():
84
84
line = line .strip ()
@@ -328,27 +328,27 @@ def cli(self, output=None):
328
328
329
329
# Interface Vlan300 "admin-out", is up, line protocol is up
330
330
p1 = re .compile (r'^Interface +(?P<interface>\S+) +"(?P<name>\S*)", +is +'
331
- '(?P<link_status>[\w\s]+), +line +protocol +is +(?P<line_protocol>\w+)$' )
331
+ r '(?P<link_status>[\w\s]+), +line +protocol +is +(?P<line_protocol>\w+)$' )
332
332
333
333
# MAC address aa11.bbff.ee55, MTU 1500
334
334
p2 = re .compile (r'^MAC address +(?P<mac_address>[\w\.]+), +MTU +(?P<mtu>\d+)$' )
335
335
336
336
# IP address 10.10.10.1, subnet mask 255.255.255.0
337
337
p3 = re .compile (r'^IP +address +(?P<ip>[a-z0-9\.]+)'
338
- '(\/(?P<prefix_length>[0-9]+))?, +subnet +mask '
339
- '+(?P<subnet>[\w\.]+)$' )
338
+ r '(\/(?P<prefix_length>[0-9]+))?, +subnet +mask '
339
+ r '+(?P<subnet>[\w\.]+)$' )
340
340
341
341
# Available but not configured via nameif
342
342
p4 = re .compile (r'^(?P<interface_state>Available) +but +'
343
- '(?P<config_status>not +configured) +via +(?P<config_issue>\S*)$' )
343
+ r '(?P<config_status>not +configured) +via +(?P<config_issue>\S*)$' )
344
344
345
345
# 889007666 packets input, 785740327549 bytes
346
346
p5 = re .compile (r'^(?P<packets_input>\d+) +packets +input, '
347
- '+(?P<bytes_input>[\d]+) +bytes$' )
347
+ r '+(?P<bytes_input>[\d]+) +bytes$' )
348
348
349
349
# 621453837 packets output, 428046938178 bytes
350
350
p6 = re .compile (r'^(?P<packets_output>\d+) +packets +output, '
351
- '+(?P<bytes_output>[\d]+) +bytes$' )
351
+ r '+(?P<bytes_output>[\d]+) +bytes$' )
352
352
353
353
# 2988535 packets dropped
354
354
p7 = re .compile (r'^(?P<packets_dropped>\d+) +packets +dropped$' )
@@ -359,7 +359,7 @@ def cli(self, output=None):
359
359
# Interface config status is active
360
360
# Interface config status is not active
361
361
p9 = re .compile (r'^Interface +config +status +is '
362
- '+(?P<interface_config_status>[\S\s]+)$' )
362
+ r '+(?P<interface_config_status>[\S\s]+)$' )
363
363
364
364
# Interface state is active
365
365
# Interface state is not active
@@ -368,12 +368,12 @@ def cli(self, output=None):
368
368
# Interface vlan config status is active
369
369
# Interface vlan config status is not active
370
370
p11 = re .compile (r'^Interface +vlan +config +status +is '
371
- '+(?P<interface_vlan_config_status>[\S\s]+)$' )
371
+ r '+(?P<interface_vlan_config_status>[\S\s]+)$' )
372
372
373
373
# Interface vlan state is UP
374
374
# Interface vlan state is DOWN (down in system space)
375
375
p12 = re .compile (r'^Interface +vlan +state +is +'
376
- '(?P<interface_vlan_state>\w+)+([\S\s]+)?$' )
376
+ r '(?P<interface_vlan_state>\w+)+([\S\s]+)?$' )
377
377
378
378
for line in out .splitlines ():
379
379
line = line .strip ()
0 commit comments