2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-13 19:27:48 +00:00

739 Commits

Author SHA1 Message Date
Jarrod Johnson
f710b1d30a Add OEM extensibility framework to pyghmi redfish
This enables OEM specific override for enhancements beyond the specification
when avaible.

Change-Id: I6a10f1fa58a425b2abfbeb9c85dd72c3b7d4cbba
2019-04-18 13:58:24 -04:00
Jarrod Johnson
a05c044874 Add clear system configuration to redfish
Implement clear uefi configuration for redfish targets

Change-Id: Id85c13b773597ae331902ae91ad3d8bcc0b9982b
1.3.0
2019-04-15 14:22:11 -04:00
Jarrod Johnson
60313e76c0 Workaround 7Y36 model bug
7Y36 firmware does not populate u-height.
Workaround the bug by embedding the correct value for the model.

Change-Id: I78481b7ec80956d76e6085855d35cd7c6886a225
2019-04-12 13:50:23 -04:00
Jarrod Johnson
9e51f88a20 If no u-height, revert to default behavior
Change-Id: I94dd5c8dd5b535c39b4b3df579961620e470c31b
2019-04-11 17:15:14 -04:00
Jarrod Johnson
7004a1a4c5 Address another location where 108 may appear
108 indicates the XCC had a temporary problem trying
to juggle the update internally.

Change-Id: I8c444c04c05b5cfee475b0601e88144c6980cdf6
2019-04-11 12:39:33 -04:00
Jarrod Johnson
03aabc6fd3 Protect more unspported instance variables
A new category of settings have instances without declaring
maximum instances.  Autosense and hide these sorts of settings.

Change-Id: I5334d6fad76454674dc0c1ffa094c2178e950c66
2019-04-11 10:38:21 -04:00
Zuul
ce62bdda95 Merge "Implement redfish set_net_configuration" 2019-04-11 13:04:12 +00:00
Jarrod Johnson
a71076c0be Implement redfish set_net_configuration
This allows using redfish to set network parameters.

Change-Id: Icab70a377194ccc2a5e2058692e6b4a37a9057b3
2019-04-10 17:12:00 -04:00
Jarrod Johnson
70de56bcbc Remove a round trip delay for inventory
Enable potential concurrency for CPU and Memory
parent urls.

Change-Id: I258f5418efb32db3c171849749cd6f390b0724aa
2019-04-10 15:39:48 -04:00
Jarrod Johnson
9c4e520d93 Attempt bulk request of inventory
Bring more urls together in hopes of performance
through concurrency.  There are still points of
serialization, however.

Change-Id: Ie2b4eebe84cbd35e08a6fbf703d3a2b15a17026d
2019-04-10 13:21:27 -04:00
Jarrod Johnson
3475b97a91 Workaround 'dead' IPv4 addresses
Some redfish implementations leave a dead DHCP definition when
configured static.  Filter out such an address when encountered.

Change-Id: I25ff6b07ff75b67f7661157a8a0f1dc230f9010c
2019-04-09 15:36:58 -04:00
Zuul
cd14632ba6 Merge "Support SYSTEM_PROD_DATA" 2019-04-04 21:28:47 +00:00
Jarrod Johnson
d203f82c20 Support SYSTEM_PROD_DATA
The config section is the only ungrouped
section.  Give it special treatment.

Change-Id: I1b23ad1c47b43741a890711810d932da6ef45e5f
2019-04-04 16:51:14 -04:00
Jarrod Johnson
a444c31b06 Hide instanced and password settings
These are currently not supported.

Change-Id: Ie38e38ebe199d61aedbd624c1dedca6f33ae5d02
2019-04-04 16:23:16 -04:00
Jarrod Johnson
02b78e2251 Skip empty firmware values
Some select configurations may induce
a null firmware entry.  Disregard such entries.

Change-Id: I5eea54b8d836aa2fb0c0b6f8d87b45c39bb28534
2019-04-04 13:17:17 -04:00
Jarrod Johnson
eb7869bfa7 Handle 413 directly on the upload
413 may return on the upload, but sometimes not the status
query.  Support the direct evaluation of the return code.

Change-Id: I4e8e8f4a03adc00d4c1de3a1fe4fbcb5d1b3d8f3
2019-04-02 13:03:51 -04:00
Jarrod Johnson
06159c4e1c Fix fallbackdata
Fallbackdata was actually being preferred rather than a
last resort.  Fix by changing to a more usual return
scheme.

Change-Id: I098dfc424c173c87c24a712efdebefb46f724473
2019-04-02 11:26:01 -04:00
Jarrod Johnson
191acd0758 Have LED fallback force a sensor if no other explanation
This mitigates the poor appearance of the 'unexplained health'
scenario.

