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
This commit is contained in:
Monty Taylor
2020-03-01 06:29:59 -06:00
parent 96a5914eb6
commit 53affc3220
36 changed files with 37 additions and 36 deletions

View File

@@ -86,7 +86,7 @@ options:
default: public default: public
aliases: [ endpoint_type ] aliases: [ endpoint_type ]
requirements: requirements:
- python >= 2.7 - python >= 3.6
- openstacksdk >= 0.12.0 - openstacksdk >= 0.12.0
notes: notes:
- The standard OpenStack environment variables, such as C(OS_USERNAME) - The standard OpenStack environment variables, such as C(OS_USERNAME)

View File

@@ -17,7 +17,7 @@ author: "Monty Taylor (@emonty)"
description: description:
- Retrieve an auth token from an OpenStack Cloud - Retrieve an auth token from an OpenStack Cloud
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
availability_zone: availability_zone:

View File

@@ -26,7 +26,7 @@ description:
notes: notes:
- The result contains a list of unsorted flavors. - The result contains a list of unsorted flavors.
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
name: name:

View File

@@ -36,7 +36,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -17,7 +17,7 @@ author: "Phillipe Smith (@phsmith)"
description: description:
- Retrieve info about a one or more OpenStack groups. - Retrieve info about a one or more OpenStack groups.
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
name: name:

View File

@@ -18,7 +18,7 @@ description:
- This module was called C(os_image_facts) before Ansible 2.9, returning C(ansible_facts). - This module was called C(os_image_facts) before Ansible 2.9, returning C(ansible_facts).
Note that the M(os_image_info) module no longer returns C(ansible_facts)! Note that the M(os_image_info) module no longer returns C(ansible_facts)!
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
image: image:

View File

@@ -41,7 +41,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -18,7 +18,7 @@ description:
- This module was called C(os_keystone_domain_facts) before Ansible 2.9, returning C(ansible_facts). - This module was called C(os_keystone_domain_facts) before Ansible 2.9, returning C(ansible_facts).
Note that the M(os_keystone_domain_info) module no longer returns C(ansible_facts)! Note that the M(os_keystone_domain_info) module no longer returns C(ansible_facts)!
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "sdk" - "sdk"
options: options:
name: name:

View File

@@ -32,7 +32,7 @@ options:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
required: false required: false
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -43,7 +43,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -19,7 +19,7 @@ description:
- This module was called C(os_networks_facts) before Ansible 2.9, returning C(ansible_facts). - This module was called C(os_networks_facts) before Ansible 2.9, returning C(ansible_facts).
Note that the M(os_networks_info) module no longer returns C(ansible_facts)! Note that the M(os_networks_info) module no longer returns C(ansible_facts)!
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "sdk" - "sdk"
options: options:
name: name:

View File

@@ -32,7 +32,7 @@ options:
choices: [present, absent] choices: [present, absent]
default: present default: present
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -18,7 +18,7 @@ description:
- Add, Update or Remove ports from an OpenStack cloud. A I(state) of - Add, Update or Remove ports from an OpenStack cloud. A I(state) of
'present' will ensure the port is created or updated if required. 'present' will ensure the port is created or updated if required.
requirements: requirements:
- "ordereddict unless python >= 2.7" - "ordereddict unless python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
network: network:

View File

@@ -18,7 +18,7 @@ description:
- This module was called C(os_port_facts) before Ansible 2.9, returning C(ansible_facts). - This module was called C(os_port_facts) before Ansible 2.9, returning C(ansible_facts).
Note that the M(os_port_info) module no longer returns C(ansible_facts)! Note that the M(os_port_info) module no longer returns C(ansible_facts)!
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
port: port:

View File

@@ -45,7 +45,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -18,7 +18,7 @@ description:
- This module was called C(os_project_facts) before Ansible 2.9, returning C(ansible_facts). - This module was called C(os_project_facts) before Ansible 2.9, returning C(ansible_facts).
Note that the M(os_project_info) module no longer returns C(ansible_facts)! Note that the M(os_project_info) module no longer returns C(ansible_facts)!
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
name: name:

View File

@@ -98,7 +98,7 @@ options:
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk >= 0.13.0" - "openstacksdk >= 0.13.0"
- "keystoneauth1 >= 3.4.0" - "keystoneauth1 >= 3.4.0"

View File

@@ -49,7 +49,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -18,7 +18,7 @@ author: "Bram Verschueren (@bverschueren)"
description: description:
- Retrieve information about one or more routers from OpenStack. - Retrieve information about one or more routers from OpenStack.
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
name: name:

View File

@@ -169,7 +169,7 @@ options:
description: description:
- Availability zone in which to create the server. - Availability zone in which to create the server.
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -48,7 +48,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -40,7 +40,7 @@ options:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
required: false required: false
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -21,7 +21,7 @@ description:
notes: notes:
- The result contains a list of servers. - The result contains a list of servers.
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
server: server:

View File

@@ -38,7 +38,7 @@ options:
- Availability zone in which to create the snapshot. - Availability zone in which to create the snapshot.
required: false required: false
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstack" - "openstack"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -39,7 +39,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -55,7 +55,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -94,7 +94,7 @@ options:
required: false required: false
default: {} default: {}
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -19,7 +19,7 @@ description:
- This module was called C(os_subnets_facts) before Ansible 2.9, returning C(ansible_facts). - This module was called C(os_subnets_facts) before Ansible 2.9, returning C(ansible_facts).
Note that the M(os_subnets_info) module no longer returns C(ansible_facts)! Note that the M(os_subnets_info) module no longer returns C(ansible_facts)!
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
name: name:

View File

@@ -59,7 +59,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -34,7 +34,7 @@ options:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
required: false required: false
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -18,7 +18,7 @@ description:
- This module was called C(os_user_facts) before Ansible 2.9, returning C(ansible_facts). - This module was called C(os_user_facts) before Ansible 2.9, returning C(ansible_facts).
Note that the M(os_user_info) module no longer returns C(ansible_facts)! Note that the M(os_user_info) module no longer returns C(ansible_facts)!
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
options: options:
name: name:

View File

@@ -47,7 +47,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -60,7 +60,7 @@ options:
description: description:
- Metadata for the volume - Metadata for the volume
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -45,7 +45,7 @@ options:
description: description:
- Availability zone in which to create the snapshot. - Availability zone in which to create the snapshot.
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -47,7 +47,7 @@ options:
description: description:
- Ignored. Present for backwards compatibility - Ignored. Present for backwards compatibility
requirements: requirements:
- "python >= 2.7" - "python >= 3.6""
- "openstacksdk" - "openstacksdk"
extends_documentation_fragment: extends_documentation_fragment:

View File

@@ -6,7 +6,8 @@ ignore_basepython_conflict = True
[testenv] [testenv]
skip_install = True skip_install = True
install_command = pip3 install {opts} {packages} install_command = python -m pip install {opts} {packages}
basepython = python3
passenv = OS_* passenv = OS_*
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}