Check LCStatus instead of MessageID to determine if an iDRAC is ready

We are currently checking the MessageID to determine if an iDRAC
is ready. This patch is to check the value of LCStatus instead of
MessageID. If the value of LCStatus is "0", then the iDRAC is
considered ready.

Change-Id: I3426c226c4bb3cdcc95b98e9b203f100bb6777d5
This commit is contained in:
mpardhi23 2019-05-14 07:53:31 -04:00 committed by Monica Pardhi
parent a34705b1bb
commit bcce3bdc6b

View File

@ -33,7 +33,7 @@ from dracclient.resources import uris
from dracclient import utils
from dracclient import wsman
IDRAC_IS_READY = "LC061"
IDRAC_IS_READY = "0"
LOG = logging.getLogger(__name__)
@ -1231,11 +1231,11 @@ class WSManClient(wsman.Client):
expected_return_value=utils.RET_SUCCESS,
wait_for_idrac=False)
message_id = utils.find_xml(result,
'MessageID',
uris.DCIM_LCService).text
lc_status = utils.find_xml(result,
'LCStatus',
uris.DCIM_LCService).text
return message_id == IDRAC_IS_READY
return lc_status == IDRAC_IS_READY
def wait_until_idrac_is_ready(self, retries=None, retry_delay=None):
"""Waits until the iDRAC is in a ready state