Change-Id: I5b41c51050789773a3851b39137316deee05f74b
2019-03-28 10:22:14 -04:00
Jarrod Johnson
13025ea364 Add token refreshes to adapter update
It was observed that an adapter update could be inflicted
with an expiring token.  Aggressively refresh to mitigate
this.

Change-Id: I7624e8c9abbfdc4e8fd3b323f868d3606cd0039e
2019-03-28 09:43:27 -04:00
Jarrod Johnson
85352d68bc Refresh token throughout upload_media
Certain calls were exceeding the lifetime of the token, add some
refreshes to keep token up to date.

Change-Id: I539f6323715ddacc5b435a61b2a1d9af65f29c2b
2019-03-28 08:46:08 -04:00
Jarrod Johnson
e47fc0d6a8 Fallback behavior on unparseable conditionals
If firmware offers up an unparseable expression, prcoeed as if the
expression were not there in the first place.  The occurance observed
was not viable.  This hampers the improved error message, but the
firmware will still enforce any rules.

Change-Id: I2be9db12b9fa8da9d40bf6829b3cdc02bbdc946d
2019-03-26 14:58:23 -04:00
Jarrod Johnson
7e2a0e258c Genericize bulk requests and fallback to Id
Independent concurrent requests are going to be a way of life, add
a generic helper.  Future modify to take a dict of urls to handlers
to launch handlers in a pool as well.

Names are usually more descriptive, but are occasionally not unique.
Fallback to Id for devices that conflict.

Store name map to urls for faster performance of
get_inventory_of_component

Change-Id: I83207d24c8bd2a23ac0d16ab5e1777f7df8d4369
2019-03-25 15:35:14 -04:00
Zuul
a21ede6bc3 Merge "Replace openstack.org git:// URLs with https://" 2019-03-25 13:14:03 +00:00
Ian Wienand
3f3c48037f Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: Ib91d991abd3e2166797130573808810492a88089
2019-03-24 20:35:47 +00:00
Jarrod Johnson
a1af60ac9b Performance enhancements for redfish
This permits the code to be able to risk redundant fetches without high
performance penalty through caching.

It also introduces a way for calling code to provide a concurrency
pool, e.g. a GreenPool from eventlet.

Change-Id: I60c4aabb5064a5ee19b0804a520d4ace1195710e
2019-03-22 15:52:11 -04:00
Jarrod Johnson
b45253eacd Add missing headers
Some implementations balk at lack of 'Accept' header.

Change-Id: I99d840e7357a7c0d04bcbd1bb7695c8512be0281
2019-03-22 14:42:57 -04:00
Jarrod Johnson
0bdf26f8c9 Fix mistake in IMM set property
There was a mistake in the code to attempt length calculation.

Change-Id: I62dbd78ec11095d897433754a5751c02fd0d5812
2019-03-21 09:47:17 -04:00
Jarrod Johnson
8b89c3e5a0 Fetch inventory information
Add system, cpus, adapters, memory.

Change-Id: Icb2024acca63ca94e0ff45d4cb3436f5d1564bda
2019-03-19 17:06:41 -04:00
Jarrod Johnson
a1e9ba2891 Fetch firmware information
Use the firmware inventory to drive get_firmware

Change-Id: Ia3289c108b570fd25452b6ef13ac44da6575f8a8
2019-03-19 15:07:18 -04:00
Jarrod Johnson
d6ab7ed15c Add fetching of network config data
This is compatible with the ipmi model for now, and raising exceptions
in multi-interface environments.  Future will have helper to list and
use interface as parameter.

Change-Id: I648edc1546a12dbd7f3ca9548ce6db3dfadd4827
2019-03-18 16:43:51 -04:00
Jarrod Johnson
6d1ef823ae Change redfish get_health to look closer to ipmi
We can have a SensorReading object that at least approximates ipmi
object, though we can never have readings.

Change-Id: Id33346263521e39f7b70ada456d0d134b6264e5c
2019-03-18 13:47:33 -04:00
Jarrod Johnson
19ebb593b7 Add missing init to redfish
Redfish needs to be a proper python module.

Change-Id: Id7e51f8cbcb42b4a0c61ebfd200f4c3e38f00203
2019-03-18 10:48:57 -04:00
Jarrod Johnson
f77554febd Pass through message for Optane
Pass through message as-is rather
than try to rephrase it.

Change-Id: I120606b5eef6de9ac24597ce58ee5a54dc326a34
2019-03-14 15:50:24 -04:00
Jarrod Johnson
3263342f34 Add fallback data
For generic unknown events, create backup data if the generic fails.

