Commit Graph

621 Commits

Author SHA1 Message Date
Dmitry Tantsur be29045601
Handle NotAcceptable when Accept-Encoding: identity is not allowed
Apparently, some HPE Gen 10 Plus machines do not allow identity encoding
when BIOS registries are requested. Add a fallback to Connector.

Change-Id: I7363df5f5f74705307990dda9dfc7baebd5c07a3
2024-03-26 11:06:39 +01:00
Zuul 5dd160cb35 Merge "reno: Update master for unmaintained/xena" 2024-03-14 12:10:32 +00:00
Zuul 58f6d663ce Merge "reno: Update master for unmaintained/wallaby" 2024-03-14 12:10:31 +00:00
OpenStack Release Bot e60cf32380 reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.

Change-Id: I9aee1ec2b18356afe3304445f05d30810d68ea15
2024-03-14 11:29:11 +00:00
OpenStack Release Bot ed7ce399b7 reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.

Change-Id: I1d15acee27bbf32be310b51e420201027ea0ff74
2024-03-14 11:25:11 +00:00
OpenStack Release Bot 86abe92a79 reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: Ib54c87b0e6ca93f79bf5ccd74fc6c30dc7eb41d9
2024-03-14 11:20:41 +00:00
Youngjun 999260434e refectoring: Fix parameter and annotation mismatch
- the names of the parameters and annotations did not match, so this was fixed.

Change-Id: Ib06a264dfc72f2854ad49bc08a11b324f4981ee3
Signed-off-by: Youngjun <yj.yoo@okestro.com>
2024-03-13 11:05:03 +09:00
OpenStack Release Bot 0cafbf3ead Update master for stable/2024.1
Add file to the reno documentation build to show release notes for
stable/2024.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.

Sem-Ver: feature
Change-Id: If76d8a07d4bbb4c4330ee7431764c89a5868df23
2024-03-07 15:36:05 +00:00
OpenStack Release Bot 8929cceb73 reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.

Change-Id: I5db3897cc74d9d2573654482d871d5f15e6e5942
2024-02-06 15:05:50 +00:00
Zuul d11eaeefa5 Merge "Handle session-uri in body" 2024-02-05 20:55:41 +00:00
Zuul 2b823e8c23 Merge "[codespell] Adding CI target for Tox Codespell" 2024-02-05 19:24:39 +00:00
Zuul 1863a3208a Merge "[codespell] Adding Tox Target for Codespell" 2024-02-05 18:53:01 +00:00
Riccardo Pittau 5d217b7e84 Force constraints when installing a package during tox test
The tox deps option grants installation of single dependencies and
requirements, optionally pinned using constraints, before installing
a package, therefore not granting installation of the correct
constraint during the package installation.
To fix that tox 4.4.0 has introduced the constrain_package_deps
option [1]

[1] https://tox.wiki/en/4.12.1/faq.html#using-constraint-files

Change-Id: I3a9e4748c1cd7aad4c88809b9d3652471b7a3e0d
2024-02-01 18:06:26 +01:00
Sharpz7 7bbec208ca [codespell] Adding CI target for Tox Codespell
Third in a series of commits to add Codespell to Ironic Repos. This commit adds the Tox Target to CI

A future commit could potentially add a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: Ia7662fa159472119201bcd7c5c01982139bdeb38
2024-01-26 05:06:37 +00:00
Sharpz7 eeb1158e8b [codespell] Adding Tox Target for Codespell
Second in a series of commits to add Codespell to Ironic Repos. This one adds the command that was used to fix the spelling errors.

Future Commits will add CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: Ib439c9873d601bb140bd3f97acb5ee2d551c7063
2024-01-26 05:06:32 +00:00
Sharpz7 a7f9492372 [codespell] Fixing Spelling Mistakes
This is the first in a series of commits to add support for codespell. This is continuning the process completed in ironic-python-agent.

Future Commits will add a Tox Target, CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: I305a44beb929495f4b67a5e94b0387647814db1e
2024-01-26 05:06:25 +00:00
Takashi Kajinami 80fd7a3e62 Update supported python versions
... according to the current PTI.

Change-Id: Ibc76ddbc6f0d8e449e3d9a5a9caa0c9715c759e8
2024-01-21 23:38:58 +09:00
Zuul 3745794d43 Merge "Handle a different related properties for missing TransferProtocolType" 2024-01-16 22:56:46 +00:00
Zuul 1fb1589a87 Merge "Allows System to access VirtualMedia in Sushy" 2024-01-10 10:02:41 +00:00
Winicius Silva a9c4a8e7c2 Allows System to access VirtualMedia in Sushy
After DMTF release a new version of their guide[1], there was an
update in VirtualMedia URI.

Deprecated: /redfish/v1/Managers/{ManagerId}/VirtualMedia/{VirtualMediaId} New:
/redfish/v1/Systems/{ComputerSystemId}/VirtualMedia/{VirtualMediaId}

