File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -434,13 +434,13 @@ class SFPShow(object):
434
434
sfp_info_dict = state_db .get_all (self .db .STATE_DB , 'TRANSCEIVER_INFO|{}' .format (interface_name ))
435
435
if sfp_info_dict :
436
436
if sfp_info_dict ['type' ] == RJ45_PORT_TYPE :
437
- output = 'Link Up'
437
+ output = 'Port Up'
438
438
else :
439
439
output = 'Present'
440
440
else :
441
441
# We have to check whether it is an RJ45 port via calling platform API in case it is absent
442
442
if is_rj45_port (interface_name ):
443
- output = 'Link Down'
443
+ output = 'Port Down'
444
444
else :
445
445
output = 'Not present'
446
446
return output
Original file line number Diff line number Diff line change @@ -738,7 +738,7 @@ def presence(port):
738
738
sys .exit (ERROR_NOT_IMPLEMENTED )
739
739
740
740
if is_rj45_port_from_api (logical_port_name ):
741
- status_string = "Link Up" if presence else "Link Down"
741
+ status_string = "Port Up" if presence else "Port Down"
742
742
else :
743
743
status_string = "Present" if presence else "Not present"
744
744
output_table .append ([port_name , status_string ])
Original file line number Diff line number Diff line change @@ -351,31 +351,31 @@ def test_sfp_presence(self):
351
351
result = runner .invoke (show .cli .commands ["interfaces" ].commands ["transceiver" ].commands ["presence" ], ["Ethernet16" ])
352
352
expected = """Port Presence
353
353
---------- ----------
354
- Ethernet16 Link Up
354
+ Ethernet16 Port Up
355
355
"""
356
356
assert result .exit_code == 0
357
357
assert result .output == expected
358
358
359
359
result = runner .invoke (show .cli .commands ["interfaces" ].commands ["transceiver" ].commands ["presence" ], ["Ethernet28" ])
360
360
expected = """Port Presence
361
361
---------- ----------
362
- Ethernet28 Link Up
362
+ Ethernet28 Port Up
363
363
"""
364
364
assert result .exit_code == 0
365
365
assert result .output == expected
366
366
367
367
result = runner .invoke (show .cli .commands ["interfaces" ].commands ["transceiver" ].commands ["presence" ], ["Ethernet29" ])
368
368
expected = """Port Presence
369
369
---------- ----------
370
- Ethernet29 Link Down
370
+ Ethernet29 Port Down
371
371
"""
372
372
assert result .exit_code == 0
373
373
assert result .output == expected
374
374
375
375
result = runner .invoke (show .cli .commands ["interfaces" ].commands ["transceiver" ].commands ["presence" ], ["Ethernet36" ])
376
376
expected = """Port Presence
377
377
---------- ----------
378
- Ethernet36 Link Up
378
+ Ethernet36 Port Up
379
379
"""
380
380
assert result .exit_code == 0
381
381
assert result .output == expected
You can’t perform that action at this time.
0 commit comments