2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-13 11:17:47 +00:00

521 Commits

Author SHA1 Message Date
Jarrod Johnson
b315aa5c05 Fix the tempest job
Change-Id: I5c513a66f79e261a5bd83bb33dcc1a12ab5dfedc
2018-01-22 11:28:34 -05:00
Zuul
d33aeb321c Merge "Fix the custom cookies feature" 1.0.32 2018-01-04 23:53:35 +00:00
Zuul
faa1369be1 Merge "Add IBM FPC id" 2018-01-04 22:19:28 +00:00
Jarrod Johnson
bf15d7f382 Fix the custom cookies feature
As written, it broke non-custom case.

Change-Id: I2a533207f060c3d06ee8fc0826d6a8d7f1ec39c1
2018-01-04 16:58:35 -05:00
Jarrod Johnson
3033152f53 Add IBM FPC id
IBM FPCs should be treated by the same spec as Lenovo

Change-Id: Ie2a922f0989225701e38c7178d5c93ad168b7739
2018-01-04 15:06:25 -05:00
Zuul
2d47854631 Merge "Obey custom ports in SOL client and server" 2018-01-03 20:52:53 +00:00
Jarrod Johnson
02b5f2e653 Obey custom ports in SOL client and server
Rather than hard baking 623, use the same port that was passed in
on init.

Change-Id: I82b837051144fec7421f6f1f37c059390f2ac5ec
2018-01-03 08:17:11 -05:00
Samuel Santos
1b3428764e Update webclient management of cookies
The 'request' method was overriding provided 'Cookies' header if
previous requests had captured other cookies.

Change-Id: I51e24e6095fa5955504b767a77fa5f2fb85448f7
2018-01-02 16:15:41 -05:00
Jarrod Johnson
7d0df42298 Implement remote media upload
Platforms that support concept of media upload can be supported.

Change-Id: I7475563ac6af90b10e2c1870f72f227db5cdfd70
2017-12-08 18:16:15 -05:00
Jarrod Johnson
ced920016f Do not error if the platform does not support restricting the MAXSEG
Some depressing platforms don't support this. The intent is to work
around incorrect MTU settings for a network, which is hopefully rare,
so being opportunistic without being fatalistic seems a wise course.

Change-Id: I2108f335bdf623f6fc0a1723a8b5988c253a76b3
1.0.30
2017-11-30 09:55:34 -05:00
Zuul
32cfa8fe5d Merge "Add storage configuration" 2017-11-28 20:05:03 +00:00
Jarrod Johnson
188926c340 Add storage configuration
Provide functionality to manage remote storage configuration

Change-Id: I7a8a5a4682ac859a2e12be3b0c9b50118ba2eb25
2017-11-21 07:52:45 -05:00
Zuul
0d2aa316ec Merge "repeatedly assign value" 2017-11-19 19:46:09 +00:00
Zuul
4f444c7c63 Merge "Update test-requirements" 2017-11-19 17:48:29 +00:00
Jarrod Johnson
ec20649bfe Update test-requirements
Fix ability to get through gate

Change-Id: Iac13cd595c80cad367d06a7b0afc3e53fc7f8ff7
2017-11-19 10:44:12 -05:00
suzhengwei
8e279a0a60 repeatedly assign value
Change-Id: If10a31cfbfd4da9c60328c0d612de89c67dcfe0c
2017-11-17 11:04:52 +08:00
Jarrod Johnson
b32089acea Add XCC Pending version to firmware inventory
The XCC with an update prepared but not yet executed offers that info.
Provide that to the calling code.

Change-Id: Iaafe681c6f744368ecc42dd87919a50a69466e1b
1.0.28 1.0.24
2017-11-07 14:34:30 -05:00
Zuul
d74b22a1fb Merge "Block problematic operations while update in progress" 2017-11-01 17:18:07 +00:00
Jarrod Johnson
ba46ba7a25 Block problematic operations while update in progress
The XCC does not take kindly to certain requests during update.
Mitigate through blocking those requests.  Before the update would fail
and the new operation succeed.  Change so that the running update is
allowed to continue at the expense of the new attempt.

Change-Id: I94618450206fd4a7eba37f2614e713baf3e82023
2017-11-01 11:06:01 -04:00
Jarrod Johnson
f4ece6cd42 Make the webclient primitives a bit more resilient
The underlying class state machine can get hairy if
things race with each other.  Transparently create
independent instances to have dedicated state machines
for transactions.

Change-Id: I17616a437374f6dfdcd46d459cfc7ed00405b311
2017-11-01 10:40:09 -04:00
James E. Blair
87cc663751 Zuul: add file extension to playbook path
Zuul now supports including the file extension on the playbook path
and omitting the extension is now deprecrated.  Update references
to include the extension.

