165 Commits

Author SHA1 Message Date
Anish Bhatt
15b1c2a32f Add support for idrac_card and lifecycle_controller attributes
Change-Id: I305976e639a406de19f23dcfb5207a25c6c311ba
2017-02-14 09:47:04 -08:00
Jenkins
62814f1984 Merge "WSMAN enumerate fails to return all entries" 2017-01-30 15:49:38 +00:00
Jenkins
a7825567cd Merge "Removes unnecessary utf-8 coding" 2017-01-30 11:04:37 +00:00
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
2017-01-25 11:26:40 -05:00
Jenkins
5b987d4495 Merge "Add constituent physical disks to RAID virtual disk object" 2017-01-16 18:00:13 +00:00
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
2017-01-12 19:56:39 +00:00
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
2016-12-26 15:21:34 +08:00
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
2016-11-25 13:32:30 +01:00
Jenkins
aa25303e3d Merge "Add missing RAID Status" 2016-11-18 20:55:34 +00:00
Anish Bhatt
e6310a69d3 Add missing RAID Status
Not specified in DCIM Library, but is defined in
DCIM_PhysicalDiskView.mof

Change-Id: If604904aeffaa1fd4199ddb089d7cf5e1636e635
2016-11-17 00:41:45 -08:00
Miles Gould
51b97178aa Remove references to 'wsmanclient' in docs.
Change-Id: I34af0ce32d5a7acf67a9d977616ef8353dbcdb9b
2016-11-14 16:33:25 +00:00
Jenkins
477eb013aa Merge "Make name and description nullable for virtual disks" 1.0.0 2016-11-10 17:24:31 +00:00
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
2016-11-10 10:56:22 +01:00
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
2016-11-08 18:04:42 +01:00
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
2016-11-07 15:44:14 +01:00
Jenkins
02a486d89a Merge "Update setup.cfg" 2016-11-07 14:10:58 +00:00
Dmitry Tantsur
75d593d775 Update setup.cfg
Change-Id: I6c22ae59369bb29a3dcfe773eec2904761f42926
2016-11-07 14:37:15 +01:00
Dmitry Tantsur
719b6eea36 Manually sync requirements (compatible with Newton and Ocata)
Change-Id: Icc871d151d304f73744a821487b3c66df6956e32
2016-11-07 11:39:07 +01:00
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
2016-11-04 17:01:21 -04:00
Jenkins
0b4855c465 Merge "Don't assume FQDD naming" 2016-11-02 17:50:11 +00:00
Jenkins
1cf414b26e Merge "Raid controller and Physical Drive attributes need to be nullable" 2016-11-02 17:46:06 +00:00
Jenkins
a8ade12f09 Merge "Fetch primary_status from raid controller" 2016-11-02 17:44:21 +00:00
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
2016-10-27 12:38:31 -07:00
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
2016-10-23 14:44:51 -07:00
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
2016-10-20 14:54:37 -07:00
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
2016-10-20 14:30:15 -07:00
gecong1973
0cfeff4d82 Add __ne__ built-in function
In Python 3 __ne__ by default delegates to __eq__ and inverts the
result, but in Python 2 they urge you to define __ne__ when you
define __eq__ for it to work properly [1].There are no implied
relationships among the comparison operators. The truth of x==y
does not imply that x!=y is false. Accordingly, when defining __eq__(),
one should also define __ne__() so that the operators will behave as
expected.
[1]https://docs.python.org/2/reference/datamodel.html#object.__ne__

Change-Id: Iacd368b64650bf7eabd342a236339d1711aea4cd
2016-10-17 10:04:46 +08:00
Jim Rollenhagen
659443b312 Use upper-constraints for all tox targets
The issue has been resolved by infra [0], so we can use upper
constraints for all targets.

