Deprecate System-specific `IndicatorLED` state constants

Change-Id: Ib4ccad20dc49e0b33a1d2b1ea24b6c8f989222a3
Story: 2005342
Task: 30290
This commit is contained in:
Ilya Etingof 2019-04-15 17:54:19 +02:00
parent 9a138d4ec9
commit f2cf60f3ce
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

@ -52,7 +52,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)