Merge "Deprecate System-specific `IndicatorLED` state constants"

This commit is contained in:
Zuul 2019-04-17 09:53:58 +00:00 committed by Gerrit Code Review
commit 933a70beed
3 changed files with 26 additions and 5 deletions

View File

@ -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.

View File

@ -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

View File

@ -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)