Add support for managing Ironic baremetal port groups.
Include CI role coverage and unit tests for create, update, delete, and check mode behavior.
Add a reno fragment describing the new module.
Tests-Run: python -m pytest tests/unit/modules/cloud/openstack/test_baremetal_port_group.py
Change-Id: I98564fcb5b81a1dd7be1fbf5ffca364483296655
There is an issue with the logic that results in a failure
to create a server when auto_ip is false. This patch tests
for the bool value of auto_ip and the two lists rather that
None.
Closes-Bug: #2049046
Change-Id: I2664c087c4bde83c4033ab3eb9d3e97dafb9e5cb
Signed-off-by: James Denton <james.denton@rackspace.com>
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Right now linters test fail due to a trivial issue in mock loader.
This aims to fix CI for the repo.
Change-Id: Ib58e70d3a54b75ca4cb9ad86b761db1ded157143
routers_info's interfaces_info attribute is not provided by
openstacksdk, it is added to each router resource by the routers_info
module after retrieving the routers list. To get the required data
list_router_interfaces() [1] is being called for each router resource
which then retrieves all ports for each router. This requires extra
api calls which might be useless because we do not know whether the
user actually cares about the ports. For getting ports of a router
we have the openstack.cloud.ports module. So instead of proactively
retrieving the router ports we drop the interfaces_info attribute.
The interfaces_info attribute was introduced because retrieving
interfaces via openstacksdk and openstack.cloud modules was
complex in the past [2]. Nowadays, using openstack.cloud.ports
Ansible and Jinja2 filters retrieving ip addresses of a router
is straight forward. In case someone still needs the old
interfaces_info attribute, one can refer to the module example
to see how it could be reproduced. But in general, retrieving the
router interfaces is much easier as can be seen in the updated
integration tests.
[1] 3f81d0001d/openstack/cloud/_network.py (L1926)
[2] https://review.opendev.org/c/openstack/ansible-collections-openstack/+/703927/6/plugins/modules/os_routers_info.py
Change-Id: I7fbdf11d07c95421d3aee800bfeebb88ea829817
Sorted pip requirements file to improve readability.
Moved pip requirements for tests into tests subdirectory and dropped
'pip-' prefix to shorten filenames and conform with common naming
scheme for pip requirements files.
Added constrains on OpenStack SDK 1.*.* to job ansible-collections-\
openstack-functional-devstack-releases on master branch because only
stable/1.0.0 branch is compatible to the OpenStack SDK 0.*.* series.
Changed job ansible-collections-openstack-functional-devstack-releases
on master branch to non-voting because OpenStack SDK 1.*.* has not
been released to PyPI yet, so tests on master branch are expected to
fail once we introduce breaking changes from stable/1.0.0 branch.
Change-Id: I6b6bb8c6900f7c8341bbf3f9a24999fbf693ba4b
Releases of OpenStack SDK on PyPI will soon switch to the 1.*.* series
which our stable/1.0.0 branch is incompatible with. Previously, in
commit 0f532d10f3, several jobs have been changed to run on master
branch only.
This patch adds siblings jobs for our stable/1.0.0 branch which
pull the latest SDK releases of the 0.*.* series from PyPI instead.
Ref.: 0f532d10f3
Change-Id: Iefc6acfa4c25eb5d9ab062a3bfa655be2188cb77
Move only from victoria, since Ansible 2.12 is installed with
py > 3.8.
Remove ussuri from voting jobs, use it for experimental only.
Change-Id: I74b7272794ea5fbafb7d81a5cf0068c09130bb0d
1. Added ImageInfoModule class
2. Added basic test to see if image_info reflects created image and deletion of image
3. Added deprecated_names
4. Added 'type'/'required' in argument_spec
5. Removed debug statements from test as we are checking already with image_info module
Change-Id: I6ab5fd5384392f9de0af01b1937a75de4f16d28d
This structure does not reflect the actual ironic API and is mostly
meaningless nowadays. Just let people populate driver_info directly.
Change-Id: I04d168dc86e8c0115b7183b14499fe1812af7343
Migrated networks_info module to OpenStackModule and updated playbook to test the module in CI jobs. Added deprecated_names tyo module.
Removed "ansible-deprecated-no-collection-name" exception for networks_info for ansible 2.10 and 2.11. Reverted 'False' to 'false' and updated filters (case sensitive) to check for 'False' instead
Change-Id: I85e19f0db8b4ee549137249477d0b7f5d82e9865
don't inherit OpenstackModule class from AnsibleModule class to
prevent occasional overriding Ansible methods or vars and failing
module.
Change-Id: Ic34fff0c938eb87cc0d2c5e98fbafed64bf349f6
Check only things we build into collection.
Ignore sanity files from full CI jobs.
Add queens to gate because it's voting.
Add files to ignoring when building collection.
Remove non-required lines from ignorign sanity files.
Change-Id: I0dde756efa133cf75b67d072af78a1f8307ce932
This is separate from the previous patch - it's just the results
of running the script so we can review the two a little independently.
We should probably squash them.
Change-Id: I838f15cf4a32455a5be20033c8ddc27db6ca15c0
The 2.10 transition has a routing.yml file that points each
individual module from ansible/ansible to a new location. That means
we can put:
os_server:
redirect: openstack.cloud.server
into lib/ansible/config/routing.yml in ansible/ansible and have
the result be the end user's playbooks still working with the
old names while providing new names that are less ugly.
This adds a routing file to our collection repo, as well as the
script used to generate the new mapping.
Change-Id: Ia5d18282b14ad0d86a347343be8bb477ae47130a
We can't run linters in an install because installs expand
symlinks to regular files so the ansible-test code that detects
symlinks can't work so it looks at docs for symlink aliases
as if they were real.
Change-Id: I0a5659a1f693261a21a5b29528f950b846205f2e
ansible-galaxy collection build modifies the contents of the tree.
Let's not go in to why this is bad, but instead just deal with it.
The issue in question is that is removes the +x bit from files in
the tree, which means you can't run a build twice in a row locally.
Shrug. Just roll with the -x and update our usage to reflect it.
Change-Id: I0f82531e99a98d656b60079fd3e94d4e3a1dbb6b
This is a topic where there are two points of view. While neither
is fundamentally better than the other in reality, what's best is
to not have any arguments about it. The tox.ini comments about 503
and 504 that were in place make the argument that:
- 503 is intended to be disabled and 504 enabled by default
- Donald Knuth believes 504 is the right way
Since Donald Knuth is smarter than all of us, align with 504, match
the comments in the file and turn on enforcement to keep it that way.
Change-Id: I92d4d1e82935e30ae42a0e14e641cbe36fd6e811
Importing from * is not a thing that should be done, as it masks
errors and makes code hard to understand. There are some copy-pasta
files that violate this. Mark them with noqa for now, because we don't
actually care about them.
Change-Id: I790f88c75ea546d83e347e42df0050ad36211936
The unit test requirements were copied as part of the migration from the
Ansible repo. This removes requirements that are not used in the
OpenStack Ansible collections unit tests.
Change-Id: I8b8914ffa327b4914169e79625972d4c67e406cb
since inception skip_update_of_masked_password is misspelled
as skip_update_of_driver_password in the documentation.
Change-Id: I439f672b82385b4e317f2442755a81ef9c7c6bda
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>