[0]
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: I72e5139a23a01e6d374c8fc9187903b0f2cb8118
0.1.0
2016-08-19 08:46:54 -04:00
Jenkins
b52edbb844 Merge "Split tests to based on modules" 2016-08-15 08:48:42 +00:00
Jenkins
865315f7be Merge "Make object attribute names and values consistent" 2016-08-15 08:48:24 +00:00
Jenkins
176ca93fb2 Merge "Allow missing flags on inventory.CPU" 2016-08-12 19:18:00 +00:00
Jenkins
00ff33b8fb Merge "Add flag to indicate 64bit support in inventory.CPU" 2016-08-12 19:12:47 +00:00
Jenkins
ea2201959c Merge "Add NIC enumeration to InventoryManagement" 2016-08-11 16:53:23 +00:00
Imre Farkas
4878147fd1 Split tests to based on modules
Change-Id: I26d624882695e9639b28ef8ab769c9cf64c62be4
2016-08-10 10:48:37 +02:00
Imre Farkas
9ff7c31972 Make object attribute names and values consistent
- dict for PrimaryStatus is moved to constants
- inventory.Memory has its size renamed to size_mb
- job.Job has its state renamed to status
- raid.PhysicalDisk and raid.VirtualDisk have their state and raid_state
  renamed to status and raid_status

Change-Id: I0fc8450d13a8f0de271f4e14b770bf5497e19b8e
2016-08-10 10:48:36 +02:00
Imre Farkas
f96744daf3 Allow missing flags on inventory.CPU
Change-Id: Idd485fd11ab9d784bc8c24a9b8279bcce76f0f68
Closes-Bug: #1602173
2016-08-10 10:47:38 +02:00
Imre Farkas
5a617b9e8d Add flag to indicate 64bit support in inventory.CPU
Change-Id: I84b66ab9a55683cc0c0f03efaab90e77131c1c33
2016-08-09 16:43:11 +02:00
Imre Farkas
157eba7a64 Add NIC enumeration to InventoryManagement
Change-Id: I32e3d8ae5103d3a0f47a9d0aa3bb9464ff575d03
2016-08-09 16:43:06 +02:00
Jenkins
e51f04a2c5 Merge "Use constraints for all the things" 2016-08-05 17:59:51 +00:00
Jim Rollenhagen
f5ead0cbc1 Use constraints for all the things
This configures tox to use upper-constraints for everything, except
environments used for post jobs (as constraints aren't supported there
yet).

Change-Id: I52530198b1970733cca6a3d0dedb42e416c69f54
2016-08-01 18:51:39 -04:00
Imre Farkas
f086c0329d Add py35 to tox environments
Change-Id: I3a62ebfef9f5a78e112c17404e3c4b567b3883d9
2016-07-21 12:07:41 +02:00
Stig Telfer
3e9d66173b Add interface to convert disks to RAID mode
A new function, convert_physical_disks, converts disks to and from
RAID mode.  This function enables a Dell system at factory defaults
to be initialised with a RAID configuration by python-dracclient.

Change-Id: Ice40bfb47485056428a22c216990cf0a026c73d2
2016-06-07 17:15:04 +01:00
Jenkins
a696dcd94d Merge "Improve docs" 2016-04-08 13:23:49 +00:00
Chris Coyle
b87d729dca Add memory enumeration to InventoryManagement
Change-Id: I0e58122a8d68d927b057aeedd2c127d62d9bae92
2016-04-06 15:00:11 -04:00
Imre Farkas
2bffe8d161 Improve docs
Adding maxdepth and avoiding duplicating titles.

Change-Id: Iea36b58de05b5e113f7db7e5358b5b3b912a0d8d
2016-04-05 13:58:31 +02:00
Jenkins
f2cd8bbd8a Merge "Add documentation" 2016-04-04 16:49:13 +00:00
Imre Farkas
c35a60bba9 Add documentation
Change-Id: I9380316bcbbee6760ef13a91a93b489aee659a40
2016-04-04 14:15:30 +02:00
Chris Coyle
b61253ce92 Add CPU enumeration and InventoryManagement class
Change-Id: I1f65cc8b39b9e665ac2f7a48cdc4dc0193c81256
2016-03-18 11:24:56 -04:00
Tin Lam
e2dd764649 Change LOG.warn to LOG.warning
Python 3 deprecated the logger.warn method, see:
https://docs.python.org/3/library/logging.html#logging.warning
so we prefer to use warning to avoid DeprecationWarning.

Change-Id: Ide5daf929e2e1717f6a756d609071ff329f443a8
Closes-Bug: #1508442
2016-02-19 09:43:03 -06:00
Janonymous
ac5a60560d Put py34 first in the env order of tox
To solve the problem of "db type could
not be determined" on py34 we have to run first the py34 env to, then, run
py27. This patch puts py34 first on the tox.ini list of envs to avoid this
problem to happen.

Change-Id: I94baade12db4b445e2f7879b1674c5d8e29fcccf
Closes-bug: #1489059
2015-12-22 18:28:12 +05:30