Commit Graph

100 Commits

Author SHA1 Message Date
siavashsardari
bce3eea5c0 Refactor TCP/UDP port check.
Task: 41314
Story: 2008390
Change-Id: Ib479dbef68cede6189d25e75388d8cb1fc61f95f
2020-11-26 17:49:14 +02:00
anbanerj
f89eea10b4 Added deprecated_names for router_info module
Change-Id: I15bc654f1567ebfa4319523be4a9a8f4124898aa
2020-11-23 18:59:20 +01:00
anbanerj
e1178fde34 Migrating routers_info from AnsibleModule to OpenStackModule
Change-Id: I0b87c5c3336849bd2e62da5dee04614f74714dbf
2020-11-19 12:27:27 +02:00
Dmitriy Rabotyagov
8b35c64fda Do not fail when endpoint state is absent
In case endpoint state is absent we shouldn't fail in case service does
not exist, since it means that we're ok, and endpoint is not present.

This might be pretty useful, when user tries to create and delete service
and endpoint with the same code ie [1]

[1] https://opendev.org/openstack/openstack-ansible-tests/src/branch/master/sync/tasks/service_setup.yml

Change-Id: If7ecd7b2e28c81ffe18539731edd4efa599c42ec
Closes-Bug: #1904029
2020-11-16 10:35:41 +02:00
Dmitry Tantsur
8b98452cbb Refactor ironic authentication into a new module_utils module
This change merely moves the code to one location. The next logical
step would be to make IronicModule inherit the common ansible module.

Change-Id: Iec0ca1e33de6ebc36d7664941eafe1d77203d8f2
2020-10-26 11:05:31 +00:00
Mark Chappell
8ca8df1a84 OpenStackModule: Support defining a minimum version of the SDK
While it's currently possible to set min_ver and max_ver for specific
parameter, there are times when the whole module needs to specify a
minimum version:

- When the object isn't supported at all prior to a version
- When major features are missing from the SDK prior to a version

Change-Id: I94bbff7c54621e8a4786ebc7eb030103255dcb17
2020-10-19 13:55:30 +02:00
Zuul
38e61994c7 Merge "Add volume_snapshot_info module" 2020-09-30 16:02:15 +00:00
Artem Goncharov
d416a27112 Add volume_snapshot_info module
Change-Id: I4edc34639f17adb97dd055fcdeec14ea92acb9bd
2020-09-30 13:40:54 +02:00
Zuul
631e1412a0 Merge "Add volume_backup_info module" 2020-09-30 09:52:35 +00:00
Zuul
4c31ea152e Merge "Make it possible to create a health monitor to a pool" 2020-09-30 07:54:37 +00:00
Artem Goncharov
a39470ac2b Add volume_backup_info module
Change-Id: I5ef76247a449b1b8653bb2bb91fccd5f3db57cf8
2020-09-30 07:38:29 +02:00
Artem Goncharov
39a8362d7a Add volume_backup module
Introduce volume_backup module to manage volume/snapshot backups.

Change-Id: Ibc4e87d47d8e38a0cf52e391dafdf025ab202982
2020-09-29 18:59:02 +02:00
Jesper Schmitz Mouridsen
05da83520e Make it possible to create a health monitor to a pool
Change-Id: I6119f5be02ace88253cba448f5a0699b39ea9ee1
2020-09-28 19:37:24 +02:00
Sagi Shnaidman
33ce7ab9c7 Add volume_info module
Add module for retrieving information about volumes in a cloud.

Story: #2007817
Task: #40095
Change-Id: Ic7551c1737b08b967613e42923f5ea4ec0b606a4
2020-08-16 20:56:45 +03:00
Sagi Shnaidman
03fadf3b43 Fix non existing attribuites in SDK exception
SDK exception may not have extra_data, details or
response attributes. Print None in this case.

Change-Id: Ic4073c28a4e4afb8ca5d2b72c4ea8582da244af1
2020-08-11 14:17:36 +03:00
Dmitry Tantsur
8731fcc64b Do not require ironic_url if cloud or auth.endpoint is provided
The endpoint may be specified in clouds.yaml or via auth, do not
force ironic_url in either of these cases.

Finally, accept "none" as a valid no-auth plugin name.