Change-Id: I9f7cfb25cdd87b7431ec0297a97aa827eec31799
2017-10-28 23:57:33 -07:00
Jarrod Johnson
c453ba5f83 Whitelist more core drivers
LXPM and associated content also needs to be updated
the core way.

Change-Id: I0b5eb493ad1b118bac764e0c2ec842a427da8f18
2017-10-26 11:27:50 -04:00
Jarrod Johnson
3d4cdb4bad Provide reseat command
Some chassis managers implement a reseat function, provide access to
this capability with a high level API.

Change-Id: Ie7bbedc34236c95e43b790677b9e637cda893e0a
2017-10-25 09:24:35 -04:00
Jarrod Johnson
30195bd316 Provide for Adapter updates
Adapter updates require a different conversation.
Implement that conversation so that the user need
not be aware.

Change-Id: I865d211b8aad08797b556a077814a3068ae9ea2c
2017-10-24 15:32:05 -04:00
Tovin Seven
110f6c1ebd Migrate to zuulv3 - move legacy job to project
This patch do step 1 in the docs: Move Legacy Jobs to Projects.

Change-Id: I824b28f184c68da6e5ff66b1ca2ee007eb44fbbb
Needed-By: I550188a50554b086a11d35e39927f8b0f8a89bf7
Needed-By: Ib86c59dc309c1e1596013eca42b7e34a4ebfdcd1
2017-10-19 11:07:31 +07:00
Zuul
0cc9fdc61d Merge "Do not suppress all exceptions" 2017-10-17 20:18:46 +00:00
Jarrod Johnson
1d0e274238 Do not suppress all exceptions
The only exception that is somewhat usual is connection refused,
for systems without a web interface at all.  Everything else should
be raised.

Change-Id: I2c6bd7f6a25a4728191748b071053112af3a2139
2017-10-17 13:21:40 -04:00
Jarrod Johnson
0b14ffdbca Change from 'Power' to 'Energy'
While it was 'Power' for the sake of being convenient to people
about power metrics, it is not strictly accurate.  Change to the
accurate description and people will just have to know to look for
Energy rather than Power.

Change-Id: Iaa303b417740015bd35ef0a4d41928a4c40bf933
2017-10-17 10:58:03 -04:00
Jarrod Johnson
243cf797de Add support for Lenovo Energy Meters
Energy meters are available through OEM commands for Lenovo enterprise
servers.  This enables those data to appear as sensors when enumerated.

Change-Id: I28d59b24cf49642e82d5b71f7c34f94d858796dd
2017-10-16 08:38:46 -04:00
Jarrod Johnson
9131df4ced Fix for DIMM models with invalid bytes
Some DIMMs have short model numbers and pad with NULL.  Also tolerate
other common padding (0xff and spaces).

Change-Id: I01550996ade799b2c29d910ae9bb8c5150f94a38
2017-10-11 09:22:41 -04:00
Jarrod Johnson
19e3d74991 Skip FPGA when not supported
Some systems do not support reporting FPGA version,
for such systems that return 193, ignore the situation.

Change-Id: Ic6f967754741d1789bc293f9489fab0077faf033
2017-09-18 09:14:46 -04:00
Jarrod Johnson
40af456196 Get UUID of ThinkSystem D2 enclosures
If a ThinkSystem server is in a D2 enclosure, get
the UUID of the enclosure.

Change-Id: I3e2cf4b76306a2a7fce4fb655fc14c4c38306e84
2017-09-13 16:12:52 -04:00
Jarrod Johnson
a676ff3bef Remove NUL bytes from SMM serial/model
The data may contain NUL bytes, make sure strip removes them.

Change-Id: I3bfea4ac85fb696e30a6b990e9fa167b4005edab
2017-09-06 15:15:48 -04:00
Jarrod Johnson
3627ba60d1 Add LXPM driver bundle info to inventory
LXPM has driver bundle packs, provide this information
to the nodefirmware command.

Change-Id: I85f21892c0591600dea8f964961ec236775b52d2
2017-09-05 11:19:34 -04:00
luke.li
c7215ce77c Update "nework" to "network" in comments
Change-Id: I221c480127b51b02d7deb0e783b0895e14327c97
2017-08-22 11:01:31 +08:00
Jarrod Johnson
cbc1445d7c Manage NTP configuration of ThinkSystem D2 SMM
This provides access to the NTP configuration of SMMs so that
API and CLI can manipulate it.

Change-Id: I896df6b254b2838d8ec89c56d07245ae4dd03bff
2017-08-17 16:11:38 -04:00
Jarrod Johnson
9f8984d254 Support update of backup XCC bank
The XCC has a primary bank and backup bank that may
be individually managed.  Provide access to updating the
backup bank.

