667 Commits

Author SHA1 Message Date
Doug Goldstein
6e0f5fabdc
explicit oem extn names and fix parallel tests
Rather than building up the full name and then trying to parse the
string later on, just pass the two parts to the function that needs it.
The tests are also running in parallel and the mocks and patching of the
global object falls down when there are any oem extensions installed
past the ones that match up with what the tests mock out. Currently
sushy only has one for system under contoso, which is what the first
mock uses so it just works. But adding even another causes
undeterministic failure in the tests. This should patch things and keep
them in scope to the test.

Change-Id: I8f58769b39315caf6e7939665efc9e3cc6faa0f0
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2025-02-18 23:12:26 -06:00
Zuul
d0752a5598 Merge "enable pyupgrade via ruff to Python 3.7" 5.5.0 2025-02-10 09:08:14 +00:00
Alexon Oliveira
81fbc97cea trivial: fix variable in log message
Proper variable name should be %(err)s instead of %(error)s

Change-Id: I96c08c7daa2f4258dda1547a32f01747709d6d0b
Signed-off-by: Alexon Oliveira <alexon@redhat.com>
2025-02-04 22:36:05 -03:00
Doug Goldstein
52d9078836
enable pyupgrade via ruff to Python 3.7
Upgrade our syntax to Python 3.7 using pyupgrade support via ruff.

Change-Id: I475eed8abbfff0717211605364482ab942c69369
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2025-01-25 12:27:08 -05:00
Doug Goldstein
27434e48e4
enable flake8 logging checks in ruff
Enable flake8-logging and flake8-logging-format checks to ensure we use
the correct logging style.

Change-Id: Ic4e38d31955412a3b8cf5810d8e75d0ce8178881
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
5.4.0
2024-12-06 15:39:11 -06:00
982647d99b reno: Update master for unmaintained/2023.1
Update the 2023.1 release notes configuration to build from
unmaintained/2023.1.

Change-Id: I4a6df51152eedd7188655b8752a1b41ca5d9cc93
2024-11-29 07:55:30 +00:00
Doug Goldstein
7204dbcc95
enable pycodestyle and pyflakes checks in ruff
Change-Id: I4dfad000f38b4405c94085f279794362c738534c
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-11-22 13:37:19 -06:00
Doug Goldstein
1921d6d22b
change ambiguous variable name
pycodestyle reports this as an ambiguous variable name.

Change-Id: Idf2a37253a8872ebf9e2e26b08804f68d5d7a245
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-11-12 17:43:35 -06:00
Doug Goldstein
83293508d8
enable ruff with flake8-bandit rules
Enable flake8-bandit checks via the ruff checker. The flake8-bandit
rules are prefixed with S instead of B like the bandit rules are but the
numberical values are different. flake8-bandit provides the default
config without needing it to be generated like bandit has in the ironic
repo. The only exceptions to the default config in ironic is the
skipping of 3 rules which is instead skipped just for tests instead of
globally. The choice of ruff is intentional as other OpenStack projects
are trending that way and more checks can be used in the future.

Change-Id: Iec4b628a5d5425dd18b5a4fd76f61c504e3d53b0
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-11-12 17:43:34 -06:00
Doug Goldstein
43fdf124f8
ensure all requests calls have a timeout
requests can hang indefinitely without a timeout so ensure all calls
have a timeout.

Change-Id: I546880a3ebd9319b9d9977a87fbc5e0495ca8091
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-11-12 17:43:01 -06:00
Doug Goldstein
a6d514b24a
ignore open coded password from flake8-bandit
Ignore this open coded password from flake8-bandit because that's the
point of this case to submit this hardcoded password.

Change-Id: I2a5666b5d372ebb124111ae132c4ca34b38b05d9
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-11-12 17:42:59 -06:00
Doug Goldstein
d40564de3e
switch to pre-commit
Switch to using pre-commit for linters. This consolodates our
codespell job into the general pep8 job. To ensure that CI matches what
users get and to not require users to do anything different, call
pre-commit from tox. Brought over some tox.ini differences from the
ironic repo.

Change-Id: Ic2af465a1f9446e9753cdd0d2d9d8c567df71dc1
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-11-11 11:13:13 -06:00
Doug Goldstein
1a3ce79a99
trim trailing whitespace
Trim white space so that our pre-commit config can match the one in
Ironic.

