Commit Graph

211 Commits

Author SHA1 Message Date
Zuul
2c68080758 Merge "Added module for volume type encription" 2023-10-16 14:42:15 +00:00
Zuul
6e680d594b Merge "Add volume_type related plugins/modules" 2023-10-16 14:29:57 +00:00
Will Szumski
0aedc268f1 Adds stateful parameter to security groups
This is a missing option.

Change-Id: Ic7b43093d9c35de8962978e9ee108cf7b5379fcd
2023-09-01 17:53:32 +00:00
Dmitriy Rabotyagov
9b47cb4b59 Fix usage of subnet_id key for router
At the moment `subnet` is an alias of `subnet_id`. The way, how aliases
work in ansible modules, is that ansible does add intended key to param
in case alias is used. When riginal key is used, aliases are not
populated.

Right now in case user define `subnet_id` instead of its alias `subnet`
module will fail with KeyError.

Change-Id: I5ce547352097ea821be4c9bbc18147575986c740
2023-09-01 07:23:05 +00:00
arddennis
8f321eaeb2 Added module for volume type encription
New module to manipulate volume type encryption. Including simple CI
task to verify functionality.

Change-Id: I7380a5d258c3df1f9bd512aa4295868294391e31
2023-08-21 08:43:23 +02:00
Denys Mishchenko
147ad6c452 Add volume_type related plugins/modules
Added 2 new modules to manipulate volume types in OpenStack
* volume_type is used to create, delete and modify volume type
* volume_type_info is used to show volume_type details, including
  encryption information

ci tests extended with additional role to test basic module behaviour

It is currently impossible to update is_public volume type attribute
as it is being changed to "os-volume-type-access:is_public" which is not
expected by api. Which expects just "is_public"
https://docs.openstack.org/api-ref/block-storage/v3/?expanded=update-a-volume-type-detail#update-a-volume-type
Which results in "'os-volume-type-access:is_public' was unexpected"
reply. I guess the change is required by openstacksdk or on the API side

Change-Id: Idc26a5240b5f3314c8384c7326d8a82dcc8c6171
2023-08-16 16:35:51 +02:00
Dmitriy Rabotyagov
0a371445eb Image filters should be dict not set
At the moment we generate a set as a filter for image checksums which
lead to AttributeError in SDK:
'set' object has no attribute 'keys'

With that we ensure that supllying checksum does not cause
module crash.

Change-Id: I490f51950592f62c9ad81806593340779bf6dbdb
2023-07-25 12:49:28 +02:00
Jakob Meng
ab6f2e45c6 Change security group rules only when instructed to do so
Security group rules in module openstack.cloud.security_group
are changed/updated only when option 'security_group_rules' was
defined explicitly. This follows our policy of "apply no change"
when module options in our Ansible modules have not been set.

Story: 2010691
Task: 47795
Change-Id: I4a0cda46cb160b5321913b63ff1123d8b8a19705
2023-04-18 08:39:57 +02:00
Mark Goddard
454a05452b Add baremetal_deploy_template module
This module supports managing deploy template resources in OpenStack
Ironic.

https: //docs.openstack.org/ironic/latest/admin/node-deployment.html#deploy-templates

Change-Id: I2d1b89e7cbd1a7e847f54ffd62778f953ba65863
2023-03-28 12:05:38 +00:00
Jakob Meng
f73a0e385e Use true and false instead of yes and no for boolean values
Story: 2010586
Task: 47380
Change-Id: I1b88aa925d823d74b2d012153dfe26d35c93dfd5
2023-02-21 13:07:29 +01:00
Jakob Meng
b6b5f63877 Do not hardcode image name and properly delete mock images in CI tests
Change-Id: I2962dd1d1c27989cbd135b051cfb3e9f8c9e3823
2023-02-21 13:06:44 +01:00
Sagi Shnaidman
edd4e1b2e9 Fix issue with multiple records in recordset
Story: #2010527
Task: #47136

Sort records in recordset so it can be compared to existing ones
and not to trigger update in case of a different order.