Change-Id: Ia9b3b4602d7a0ff62b0269020eeece03844ecaa9
2017-08-16 17:13:09 -04:00
Jarrod Johnson
69b70441ac Connect backend completion to OEM handler
The OEM handler was not wired up all the way, correct
this oversight.

Change-Id: I30fcf011d0d82f0fb863aaccb3d7e4db41d19aea
2017-08-14 17:08:03 -04:00
Jarrod Johnson
e8f368d648 Implement state feedback on firmware update
Provide a means to indicate through string return to show user
what the next step should be.

Change-Id: Id6b9c2bb6e6a46d6eb653622294ae93e858b8356
2017-08-14 13:34:56 -04:00
Jarrod Johnson
d5fddf022b Set referer in IMM web
IMM web has now started rejecting http without referer.  Provide
a reasonable referer for that situation.

Change-Id: Id6d537252646122005a78a92c8a0122f28d379ae
2017-08-11 14:34:44 -04:00
Jarrod Johnson
1a60269df7 Implement SMM data extension
Do the SMM specific commands to get the serial number and model
number.

Change-Id: Iddc84c386996a2f93974e65980ed6f928105d87f
2017-08-09 13:31:19 -04:00
Jarrod Johnson
c341814267 Implement firmware update for ThinkSystem SMM
Provide similar support for ThinkSystem SMM as the XCC
devices.

Change-Id: I9173ef1c509b2965469ee610cca58590fe42cb69
2017-08-07 09:42:28 -04:00
Jarrod Johnson
a8e523cc11 Gracefully disable localsession without fcntl
Windows does not have fcntl, but can work out of
band.  Allow out of band on Windows to work even
though localsession cannot.

Change-Id: Ia3c188b33582f2c62bef6cb1f9576ccec314506d
2017-08-03 10:03:00 -04:00
Jarrod Johnson
f454c086ff Replace IPv4 inet_p functions with inet_a
On windows especially, inet_p functions are rare in python.  For AF_INET, inet_a functions
do the same thing and are more easily found.

Change-Id: I26f6e1015e9e82aad9b3c05ab7a45af6d11555cb
2017-08-02 17:00:24 -04:00
Jarrod Johnson
56e3eb5cb7 Replace waitall mechanism with never wait
Previously waitall was used as a way to have wait_for_rsp be able to
call out for specifically keepalive, to prevent a wait_for_rsp from
hanging.  The thought was to create a new wait_for_rsp by recursing.
However, if things go really bad with enough systems, it runs afoul of
python's recursion limit.  The alternative strategy is to provide a way
to never wait, and asynchronously do cleanup in a callback.  This
returns to the original wait_for_rsp instance rather than recursing
to a new one, keeping the stack shallow.

Change-Id: I54450bfc5bf57563a0a8bd986d9aea887bf36e53
2017-08-02 15:32:12 -04:00
Jarrod Johnson
19ae81f1dc Request a small MSS in web connection explicitly
Sometimes equipment will not handle some header data, such as 802.1q tag.  Other times,
there's a jumbo NIC talking to a BMC that is not jumbo.

Workaround such situations by setting the MSS to 1456 explicitly, which fits in MTU 1500 plus
4 bytes for dot1q tag, if some intermediat device fails to handle that.

Change-Id: I7db1c8feac1c094871723026771792432a3daaf4
2017-08-01 15:04:17 -04:00
Jarrod Johnson
2d517cf113 Provide support for event only SDR
Sensor numbers can have a lookup table in SDR without being a sensor.
Support these for eventlog decode, without adding noise to the sensor
enumeration.

Change-Id: If635512616da1a98ab7ca9d2352aea55ea2da5e3
2017-08-01 10:45:27 -04:00
Jarrod Johnson
d494390945 Localize console lock
The console code was using a global lock, but the data protected
is per instance.  Change to using a local version.  I couldn't figure out
a generic way for the decorator approach to dereference 'self'
without creating a specific requirement on the class name, so
I changed to using it as a context manager directly for now.

Change-Id: I304b75572fecd3326723d981fec67207d87d0742
2017-07-31 09:17:09 -04:00
Jarrod Johnson
faec94834a Provide more specific info on update process
The update process has a number of common errors and a lengthy
validation phase, provide more detail on the process.

Change-Id: I814d512814c132e95bb018cd622cff3c2efdf2c2
2017-07-27 08:57:08 -04:00
Jarrod Johnson
3adae44c07 Reduce memory usage for uploading
A per instance copy of data was kept in scope throughout download
process.  Minimize that to once regardless of instances, and have
lifetime of the extra copy be very short.

Change-Id: Ife3c7f83bf9b97925cf079597f014db648b227ba
2017-07-26 14:30:20 -04:00