Module option 'listeners' has been removed because it shares
functionality and a huge amount of code with
lb_{listener,member,pool} modules.
Co-Authored-By: Rafael Castillo <rcastill@redhat.com>
Change-Id: I839365bd3485859a2351b0124eae9d09a9d0b31a
Reboot actions (both SOFT and HARD) were missing in ansible actions.
Reboot is different than stop and start, because reboot (HARD) is asking
openstack nova to recreate the libvirt XML, which is sometimes needed.
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: I43a42010e7474f47020c8df2839f8584157c97a4
Tox>3,<4 does not support dots in generative envlists and tox>=4 changed
its behaviour when it detects hyphens in env names [1].
[1] 0580121601/src/tox/tox_env/python/api.py (L130)
Change-Id: I63ad716415755d2a140a6ade97d22bd18236a0df
Module templates have little benefit because
* they are not documented anywhere,
* their structure is not suitable for our modules, hence not a
single module is written according to the templates,
* contributers better base their own modules on existing modules
because we have modules for most OpenStack components,
* they are outdated, e.g. normalizing is a relict of
openstacksdk<0.99.0 and results,
* they are bloated, e.g. *_info module is doing preliminary checks
and creating filters in separate functions which proved in other
modules to be much better readable when inlined,
* they are hard to understand, e.g. argument_spec definition is
a huge Jinja2 template which does nothing except for copying
arguments from one place to another,
* they are not tested.
Change-Id: I460b75c09a361e712bbfb002c1ad1d03b3dff8ee
This will, like all other options changes, recreate the flavor. This
matches the workflow allowed by the openstacksdk (if description is
not set, it defaults to None).
Change-Id: I3d46a3f527f0632f42f6796c0a2701addebde640
Previously both modules object and object_container had huge overlaps in
functionality. Both allowed to create and delete containers. One would
not have to pass a object to the object module at all and could use it
to manage containers only. Now the object module has been changed to
manage an object in a container only while the object_container module
is responsible for managing Swift containers only.
With object module it is now also possible to pass data instead of a
filename via module options. The container_access functionality has been
dropped from object module. It has been moved and extended as read_ACL
and write_ACL options in object_container module.
With object_container module it is now also possible to manage the
container access with read_ACL and write_ACL options. Those mirror
earlier container_access option of the object module which has been
removed.
Change-Id: I96fb9b946444866b157655e148250f1eda35e942
- Switch to using proxy layer calls
- Return whole server resource instead of only metadata map
- Swap the name and server aliased parameters
- Add a server_metadata test role
- Ensure check mode returns tentatively updated metadata
- Remove server_id return value
Change-Id: Id63e6a80d1b8e3574911016fec792f00b63f1524
Instead of asserting that openstacksdk created a logging file,
we read the contents of that log file now. The benefit is, that
this integration test gives users an idea how to actually use the
logging feature and also read the contents of the log file.
Change-Id: I9e3c75dda4c1c920937c9780fbdcbe3caeb4d6ad
Match defaults in spec and documentation, make happy ansible-test.
Change-Id: Ifd6a02e957d1f0df27d89c350fb9d1ebf1ca7680
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Dropped default values of min_disk and min_ram parameters because
it interferes with the update mechanism and glance uses those values
anyway [1], [2].
If the image is already present and visibility param is defined we
should check its visibility and correct it if needed. Added tests
to verify that both is_public and visibility can change the image.
If both name and id are specified for the image, we might want to
update the image name. This rely on fact that id pram is checked first.
Added rename tests to verify this.
For some reason if image object is used for the image update, 409
error produced and exception trown, but the change is in place. So
instead of image object, update query rely on the image.id
[1] 75051dd5a2/glance/db/simple/api.py (L226)
[2] 75051dd5a2/glance/domain/__init__.py (L125)
Change-Id: I9ca6b78bec96b69e6946b65796f12314a1ec6ab4
openstacksdk's create_server() [1] takes cloud-init userdata as a
plaintext string (or other data types [2]) via argument 'userdata',
not 'user_data' [3]. This is 'userdata' argument of create_server()
is different from the 'user_data' value which is returned [4]. The
latter is base64 decoded, while the former is e.g. a plaintext string.
As a (tiny) visual indicator for this difference, this patch reverts
the module parameter 'user_data' to 'userdata' which was used before
this module got refactored [5].
[1] 57fbb72e32/openstack/cloud/_compute.py (L678)
[2] 57fbb72e32/openstack/cloud/_compute.py (L1757)
[3] 57fbb72e32/openstack/cloud/_compute.py (L796)
[4] 57fbb72e32/openstack/compute/v2/server.py (L223)
[5] ac401bb354
Change-Id: I1f3b9314e4d82674cd2ae45f6209de5611e2b6cb
Ansible requires Python 3.9+ since ansible-core 2.14 [1], but our
ansible-collections-openstack-functional-devstack-* jobs use
Ubuntu 20.04 LTS (Focal Fossa) which has Python 3.8 only.
[1] 884244f1b2
Co-Authored-By: Jakob Meng <code@jakobmeng.de>
Change-Id: I0c363a925265a5d42c16870094c8384fa509e4d2
Changes sdk calls to use the proxy layer where convenient.
Ensures resources are converted to dict before returns.
Changes the name of various parameters to match sdk attributes. Adds the
old attribute names as aliases to maintain backward compatibility.
Adds detailed return documentation.
Removed the ability to create volumes in specific projects. Users
looking to do that can use the auth parameter to specify what project
is relevant
Removes conditionals in tests that maintained support for ancient
openstack and sdk releases.
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/854293
Change-Id: I3c4f4209f2ca6348370a45473bdb0d111b2439b6
Sorted argument specs and documentation of both modules.
Refactored both modules to be subclasses of OpenStackModule class.
Renamed baremetal_port's module attributes 'uuid' to 'id' and
'portgroup' to 'port_group' to match openstacksdk. Added the previous
attribute names as aliases to keep backward compatibility. Added
alias 'pxe_enabled' for 'is_pxe_enabled' which was previously set
programmatically.
Changed baremetal_port module to return attribute 'port' only when
state is present. It will return no values (except Ansible's default
values) when state is absent. Previous return value 'id' can be
retrieved from port's dictionary entry 'id'.
The non-standard return value 'result' has been dropped because its
content can easily be reconstructed with Ansible's is changed check.
The non-standard return value 'changes' has been dropped because its
content was only returned on updates, has no known uses and can
easily be reconstructed in Ansible by comparing the updated port
dictionary with a copy of the pre-updated port dictionary.
Module baremetal_port_info will no longer fail when no port with a
matching id or name or address could be found. Instead it will return
an empty list like other *_info modules.
baremetal_port_info's return attribute 'baremetal_ports' has been
renamed to 'ports' to be consistent with other modules. The former
name will keep to be available for now to keep backward compatibility.
Both modules convert their return values into dictionaries without
computed (redundant) values. They do not drop values such as links
anymore though, because we do not withhold information from users.
Updated DOCUMENTATION, EXAMPLES and RETURN docstrings in both modules.
Added integration tests for both modules. They will not run in CI atm,
because we do not have Ironic enabled in our DevStack environment.
Change-Id: I54b3ea9917fbbbdf381ef934a0d92e2857f6d51b