Change-Id: I4d50b7c55727f022d79df85fb4a163fe3e5fca7b
2020-07-28 17:10:01 +02:00
Mark Chappell
88b86be33e Add support for setting the Flavor when creating a load balancer
Change-Id: I72c6b60225cacf598ddb9b7df142eced429b7226
2020-07-26 11:22:24 +00:00
Zuul
8792b2b527 Merge "Add openstack logger and Ansible display utility" 2020-07-09 14:30:17 +00:00
Zuul
4a930cf0ec Merge "keypair: make use of OpenStackModule class" 2020-07-09 14:30:16 +00:00
Marc-Antoine Bourgeot
40ce8103f4 Add openstack logger and Ansible display utility
Story: 2007879

Change-Id: I76fc7df8202b4e00b54b5bafe7719e02b49e59ff
2020-07-07 22:21:47 +02:00
Gonéri Le Bouder
9600baec6e security_group_rule: use OpenStackModule class
Refactoring of security_group_rule to depend on the OpenStackModule
class.

See: I487e79fe18c0b9a75df7dacd224ab40ed7f4e1ab

Change-Id: Ide09bdd6a57324a0e1d2ec29c4c49db8dc1c3843
2020-07-02 19:23:15 +00:00
Gonéri Le Bouder
abebbe722c keypair: make use of OpenStackModule class
Convert the keypair module to use the OpenStackModule class.

See: I487e79fe18c0b9a75df7dacd224ab40ed7f4e1ab

Change-Id: I60cd5811f1926f53a7f88b19889fba9ca39c6184
2020-07-02 13:59:36 -04:00
Zuul
94e518e42c Merge "Update author lines" 2020-06-24 15:30:26 +00:00
Monty Taylor
a96d28dfbc Update author lines
We don't use github, so having @ mentions of specific humans is
not valuable. Also, we are a team and own the modules as a team,
so calling out individual authors is philosophically contrary.

We landed a patch upstream to special-case this author string.

Change-Id: I38b4e68f14bbba6e13e8a50e2b202874ab74e3bc
2020-06-23 21:50:43 +03:00
Artem Goncharov
32ef77d9fd Add more useful information from exception
When the module faces API exception we can give much more useful
information to the user. Let us do this for the modules inheriting from
the base class, since all modules should do this at some point in time

Change-Id: I5f1ef01765829900334aa2ecae5dab3ba96f1a49
2020-06-23 18:43:09 +00:00
Sagi Shnaidman
5e3a91a7c6 Add OpenstackModule to os_server_action
Redesign the module for more OOP
Add tests for server_action
Change-Id: I054de32ee3ff34988db53fc87b1cb63b8e551ae3
2020-06-17 12:59:23 +00:00
Zuul
f8c768ae61 Merge "Don't pass tenant_id for remote group" 2020-06-13 16:34:06 +00:00
Sagi Shnaidman
c75ab0924a Fix ansible-devel sanity tests for deprecations
Change-Id: I02c3f2cb5a8bb4c891a8f0e36628925208251bf7
2020-06-11 12:55:43 +03:00
Sagi Shnaidman
8e2e5966b7 Don't pass tenant_id for remote group
When security group is from different project, don't pass tenant
Fixes https://github.com/ansible/ansible/issues/69673
Change-Id: I230c41d1ace179390744287102fead5ddf420157
2020-06-07 18:12:30 +00:00
Sagi Shnaidman
f3610ad0e1 Redesign OpenstackModule class
don't inherit OpenstackModule class from AnsibleModule class to
prevent occasional overriding Ansible methods or vars and failing
module.

