diff --git a/releasenotes/notes/deprecate-system-leds-f1a72422c53d281e.yaml b/releasenotes/notes/deprecate-system-leds-f1a72422c53d281e.yaml new file mode 100644 index 00000000..1cdef5d1 --- /dev/null +++ b/releasenotes/notes/deprecate-system-leds-f1a72422c53d281e.yaml @@ -0,0 +1,9 @@ +--- +deprecations: + - | + Deprecates system-specific indicator LEDs as redundant. + The ``SYSTEM_INDICATOR_LED_LIT``, ``SYSTEM_INDICATOR_LED_BLINKING``, + ``SYSTEM_INDICATOR_LED_OFF`` and ``SYSTEM_INDICATOR_LED_UNKNOWN`` constants + should not be used. Generic indicator LED constants should be used instead. + Those are ``INDICATOR_LED_LIT``, ``INDICATOR_LED_BLINKING``, + ``INDICATOR_LED_OFF`` and ``INDICATOR_LED_UNKNOWN`` respectively. diff --git a/sushy/resources/system/constants.py b/sushy/resources/system/constants.py index 13eb868b..26c3866d 100644 --- a/sushy/resources/system/constants.py +++ b/sushy/resources/system/constants.py @@ -49,16 +49,28 @@ SYSTEM_POWER_STATE_POWERING_OFF = res_cons.POWER_STATE_POWERING_OFF # Indicator LED Constants SYSTEM_INDICATOR_LED_LIT = res_cons.INDICATOR_LED_LIT -"""The Indicator LED is lit""" +"""The Indicator LED is lit + +Deprecated: Use `sushy.resources.constants.INDICATOR_LED_LIT`. +""" SYSTEM_INDICATOR_LED_BLINKING = res_cons.INDICATOR_LED_BLINKING -"""The Indicator LED is blinking""" +"""The Indicator LED is blinking + +Deprecated: Use `sushy.resources.constants.INDICATOR_LED_BLINKING`. +""" SYSTEM_INDICATOR_LED_OFF = res_cons.INDICATOR_LED_OFF -"""The Indicator LED is off""" +"""The Indicator LED is off + +Deprecated: Use `sushy.resources.constants.INDICATOR_LED_OFF`. +""" SYSTEM_INDICATOR_LED_UNKNOWN = res_cons.INDICATOR_LED_UNKNOWN -"""The state of the Indicator LED cannot be determine""" +"""The state of the Indicator LED cannot be determine + +Deprecated: Use `sushy.resources.constants.INDICATOR_LED_UNKNOWN`. +""" # Boot source target constants diff --git a/sushy/tests/unit/resources/system/test_system.py b/sushy/tests/unit/resources/system/test_system.py index 02f0457b..63fffe28 100644 --- a/sushy/tests/unit/resources/system/test_system.py +++ b/sushy/tests/unit/resources/system/test_system.py @@ -53,7 +53,7 @@ class SystemTestCase(base.TestCase): self.assertEqual('Web Front End node', self.sys_inst.description) self.assertEqual('web483', self.sys_inst.hostname) self.assertEqual('437XR1138R2', self.sys_inst.identity) - self.assertEqual(sushy.SYSTEM_INDICATOR_LED_OFF, + self.assertEqual(sushy.INDICATOR_LED_OFF, self.sys_inst.indicator_led) self.assertEqual('Contoso', self.sys_inst.manufacturer) self.assertEqual('WebFrontEnd483', self.sys_inst.name)