Change-Id: I7894fa80fd22a50c3eb27fec6edc34b1e9edc3fb
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-11-08 20:12:49 -05:00
Zuul
5a66a46903 Merge "Add Port resource" 2024-11-07 15:01:21 +00:00
Zuul
360f2d7050 Merge "Make default request timeout configurable on Connector" 2024-10-31 17:54:04 +00:00
Scott Tran
ba4a6d1cf3
Add Port resource
- Add Port and PortCollection to system as they are any physical port
- Add enumeration for port link status
- Add tests to exercise PortCollection and Port resources
- Add sample json files for PortCollection and Port resources

Change-Id: I9443bc724816b5929e28c6d95f540bdff785850f
2024-10-29 17:37:05 -05:00
Zuul
cf75dee0d8 Merge "Provide vmedia username and password if required" 2024-10-25 14:40:16 +00:00
Derek Higgins
13bbed34e0 Provide vmedia username and password if required
virtualmedia mount on nvidia fails if a username and password
is not provided(even if not required).

Closes-Bug: #2071945
Change-Id: I15d035357c775d422b9b1165b32a51453b4b907f
2024-10-24 17:24:51 +01:00
Zuul
b2c62b636b Merge "Drop unnecessary 'x' bit from doc config file" 2024-10-24 15:27:43 +00:00
Zuul
0a97f20d87 Merge "Remove Python 3.8 support" 2024-10-24 14:33:00 +00:00
Takashi Kajinami
ea8529dca4 Drop unnecessary 'x' bit from doc config file
This file is not actually executable.

Trivial-Fix

Change-Id: I348d395bdf3463d125026e8a00e8c0167bf36ac4
2024-10-24 22:57:41 +09:00
Doug Goldstein
d8cf598aa5
bump pbr to match what pyproject.toml requests
In 8928f45402f26 the minimum version of pbr was bumped to 6.0.0 without
the matching change to requirements.txt

Change-Id: Iba20bb98d310995851fd23d0a735204a292cc3f3
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
5.3.0
2024-10-17 12:07:01 -05:00
Takashi Kajinami
e887eca2ff Remove Python 3.8 support
Python 3.8 is no longer be part of tested runtimes since 2024.2 and is
reaching its EOL soon. Bump the minimum supported python version to
clean up the logic for Python 3.8 compatibility.

Also declare Python 3.12 support because now it's part of the tested
runtimes.

Change-Id: Iec518ada66b5891a50834b574a5ccbe0965e3933
2024-10-04 02:10:02 +00:00
Jay Faulkner
04eca76b93 contributor: links to ironic dev docs, launchpad
- Removes now-erroneous link to storyboard.
- Adds link to Ironic dev quickstart for basic information on running
  unit tests and devstack.

Change-Id: If93a22daf850cbc89c63454bc18eaaa08db19e6a
2024-09-30 14:15:00 -07:00
Derek Higgins
11ff4bcfcf Fix setting "HttpBootUri" attributes
Enhance handling of 'HttpBootUri' so that it is set against
SettingsURI if it present there. If not, fall back to System URI.

Change-Id: I8c29be1332f7ff1ce7346e9bcdccb72be49199d4
2024-09-27 16:13:12 +01:00
Doug Goldstein
8928f45402
add pyproject.toml to support pip 23.1
pip 23.1 removed the "setup.py install" for projects that do not have
their own pyproject.toml by having a hardcoded one within pip.

To address that, this change adds the minimal pyproject.toml
to enable pbr to be properly used to build editable wheels.

See https://pip.pypa.io/en/stable/news/#v23-1
and https://github.com/pypa/pip/issues/8368 for more info.

Change-Id: I30038fa6b4c924ff625deeb21633d487f3ea5ed2
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-09-17 13:13:02 -05:00
Dmitry Tantsur
64e86c9345
Make default request timeout configurable on Connector
This may allow to configure it globally, e.g. in ironic.conf

Change-Id: I53bc2451c09277b3fd18aa21c2c8a49bf451443d
2024-09-12 15:22:40 +02:00
Zuul
c44c2d3d56 Merge "fix spelling and make codespell pass" 2024-09-09 20:38:14 +00:00
Zuul
cd94fc00b6 Merge "EthernetInterface without an Id" 2024-09-09 16:18:00 +00:00
0506d81d37 Update master for stable/2024.2
Add file to the reno documentation build to show release notes for
stable/2024.2.

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

Sem-Ver: feature
Change-Id: I12d9d2f0e24ed07acef5672a26e9fc4a0d1ca32e
2024-09-06 13:09:33 +00:00
Zuul
60d992eaaf Merge "add a link to the release notes in the README" 2024-09-05 23:15:58 +00:00
Doug Goldstein
c582b6471b
fix spelling and make codespell pass
Fixed one typo and configured codespell using the same skip list as the
ironic repo and configured ignore words. Enable codespell as a voting
job.

