2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-14 19:57:47 +00:00

656 Commits

Author SHA1 Message Date
Jarrod Johnson
bff08bbe60 Support upcoming XCC update API
Upcoming XCC firmware update has an additional step to support in
order to successfully perform an update.

Change-Id: I08e1fccd25d40b290bbd818bdb57ef74131e76f7
2018-12-07 16:43:52 -05:00
Jarrod Johnson
4f74d4c4f9 Allow SMM downgrade
Call API to allow downgrades when going to apply firmware.

Change-Id: I7953929ef5cb2aa410feeb7dba9d679d5c8ced6b
2018-12-06 15:10:32 -05:00
Jarrod Johnson
3bf7fc543f Fix formatting of SMM/FPC version
The SMM/FPC standard format is 0 padded.  Implement
this in pyghmi.

Change-Id: I21a58678968e7129278bf1fb3ffeb8391e07a4e8
2018-12-05 15:20:21 -05:00
Jarrod Johnson
40a1600f3e Add FPC/SMM description
The get_description call will now help describe the height of current
Lenovo dense portfolio chassis.

Change-Id: I7d7f53b71360f3e2227c08a06cac03ac0d407210
2018-11-14 14:30:13 -05:00
Jarrod Johnson
84924a1f5c Fix python3 incompatibilities
The python3 http support has some differences from python2.  Provide
compatibility for both python 2 and python 3.

Change-Id: Idb8d5815b0a540fc7ae4183bd033a2725d889930
2018-10-30 14:42:01 -04:00
Jarrod Johnson
2367c85f25 Preserve logout on storage failure
If the storage call should fail, carry on logic to allow the situation
to clean out.

Change-Id: I325c0870bdc2ff358ed872697c15b5963ca836a0
1.2.16
2018-10-26 15:44:57 -04:00
Jarrod Johnson
a7db8615aa Fix storage deletion
When multiple controllers are present, it is required to
specify the controller number.

Change-Id: Iab8e7a44c1bcdb65c682c2cd9b9629206300ecd1
2018-10-25 16:29:11 -04:00
Jarrod Johnson
c716dca665 Have storage functions log out of the session
The storage functions were not leaving the web
session viable after a time.  Correct by having
the storage functions logout on completion.

Change-Id: If0ccc40d0525de4a4f3690be478bd5fb0d7dcd3c
2018-10-16 10:09:11 -04:00
ghanshyam
dca0e4001c Gate fix: Cap hacking to avoid gate failure
hacking is not capped in g-r and it is in
blacklist for requirement as hacking new version
can break the gate jobs.

Hacking can break gate jobs because of various
reasons:
- There might be new rule addition in hacking
- Some rules becomes default from non-default
- Updates in pycodestyle etc

That was the main reason it was not added in g-r
auto sync also. Most of the project maintained the
compatible and cap the hacking version in
test-requirements.txt and update to new version when
project is ready. Bumping new version might need code
fix also on project side depends on what new in that
version.

If project does not have cap the hacking version then,
there is possibility of gate failure whenever new hacking
version is released by QA team.

Example of such failure in recent release of hacking 1.1.0
- http://lists.openstack.org/pipermail/openstack-dev/2018-May/130282.html

Change-Id: I5f17ec6f67c7e7addfc5b2b2a3f17719402d9c0b
2018-10-16 11:43:37 +00:00
Jarrod Johnson
78cbbb4ee5 Handle response without unconfiguredDisk
Some adapters do not provide this information explicitly.  Handle
this discrepency by defaulting to an empty list.

Change-Id: I72c2e83a78c821e1d790972b253e9d7026a5f7ad
2018-10-15 16:11:30 -04:00
Jarrod Johnson
d28955e3ef Fix early life mark_broken call
If mark_broken called early, it would incorrectly
fail due to self.socket not existing yet.  Address
this by ensuring the attribute exists earlier and
ignoring the pool accounting if socket is not yet
assigned.

Additionally, fix a problem where the callback for
console could happen before console actually had
the ipmi_session attribute.

Change-Id: Idb93ca23d4a43760698bdc55d19418210daa7a62
2018-10-12 15:17:48 -04:00
Jarrod Johnson
d3fbe9c06c Prefer more specific IMM/XCC check over FPC check
There exists one set of FPCs and IMMs that share id.  Compensate
by using the more direct IMM query first, then falling back
to the fpc id based.

Change-Id: Ibbaea1ffce6e5903523a8467280d168bb080daee
2018-10-12 10:02:53 -04:00
Jarrod Johnson
c0acd75fe1 Fix the mistake in last nights fix
Change-Id: I5af26ca21d6d641b665acebec12ca0552f2faa8e
2018-10-12 09:29:29 -04:00
Jarrod Johnson
4972f01246 Clear lastpayload explicitly in some contexts
It was detected that sometimes lastpayload could get 'stuck',
with no facility to clear it

