File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -546,6 +546,33 @@ def get_status_led(self):
546546 """
547547 raise NotImplementedError
548548
549+ ##############################################
550+ # System LED methods
551+ ##############################################
552+
553+ def set_uid_led (self , color ):
554+ """
555+ Sets the state of the system UID LED
556+
557+ Args:
558+ color: A string representing the color with which to set the
559+ system UID LED
560+
561+ Returns:
562+ bool: True if system LED state is set successfully, False if not
563+ """
564+ raise NotImplementedError
565+
566+ def get_uid_led (self ):
567+ """
568+ Gets the state of the system UID LED
569+
570+ Returns:
571+ A string, one of the valid LED color strings which could be vendor
572+ specified.
573+ """
574+ raise NotImplementedError
575+
549576 ##############################################
550577 # Other methods
551578 ##############################################
Original file line number Diff line number Diff line change @@ -16,3 +16,21 @@ def test_reboot_cause(self):
1616 assert (chassis .REBOOT_CAUSE_HARDWARE_BUTTON == "Push button" )
1717 assert (chassis .REBOOT_CAUSE_HARDWARE_RESET_FROM_ASIC == "Reset from ASIC" )
1818 assert (chassis .REBOOT_CAUSE_NON_HARDWARE == "Non-Hardware" )
19+
20+ def test_chassis_base (self ):
21+ chassis = ChassisBase ()
22+ not_implemented_methods = [
23+ [chassis .get_uid_led ],
24+ [chassis .set_uid_led , "COLOR" ],
25+ ]
26+
27+ for method in not_implemented_methods :
28+ exception_raised = False
29+ try :
30+ func = method [0 ]
31+ args = method [1 :]
32+ func (* args )
33+ except NotImplementedError :
34+ exception_raised = True
35+
36+ assert exception_raised
You can’t perform that action at this time.
0 commit comments