Commit Graph

89 Commits (b327b0811f412bf022863c01fcadf95759805998)
 

Author SHA1 Message Date
Christopher Dearborn b327b0811f Add ability to set iDRAC card settings
This patch adds the ability to set iDRAC card settings.

Change-Id: I117e5ed0af1469dc316a30abcfa384d3c773ed1f
5 years ago
Christopher Dearborn ee0ca6f1f6 Refactor list_bios_settings and set_bios_settings
This patch factors the code in list_bios_settings and set_bios_settings
out into utility methods that can be used by other code that has the
same functionality.

Change-Id: I310fc0cb1c8372b1391d085078686e616890eb6f
5 years ago
Christopher Dearborn 72ea2323e5 Separate reboot required from commit required
This patch separates indicators for reboot required and commit required.
It does this by adding two new keys (is_reboot_required and
is_commit_required) to the dictionary returned by set/create/modify
operations while continuing to return the commit_required key for
backwards compatibility.

The commit_required key should be considered deprecated at this time and
it will be removed in a future patch.

The is_reboot_required key has an enumerated value that can have three
possible values: true, optional, and false.  This allows the return of
optional for RAID operations that can return this value.

Change-Id: I70e52868f10bfafb30bbb38b85888bc4ec8e65ae
Closes-Bug: 1732549
5 years ago
Jenkins 5e9b27ee97 Merge "Report bus in controllers" 6 years ago
Christopher Dearborn a93954ba34 Report SAS address in physical disks
This patch adds sas_address to the attributes reported for physical
disks.

Change-Id: Ic7046ead0b42c048303fe0e601c5d3e28e8e4216
6 years ago
Christopher Dearborn 4977b154ce Report bus in controllers
This patch adds bus to the attributes reported for controllers.

Change-Id: Id1f444f33862520dfd82d1dc23bf21c2e4e2e386
6 years ago
Christopher Dearborn 8f368ed3e1 Increased is-iDRAC-ready timeout
The current is-iDRAC-ready timeout is set to 24 iterations times a
delay of 10 seconds, or 4 minutes.  This timeout is too short for 12G
and 13G hardware as operations against the iDRAC will frequently
timeout if the iDRAC is not in a ready state.

This patch increases the number of iterations to 48, which bumps the
timeout up to 8 minutes.  This increased timeout is sufficient for the
iDRAC on 14G, 13G, and 12G hardware to become ready and therefore avoid
a timeout exception.

Change-Id: I9dc476d3c28475919404077875f04fd006d4464a
Closes-Bug: 1718277
6 years ago
Christopher Dearborn 8e49089db3 Add "Reboot Failed" as terminal job state for 14G
In the 14G iDRAC 9, "Reboot Failed" has been added as a terminal job
state.  This patch updates the job filter query in list_jobs so that
jobs with a status of "Reboot Failed" will now be considered a finished
job.

Change-Id: Icffb22da37f99f8b24fcab405be196eace436785
Closes-Bug: #1707911
6 years ago
Richard Pioso bcfe996deb Simplify wait_until_idrac_is_ready() calls
This change simplifies the internal calls to
dracclient.client.WSManClient.wait_until_idrac_is_ready() by no longer
passing arguments. That makes the code cleaner and easier to understand.
It contains no functional change.

The arguments no longer need to be passed, because that function's
default parameter values are now None, which means use the values that
were provided when the WSManClient object was created. The default
values provided at creation are equal to the arguments that were being
explicitly passed.

Change-Id: I70237bb9eda49a98c55a452b7f534a1e720696bb
Related-Bug: #1697558
6 years ago
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
6 years ago
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
6 years ago
Richard Pioso deed7d7c1c Invoke operations can wait until iDRAC is ready
Web Services Management (WS-Management and WS-Man) Invoke operations can
fail when issued to an integrated Dell Remote Access Controller (iDRAC)
whose Lifecycle Controller remote service is not "ready".

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. A notable
exception is the dracclient.client.WSManClient.is_idrac_ready() method,
which is a chicken and egg situation.

This patch adds a new parameter to the
dracclient.client.WSManClient.invoke() method that indicates whether or
not it should wait until the iDRAC is ready to accept commands before
issuing the Invoke command. When it is true, that method waits until the
iDRAC is ready before issuing the command. Since almost all Invoke
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: Ib5b9fb2a954579be40f47304c70157ab1f00d39c
Partial-Bug: #1697558
Related-Bug: #1691808
6 years ago
Richard Pioso c75969dd8d Parameterize iDRAC is ready retries at class level
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.

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
constants.

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

