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: Id513bfda09688fc9ba7ea8dc7ae7304bf06994e6
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
This is needed when fakeIPA is needed is running with TLS
Change-Id: Ida70590ac464992be61076ae1f2e5e9c13862983
Signed-off-by: Mohammed Boukhalfa <mohammed.boukhalfa@est.tech>
This change attempts to resolve redirect issue triggered by passing VM
name to UpdateService.SimpleUpdate by making an additional call to
libvirtdriver uuid method.
Change-Id: Ie20846b5c0fcce51465feeefb59ec521de7b2770
The fake driver can now share the status of fake systems with any external component expected to run on the VMs. This update adds a function to notify an external API when the power status of a fake VM changes. The notification is sent via a PUT API method with the system object as a JSON parameter. This allows the receiver to implement an endpoint that triggers some process based on the new status.
Change-Id: I8897c4ce03fc02b3fec4152ff6d52a4e8e81013a
Signed-off-by: Mohammed Boukhalfa <mohammed.boukhalfa@est.tech>
Currently the sushy-tools jobs will not run if the changes are made
in test-requirement or unit tests, this improve the config of our
jobs to not run when changes are made to:
- tox.ini
- setup.cfg
- doc/*
- releasenotes
- rst files
Change-Id: If2b683195212441a5d227f4c8a3af193f78f1b1c
This change adds UpdateService resource and SimpleUpdate action to
sushy-tools. The goal behind this addition is enabling support for
automated testing of firmware update functionality in virtualized
environments. Note: no actual firmware update is performed with these
API calls, the only result is incrementing the BiosVersion value stored
in instance metadata.
Change-Id: I22d9b7614a5a7243e08d40392a0a49a31ee00034
Turns out some of the unit tests needed some additional fixes which
were spotted when I ran my change to main.py, so those fixes
are included as well. Likely just rooted in brain typo-ing.
Change-Id: Ib9e30b6dc54dd7476dd854e1c4214ea3e235909e
Currently, BiosVersion value returned in respose to GET /System/
comes from a value hardcoded in template. This change replaces the
hardcoded value with a variable stored in sushy:bios metadata in the
libvirt xml definition of the VM.
Change-Id: Iaefc695c6cb177bc232112515c7b33c7b9af8b68
Previously we couldn't use a relative path in --config option
because it was interpreted as a path relative to the package dir.
Task: 49792
Story: 2011082
Change-Id: I59664991079a969a5af93114a0ab45fd36a4bcbe
Firmware auto-slection in Libvirt uses the QEMU firmware
description files to ease the burden on users.
This change adds support for get/set boot mode and secure
boot for domains created with firmware auto-selection.
Prior to this change operations on fw auto-selection domains
with errors such as:
libvirt: Domain Config error : loader attribute 'readonly'
cannot be specified when firmware autoselection is
enabled
Change-Id: I533edb7a2a296026bb98977f7dd0de2acf553b7e
The implementation does the following.
On insert:
- Upload the image directly to glance from the URL (long running)
- Create and attach a new volume the same size as the root disk
- Rebuild the server with the image, replacing the contents of the root
disk
- Delete the image
On eject:
- Assume the attached volume has been rewritten with a new image (an ISO
installer or IPA)
- Detach the volume
- Create an image from the volume (long running)
- Rebuild the server with the new image
- Delete the volume
- Delete the image
The long running operations are performed in a background thread task.
Only one long running operation (insert or eject) can be performed
concurrently for each server. If a long running operation fails, the
only way to feed that back to the user is by re-raising the error during
the next insert/eject request for that server.
The documentation is updated to describe OpenStack driver specifics.
Also the Redfish spec has deprecated accessing VirtualMedia via Managers
so the documentation is updated to refer via Systems.
Change-Id: I24ea943325a23a06887a185801211b4a9570e284
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: I98e55372488fb0acc24d08b23ca6b41f7cb2764a
There will be no image when the instance boots from volume. In the
future there could be a fallback to fetch the metadata from the volume
but for now just return None for boot mode and secure boot.
Change-Id: I00576ee19571bd91683fd6c1754e0624e469b2c9
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: I384db875eb9090e9d9e711af3479021bdbed5a26
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: I3ab0d3acd2e008038605ea0fbfc4b199b312a6e5
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: I563e316ba9955766e28d9cec702387fac472c414
These translation sections are not needed anymore, Babel can generate
translation files without them.
Change-Id: Ief444d81e6a70960d40463568ab608c0991eba61
Werkzeug>=2.3.0 introduced a logic to detect incorrect Content-Type and
now returns 415 instead of 400 if an application tries to load request
body as json but Content-Type is not `application/json`.
This fixes the unit test broken by that change.
Change-Id: I3470813661be312eac7bbead91af7913aa15ac9d
* "full" is the default and provides all features
* "minimum" only provides boot settings
* "vmedia" is "minimum" plus virtual media and NICs
Closes-Bug: #2046153
Change-Id: I57cff90b1327104f65264d3fb87dafc89f3be521
VirtualMedia on Managers is deprecated, so make System the primary
source while keeping compatibility.
Change-Id: I933d0d5c9f78109f46eb314bef05cc8d653d7137
When libvirtd is started as a non-root user it does not have access to
folder /var/lib/libvirt. By default, libvirtd in session daemon mode
creates a nvram file at path ~/.config/libvirt/qemu/nvram/\
[DOMAIN]_VARS[EXT] instead [0],[1].
Querying the nvram path in session daemon mode is difficult because
libvirtd does not expose it nor $HOME of the user that runs the daemon.
As a workaround, this change will let libvirtd create the nvram file
path if it has not been previously defined [2]. However, if it had been
defined earlier then the path will be changed to enforce regenerating
it from the template.
[0] 2b148748c2/src/qemu/qemu_conf.c (L203)
[1] 2b148748c2/src/qemu/qemu_firmware.c (L1124)
[2] 2b148748c2/src/qemu/qemu_firmware.c (L1065)
Change-Id: Id78101f5c1f5fdf4b365d2d270dbde8877b05dbf
This is an alternative to https://review.opendev.org/c/openstack/sushy-tools/+/902015
The tl;dr is we can leak the uuid out in some weird cases and
while things will just keep working, some methods internally
really just want a UUID and not a name. The other patch
is the name fix.
This, explicitly uses a UUID for httpboot, in the event
it is still happilly working with a name up until that point.
Change-Id: I52121f7e6148aaa3739bc9900b4480b7b3dff8fc
In trying to test the Redfish UEFI Http interface logic, it was
observed that we were not getting the values out of the emulator we
expected. So this change simplifies the logic which wasn't quite
working for us.
We also realized the code was trying to set the boot interface before
actually creating it. Doh!
It seems, also I might have had some other issues in the original patch
which we couldn't detect without fully getting everything working, so
some additional refactoring exists with this patch.
Change-Id: Ibfe5a560a25251965e8bad87012f64e89d9640be
Maps the HttpBootUri to the virtual media functionality, so we can
leverage sushy-tools for testing HttpBootUri functionality.
Change-Id: I51a7e684bafdb6b3aa9adda35ae438c747c9847a
Currently we don't have the BiosVersion information when
we query the System resource in sushy-tools, this cause
problems when checking the information with Firmware Interface
Change-Id: I8b5bf1387f32bd4d4bd91d3211782d900320b319
Add a driver to provide a limited emulated redfish
API to ironic nodes. This would be needed in cases
where a redfish compatible endpoint is needed but
but don't have direct access to the BMC (you only
have access via Ironic) or the BMC doesn't support
redfish.
Change-Id: I9a3f6a178978ef25efe5129d8bf5f94e031d9751
As these files are in /tmp the can be garbage collected
causing a FileNotFoundError. As it is trying to remove
the file anyway there is no reason to propogate this
error as the end result is the same.
Change-Id: If44be26e3fba70b89aec6ba88743d740276e7560