13 Commits

Author SHA1 Message Date
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
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
Mark Chappell
e39c5d0a9a Fixup elements related sanity failures
Change-Id: I6f2bba929af5a148a1f52df26916e00efcc14a07
2020-03-16 15:49:49 +01:00
Mark Chappell
63e444a324 Ensure documented choices match spec
Change-Id: Ia40e846f970a05a894601a7a37af0231f136bab6
2020-03-16 14:15:04 +01:00
Mark Chappell
1849f8bd47 Add missing type information to docs
Change-Id: Iac23d54512b23f031460d1b7281ccb8d93e20cad
2020-03-16 13:56:58 +01:00
Mark Chappell
9e9dacdf3c Fix doc requirements, and consistently require python 3.6+
Change-Id: I43f4ba5718422f75f553e3cae88fa887722aa044
2020-03-16 10:32:21 +01:00
Mark Chappell
400e9c4873 Move default availability_zone docs into doc_fragment
If availability_zone is defined in the module this will override the fragment

Change-Id: I4f6abcbfee89a53480134dc64ca06782c8e6d094
2020-03-16 10:32:20 +01:00
Monty Taylor
53affc3220 Test with and assert support for python3
Collections are new. openstacksdk as of now doesn't support python2.
We shouldn't pretend to support python2 either. If you're using
ansible new enough to use collections, you can use python3.

This release of openstacksdk only supports 3.6 and onwards, so
set that as our min.

Change-Id: I34d544ce48f25bffde8e6e0cf82cdf9a85e681c3
2020-03-03 09:28:43 -06:00
Monty Taylor
96a5914eb6 Remove from __future__ lines
We only support python3

Change-Id: Ieb82eb3369c4ac73f3595dc84ca11e1f11766a79
2020-03-01 06:26:03 -06:00
Monty Taylor
9d29e8c847 Fix H236 and remove exclusion
We haven't needed this in a VERY long time.

Change-Id: I35041c2c6ae421e7caaef3c04ffca92e2ff10e35
2020-03-01 06:22:58 -06:00
Monty Taylor
92d7d7caeb Fix W504 and remove exclusion
This is a topic where there are two points of view. While neither
is fundamentally better than the other in reality, what's best is
to not have any arguments about it. The tox.ini comments about 503
and 504 that were in place make the argument that:

  - 503 is intended to be disabled and 504 enabled by default
  - Donald Knuth believes 504 is the right way

Since Donald Knuth is smarter than all of us, align with 504, match
the comments in the file and turn on enforcement to keep it that way.

Change-Id: I92d4d1e82935e30ae42a0e14e641cbe36fd6e811
2020-02-27 13:56:48 -06:00
Abhijeet Kasurde
ead550d34e Fix argument spec for os_subnet and os_zone
Ansible argument spec provides facility to provide choices
for the given parameter.
Module os_subnet and os_zone spells 'choices' incorrectly.
This change fixes these modules, by changing 'choice' to 'choices'.

Original Upstream PR: https://github.com/ansible/ansible/pull/65497

Change-Id: I3eed5feeef1234996f22bf8dfe7ecec0bc8eb298
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-01-22 13:19:00 +02:00
Sagi Shnaidman
6ac08e7f0e Migrate openstack modules as a collection
Migrate accordin to Ansible guidelines [1[]] and tool
migrate.py [2]
Also fixed ALL ansible-test sanity issues

Add pep8 and linter job with runs ansible-test sanity test.

[1] https://etherpad.openstack.org/p/openstack-ansible-modules
[2] https://github.com/ansible-community/collection_migration

Change-Id: Ib2b1c8f23aacfca95304132bfe5c4cdedbea0520
2020-01-17 14:07:24 +00:00