Change-Id: Ic001bd3d9daa6a47c88b63b51df2f4002ee46358
2019-03-14 14:22:26 -04:00
Jarrod Johnson
d3de9ef67c Check Fault LED in health check
It is possible for fault LED to be lit without
any active events.  Have this trigger a critical,
since we have no idea what would have caused the light.

Change-Id: Id4cbbc64b0dd44c2757ce1f30deaa28a7e668472
2019-03-14 11:19:18 -04:00
Jarrod Johnson
4ff8bc7cc0 Request forced inventory after adapter update
For adapter firmware to be accurate, force an inventory
boot on next reboot.

Change-Id: I9d0281de1bd8c39ec79aace5f8b4343b97ffe89b
2019-03-07 14:42:10 -05:00
Jarrod Johnson
db1a87f7b1 Add 0x10 and 0x03 to ignore
These bytes have also appeared erroneously in FRU
data, treat them as equivalent to null.

Change-Id: I9d19239f2dc13fc47321c8a35f25c58ccbebec3d
2019-03-01 13:04:17 -05:00
Jarrod Johnson
c1a20db6d8 Fix cache interop between firmware and hardware
The inventory had diverged between firmware and hardware,
for now just give each a dedicated name.

Change-Id: I8f755a0f9ed21369a1c05e7e3139ab43c645a01f
2019-03-01 11:05:57 -05:00
Jarrod Johnson
3ed62e5bd4 Add detected, but unknown disks
SATA attached disks can show presence,
provide recognition of detected, but unmanaged
disks.

Change-Id: I6626ed2fe9dc9cc0d76bfd4e49bc892603b1f5fa
2019-03-01 10:35:44 -05:00
Jarrod Johnson
241f2a7fee Report pending updates on adapter
When possible, provide the pending firmware
as inventory data.

Change-Id: I540545073be94eda166013cb428044a15b05fcd8
2019-02-27 15:46:12 -05:00
Jarrod Johnson
5ebe762737 Report 108 as temporary error
108 is a transient condition that requires
the update procedure to be done again.

Change-Id: Icf2108dda2ef56ac8fcd5710c3e67c6658dfdeee
2019-02-27 09:54:04 -05:00
Jarrod Johnson
a1364d55a0 Handle firmware upload error 413
If software attempts to upload a file
larger than the XCC supports.  Report
a more understandable condition in
such a case.

Change-Id: I8b5a80c0be8fbca141bdce34d5da39095217b30b
2019-02-26 16:11:34 -05:00
Zuul
7a195ddc2e Merge "Fix string formatting" 2019-02-26 15:47:41 +00:00
Jarrod Johnson
c8135688be Fix string formatting
Error string was incorrectly trying to use '+' to
add number into the message.  Fix by using format

Change-Id: Iedc83383ffa4770b28538895369c9b3d58bb5bad
2019-02-26 10:26:23 -05:00
Jarrod Johnson
d36552df27 Fix incorrect M.2 labelling
Measure the M.2 status of a disk more
directly, avoiding modifying the slotNo unless
the disk is actually M.2

Change-Id: Ic8bd578654f586791f04d8f880842cc11e678ed5
2019-02-25 16:35:44 -05:00
Jarrod Johnson
1575928d03 Support updating multiple adapters
Add support for updating multiple adapters.

Change-Id: Idafaa9896cdf6c4da100016ea033c31749ce0bde
2019-02-22 16:32:28 -05:00
Jarrod Johnson
9c4991a747 Generalize the megaraid check
The megaraidconfigurationtool may be branded a few different
ways.  Mask all of them.

Change-Id: Ie0c056a0467eb118500be59a270e5940c3c94529
2019-02-21 13:27:41 -05:00
Jarrod Johnson
d065f22324 Treat thorn as string terminating
While a thorn in theory could be valid,
in practice the more likely intention
is yet another nonstandard string termination
attempt.

Change-Id: I71f837725b1e286b9f94786aa520deb12ce208e4
2019-02-20 13:36:17 -05:00
Jarrod Johnson
57d4db40ca Improve consistency with Lenovo tools
Lenovo tools use mriName to label configuration groups.  Change to this
by default, while retaining legacy name
as alias for backwards compatibility.

Change-Id: I220ab18e21947745cf942d78536668d580ffa38b
2019-02-20 11:14:16 -05:00
Jarrod Johnson
d88b508e71 Suppress Avago RAID config
The storage configuration interface is more appropriate
and other tools mask these settings.

Change-Id: I02bd935e68beb63ae725eb45cb062604377f26bd
2019-02-20 09:22:21 -05:00