Change-Id: Ib5d2af56616532174c29ec2be86827ccd0a17940
2023-02-01 21:26:26 +02:00
Jakob Meng
5b77519b89 Refactored coe_cluster{,_template} modules again
Change-Id: If9e28cf236db9a617657f177c0a7176eabc752ea
2023-01-31 19:52:19 +01:00
Jakob Meng
f758dfa626 Added workaround for non-determinism in ansible-inventory output
YAML output of ansible-inventory does not guarantee which group will
actually populate hosts with all their host vars.

Change-Id: Ia7d46898b8e91bafff05873be2b3c92bc85d83d2
2023-01-31 19:49:35 +01:00
Jakob Meng
70c029fa50 Refactored inventory script
Change-Id: I78dbee41071bbfa8040ee13d662c1ba0fbdc10a5
2023-01-28 14:17:40 +01:00
Jakob Meng
d5ab2bf33f Refactored {group,role}_assignment modules
Change-Id: I6ec79eb203d0f68661b54bc89a194c366b3574c6
2023-01-26 13:36:30 +01:00
Jakob Meng
754ae5e50d Sorted Ansible roles with ci integration tests
Change-Id: I95e0bcc2715493a5a3d27411957faf53b2394d52
2023-01-26 13:36:17 +01:00
Jakob Meng
546f24940f Refactored tests for keystone_federation_protocol{,_info} modules
Change-Id: I9665f04e6c0d5a84d6c20a73ef7b0dfdc7bd8159
2023-01-26 13:36:03 +01:00
Jakob Meng
90b110794f Refactored federation_idp{,_info} modules
Change-Id: Icbff6c799a9c33f1104633f7d9521f02228217a5
2023-01-26 13:35:27 +01:00
Jakob Meng
c9afdbfd73 Refactored identity_user{,_info} modules
Change-Id: Iae52d1a86f8f78790290be3966681f2277b9701d
2023-01-26 13:35:09 +01:00
Jakob Meng
4a27306440 Refactored identity_role{,_info} modules
Change-Id: If8230eb8b41b5461e1eaa470569030e8a888015b
2023-01-26 13:34:53 +01:00
Jakob Meng
8534990840 Refactored identity_group{,_info} modules
Change-Id: I72dce1278a7623d4f68cabcceafcdfefda900195
2023-01-26 13:34:33 +01:00
Jakob Meng
16a8a9e5d4 Refactored identity_domain{,_info} modules
Change-Id: Idf48f10e66a5651fa4693774eecd2c8683703082
2023-01-26 13:34:06 +01:00
Jakob Meng
a4a6e6d4ec Added resource{,s} modules
Change-Id: I0b04d43d5095ee74ec5af27013b6159a6a4d0f13
2023-01-26 09:34:30 +01:00
Rafael Castillo
778cf14f1b Refactored server_action module
Co-Authored-By: Jakob Meng <code@jakobmeng.de>
Change-Id: Ib9b7e26889123443a67b35e094deb3cadeb615fe
2023-01-19 08:54:40 +01:00
Jakob Meng
cc9ca5a34b Refactored image{,_info} modules
Code of the image module has been refactored partially only.
It will have to be completed in a follow up patch.

Change-Id: Id2360163117db9639a0af502ab44e02cae5cebaa
2023-01-14 09:12:21 +01:00
Jakob Meng
1f8c9fee05 Fixed ci integration tests for server actions
Change-Id: I151510cb0e914c33a86d2eb9d205c389bbe2acba
2023-01-13 21:00:59 +01:00
Jakob Meng
0c75f19e4c Refactored compute_flavor_info module
Change-Id: Ic598a60c2dd6fb465965fa8beee0ea973385bbcf
2023-01-13 20:59:59 +01:00
Jakob Meng
e34f259566 Added support for 'any' protocol in security group rules
Story: 2007849
Task: 40143

Story: 2008064
Task: 40747
Change-Id: I1e2f6dde4c7a17b6c5c9fcffad1b5748a1d44a15
2023-01-13 20:55:05 +01:00
Jakob Meng
5aaa41c9c4 Inlined network_external variable
Change-Id: I4cbbd84eaed99dae40c72fbdf567b480a1f268a4
2023-01-12 13:49:43 +01:00
Jakob Meng
eaa26c6b9c Refactored project{,_info} modules
Change-Id: I863d08c42b4c708444b74e3d47f0ca70a8ff94fd
2023-01-11 07:39:17 +01:00
Jakob Meng
0071fdcd97 Refactored compute_service_info module
Change-Id: I1773b72f8c7eaec77f0480045c45073dc522c5cf
2023-01-11 07:38:57 +01:00
Balazs Pokoradi
124e174d27 Added parameter for managing rules in security_group module
Co-Authored-By: Jakob Meng <code@jakobmeng.de>