So, it is needed that System has access to VirtualMedia in Sushy lib
to later Ironic may be able to handle this. This way, i added a
property in System that it can have access to VirtualMedia instance.

[1]https://www.dmtf.org/sites/default/files/standards/documents/DSP2046_2023.2.pdf

Partial-Bug: #2039458
Change-Id: I7bd7db539eab158c283524aecdaa9ebebd033cf6
2024-01-08 18:31:57 -03:00
Fedor Tarasenko f4b84abadf Handle a different related properties for missing TransferProtocolType
Closes-Bug: 2048430
Change-Id: I413830261c8e1538c9bc4745c0a72176771cc631
2024-01-06 23:00:48 +03:00
Zuul ac0c3e10c6 Merge "Handle exceptions after re-authentication" 2024-01-04 15:38:23 +00:00
Dmitry Tantsur e88e0d8b41
Add release version to release notes
Change-Id: Iba37a0a659086ca8b4d0a26e32fc07e8b258ab99
2023-12-19 14:41:45 +01:00
Dmitry Tantsur db87ff7912
Handle exceptions after re-authentication
Currently, no handling is done for the 2nd request (we catch HTTPError,
but it won't be raised without raise_for_exceptions). Recurse into
the same call instead.

Change-Id: I9d593a741344fd7d5d6d59eca48a12222572c1ce
2023-12-19 13:56:50 +01:00
Julia Kreger 192d897ce9 Remove version field from iLO error
According to bug https://bugs.launchpad.net/sushy/+bug/2028214
the 2.15 value in the error string we had recorded for iLO devices,
is actually a version indicator according to one of the ilo developers.

Closes-Bug: 2028214
Related-Bug: 2021995
Change-Id: I0059341e3815f2d13bdaf1efa794e29a6f2cd503
2023-11-27 08:34:07 -08:00
Julia Kreger 3c49a85c5f Add a boot progress indicator
Add the indicator for boot progress, as mapped to the System
``BootProgress`` field and subvalues, which allows for API
consumers to determine the current status.

Related-Bug: #2041902
Change-Id: Icaf8d1ba1a46ab5ffbf8a98fc7eff020fdcecfa5
2023-11-22 06:26:59 -08:00
Zuul b611b93bed Merge "Adds an option for setting the http boot uri" 2023-11-22 05:20:27 +00:00
Julia Kreger 7340b340c1 Adds an option for setting the http boot uri
In order to utilize Http Boot from URL, we need to be
able to set the the parameter to the remote BMC.

This enables a greater level of security as the
URL and ultimately the instruction comes from an
authenticated source, i.e. the BMC connection, and
not DHCP which is the fallback if a target is set
to UefiHttp.

We now also unset the the http boot uri if it is set
and we're not setting an explicit URI to use. This
keeps the state of the data clean in order to prevent
any unexpected behavior.

Change-Id: I73ae614ffe735bd055090ded32926a5416a12fc0
2023-11-21 08:35:16 -08:00
Zuul b87bc5448d Merge "Fix missing ETag when patching Redfish resource" 2023-11-14 09:21:59 +00:00
Zuul fa60bf398f Merge "Fix wrong _get_registry logic in ResourceBase" 2023-10-15 04:56:48 +00:00
Vanou Ishii 4ff512a6ee Fix missing ETag when patching Redfish resource
Some Redfish implementations require current ETag of Redfish
resource against which resource update is requested to be
included in HTTP PATCH operation header.
This commit adds missing ETag in PATCH operation header.

Change-Id: I3f88d8a7032fd9071aa033c706768127da1d12af
2023-10-14 23:07:32 -04:00
OpenStack Release Bot 82772d3424 Update master for stable/2023.2
Add file to the reno documentation build to show release notes for
stable/2023.2.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.

Sem-Ver: feature
Change-Id: I1fda62003a2b703a347aa2b05db9d7bcb449d46f
2023-09-08 14:56:55 +00:00
Vanou Ishii 89a098830b Fix wrong _get_registry logic in ResourceBase
_get_registry method of ResourceBase retrieves
Registry-like resource specified by identity
parameter of _get_registry.
However current _get_registry method of ResourceBase
retrieves Registry-like resource whose name is in
_attribute_registry. This works with Bios resource
but doesn't with another resource. This commit fixes
this.

Change-Id: Ifd01b5f633cb5076abb09a13c223b19f07e68fe6
2023-08-22 02:13:22 -04:00
Jay Faulkner 7c2a2511fc Requests must always have a read/connect timeout
Before this change, a request to a nonresponsive BMC may have hung
forever waiting for requests to connect and read. Now, we ensure all
calls have a timeout unless explicitly disabled by the API user.

Because timeout was already an argument for _op, anyone attempting
to previously override the requests timeout (send one at all) wouldn't
have been able to for pythonic reasons.

Closes-Bug: 2021995
Change-Id: I76c543c6e39bab81f46a7aa00f1d38328c30cf7b
2023-07-18 13:05:00 -07:00
Fabian Wiesel 43ed6a683d Handle session-uri in body
The Cisco CIMC 4.1(2b) and potentially others do not
set the Location header as required by the Redfish
standard on a successful login, but return a session
object as a body.

By taking the session-uri out of the body,
we avoid leaking sessions in that situation.

Story: 2010477
Task: 47038
Change-Id: I3dbf80f3383c51d3e754516529471698851bf573
2023-05-19 11:44:52 +02:00
Zuul f03d77ebcb Merge "Retry on ilo state error" 2023-05-04 08:49:21 +00:00
Julia Kreger eee778a702 Retry on ilo state error
This not great patch allows us to automatically retry when we
encounter a message from the BMC indicating that the requested
operation was invalid.

We've seen similar issues on other BMCs in the past, however
in this case the BMC uses a HTTP 400 error as opposed to a 500
error. It is not perfect, but easily accounted for with
differing approaches to the client being aware or not of the
underlying state.

Change-Id: Ib78198a60a8924de934bda0c9a0b9298541496cf
Closes-Bug: #2016307
2023-04-28 09:06:22 -07:00
Jay Faulkner a1eef458c7 Update pep8 dep hacking to latest: v6
No code changes needed for compliance with new flake8.

Change-Id: I5382cfb90cef89eb17548f12cb32d07810806967
2023-04-21 12:56:38 -07:00
Iury Gregory Melo Ferreira c416bf158e Handle TransferMethod in vmedia insertion
This commit adds the TransferMethod to insertmedia
calls if necessary.

Some HW require that the TransferMethod is set before
inserting virtual media.

Change-Id: I7fc5d41cdcf79d61cb1906f2755f55f284efe766
2023-04-07 13:09:59 -03:00
Derek Higgins 2506b87d87 Add TransferProtocolType for any general error that mentions it
Story: 2010621
Task: 47554
Change-Id: I0d1a200c3fe3d4806d660553ee2f59b8d217f06c
2023-03-22 11:23:56 +00:00
Riccardo Pittau a59cf6c698 Exclude all files starting with . from flake8 tests
Some tests tool and IDE may create a .local directory inside the repo
with virtualenvs for dependencies, other tools may create . directories
or files for temporary reports.
While they can be removed in a second time, or configured differently,
it's advisable to just exclude all file starting with . from the
flake8 tests to avoid confusion and possible unexpected errors.

Change-Id: I6fdee20603437773c8a8c08cce3bbdcb4f8ef0e7
2023-03-10 12:19:44 +01:00
Zuul 40f460183a Merge "Handle non-default language for registries" 2023-03-08 21:54:14 +00:00
OpenStack Release Bot 4a4014355f Update master for stable/2023.1
Add file to the reno documentation build to show release notes for
stable/2023.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.

Sem-Ver: feature
Change-Id: Ib2998dc14dba7a7a99c827dd7b5180f383700759
2023-03-02 14:14:07 +00:00
Iury Gregory Melo Ferreira fbf44e92c4 Handle non-default language for registries
The default value for language in sushy is "en",
in the ZT hardware some registries have "en-US"
as their language, in this case we can't get the
right information.

This commits changes the logic to accept the case
where the registry language starts with the default.

Change-Id: I0c4690925d086af593a691565a66ce90c19be156
2023-03-01 08:58:27 -03:00
Samuel Kunkel 98c899997f workaround: requests verify handling if env is set
if the env REQUESTS_CA_BUNDLE is set the requests.Session() ignores the
verify parameter. Therefore the verify parameter is moved directly into
the function call of request.

Workaround for https://github.com/psf/requests/issues/3829

Change-Id: I66dc7c4d90e5bd5e3d1b331cf1728f27dece6dd4
2023-01-20 10:44:07 +01:00
Riccardo Pittau a330427d94 Remove setuptools workaround
Also make it explicit we now support Python 3.10 and use generic
openstack test template

Change-Id: I3ff370e1886b05450949db000f37f5dff9e52227
2023-01-12 14:52:52 +01:00
Zuul 3f6f693ee8 Merge "Fix volume deletion on newer iDRACs" 2023-01-04 21:41:51 +00:00
Zuul 25a113b045 Merge "Fix exceeding retries" 2023-01-04 17:24:03 +00:00
Riccardo Pittau 22ca7f4312 Fix tox4 and setuptools errors
- Remove skipsdist that it was never supported and causes breakage
when used with usedevelop.
- disable setuptools autodiscovery

Change-Id: Iee925dd901d3b7e3407e9d2356b5d7b81d17fc55
2022-12-28 16:44:30 +01:00
Aija Jauntēva 42071d1251 Fix exceeding retries
Connector is not created with every request, but long-lived.
As the result retries run out when using sushy for longer
and resulting in permanent failure where another retry or so
should be enough. Fix this by counting retries per request.

Also fix and update log message for clarity.

Change-Id: I879b0410fd1f2f42657517c2ae435dd4681f8c8d
2022-12-14 11:00:22 -05:00