Change-Id: I0fc0753373233a817926f33c9623b3b5be93b59f
2018-10-11 19:09:00 -04:00
Jarrod Johnson
82e015edb2 Retry OEM lookup if no specific OEM identified
Some devices might experience a problem returning a useful response to
get device id under certain circumstance.  Make failures due to
inability to lock into a device id transient rather than persistent.

Change-Id: Ie11155632c1a627a1c3303555a6ba10926c7efb0
2018-10-10 10:42:53 -04:00
Jarrod Johnson
ba1fc32e76 Fix event data for slot events
Slot events should generically have the Slot/Connector number.
Fix this by clarifying the description and allowing it
for any offset.  Additionally, the USB offset defined in
the spec is added.

Change-Id: I80dcb86ae58f47b794eab1571c292708edf83995
2018-09-28 11:11:31 -04:00
Jarrod Johnson
4a99f18023 Fix typo in error message
The word unavailable was misspelled.

Change-Id: I53ac5b32f803aad0ffc5e24ce573e5437846a703
2018-09-26 10:51:13 -04:00
Jarrod Johnson
cf1f0c25e6 Add 'name' subfield to preserve original names.
For inventory taking, the lack of common names for the same thing
is a problem.  Provide a 'name' field to preserve the original
name that may be duplicate, but indicate multiple instances
of the same thing.

Change-Id: I02e9902f4c2d9d07982fd00b9a17617b96deb1ef
2018-09-07 14:34:11 -04:00
Jarrod Johnson
c87bdf7cef Enrich inventory data on Lenovo IMM/XCC equipment
Fix some data lost in XCC, and flesh out more info, including
info on generic cards.

Change-Id: I810fdaa3f399b0236dfb7e60d4cbd6764248b513
2018-09-06 15:16:06 -04:00
Jarrod Johnson
e5d70b22da Provide 'hardware' inventory for disks
Rework the disk inventory to handle both firmware and hardware
style data, at least for XCC generation.

Change-Id: I195ab395b8f1905f548094bc5014200fb3a39e2a
2018-09-05 10:03:07 -04:00
Jarrod Johnson
576a5f1729 Accept wildcards for settings names
For some settings, it is very helpful to be able to take wildcards.
Honor those and have those potentially replicate across multiple
matches.

Change-Id: I9ebfb2a4686b5f822527be9b05b59ca9df1e3caf
2018-08-30 10:21:30 -04:00
Jarrod Johnson
f9d784f417 Provide feedback if the clear system config attempt fails
Also extend webclient to generically hold on to last error.

Change-Id: Ied9452927260e22708faf4105a2ed3cafe1a6f46
2018-08-30 09:46:12 -04:00
Jarrod Johnson
552609114c Add method to clear system configuration
Reset to factory defaults is a relatively common request, provide
an extensible hook.  Use the standard redfish method on current systems.

Change-Id: I92a17a7434eeab0d8f455cf609ca2db764fe4a17
2018-08-29 15:14:45 -04:00
Jarrod Johnson
dd1dfdb7d5 Fix bay number from IMM property in nextscale chassis
The property is ASCII representation of decimal number that would result
from erroneously evaluating BCD as normal.  Compensate by working back
to the hexadecimal representation and presenting that as a number.

Change-Id: I47ae2fe484c2eaaa4c103eae81c56f9561ac316c
2018-08-29 09:07:00 -04:00
Jarrod Johnson
e58247b2c9 Correct probles in the servicedata attempt
When testing in actual environment, problems were detected.

Change-Id: I07fdd296c05a4e76a4c00f6a8a3ac1f70f218ff1
2018-08-23 16:12:45 -04:00
Jarrod Johnson
2b28ef74be Fetch diagnostic data
Implement a function to call into whatever the appropriate method
for a vendor to provide diagnostic/support/service data to send
to their support staff.

Change-Id: I1e1d73ec0133aa413cb3d9d44101e7f22cb1a398
2018-08-23 15:02:55 -04:00
Zuul
41ad976be7 Merge "Provide get_description for physical description" 1.2.14 2018-08-23 12:35:58 +00:00
Jarrod Johnson
cf1016bf6a Provide get_description for physical description
This function will enable GUI providers to have at least some
generic information.

Change-Id: Ic149ee23698c1c7c870b54b03355b8b8d87bd5f2
2018-08-22 16:26:39 -04:00
Jarrod Johnson
b3cbe9bf6e Add a maintenance thread
Make it easier to cope with burdens of long running execution by
providing a single-shot call to establish a persistent context
to run keepalives from.

Change-Id: I5ddbd647846daf119a4219d5c014682223657dfd
2018-08-22 15:22:42 -04:00
Zuul
130de5483f Merge "Update package documentation" 1.2.12 2018-08-17 12:46:29 +00:00
Zuul
fb33a19cbb Merge "Fix minor .spec issues" 2018-08-17 12:42:21 +00:00
Ilya Etingof
ead5aa1531 Update package documentation
* Switched to Sphinx openstacktheme
* Rearranged docs along the OpenStack project lines
* Add Sphinx docs building job
* Added tox docs job

