When an enumerate is done, it is possible that the iDRAC may return
invalid UTF8 that contains non-ASCII characters. This causes an
XMLSyntaxError to be thrown. This fix detects that situation and
filters out all non-ASCII characters to bypass the error.
See the following bug for further details:
Web Services Management (WS-Management and WS-Man) requests/commands can
fail or return invalid results when issued to an integrated Dell Remote
Access Controller (iDRAC) whose Lifecycle Controller remote service is
not "ready". Specifically, that applies to the WS-Man Enumerate and
A Dell technical white paper , "Lifecycle Controller Integration --
Best Practices Guide", states that for Lifecycle Controller firmware
1.5.0 and later "The Lifecycle Controller remote service must be in a
'ready' state before running any other WSMAN commands." That applies to
almost all of the workflows and use cases documented by that paper and
supported by this project, openstack/python-dracclient. That document
describes how to determine the readiness of the Lifecycle Controller
This patch parameterizes the iDRAC is ready retry behavior at the class
level. That makes it possible for consumers of this project, such as
project openstack/ironic, to configure it library API-wide.
Additionally, this patch improves the names of the parameters to class
__init__() methods that control the retry behavior on SSL errors, so
that they are not confused with those added by this patch. Finally, it
defines constants for the default values of the retry behavior on SSL
errors and iDRAC is ready retry parameters, and utilizes those new
This patch adds retry logic to communication with the iDRAC so that
intermittent SSLErrors or ConnectionErrrors will not cause an immediate
failure of the operation.
When querying an enumeration using the WSMAN enumerate method, not all
entries are returned if there are more than max_elems (default of 100)
in the enumeration.
When querying an enumeration, the first response returns <wsman:Items>
in the body. Successive pulls, however, contain <wsen:Items>.
The old code always queried for <wsen:Items>, which caused the first
batch of attributes to be dropped only when the number of entries in
the enumeration exceeded max_elems.
This patch queries for <wsman:Items> in the first response, and for
<wsen:Items> in successive responses.