Change-Id: Ie866466a8ddf587a24c6d25ab903ec7b24022ffd
Partial-Bug: #1697558
Related-Bug: #1691272
Related-Bug: #1691808
6 years ago
Jenkins bb3313de14 Merge "Refactor iDRAC is ready functionality" 6 years ago
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
6 years ago
Anish Bhatt c9e33ccd4c Fetch system attributes
Change-Id: I323366268e359afbe0c7556e88cc6da936af8362
6 years ago
Jenkins 00c9fe4fde Merge "Remove support for py34" 6 years ago
Jenkins e7122263c4 Merge "Fix immediate failure on SSL errors" 6 years ago
Vu Cong Tuan c9e0e2fca4 Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: I72dd71f8f68b7459593b520ea42e9a8af6aaefba
6 years ago
Christopher Dearborn d6edaac2a1 Fix immediate failure on SSL errors
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.

Change-Id: Idc56e961699702eca734cba1da5e56cac0ad4832
Closes-Bug: 1691272
6 years ago
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
6 years ago
Christopher Dearborn f49efaa1bf Get/Set power state fails
It's possible for iDRACs to get into a state where the Name element is
not returned when querying DCIM_ComputerSystem.  This results in the
get_power_state command failing against nodes with iDRACs in this
state.

This patch removes selecting on the Name element from get_power_state.
This makes get_power_state work against both nodes with iDRACs in this
state and iDRACs not in this state.

Change-Id: Ide2d69b695376c777e5c4ee847dd0e481474a09f
Closes-Bug: #1667088
6 years ago
Jenkins d349af3ce6 Merge "Fix typo in BIOS code" 6 years ago
Anish Bhatt 19fc4c56e6 Fix typo in BIOS code
Change-Id: I1ea7afdf142e0e51d5201bd4e0cb622d7514d840
6 years ago
Anish Bhatt 15b1c2a32f Add support for idrac_card and lifecycle_controller attributes
Change-Id: I305976e639a406de19f23dcfb5207a25c6c311ba
6 years ago
Jenkins 62814f1984 Merge "WSMAN enumerate fails to return all entries" 6 years ago
Jenkins a7825567cd Merge "Removes unnecessary utf-8 coding" 6 years ago
Christopher Dearborn 0c1d56dde5 WSMAN enumerate fails to return all entries
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.

Change-Id: I2e9036b562c7d7ba5af188dd552b6c67388bb02c
Closes-Bug: #1659052
6 years ago
Jenkins 5b987d4495 Merge "Add constituent physical disks to RAID virtual disk object" 6 years ago
Mark Goddard 2a80dbb2c9 Add constituent physical disks to RAID virtual disk object
This change adds a new attribute - physical_disks - to
dracclient.resources.raid.VirtualDisk objects. The attribute is a
list of IDs of the physical disks that a virtual disk is composed of.
This allows clients of the library to obtain a more complete view of
the current RAID configuration.

Change-Id: If4f762d3bc115a971d0392af8270f5440ef43913
Closes-bug: #1651702
6 years ago
gengchc2 efad89ab07 Removes unnecessary utf-8 coding
The file was added redundant utf-8 coding by some editor.
we can delete it .

Change-Id: I51d76072500a684cc8941528dfc588d3073e34c6
7 years ago
Flavio Percoco 9c9c41d474 Show team and repo badges on README
This patch adds the team's and repository's badges to the README file.
The motivation behind this is to communicate the project status and
features at first glance.

For more information about this effort, please read this email thread:

http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html

To see an example of how this would look like check:

b'https://gist.github.com/714fce0e84b19afa25ae7177d7d68df0\n'

Change-Id: I4cd0a16c8286cd0cd567c5ab6d31fd981aa77a9a
7 years ago
Jenkins aa25303e3d Merge "Add missing RAID Status" 7 years ago
Anish Bhatt e6310a69d3 Add missing RAID Status
Not specified in DCIM Library, but is defined in
DCIM_PhysicalDiskView.mof