Change-Id: Ic34fff0c938eb87cc0d2c5e98fbafed64bf349f6
2020-06-04 13:49:48 +03:00
Sagi Shnaidman
7e4fbcf568 Fix ansible-tests for devel branch
Ignore for now deprecation warnings
(see https://github.com/ansible-collections/overview/issues/45#issuecomment-628262697)
Current there are bugs in ansible-test that prevent to run these
tests.

Change-Id: I9829bb23a45699e61d7b0af5ecc3e1a94bbbca85
2020-06-03 00:05:07 +03:00
Matt Parkinson
d206ea000a Minor spelling fixes in floating_ip documentation
Change-Id: Ib888b4890ff91a9bccaaa1e8b582a478243e47a3
2020-05-25 13:38:25 +10:00
Sagi Shnaidman
ad7d6ea668 Fix broken server_info module and add tests
Fix server_info module. Add tests because it wasn't executed in
tests at all.

Change-Id: I50435f3a3103501bc0eccf8fdfced3179b991bb8
2020-05-21 20:56:13 +03:00
Sagi Shnaidman
572fe85894 Remove ANSIBLE_METADATA from all modules
It's not required for collections,
for more details:
https://github.com/ansible-collections/overview/issues/57
Change-Id: I954eef25bb9837c9282665ad5586dbe37f4f4424
2020-05-14 17:00:01 +03:00
Monty Taylor
e47c4671c7 Rename all of the modules
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
2020-05-12 10:20:50 -05:00
Monty Taylor
238387f2f8 Remove incorrect os_ prefix in documentation
The parameteres are project_domain_name and user_domain_name.

Change-Id: I509ae5d398ff8a93d3cbcd09edb21118a1ff03c3
2020-05-12 10:10:57 -05:00
Zuul
1906b85668 Merge "Updated allocation pool checks" 2020-05-10 14:21:01 +00:00
Ken Dreyer
25ad4882b0 os_server_action: pass imageRef to rebuild
Prior to this change, the os_server_action module could not rebuild
servers, because it passed no arguments to the "rebuild" object.

The imageRef parameter is mandatory. If the client does not specify
imageRef, Nova takes no action to rebuild the server.

Change-Id: I0edbdb634feb90d4c54476a4089fcb014c0b83b2
2020-04-29 14:56:49 -06:00
rawat
95dcd82cbb Updated allocation pool checks
As per the REST Networking API v2.0 (Subnet) docs, if subnets pools
are not specified, OpenStack networking automatically allocates pools
covering all IP addresses in the CIDR.

In custom vendor specific environments, subnets can be created without
allocation pools via UI due to which subnets will not have any existing
allocation pools. Under this scenario, module throws an
"IndexError: list index out of range" error.

Also, allow to add more allocation pools on top of existing allocation
pools.

Change-Id: Ib8becf5e958f1bc8e5c9fd76f1722536bf1c9f1a
2020-04-27 07:19:56 +10:00
Sagi Shnaidman
b824bf1c38 Convert os_server_info to use OpenStackModule
Change-Id: I864c767ff06d32dd79b72826cfc09e7203e5291d
2020-04-21 19:08:46 +03:00
Zuul
d1ad72a068 Merge "Add properties for os_project" 2020-04-16 19:33:48 +00:00
Duc Truong
c1a2496e0f Add properties for os_project
Keystone supports setting custom properties for projects.  This changes add
properties to os_project to enable setting of custom properties.

Depends-On: https://review.opendev.org/715255
Change-Id: I23e2834d6b9d40ce86db4b32a0ed8bf76b3d9879
2020-04-14 10:11:12 -07:00
Zuul
2b51a58da2 Merge "New Module: os_keystone_federation_protocol_info" 2020-04-03 16:13:26 +00:00
Zuul
0424bb8ac1 Merge "New Module: os_keystone_federation_protocol" 2020-04-03 16:12:45 +00:00
Mark Chappell
583770f597 New Module: os_keystone_federation_protocol_info
Add support for getting information about Keystone federation Protocols

Change-Id: Id389b094465967a2a8a0eff428f1f6679865c6f6
2020-04-02 17:27:06 +02:00
Mark Chappell
8729b8da72 New Module: os_keystone_federation_protocol
Add support for Keystone federation Protocols

Depends-On: https://review.opendev.org/714431
Depends-On: https://review.opendev.org/713461
Change-Id: I6dff6cebe72106e601834976e369e08583391c55
2020-04-02 17:26:31 +02:00
Mark Chappell
54c189063f os_keystone_mapping: fixup some minor nits found in followup reviews
Change-Id: I0c8995e8d52a993395e674c06c84f6398473754c
2020-04-02 17:23:27 +02:00
Zuul
bf4af7b1b9 Merge "New Module: os_keystone_identity_provider_info" 2020-04-02 14:42:08 +00:00
Zuul
9e2eeedaf3 Merge "New Module: os_keystone_identity_provider" 2020-04-02 14:42:08 +00:00
Zuul
d2379cd284 Merge "New module: os_keystone_mapping_info" 2020-04-02 14:35:51 +00:00