Change-Id: I069d3a95b90bc798b1dcc0331d6e24a6c08d1317
2018-08-17 12:04:36 +02:00
Christian Arnold
5c36f63b58 Add support for reduced privilege
Add API for existing functionality

Closes-Bug: 1672223
Change-Id: Icf47c8c8ce430a9f8654b707fe7d8c141d27cc0c
2018-08-17 11:28:51 +02:00
Ilya Etingof
5e0f1dab3c Fix minor .spec issues
Also require python-cryptography >= 2.1 in the .spec

Change-Id: Id72bde418a1c9ff9d69ae6d6d37733c3557c0ecd
2018-08-17 11:08:56 +02:00
Jarrod Johnson
fb44c47d40 Do not claim a broken session is valid
Also traverse the directediowaiter list in reverse, to avoid
index referring to wrong value as it goes.

Change-Id: Id8ffa4795b0d90f0cf1db59a271b1ec21d2dafea
2018-08-16 14:57:57 -04:00
Jarrod Johnson
24f847049f Use list() to avoid size change during iteration
Since we want to delete as we iterate, use list() to make a copy
that will survive modification during iteration.

Change-Id: I4b0425acbe01a84a47d6cbaa2138e8bc908b2dfe
1.2.10
2018-08-16 09:24:24 -04:00
Jarrod Johnson
2c25baf4ca Reduce calls to _monotonic_time
iowaiter overhead can be significantly reduced by not calling
monotonic_time() for every single one that is waiting.

Change-Id: I7ee5cd78541d722f4a11898dcd4a3390b8220a95
2018-08-16 08:28:33 -04:00
Zuul
f1bea21cf1 Merge "Show hidden settings" 2018-08-15 19:22:30 +00:00
Jarrod Johnson
a694f5f314 Show hidden settings
Change-Id: Ibe6673eb3ee2295712dfb0d1fc3d5b784d63e0db
2018-08-15 15:09:16 -04:00
Jarrod Johnson
cc7b2cf2c0 Forget sessions with poor connectivity that should be forgotten
The only way for a registered waiter for general IO activity
to be forgotten was for it to be satisfied.  Unfortunately, in a bad
scenario, it would sit and be relatively worthless.  In a large
environment, this could accrue and those stubbed out events become a
large headache.

Change-Id: I1e2c7afa1dc5c9e2adeb26f2e4cd7a7b7b9709ed
1.2.8
2018-08-15 13:58:07 -04:00
Ilya Etingof
6a85c24b16 Fix .spec to include bin scripts and build reqs
* Add installed scripts into the spec.
* Add missing BuildRequires
* Pull source by URL
* Remove installation directories as they do not
  seem to be used

Change-Id: Ib4ff280cb4c50c2f1d57b271557b0c2ddf4e07fe
1.2.7
2018-08-14 14:13:19 +02:00
Jarrod Johnson
36a09e980d Handle IMM/XCC without xSEC
There will be models without xSEC, handle them transparently.

Change-Id: Id4a8f943b1e36fe22f0d84c00445af02cd90290f
1.2.6
2018-08-11 10:02:28 -04:00
Zuul
6fe4233970 Merge "Add spec for python3-pyghmi package build" 2018-08-10 13:32:32 +00:00
Zuul
a6dd0c6d83 Merge "Switch to stestr" 2018-08-10 13:28:36 +00:00
Zuul
dd2ff9431b Merge "Refactor console scripts into entry points" 2018-08-10 13:25:12 +00:00
Zuul
0b6730557f Merge "Fix print statement in console scripts" 2018-08-10 13:23:03 +00:00
Zuul
2a251f5ba3 Merge "Add more file patterns for git to ignore" 2018-08-10 13:23:02 +00:00
Ilya Etingof
f098bf996d Add spec for python3-pyghmi package build
The Python2 package has been renamed from python-pyghmi
into python2-pyghmi

Change-Id: I2a6064bc98b0d819487e73e264d68e38d3bedf84
2018-08-10 15:14:28 +02:00
Ilya Etingof
524821fa31 Switch to stestr
According to OpenStack summit session [1], stestr is
maintained project to which all OpenStack projects should
migrate.

Let's switch to stestr as other projects have already
moved to it.

Uses environment inclusions which need tox 2.8.1 due to
a bug fix. So increase the tox minversion.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: If6eded0dd802cbdfe49ad72c64004585d4a1484b
2018-08-10 14:36:57 +02:00
Ilya Etingof
497e11b102 Refactor console scripts into entry points
Change-Id: I521ab193bb65dc4d53e84d4f289194bff85b0685
2018-08-10 13:56:22 +02:00