Updated documentation of return values and added test to verify
return values
Function self.conn.search_security_groups() cannot be used here.
Arguments for filtering such as 'description' would have to be passed
to self.conn.search_security_groups() in its 'filters' argument [1].
The latter is passed to both as query arguments to OpenStack API
and later to _utils._filter_list() [2] for filtering the results.
Some arguments such as 'any_tags' are only used as query arguments
by openstacksdk [3] when querying OpenStack API. They are no valid
attributes in security_group.py [4]. Whenever those non-attribute
arguments are passed to self.conn.search_security_groups(),
_utils._filter_list() [2] would drop all results because no result
would have a matching attributes.
[1] 0898398415/openstack/cloud/_security_group.py (L31)
[2] 0898398415/openstack/cloud/_utils.py (L63)
[3] 0898398415/openstack/common/tag.py (L19)
[4] 0898398415/openstack/network/v2/security_group.py
Change-Id: Ie7fe9d2e973d38751c48e71e6bd55e56a591ac1f
Previously, all security_group{,_info} and security_group_rule{,_info}
modules were tested in the same Ansible role. This patch splits
tests into two separate Ansible roles to increase readibility and
prevent variable name conflicts, e.g. for expected_fields.
Change-Id: Ifc28435147b3bfe88d4ee5e176469a53b7395dc0
- Update docs
- Change calls from cloud to proxy layer
- Make sure return value is a dict
- Improve test coverage
Change-Id: I857d7ba7b7ca1b23100ee7e85e90e98430d68462
- Use proxy layer where possible
- Image upload has some tricky logic so that stays in the cloud layer
- Convert return value to dict
- Document return values
- Update visibility logic for glance v2 api
- Increase test coverage
- General refactoring to bring more in line with rest of collection
- Deprecate is_public attribute which has been replaced with
visibility.
- Deprecate volume attribute which has been made obsolete with
openstack.cloud.volume module. Removed examples showing the volume
attribute since users are encouraged to use openstack.cloud.volume
module.
Change-Id: I1d8034a3b9a391444ea275b68b06ee3a291c73c3
Make project_info module compatible with the new sdk 1.0.0 and also add
ansible tests for project_info module
Change-Id: I413200cf6a9b8bada7e5d78087246b888d53fac2
With this change we replace zuul.projects with zuul.project that will
imply any project which will run the job. Also we read galaxy.yml as
vars file to predict packed collection naming for futher upload.
Change-Id: I66e27f3026689ad719384203fe66d65f5bca46ce
Needed-By: https://review.opendev.org/c/openstack/ansible-config_template/+/846391
This patch do the following:
* Update catalog_service to use new openstacksdk
* Add catalog_service role to test catalog_service module
Change-Id: I6778f5e91cb0ead63cede28af0111d7ffbbf3ab1
Change If8fda40780050d271c9d869d8959ef569644fd88 unintentionally broke
our integration tests. This patch fixes the code and tests to make
everything pass again.
Change-Id: Ief8d1f9e1eec13a2d435e96a0d70e31a2b4431f2
- Change the implementation to use the proxy layer
- Update the module to return an aggregate object
- Adds a role to test the module
Change-Id: I6a98ba8466863b41fc996855fd12cf9f3097abe0
- Change sdk calls to use proxy layer
- Convert sdk results to dict before returning
- General refactoring of module
- Move recordset specific tests from the dns role to new recordset role
- Adds additional tests to recordset role
Change-Id: If8fda40780050d271c9d869d8959ef569644fd88
The following changes were made:
* Update identity_group_info to use the new openstacksdk
* Added identity_group_info role to test the module
Change-Id: I24e64c9455618952ee612d7413882f0ac022189f
Previously the owner field was not set by module
`cloud.openstack.image`, although it is specified as a module parameter.
The usual approach in `ansible-collections-openstack` is to accept both
names and IDs when referencing openstack resources.
Therefore this commit follows the approach taken by
`python-openstackclient` in [1] and introduces a `project` and a
`project_domain` parameter to identify projects by name or ID and
assign the ID to the `owner` attribute of the image.
The `owner` parameter is left as an alias to `project` in the module.
Story: 2009983
Task: 45012
[1]
cf2de9af79
Change-Id: I3654587df8e40d554aac5126df307961f335332c
(cherry picked from commit acf64a1f72)
This makes image_info compatible with new sdk version
- This patch changes get_image (which is a cloud object method) to image.get_image (proxy object method)
- image.images accepts **query which is a dict object. So this patch changes the args passed to a dict. If properties is not specified it passes an empty dict.
- updates the documentation to reflect the actual returned parameters
- adds a ci test to list all images without specifying image name or property and assert no field is missing
- changes openstack_image to image in ansible return value
Change-Id: Ibf934568f069c305747fc24fbb22ce3fc095286c
- Stop checking for to_dict, breaking compatibility with older sdk
releases
- Updates RETURN doc string with all the returned fields
- Adds a new identity_role_info role to test the identity_role_info
module.
- Change the name of the module return value to remove 'openstack_'
prefix
Change-Id: If8a1145a31d685d41367383930e6fd08d64c6ae8
Switch to SDK's cloud layer function search_domains which allows
us to reduce our code. Added integration test for this module.
Change-Id: Ic7915fd3334266783ea5e9d442ef304fa734ca00
This patch changes the module to use the sdk proxy layer and does some
general refactoring to simplify the code. It will no longer fail if
no password is supplied since it is perfectly fine to create a user
with an password.
Renamed the test role from user to identity_user to match the module
name
Change-Id: I97ee9b626f269abde3be7b2b9211d2bb5b7b3c26
- Changes the module to get user through proxy layer
- Adds a role to test the module
- Renames the return value to drop openstack_ prefix
Change-Id: I99e98a529ce74ff2ca77a67d09f188228e6a0e37
OpenStack SDK 0.53 added parameters is_forced_down and updated_at
in openstack/compute/v2/service.py, hence our compute_service_info
module will return different values depending on which release of
the OpenStack SDK is used.
Ref.: 5450c45253
Change-Id: I4b055266555cb91681d0ab6edcaa850e061f3afb
OpenStack SDK 0.53 renamed parameter disables_reason to disabled_reason
in openstack/compute/v2/service.py, hence our compute_service_info
module will return different values depending on which release of
the OpenStack SDK is used.
Ref.: 5450c45253
Change-Id: I1c0f787f7f67c92f92dd106fc8d55580461e4aa3
Tag object was introduced to server role in commit c8a5be6b30 [1] to
allow skipping server tests when volumes are not available.
Whenever tag object is specified, Ansible will run those three tasks
in role server. But as our server module has not been ported to
OpenStack SDK 1.0.0 series it will fail even if someone only wants to
test our object ci role.
This patch removes all occurrences of the object tag in the ci server
role. Since it is not used anywhere in our code it will not break ci.
Ref.:
[1] c8a5be6b30
Change-Id: I222fac499c9a3cb16c4581fb4347170a4d97f833
Make it compatible with new SDK.
Although this one was already using self.con.dns.zones to retrieve the
zones, it wasn't using the to_dict(computed=False) and was still
removing the location (which is obsolate when you use to_dict.
Change-Id: Ie2a5b772acc0c8c8338f6f1da877564a077e3b7a
Attributes such as location and tenant_id are computed by OpenStack
SDK. We do not return these fields in floating_ip_info because e.g.
tenant_id has been marked as deprecated and is a copy of the
project_id field.
Ref.: 70a06d9990
Added an assertion to CI which checks that all advertised fields
are returned by floating_ip_info. This helps with detecting breaking
changes in future updates.
Change-Id: I62e4681cd57f82054f68efe1dc59be2cca118135
We do no longer return computed values here. Note, this breaks backward
compatibility because we do no longer return the location attribute.
It was never documenteed anyway.
Change-Id: I11af9486a6a284d1756380548fca22435c43765a
This allows to execute actions on servers outside of the current auth
scoped project if the user has permission to do so.
Change-Id: Ifb3f40973a76ad8c57bcbcbcb8e73c917681096b
After a stack has been removed with module stack, a call to module
stack_info might still return this stack with its status set to
'DELETE_COMPLETE' and its status_reason defined as 'Stack DELETE
completed successfully'.
Change-Id: Ice843c403669b4a4e1b12ec73db1fb00d1405980
Keystone project doesn't have project "properties" documented and
discourage users to use them. Remove support for this feature and
tests for it. It was removed from new SDK as well.
Change-Id: I2e47ade56c3df5945e991d11d70f429760c0d852
The dns-integration extension adds the dns_name and dns_domain attributes
with this change updated/set operations can be done on those attributes
Change-Id: I4bb0f8692dec3fba5ab50f07571029f374761a5b
The module retrieve the nova compute services info
filters by
* host
* binary ( nova-compute, nova-conductor, ... )
Closes-Bug: 2009775
Change-Id: I0f9cac27a7a91727ba1d005e04431e8f83c46fa8