Change-Id: Iebe532350563fe7551fd4811999ddc1f93b3a71b
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-09-04 12:34:28 -05:00
Zuul
c2ae045911 Merge "Fix versions in release notes" 2024-09-03 23:24:50 +00:00
Doug Goldstein
3abb6caf9c
EthernetInterface without an Id
While the Id field is required on all Redfish object schemas, the field
can be omitted on some hardware. We do not need this field in any of the
code today so make it optional. This is no different than the Name field
being optional which is similarly required per the spec.

Closes-Bug: #2055542
Change-Id: Id78f57280261ef19dbd03046affef58546583aff
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-08-31 12:28:23 -05:00
Doug Goldstein
d1f0faa2b8
add a link to the release notes in the README
Change-Id: Ib56640e8889c198f376beb205e59485d13c5b201
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024-08-30 09:55:13 -05:00
Doug Goldstein
9246f0ad69
drop usage of pkg_resource for newer python compat
pkg_resources comes from setuptools and not the python stdlib. Starting
with python 3.12 and newer, setuptools won't automatically be installed
into virtualenvs so the lack of a direct dependency will result in an
error. Further more setuptools has deprecated pkg_resources and intends
to remove it so adding a dependency would just be a band aid. The python
stdlib has added a replacement for how sushy uses pkg_resources starting
with python 3.9 and newer. Since sushy supports python 3.8 and newer we
must support using the backport package.

Depends-on: https://review.opendev.org/c/openstack/requirements/+/925306
Change-Id: I83719e368f8f7d39963c29c0013f512d1883a8dc
2024-08-28 20:47:30 -05:00
Zuul
7ccea0a4a0 Merge "Adds Ethernet Interfaces for manager." 2024-08-26 15:13:28 +00:00
Riccardo Pittau
83679faa97 Fix versions in release notes
Change-Id: I0ebc74b70cdb749f61cd4001ee7303f41ceceacb
2024-08-23 10:22:25 +02:00
Jacob Anders
dccdadec5c When ManagedBy attribute is missing from System retry with Managers
On some hardware, ManagedBy attribute is missing from System and
Managers attribute is used instead. This change enables sushy to detect
this condition and retry the request, allowing sushy to support such
hardware.

Change-Id: Ibc81e64b8ac0533024c203ea48003aea764901c3
5.2.0
2024-08-15 20:43:02 +10:00
Dmitry Tantsur
c589fae847
Name is not mandatory for Storage/StorageControllers
Unlike the separate StorageController object, the StorageControllers
sub-fields do not mandate a name, and it's actually missing from some
iLO 5 machines.

Change-Id: I814e01a8487d0432deec32f9653bfd35099ebe69
2024-08-07 11:33:46 +02:00
Kamil Gustab
d6aa0ac230 Adds Ethernet Interfaces for manager.
This commits adds the EthernetInterface for the manager.
Most of the code was copied from EthernetInterface from system instance.

Tested on Dell Hardware.

Story: 2011060
Task: 49684

Change-Id: I2d0a5f283da946782b69182d284c3a764bbe65ea
2024-07-31 06:32:58 +00:00
Doug Goldstein
033287f8c2 avoid MAC addresses that are the empty string
Some hardware vendors don't set the MAC address to null but instead use
the empty string. Skip those as well.

Change-Id: I95e26cc20338942113b9076f80741ef72afa3213
2024-07-30 20:21:31 -05:00
Dmitry Tantsur
7f56f778d6
Log the response when unable to parse JSON
This seems to be a surprisingly common problem which is very hard
to debug without knowing what actually got returned.

Change-Id: I7a89d1d294b325577681dafc6edae5f288b533cf
2024-07-02 12:43:22 +02:00
Jens Sandmann
2ac3287f90
Fix link to bugs
Bugs are again hosted on launchpad.

Change-Id: I69e16393aacb7c0de330124ab4cdf7cd22c0cc0b
5.1.1
2024-06-28 18:29:39 +02:00
Dmitry Tantsur
eb3aa8e0c9
Trivial: fix duplicated docstring
Change-Id: I21325881947269e48c04289dd36cd6a84394a0a0
2024-06-12 10:57:08 +02:00
0cec13bf6d reno: Update master for unmaintained/zed
Update the zed release notes configuration to build from
unmaintained/zed.

Change-Id: I31206608ff6b140575ab7cbc8179a6f91843ba21
5.1.0
2024-05-06 06:25:29 +00:00
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
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