Change-Id: If604904aeffaa1fd4199ddb089d7cf5e1636e635
7 years ago
Miles Gould 51b97178aa Remove references to 'wsmanclient' in docs.
Change-Id: I34af0ce32d5a7acf67a9d977616ef8353dbcdb9b
7 years ago
Jenkins 477eb013aa Merge "Make name and description nullable for virtual disks" 7 years ago
Dmitry Tantsur 4fbea94a1c Make name and description nullable for virtual disks
This change fixes inspection failure on my hardware.
In the future we should develop a better understanding on which
fields are mandatory and which are not, as right now we're very
inconsistent with handling them.

Change-Id: Ia2af90fec4eef168953552a947933617e7c808d0
Closes-Bug: #1550328
7 years ago
Dmitry Tantsur aeebdf890b Raise a specific exception instead of generic AttributeError
Currently we raise an AttributeError when expected attribute is missing
from the response. This is not very developer-friendly, so this patch
creates a new exception (derived from AttributeError for compatibility)
for this purpose.

Change-Id: If2ac03dcd410d451dc7bbfe7bbd0b145da201c9a
Related-Bug: #1550328
7 years ago
Dmitry Tantsur ba1eb4aa99 Raise a reasonable error on non-nullable flags with empty text
Now it fails with AttributeError: 'NoneType' object has no attribute 'strip'.
Raise a new exception with proper explanation instead.

Partial-Bug: #1550328
Change-Id: Ie9f9d212c934bb75e8224dd64ec8df7f788b86d3
7 years ago
Jenkins 02a486d89a Merge "Update setup.cfg" 7 years ago
Dmitry Tantsur 75d593d775 Update setup.cfg
Change-Id: I6c22ae59369bb29a3dcfe773eec2904761f42926
7 years ago
Dmitry Tantsur 719b6eea36 Manually sync requirements (compatible with Newton and Ocata)
Change-Id: Icc871d151d304f73744a821487b3c66df6956e32
7 years ago
Richard Pioso 5235cdf4b3 JobManagement.get_job() causes FutureWarning
The python-dracclient job resource's JobManagement.get_job() causes a
FutureWarning. When that function is called, the following is output.

/usr/lib/python2.7/site-packages/dracclient/resources/job.py:103:
FutureWarning: The behavior of this method will change in future
versions. Use specific 'len(elem)' or 'elem is not None' test instead.
  if drac_job:

Change the identified line as suggested by the warning.

Change-Id: I9624b76cbf2e195f387ba104c98ae922619aa1f2
Closes-Bug: #1639339
7 years ago
Jenkins 0b4855c465 Merge "Don't assume FQDD naming" 7 years ago
Jenkins 1cf414b26e Merge "Raid controller and Physical Drive attributes need to be nullable" 7 years ago
Jenkins a8ade12f09 Merge "Fetch primary_status from raid controller" 7 years ago
Anish Bhatt 5e6b55dac3 Use InstanceId as unique attribute identifier rather than name
AttributeName just happens to be unique for everything under
DCIM_BIOS* but this is not a guarantee. Using InstanceId instead
which is guaranteed to be unique.

Discussion on the list
http://lists.openstack.org/pipermail/openstack-dev/2016-September/103602.html

Closes-Bug: #1635419
Signed-off-by: Anish Bhatt <anish.bhatt@salesforce.com>
Change-Id: I93c0f7919ecfd77642634d1d0addfe8a79aa6f57
7 years ago
Anish Bhatt b6009a0da7 Fetch primary_status from raid controller
This is already being polled but just not returned. This also
bring parity with standard racadm output.

Change-Id: Ia5f1c49b46463f4872960d2f652a7406b79101eb
7 years ago
Anish Bhatt 5804c28b5f Raid controller and Physical Drive attributes need to be nullable
This can fail with
AttributeError: 'NoneType' object has no attribute 'strip'
otherwise

Closes-Bug: #1550328
Change-Id: I8eafe606407cddc1e9ea03a33473b65ff3b59384
7 years ago
Anish Bhatt af0894134f Don't assume FQDD naming
Splitting on fixed number of colons breaks in this case :

Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.3:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Direct.4:RAID.Integrated.1-1
Disk.Direct.5:RAID.Integrated.1-1

Split from right instead, doesn't fail

Partial-Bug: #1586545

Change-Id: Ib4ca517388c48ade321451cb8af07abb731e5940
7 years ago