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>
Proper variable name should be %(err)s instead of %(error)s
Change-Id: I96c08c7daa2f4258dda1547a32f01747709d6d0b
Signed-off-by: Alexon Oliveira <alexon@redhat.com>
Upgrade our syntax to Python 3.7 using pyupgrade support via ruff.
Change-Id: I475eed8abbfff0717211605364482ab942c69369
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
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>
pycodestyle reports this as an ambiguous variable name.
Change-Id: Idf2a37253a8872ebf9e2e26b08804f68d5d7a245
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
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>
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>
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>
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>
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>
- 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
virtualmedia mount on nvidia fails if a username and password
is not provided(even if not required).
Closes-Bug: #2071945
Change-Id: I15d035357c775d422b9b1165b32a51453b4b907f
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>
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
- Removes now-erroneous link to storyboard.
- Adds link to Ironic dev quickstart for basic information on running
unit tests and devstack.
Change-Id: If93a22daf850cbc89c63454bc18eaaa08db19e6a
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
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>
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
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>
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>
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
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
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
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
Some hardware vendors don't set the MAC address to null but instead use
the empty string. Skip those as well.
Change-Id: I95e26cc20338942113b9076f80741ef72afa3213
This seems to be a surprisingly common problem which is very hard
to debug without knowing what actually got returned.
Change-Id: I7a89d1d294b325577681dafc6edae5f288b533cf
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