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

634 Commits

Author SHA1 Message Date
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
Ilya Etingof
38395b2307 Fix print statement in console scripts
Change-Id: Ibafcdde71542485b8141f2a16f049d76c74b50ab
2018-08-10 13:49:04 +02:00
Ilya Etingof
b1efd446e7 Add more file patterns for git to ignore
Change-Id: I4e19a008f236094cd2641279b3660cafb187c8ec
2018-08-10 12:42:20 +02:00
Ilya Etingof
372fce3a1d Add Python3 support to Trove
Change-Id: I377e6e5c870976fa3fbc883caac390bd2f7ba913
2018-08-10 11:16:02 +02:00
Jarrod Johnson
9e443c8135 Fix notification of custom keepalive on broken
The addition to actively try to logout failed to notify custom keepalive
Have logout() run the same routines that mark_broken did if logged
to have it more consistent and reliable.

Change-Id: I557ce0e8ef856acee5eb52622537e02f7bffe805
1.2.4
2018-08-07 10:57:26 -04:00
Jarrod Johnson
f04f2fd416 Fix console input with unicode
If unicode data comes in, coerce it to utf8 so it can be concatenated
to a bytearray.

Change-Id: Idfefbd8d89a817b3c93daa295c76ab829d2be8d3
1.2.2
2018-08-03 14:37:57 -04:00
Zuul
5b4dc292a6 Merge "Improve pyghmi performance" 1.2.0 2018-07-26 18:50:17 +00:00
Jarrod Johnson
cc32c99916 Improve pyghmi performance
The session.py uses lists and struct liberally.  We can be clearer and
more efficient by just working with bytearrays instead, which are better
fit for this purpose.

Change-Id: I280db9322c9a4f89470d93cf6df56b18966edb51
2018-07-26 13:31:00 -04:00
Jarrod Johnson
779b9be2e2 Abandon a broken session
init can wait forever if a session is going to be broken.

Change-Id: I233e0bffdac58eed7644db0cd17477d45f8ace15
2018-07-24 14:22:44 -04:00
Daniel Speichert
c7da450214 Python 3.7 compatibility: async is reserved keyword
Change-Id: I2f9a1e4fa4bb4d4cf95c2a43039397c9a03ddda8
2018-07-23 16:02:12 -04:00
Jarrod Johnson
50907ea2ca Try to clear presence in initting sessions on broken
If a session goes broken while initting, make sure to clear that.

Change-Id: I38a97af68f5d6bc836f477793f98b703b9ac43ff
2018-07-23 14:14:38 -04:00
Jarrod Johnson
eec5bcf9cd Support default for numeric_data
numeric_data entries have default as an attribute, support this
location for default

Change-Id: I23f8bc23f55e804100e2816536f7d33855fa61d6
2018-07-20 11:33:28 -04:00
Jarrod Johnson
52374d6a30 Print SOL error on broken ipmi session
If we detect a broken ipmi session on send, induce calling code to
do error handling.

Change-Id: I6987a6fc6bf69e8112f6c1735b4332e27b70a2ca
2018-07-19 11:25:54 -04:00
Zuul
571d70edc7 Merge "Provide a grace period for session validity" 2018-07-16 17:52:27 +00:00
Jarrod Johnson
62211a05df Provide a grace period for session validity
If a session has *just* expired, it may just be waiting for the
next timeout pass.  If it expired 15 seconds ago, however, it should
by all rights be beyond dead.

This matters as the calling code may be oblivious to the change of
session object under the covers if this is tripped.

Change-Id: I5be3bafb5932c287eb17c66217ba630746533310
2018-07-16 11:18:38 -04:00
Jarrod Johnson
eb98259f6b Fix build id of FPC
FPC does BCD encode of the build id.  Fix the display.

Change-Id: I921c9cb8cde687ed700bb400dc4081d7f67410a8
2018-07-11 12:49:20 -04:00
Jarrod Johnson
ae0c9782d7 Require python-cryptography
Ensure that rpm based packages carry this requirement correctly.

Change-Id: I0c7c58c9924d2713e6cc5f366beb03cb2e08b618
2018-07-09 09:47:26 -04:00
Jarrod Johnson
3cd94503ff Fix uploads without otherfields
otherfields addition for IMM broke other uploads.  Rectify the mistake
by referencing an empty tuple instead.

Change-Id: I0db752351cfef4ba54cb81b551585ac5aad74f91
2018-06-26 16:57:05 -04:00
Jarrod Johnson
399618df92 Attempt to logout on the way out when broken
Do a no-retry logout attempt, in hopes of mitigating leaving
stray sessions open in various situations.

Change-Id: I750249a69cac2695d8da45780c3b908943148565
2018-06-26 08:52:59 -04:00
Jarrod Johnson
8bd1aeeada Properly pass formname when using FileUploader
There was an oversight where the formname was not properly
passed when requested.

Change-Id: I6a7b95b82bbfcdbd8f7c54261fb09b1b70b9347c
2018-06-19 14:16:12 -04:00
Jarrod Johnson
b649afcb45 Add progress indication to SMM update
Refactor the support added to support IMMv2 RDOC to be reusable, and
apply it to SMM updates as well.

Change-Id: I01cd3dca8b14230c0487e2e7261fde412efedf8d
2018-06-19 11:24:31 -04:00
Jarrod Johnson
dc8d2f3bf6 Add IMMv2 remote media upload
IMMv2 media upload was required, so this implements it.

Change-Id: Idf4ea58c0b01186b2ae646ff428ff952ab72c0ef
2018-06-19 10:25:40 -04:00
Zuul
dfe960d5a3 Merge "Wrap bytes in a StringIO" 2018-06-18 19:12:19 +00:00