2
0
mirror of https://opendev.org/x/pyghmi synced 2025-10-26 17:05:30 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
Jarrod Johnson
33db8cdfeb Add mandated client headers
Since we added gzip support due to a non-compliant
implementation firing gzip at us anyway, advertise
so that we have the benefit for compliant implementations.

Also add the OData-Version header.  This is required but
mostly not needed, except one implementation that uses it
to enter standard compliant mode and is non-compliant
without that in the client.

Change-Id: Ie2fdb95fa12f2ddef46506ca531e5188b6019227
2019-05-16 09:21:19 -04:00
Jarrod Johnson
5a15c6b604 Fix system_configuration
Some redfish implementations may use a trailing slash in registries.

Additionally, any json may be gzipped.

Support these two scenarios.

Change-Id: I6437af21c927d13a74e8d914ed261412c1a3afa1
2019-05-14 16:51:52 -04:00
Jarrod Johnson
904a2428c7 Add fallbacks for more redfish implementations
Redfish implementations can get dodgy about some things
and use different names for the same thing and different
mappings depending on vendor opinion...

Change-Id: I7ec5f1754fcfeca3933dd22a91d1a2daa037e501
2019-05-14 15:30:10 -04:00
Jarrod Johnson
61e5a9967b Add get_inventory_of_component
redfish did not have a compatible function for the ipmi get_inventory_of_component.
For now, only provide fastpath for system,
other components are difficult to have shortcuts for.

Change-Id: I1998186340b206a997fd0c062bec02fcb0af5ebe
2019-05-13 15:18:17 -04:00
Jarrod Johnson
0f115fdb02 More clearly indicate bad credentials
When used with invalid credentials, present a more clear
exception rather than a missed member of a dictionary.

Change-Id: I1e5bda9368673db62dce3ca2fd321cd79c62cb9c
2019-05-07 16:20:48 -04:00
Jarrod Johnson
70bf3cf165 Cleanly degrade on bad BMC time format
If a BMC provided a time, but the format was not compliant,
it caused an exception.  Now gracefully degrade to not
doing time correction if time cannot be parsed.

Change-Id: I5ab45d51913232016bb55d3595ea30188bbfe2e7
2019-05-07 10:08:48 -04:00
Jarrod Johnson
b8254fb5b9 Use dependency information for error checking
This uses the Dependencies section to perform validation
of data provided by the caller.  This produces more informative
error messages without having to reboot to examine why.

Change-Id: I6360b8a2694e42d7b848de9ce45466c88e722c91
2019-05-07 08:44:25 -04:00
Jarrod Johnson
a55dacf1d8 Provide better messages when redfish provides
This provides a more informative behavior in the clients.

Change-Id: I7cecc39c3928aac6ee2d9b86ed53159dcdf3dde5
2019-05-01 11:45:16 -04:00
Jarrod Johnson
5c2c5d797f Get pending settings with current
To be consistent with the ipmi settings, present the pending
as the 'value' and 'active' for the current value for pending
settings.

Change-Id: Ia99374732f05509d2796b5e2166c686716e93c69
2019-05-01 11:06:02 -04:00
Jarrod Johnson
1988c09d48 Use the registry info to help set
Provide support for wildcards in settings and attributes,
as well as case insensitivity.  This brings set nearly to
parity with the XCC configuration set in the ipmi half.

Change-Id: I6eef01af8e9e3bb7be03538509a606728c3c33da
2019-05-01 10:41:17 -04:00
Jarrod Johnson
e073e078a8 Have get_system_configuration get detail
Use the bios attribute registry to flesh out detail
when available.

Change-Id: I43cdc8ad6cefef83f45787000259f4962f9e1b37
2019-05-01 09:49:01 -04:00
Jarrod Johnson
42c21cfb3e Add sensor data to redfish
Redfish models a moderate amount of data that can map to sensors.
Provide a preliminary partially compatible sensor model.

Change-Id: I10cadac5871497ef89f14b95924a5f4c3be52b01
2019-04-23 16:20:38 -04:00
Jarrod Johnson
13c7d6d3b5 Convert to localtime
The IPMI module returned localtime, be consistent with that behavior.

Change-Id: I7a787ffb4b9aac81e54cc20707e97087a97d5d16
2019-04-22 15:54:26 -04:00
Jarrod Johnson
5979a2b215 Add log clear to redfish log
This permits log clear while ensuring
that the log data did not change between retrieval and deletion.

Change-Id: I15ef6bb330612b83a6acb1dcf3663eb60bb8363b
2019-04-22 15:28:21 -04:00
Jarrod Johnson
f064774ddd Add redfish log support
Change-Id: I7b0ad31da8a178acaffb3c61d189f12d5d0143ac
2019-04-18 17:00:49 -04:00
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
2019-04-15 14:22:11 -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
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
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
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
c0d8e2a12c Add UEFI/BIOS configuration to pyghmi redfish
Change-Id: Ie1a697eaf136f75007838d85bf877a262318fd5b
2019-01-28 16:43:44 -05:00
Jarrod Johnson
b810b02b1e Begin redfish implementation in pyghmi
This provides support for the redfish standard.

Change-Id: If2115f612c0f7d352361c31ad1958c102b70b6fc
2019-01-02 15:55:20 -05:00