Add an option to configure the expected provision state for newly
created baremetal nodes.
Change-Id: Iafb9206b86ea366d45c6919247847f5f8d221952
Signed-off-by: Jed Preist <jed@stackhpc.com>
Stop CI failing due to DNS zone update timing out. Designate currently
has a bug where an update that only changes the description of a DNS
zone gets stuck in pending. Update the TTL as well to work around this.
https://bugs.launchpad.net/designate/+bug/2171489
Change-Id: I47ec220f0db00dde996962077a15b2a8b2f072ee
Signed-off-by: Jed Preist <jed@stackhpc.com>
If we have multiple networks with the same name in different projects,
we will get an error in a global search. So first we should search in
specified project and only if the network is missing there, do a global
search. This should allow creation of multiple projects with the routers
using the same network names.
Change-Id: I40f41a6ee3e18d7cb2fc7fdd375539066444f3fb
Signed-off-by: Denys Mishchenko <denys.mishchenko@cleura.com>
Allow the creation of baremetal nodes without specifying any NICs.
In this case switch the target provision state from available to
enroll.
We're proposing this patch to support enrolling nodes as a first
step before running an out-of-band Redfish inspection to get the
NICs.
No change is made to existing workflows.
Change-Id: I9b1636d778e7477191bfbe6094bd6bc70a4d384e
Signed-off-by: Hollie Hutchinson <hollie@stackhpc.com>
Signed-off-by: Doug Szumski <doug@stackhpc.com>
Bump galaxy.yml to 2.6.0.
Add a 2.6.0 entry in changelogs/changelog.yaml,
regenerate CHANGELOG.rst with antsibull-changelog.
Tests-Run: tox -e pep8
Change-Id: I03a4a424d1f47a9fdaa70efae9b8c9a3fa60b072
Signed-off-by: Grzegorz Koper <grzegorzk@stackhpc.com>
Seemingly, ansible-test unit tests were not run in CI for a while and
are broken in multiple places.
This patch aims to re-incarnate unit testing of modules
and execute them as part of the sanity tests.
We use sanity right now, as they perform testing against different
ansible versions and unit tests take multiple seconds to complete.
So spawning a separate nodes would be an overkill.
Unit tests have also detected a regression in server module, as existing
nets generation can create a generator, where `isinstance(net, dict)`
will return negative result, as it is gonna
be a generator, not a dict.
So this part has been refactored to avoid poitential regressions.
Change-Id: Ibefc087239b5c8d5e843c977c2c5a2250ae0bfbd
Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
openstacksdk 1.0.0 was released 3½ years ago [1]. pip is not going to
pull that version any more. These checks are redundant.
In addition, we can remove sdk_version extra var. Change
I9665f04e6c0d5a84d6c20a73ef7b0dfdc7bd8159 removed the last guard that
relied on this, similarly about 3½ years ago.
[1] https://pypi.org/project/openstacksdk/1.0.0/
Change-Id: Ic0dd7bc5de1f24d1ee3336ccea97aced850f86af
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
At the moment project documentation does not contain any mention
on how changelog should be produced.
Some use reno, some use fragments. At the moment there is no transition
from reno to antsibull format is available, so let's ask contributors to
follow ansible's format of changelog fragments.
In case we come up with a transition layer from reno to fragment format,
or antsibull replacement, we can change documentation.
Change-Id: I048f80af849d2872be866e44882d2a8fcbf01cfc
Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
In order to generate a proper changelog as a part of releasing
process, we should maintain proper fragments instead of the
notes produced by `reno`.
This patch moves content to the expected place.
Change-Id: Icedb383b08a2e7ce60f5423912c09b2c499070ad
Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
Introduce openstack.cloud.volume_retype, a new module that wraps
the Cinder os-retype block storage action (POST /volumes/{id}/action)
to change the type of an existing volume.
The module supports both migration policies exposed by the Cinder API:
- 'never' – changes volume type metadata only; requires source and
target types to share the same storage backend.
- 'on-demand' – triggers a full data migration to the backend
associated with the new volume type.
The module is idempotent: if the volume already carries the requested
type no API call is made and changed=false is returned. It also
honours Ansible check mode, resolving the volume and target type to
verify feasibility without mutating any state.
A wait/timeout mechanism is included. For on-demand retypes the module
polls migration_status until 'success' or 'error'. For never retypes
it polls volume status until 'available'.
The equivalent CLI command is:
openstack volume set --type <type> --retype-policy <policy> <vol>
This closes a gap in the collection: openstack.cloud.volume handles
create/delete/update but does not expose the retype action.
Integration tests are provided covering: basic retype, idempotency,
check mode, lookup by UUID, and error handling for missing volume
and missing volume type.
Change-Id: I32b2b6303366a19baa1e3f1473b09650f6daee66
Signed-off-by: Simon Dodsley <simon@purestorage.com>
This module allows operators to get informations on
compute aggregates in a cluster, including availability zone
informations and hosts membership.
Change-Id: I14fa8d6914072bee314efa3753633933b21e9439
Signed-off-by: Bertrand Lanson <bertrand.lanson@infomaniak.com>
ansible-core 2.19 introduced _ANSIBLE_PROFILE alongside _ANSIBLE_ARGS.
set_module_args() in utils.py and test_baremetal_port_group.py only set
_ANSIBLE_ARGS, causing "No serialization profile was specified" errors.
Set _ANSIBLE_PROFILE to 'legacy' to match the pre-2.19 behavior.
Change-Id: I1073f347ce18f061b5fa099442a6b6aa10c42507
Signed-off-by: Bertrand Lanson <bertrand.lanson@infomaniak.com>
This module introduces the ability to set image metadata
which is distinct from regualt volume metadata, and is
required for correct boot-from-volume behaviour.
This allows workflows such as replication and disaster
recovery to correctly preserve image provenance and
Nova boot semantics.
Change-Id: I55732fbe8fc6bd579b8542f834033650a076db76
Signed-off-by: Simon Dodsley <simon@purestorage.com>
Ironic supports setting a shard key on baremetal nodes
which can be used to scale out the Nova Compute Ironic
service. This change adds support for setting the shard
key.
Change-Id: I9694470a8ce6d964d6251bda4463f025bd4245e0
Signed-off-by: Doug Szumski <doug@stackhpc.com>