Change-Id: I571955e8f4023293cce325604de5f1689b855416
2023-01-11 07:38:05 +01:00
Jakob Meng
4dc6c421db Refactored security_group_rule{,_info} modules
Change-Id: Ie953bee843a43b945d24d6152766b3ae418f797c
2023-01-11 07:37:18 +01:00
Jakob Meng
4cf6842222 Refactored security_group{,_info} modules
Change-Id: I8ae38c038e24ae53704224adb614b98e2e56a271
2023-01-11 07:36:59 +01:00
Jakob Meng
647ffef375 Refactored coe_cluster{,_template} modules
Change-Id: I209b242b43d8b79740752cd2c405705d247326c4
2023-01-10 16:16:28 +01:00
Jakob Meng
97c4531d15 Refactored lb_{health_monitor,listener,member,pool} modules
Change-Id: Iffd6ffb08aae4cbd84e4cade79993d82e8c2b2de
2023-01-10 16:16:03 +01:00
Jakob Meng
407b50c8b2 Refactored loadbalancer module breaking backward compatibility
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
2023-01-10 16:15:45 +01:00
Polina-Gubina
52e7bfe7a4 Added is_multiattach parameter to volume module
Change-Id: Ieb98d78d730ee51480c78053152da265481c11f1
2023-01-10 13:33:53 +01:00
Arnaud Morin
852d971d50 Add reboot and reboot_hard actions on server
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
2023-01-10 08:16:19 +00:00
Jakob Meng
85fa2bb2b6 Moved Octavia image upload and CirrOS image identification to Ansible
Change-Id: Ief843310ce57a2d1062d86c54cd7ad6e0f705b68
2022-12-10 14:25:08 +01:00
Robin Koch
51f1fea8b3 Added tests for router interface creation in a shared network
Story: 2010012

Change-Id: Ifa6a7e5a799a5bdfb3bbf585436e57cc6eea0811
2022-12-10 13:21:25 +01:00
Jakob Meng
94c150b2e7 Allow all external commands in tox
Change-Id: I76e0fc0e574d791e8f4d83ccc22289fa06360709
2022-12-10 11:48:48 +01:00
Jakob Meng
0e07b15f92 Refactored dns_zone{,_info} modules
Change-Id: I030cc0566ae94edf340d33e1e00c20403acabb2d
2022-11-30 10:54:17 +01:00
Jakob Meng
7c536e69b3 Refactored object{,_container} modules breaking backward compatibility
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
2022-11-30 10:53:52 +01:00
Jakob Meng
1ca6f208f7 Refactored catalog_service{,_info} and auth modules
Replaced service_catalog return value in auth module with new
catalog_service_info module.

Change-Id: I1ca5082d643eb97e8cb951a4bccf92b78537d917
2022-11-30 10:53:24 +01:00
Jakob Meng
00ec3f1c92 Refactored subnet_pool module
Change-Id: If210789edac2768178ccf323ec5be12f0c439a0f
2022-11-30 10:53:08 +01:00
Jakob Meng
0f37ed795b Refactored neutron_rbac_polic{ies_info,y} modules
Change-Id: I1cd37096834d4159b5fa46719f5c479cb2bc29a9
2022-11-30 10:52:27 +01:00
Rafael Castillo
daf79de37e Updates server_group for 2.0.0
Replaces the policies argument with policy. The policies attribute is
ancient and was superceded by policy a long time ago[0][1]. Since policy and
policies differ in type, we can't simply alias these and had to drop
policies to keep the implementation small.

[0] https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id59
[1] https://docs.openstack.org/api-ref/compute/#create-server-group

Change-Id: Icd658fb179ca0a96276b033130b9dddfedd84236
2022-11-17 04:41:14 -07:00
Jakob Meng
961bdb5bd5 Refactored federation_mapping{,_info} modules
Change-Id: I8ab45280badf7fc9448e2ebfc6e38648cc2dc1b7
2022-11-10 19:50:48 +01:00