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
It supports for adding extra_specs in updating project.
Change-Id: I98a73ed9367d52df82213b3b7c484ceac10acf3d
Signed-off-by: Naoki Hanakawa <naoki.hanakawa@lycorp.co.jp>
Add share_type and share_type_info modules.
Uses direct Manila API calls via the SDK's session/connection interface
since share type resources are not available in openstacksdk.
Change-Id: I49af9a53435e226c5cc93a14190f85ef4637c798
Signed-off-by: Tadas Sutkaitis <tadasas@gmail.com>
When creating a coe cluster, a flavor lookup occurs which
fails as nothing is specified. This adds a default flavor
which can be used to test cluster provisioning.
Various checks used a deprecated truthy check which no
longer works with Ansible 2.19
Inventory cache format change in Ansible 2.19
galaxy.yml required in tmp testing directory or version
checks fail for linters with Ansible 2.19
Change-Id: Iaf3f05d0841a541e4318821fe44ddd59f236b640
Adds a module to manage Neutron network segments where the
segmentation plugin is enabled.
Segments are relatively simple and do not support modification
beyond the name/description, so most attributes are used for
initial segment creation, or filtering results in order to
perform updates.
Depends-On: https://review.opendev.org/c/openstack/ansible-collections-openstack/+/955752
Change-Id: I4647fd96aaa15460d82765365f98a18ddf2693db
This module introduces the ability to use the cinder manage
and unmanage of an existing volume on a cinder backend.
Due to API limitations, when unmanaging a volume, only the
volume ID can be provided.
Change-Id: If969f198864e6bd65dbb9fce4923af1674da34bc
When performing these actions a server will start `ACTIVE` and end
`ACTIVE` meaning that the Ansible module skips over the host you are
trying to reboot because it looks like the action was already taken.
Tests are updated to reflect `changed=True` with the end state
remaining as `ACTIVE`
Closes-Bug: 2046429
Change-Id: I8828f05bb5402fd2ba2c26b67c727abfbcc43202
The role_assignment module always looks up the user, group and project
so to support cross-domain assignments we should add extra parameters
like OSC to look them up from the correct domains. Switch to using
the service proxy interface to grant or revoke the roles as well.
Partial-Bug: #2052448
Partial-Bug: #2047151
Partial-Bug: #2097203
Change-Id: Id023cb9e7017c749bc39bba2091921154a413723
When creating a subnet with disable_gateway_ip, the value
was not passed into the creation which would lead into
a subnet being created with a gateway, and then on updates
it would have the gateway removed.
Change-Id: I816d4a4d09b2116c00cf868a590bd92dac4bfc5b
The router module used to support adding external fixed IPs
by specifying the subnet only, and the documentation still
allows for this. Unfortunately the logic currently results
in an error message stating that the ip_address cannot be
null.
This patch reinstates this functionality and adds tests to
avoid a future regression.
Change-Id: Ie29c7b2b763a58ea107cc50507e99f650ee9e53f
Since long time we knew that it is necessary to explicitly invoke
`to_dict` for openstacksdk resources before passing them to Ansible.
Here it was missed and in addition to that records are only returned
when the recordset becomes active.
Change-Id: I49238d2f7add9412bb9100b69f1b84b512f8c34b
This adds a module for getting information on one or more
object storage containers from OpenStack.
The following options are supported:
* name - Get details for a single container by name.
When this parameter is defined a single container is returned,
with extra metadata available (with the same keys and value
as in the existing object_container module).
* prefix - Search for and return a list of containers by prefix.
When searching for containers, only a subset of metadata values
are available.
When no options are specified, all containers in the project
are returned, with the same metadata available as when the
prefix option is used.
Change-Id: I8ba434a86050f72d8ce85c9e98731f6ef552fc79
Tags are not included in the metadata and are not supported by PUT
/servers/{server_id}, requiring a specific mechanism for modification.
With this fix, existing tags on the server will be completely replaced
by the new set of tags provided during the update
Also optimized tags tests a bit
Change-Id: I2673ed57d848654427dcb7ed7aceba811a3dd314
Enable configuration of loadbalancer options within the quota module so that the current collection can be used to address Octavia quotas.
Change-Id: I1dd593f5387929ed522d54954fc63dd535df7c7c
With this change, multiple allocation pool may be specified when creating
a subnet. Allocation pools are defined as a list of dictionaries.
For example:
openstack.cloud.subnet:
name: sub1
network: network1
cidr: 192.168.0.0/24
ip_version: 4
allocation_pools:
- start: 192.168.0.10
end: 192.168.0.50
- start: 192.168.0.100
end: 192.168.0.150
Change-Id: I77a06990de082466dc6265a14c379b8bbaf789e8
Adds target_all_project option to neutron_rbac_policy
module, for specifing all projects as target projects
explicitly.
Change-Id: I1393463a79fc83bcda7aa5642f5d3ed27fb195b5
Add a way to filter which volume service is running on a host or list
which hosts run available volume services.
Closes-Bug: #2010490
Change-Id: Icb17f6019a61d9346472d83ddcd2ad29c340ea05
Glance images can be deactivated ad reactivated with corresponding
API calls. It might be useful for operators to be able to control
these states through ansible modules as well. Instead of introduction
of the new parameter we're adding new state for the image that is
`inactive`.
Change-Id: I0738ff564f81a31690872450a4731340ed6bbeb1
SDK does return all keys and values of the template labels as
strings. At the same time user can define some labels as integers or
booleans, which will break comparison of labels and lead to module
failure on consecutive runs.
Change-Id: I7ab624428c8bb06030a2b28888f5cb89bb249f08
This adds a Ansible module for managing a
Neutron trunk and the sub ports associated
with the trunk.
Change-Id: I0e1c6798b6cc30062c881d1f92fdd4d630d31106
A ValueError is raised when running the object_container module with the
`metadata` param against a container with existing metadata.
When the module attempts to enumerate the existing container metadata, a
ValueError exception is raised, because the code is iterating over the
metadata keys, instead of `dict_items`.
Compare to the iteration through another dict `metadata` on the next
line:
new_metadata = dict((k, v) for k, v in metadata.items()
This change adds a call to `items()` on the dictionary.
Note that this is added outside the parentheses so that the behaviour of the
`or` statement is not affected, and that another exception isn't caused
if `container.metadata` is not a dict.
Closes-Bug: #2071934
Change-Id: Ie5e1f275839e38340a75ab18c3b9ec9bc7745d68
When creating a new object from file, a AttributeError is raised.
This is caused because the sdk does not return anything when creating an
object from a file.
With this change, the `_create` function will always return an object.
Closes-Bug: #2061604
Change-Id: I34cefd1bb10c6eef784e37d26122e5ed2c72488d
I suspect that the change to `update_quota_set` in openstacksdk commit
[9145dce64](https://opendev.org/openstack/openstacksdk/commit/9145dcec64)
has caused a regession in the quota module, making it not work correctly
for volume and compute quotas.
This change updates the calls to `update_quota_set` with the new
signatures.
Closes-Bug: #2068568
Change-Id: I604a8ffb08a76c20397f43c0ed3b23ddb11e53eb
Create or delete a Keystone application credential. When the secret
parameter is not set a secret will be generated and returned in the
response. Existing credentials cannot be modified so running this module
against an existing credential will result in it being deleted and
recreated. This needs to be taken into account when the secret is
generated, as the secret will change on each run of the module.
The returned result also includes a usable cloud config which allows
playbooks to easily run openstack tasks using the credential created by
this module.
Change-Id: I0ed86dc8785b0e9d10cc89cd9137a11d02d03945