mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-02 15:36:05 +00:00
Do not set an indicator the platform does not have
Reading the identify state says plainly when a platform describes no indicator, but writing it went ahead and patched IndicatorLED regardless. This bmc has neither that property nor the boolean that replaced it, and answered the write with an internal service error, which reached the user as one and the log as a traceback. Ask the same question the read asks. With neither property present there is nothing to write, so say so in the same words instead of finding out from the bmc.
This commit is contained in:
@@ -897,6 +897,13 @@ class Command(object):
|
||||
if not targurl:
|
||||
raise Exception("Unable to identify system url")
|
||||
targinfo = await self._do_web_request(targurl)
|
||||
if ('IndicatorLED' not in targinfo
|
||||
and 'LocationIndicatorActive' not in targinfo):
|
||||
# Reading already knows when there is no indicator to speak of, so
|
||||
# do not go on to write a property the platform never offered and
|
||||
# let it answer with whatever it makes of that
|
||||
raise exc.UnsupportedFunctionality(
|
||||
'Indicator LED state is not reported by this platform')
|
||||
if ('IndicatorLED' not in targinfo
|
||||
and 'LocationIndicatorActive' in targinfo):
|
||||
# IndicatorLED is deprecated in favour of a boolean, which has no
|
||||
|
||||
Reference in New Issue
Block a user