Commit Graph

8 Commits

Author SHA1 Message Date
Sean McGinnis 1f2b0ed263
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I1e30d77b7ca98c08ec8c42a18df863b202525418
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-28 07:46:23 -05:00
mpardhi23 ceef78a938 Take Lifecycle Controller out of recovery mode
This patch is to check if a node is in recovery mode and take it
out of recovery mode by setting LifecycleControllerState attribute
value to 'Enabled'.

Modified list_lifecycle_settings() method to use
utils.list_settings() for retrieving lifecycle settings.

Change-Id: I4287f317b2413b70cd00fd4cf8aa69bff6ae5e2f
2019-06-17 04:52:24 -04:00
Richard Pioso 38d863e489 Simplify get Lifecycle Controller version
A Dell technical white paper [0], "Lifecycle Controller Integration --
Best Practices Guide", describes how to determine the Lifecycle
Controller version. See section 31.4, "Check Version of Lifecycle
Controller (LC)". It simply enumerates the DCIM_SystemView class. No
filter query is used to limit the items returned. And notably, that use
case does not require the LC remote service to be in a "ready" state.

That use case is implemented by the
dracclient.resource.lifecycle_controller.LifecycleControllerManagement.get_version()
method. It has used a filter query and waited for the integrated Dell
Remote Access Controller (iDRAC) to be ready. To align it with best
practices, this patch eliminates its use of a filter query and wait for
the iDRAC.

[0]
http://en.community.dell.com/techcenter/extras/m/white_papers/20442332

Change-Id: I9a499522b59f18282fc9a57227570f54e46dfd3e
Closes-Bug: #1697558
2017-07-27 10:37:20 -04:00
Richard Pioso 3207d9e1bc Enumerate operations can wait until iDRAC is ready
Web Services Management (WS-Management and WS-Man) Enumerate operations
can fail or return invalid results when issued to an integrated Dell
Remote Access Controller (iDRAC) whose Lifecycle Controller remote
service is not "ready". The following are examples of failures which
have been observed:

+ The result of Enumerate is an error.
+ Enumerate succeeds, but no items are returned when they are known to
exist.
+ Enumerate succeeds, but items for all those known to exist are not
returned.

A Dell technical white paper [0], "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.

This patch defines a new method in class dracclient.client.WSManClient,
enumerate(). It extends its base class's implementation by adding a new
parameter that indicates whether or not it should wait until the iDRAC
is ready to accept commands before issuing the Enumerate command. When
it is true, that method waits until the iDRAC is ready before issuing
the command. Since almost all Enumerate operations require the iDRAC to
be ready, the new parameter's default value is 'True'.

[0]
http://en.community.dell.com/techcenter/extras/m/white_papers/20442332

Change-Id: Ied659a4ee45b1dd55cd3a420301d866d52c838fb
Partial-Bug: #1697558
Related-Bug: #1691808
2017-07-25 17:27:42 -04:00
Richard Pioso 10df06f6c3 Refactor iDRAC is ready functionality
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
Invoke operations.

A Dell technical white paper [0], "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
remote service. A project commit [1] implements that.

This refactors that patch in preparation for changing the internal
implementation of the project's APIs so that they follow that best
practice. The implementation of is_idrac_ready() and
wait_until_idrac_is_ready() have been relocated further down the call
stack, to the iDRAC specialization of the WS-Man client defined by class
dracclient.client.WSManClient. Those methods continue to be available
through the API provided by class dracclient.client.Client.

No changes have been made to this project's APIs nor to any functional
behavior.

[0]
http://en.community.dell.com/techcenter/extras/m/white_papers/20442332
[1]
39253bb272

Change-Id: I87996bbca129995f6c84848ebdb0c33cfedeea53
Partial-Bug: #1697558
Related-Bug: #1691808
2017-07-10 20:55:17 -04:00
Christopher Dearborn 39253bb272 Added ability to determine if an iDRAC is ready
This patch adds the ability to determine if an iDRAC is ready to accept
commands.

Change-Id: I929deada3dda7b09a6f29033fff89d9b0382aef8
Partial-Bug: 1691808
2017-05-30 16:42:02 -04:00
Anish Bhatt 15b1c2a32f Add support for idrac_card and lifecycle_controller attributes
Change-Id: I305976e639a406de19f23dcfb5207a25c6c311ba
2017-02-14 09:47:04 -08:00
Imre Farkas 4878147fd1 Split tests to based on modules
Change-Id: I26d624882695e9639b28ef8ab769c9cf64c62be4
2016-08-10 10:48:37 +02:00