Commit Graph

64 Commits

Author SHA1 Message Date
Zuul
3224e68ca2 Merge "os_nova_host_aggregate: Fixup sanity test failures" 2020-03-13 17:37:20 +00:00
Zuul
9580a65090 Merge "Remove MANIFEST.json before building" 2020-03-13 17:14:32 +00:00
Mark Chappell
d39f3ae5b0 os_nova_host_aggregate: Fixup sanity test failures
Change-Id: I40cc48c8b04713a63ab8fd8c71b785a824cf3715
2020-03-13 16:49:20 +01:00
Monty Taylor
852f385889 Remove MANIFEST.json before building
For reasons surpassing understanding this doesn't seem to get
overwritten.

Change-Id: Ib4d6b38757112908dbf58d70015482831a8c2e95
2020-03-13 10:14:58 -05:00
Sagi Shnaidman
67466513da Add option for modules_default groups
It's possible in Ansible to set options for modules with
modules_default keyword[1]. For some of modules it's possible
to do with module_default groups, like cloud modules[2]
Add this option to OS modules.

[1]
https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html#module-defaults

[2]
https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html#module-defaults-groups

Change-Id: I31e36f3a6d600815152a116afb37f8e3e21bc282
2020-03-10 14:06:06 +02:00
Zuul
a451edcb5c Merge "Add Openstack guidelines spec from Ansible" 2020-03-05 16:39:08 +00:00
Sagi Shnaidman
31b113d402 Add Openstack guidelines spec from Ansible
These may not be 100% perfect, but they are a good
starting place and we can improve them over time.

Change-Id: Ifb21554d67863b4e4e964f3e98263c3dafcb607f
2020-03-05 15:40:51 +00:00
Monty Taylor
1553d34b02 Clean up minor build quibbles
collection build produces FILES.json and METADATA.json, so add them
to the .gitignore. Also, remove the version line from galaxy.yml.in
since it's generated.

Change-Id: I2ea0b04c8e56b3b7186ac2e9c475144340067636
2020-03-05 15:08:44 +00:00
Monty Taylor
e0200e9faf Fix license metadata
The galaxy upload rejects GPLv3 and requires a valid SPDX license
tag. The file headers list:

  GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

which is a way of saying "3 or later" - so use that SPDX tag.

Also - the license headers refer to the file being COPYING, so
rename the file and update it in the galaxy metadata to match.

Change-Id: I6c82b49d7ce5ea8c9cde939d5d37ff54b969a598
2020-03-05 15:08:38 +00:00
Monty Taylor
97eb24ac4d Deal with collection build modifying tree
ansible-galaxy collection build modifies the contents of the tree.
Let's not go in to why this is bad, but instead just deal with it.
The issue in question is that is removes the +x bit from files in
the tree, which means you can't run a build twice in a row locally.
Shrug. Just roll with the -x and update our usage to reflect it.

Change-Id: I0f82531e99a98d656b60079fd3e94d4e3a1dbb6b
2020-03-05 15:08:32 +00:00
Zuul
c9d2866b57 Merge "Test with and assert support for python3" 2020-03-04 22:27:00 +00:00
Zuul
11331d7f1f Merge "Remove from __future__ lines" 2020-03-04 22:26:59 +00:00
Zuul
fba0eda1d8 Merge "Fix H236 and remove exclusion" 2020-03-04 22:22:02 +00:00
Zuul
4b27e9bafd Merge "Just use shutil.rmtree in build.py" 2020-03-03 16:38:46 +00: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
Zuul
17cdcee058 Merge "os_coe_cluster: Retrive id/uuid correctly" 2020-03-02 18:36:17 +00:00
Bharat Kunwar
050acb6c03 os_coe_cluster: Retrive id/uuid correctly
Fix https://github.com/ansible/ansible/issues/67576

Change-Id: I59b07a8733d549015ed1999e30970d1131c82f99
Signed-off-by: Bharat Kunwar <brtknr@bath.edu>
2020-03-02 17:09:30 +00:00
Zuul
79b2b1001a Merge "Fix F401 and remove exclusion" 2020-03-02 13:31:36 +00:00
Zuul
4b6c60ff14 Merge "Fix W504 and remove exclusion" 2020-03-02 13:31:35 +00:00
Zuul
d2674e42b2 Merge "Fix E128 and remove exclusion" 2020-03-02 13:31:35 +00:00
Zuul
a2cd8aaf6f Merge "Remove F403 and F405 exclusions" 2020-03-02 13:31:34 +00:00
Zuul
32905ea099 Merge "Fix F841 and remove exclusion" 2020-03-02 13:31:33 +00:00
Zuul
a86bcbe9ed Merge "Run flake8 in linters" 2020-03-02 13:31:32 +00:00
Zuul
006b7a0b75 Merge "Remove old artifacts when building new ones" 2020-03-02 13:27:49 +00: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
4df2fdb4fe Just use shutil.rmtree in build.py
Turns out there's a stdlib function for this.

Change-Id: I38885c4b6d973b2a7083a04acb3f5cea9ad78ad9
2020-03-01 06:17:35 -06:00
Zuul
c1f610dac9 Merge "Add a tool to build collections with pbr" 2020-02-29 14:50:44 +00:00
Zuul
584220fdd3 Merge "fix constructed compose" 2020-02-27 23:38:05 +00:00
Zuul
bb73bafd9a Merge "Add tests for os_user_role in multidomain context" 2020-02-27 23:33:26 +00:00
Monty Taylor
86670bcec9 Fix F401 and remove exclusion
Change-Id: Id2dbff06925ed8326e4a214aabc19d4ada5db69c
2020-02-27 13:56:48 -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
Monty Taylor
72ba76f156 Fix E128 and remove exclusion
Change-Id: I0517c0ed09d7834df763c745936793739e88ef9d
2020-02-27 13:56:48 -06:00
Monty Taylor
2527faec28 Remove F403 and F405 exclusions
Importing from * is not a thing that should be done, as it masks
errors and makes code hard to understand. There are some copy-pasta
files that violate this. Mark them with noqa for now, because we don't
actually care about them.

Change-Id: I790f88c75ea546d83e347e42df0050ad36211936
2020-02-27 13:56:48 -06:00
Monty Taylor
15f7f7fc7b Fix F841 and remove exclusion
Change-Id: I92802ced580d42781cfd875389daa232aa8a64a5
2020-02-27 13:56:48 -06:00
Monty Taylor
90e68f2e8e Run flake8 in linters
We should run flake8 when we run the other checks. This
repo is mostly python.

Change-Id: I3cbecf9ef24f784c072841656b55c4162673dcaa
2020-02-27 13:56:48 -06:00
Monty Taylor
40fe366727 Remove old artifacts when building new ones
For local dev, multiple iterations can wind up with multiple
files in the build_artifact dir. Remove them when building so
that the ls command works.

Change-Id: Id309c34679d2c0b6d9380665a381af4b52495d19
2020-02-27 13:56:27 -06:00
Monty Taylor
5936a8f691 Add a tool to build collections with pbr
OpenStack in general uses git tags to drive versioning of artifacts.
This is important because of our code review driven workflow, since
patches don't necessarily land in a predictable sequence, so flows
requiring a version number in a file to be updated at a specific
time are problematic.

By having pbr generate the correct version number then putting that
into the galaxy.yml file, we can match the behavior without too much
undue burden.

Also ignore build_artifact directory.

Change-Id: Id02fee682fb5a4b6fd6dcb0644848e6d1269e19b
2020-02-27 08:20:43 -06:00
Zuul
b7e9e8870c Merge "Cleanup unit test requirements" 2020-02-26 16:34:49 +00:00
Zuul
df5bbd9fd3 Merge "Make an OpenStackModule base class" 2020-02-26 16:25:32 +00:00
Bram Verschueren
062d430f96 Cleanup unit test requirements
The unit test requirements were copied as part of the migration from the
Ansible repo. This removes requirements that are not used in the
OpenStack Ansible collections unit tests.

Change-Id: I8b8914ffa327b4914169e79625972d4c67e406cb
2020-02-20 11:57:27 +01:00
Zuul
78937f4d41 Merge "Add os_routers_info module" 2020-02-19 12:15:07 +00:00
Bram Verschueren
72944f1a3a Add os_routers_info module
Introduces a new os_routers_info module.

original github PR: https://github.com/ansible/ansible/pull/63731

Change-Id: I7fe56cfe862b2b8209675acf0f87fbad99e09546
2020-02-19 10:21:06 +01:00
Zuul
7bd15ba000 Merge "Bump min openstacksdk version for os_network/{port_security_enabled,mtu}" 2020-02-18 19:26:19 +00:00
Jesse Pretorius (odyssey4me)
0f196864b3 Bump min openstacksdk version for os_network/{port_security_enabled,mtu}
To make use of the port_security_enabled [a] and mtu [b] parameters,
[c] and [d] need to be present in the openstacksdk or the os_network
module with return an error like:

TypeError: create_network() got an unexpected keyword argument 'port_security_enabled'

or:

TypeError: create_network() got an unexpected keyword argument 'mtu'

To handle this, we fail the module if one of the arguments are used
and the minimum openstacksdk version for that argument is not met.

[a] eaf238b033
[b] c6a8e99d34
[c] 8eb788af07
[d] a1fc820a2f

Fixes: https://github.com/ansible/ansible/issues/62062
Change-Id: I2b80dc721a08bbdb530af3705ae99cf1b579d9f0
2020-02-18 12:46:00 +00:00
Zuul
1846cbd1b4 Merge "Support json type for the ironic_node config_drive parameter" 2020-02-17 17:20:16 +00:00
Abhijeet Kasurde
fcab7a9963 os_ironic: Correct parameter name
since inception skip_update_of_masked_password is misspelled
as skip_update_of_driver_password in the documentation.

Change-Id: I439f672b82385b4e317f2442755a81ef9c7c6bda
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-17 15:05:00 +05:30
Sagi Shnaidman
ae0303d482 Make an OpenStackModule base class
In module_utils we have a bunch of factory functions that we expect
people to use in a certain combination to build a module, then we
pass around a reference to the SDK and to the connection we created.
That's largely just due to how this stuff grew organically.

Instead, create a base class to be used in the modules. For now it
allows us to clean things up a bit. But as a follow on - it should
maybe help us put in things like richer logging collection which
would otherwise need to be done with helper methods and whatnot.

Change-Id: I487e79fe18c0b9a75df7dacd224ab40ed7f4e1ab
2020-02-17 08:50:17 +00:00
Abhijeet Kasurde
b455295f92 Update root hint documentation link
Root hint documentation link points to non-existing link.
This patch corrects this link.

Fixes: https://github.com/ansible/ansible/issues/67357

Change-Id: I1ad77ca2b1007ed1660ac938c6fee7f4059a979c
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-13 14:29:30 +05:30
Jeffrey Zhang
bcfa2aa095 Support json type for the ironic_node config_drive parameter
Since patch[0], ironic config_drive parameter support json type.

[0] https://review.opendev.org/639050

Change-Id: Ieecb9e6125a182a3da41002aea26233a98aecc8c
2020-02-08 18:26:39 +08:00