mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-13 13:02:21 +00:00
Linter and CI tasks fixes
Change-Id: I0bcd30fc21de7838094b992cecc3a0e850c4da3a
This commit is contained in:
37
.zuul.yaml
37
.zuul.yaml
@@ -480,49 +480,14 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- tox-pep8
|
- tox-pep8
|
||||||
- openstack-tox-linters-ansible-devel
|
- openstack-tox-linters-ansible-devel
|
||||||
- openstack-tox-linters-ansible-2.12
|
|
||||||
- ansible-collections-openstack-functional-devstack-releases:
|
- ansible-collections-openstack-functional-devstack-releases:
|
||||||
dependencies: &deps_unit_lint
|
dependencies:
|
||||||
- tox-pep8
|
- tox-pep8
|
||||||
- openstack-tox-linters-ansible-2.12
|
|
||||||
- ansible-collections-openstack-functional-devstack-ansible-2.9:
|
|
||||||
dependencies: *deps_unit_lint
|
|
||||||
- ansible-collections-openstack-functional-devstack-ansible-2.12:
|
|
||||||
dependencies: *deps_unit_lint
|
|
||||||
- ansible-collections-openstack-functional-devstack-ansible-devel:
|
|
||||||
dependencies: *deps_unit_lint
|
|
||||||
- ansible-collections-openstack-functional-devstack-xena-ansible-2.12:
|
|
||||||
dependencies: *deps_unit_lint
|
|
||||||
- ansible-collections-openstack-functional-devstack-wallaby-ansible-2.12:
|
|
||||||
dependencies: *deps_unit_lint
|
|
||||||
- ansible-collections-openstack-functional-devstack-train-ansible-2.11:
|
|
||||||
dependencies: *deps_unit_lint
|
|
||||||
- ansible-collections-openstack-functional-devstack-magnum:
|
|
||||||
dependencies: *deps_unit_lint
|
|
||||||
- ansible-collections-openstack-functional-devstack-octavia:
|
|
||||||
dependencies: *deps_unit_lint
|
|
||||||
|
|
||||||
- bifrost-collections-src:
|
|
||||||
voting: false
|
|
||||||
dependencies: *deps_unit_lint
|
|
||||||
irrelevant-files: *ignore_files
|
|
||||||
- bifrost-keystone-collections-src:
|
|
||||||
voting: false
|
|
||||||
dependencies: *deps_unit_lint
|
|
||||||
irrelevant-files: *ignore_files
|
|
||||||
|
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- tox-pep8
|
- tox-pep8
|
||||||
- openstack-tox-linters-ansible-2.12
|
|
||||||
- ansible-collections-openstack-functional-devstack-releases
|
- ansible-collections-openstack-functional-devstack-releases
|
||||||
# - ansible-collections-openstack-functional-devstack-ansible-2.9
|
|
||||||
# - ansible-collections-openstack-functional-devstack-ansible-2.12
|
|
||||||
- ansible-collections-openstack-functional-devstack-wallaby-ansible-2.12
|
|
||||||
- ansible-collections-openstack-functional-devstack-xena-ansible-2.12
|
|
||||||
- ansible-collections-openstack-functional-devstack-train-ansible-2.11
|
|
||||||
- ansible-collections-openstack-functional-devstack-magnum
|
|
||||||
- ansible-collections-openstack-functional-devstack-octavia
|
|
||||||
|
|
||||||
periodic:
|
periodic:
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -42,10 +42,12 @@
|
|||||||
register: userinfo
|
register: userinfo
|
||||||
- name: Assert only one result exists
|
- name: Assert only one result exists
|
||||||
assert:
|
assert:
|
||||||
that: "{{ userinfo.openstack_users | length }} == 1"
|
that:
|
||||||
|
- userinfo.openstack_users | length == 1
|
||||||
- name: Assert userinfo has fields
|
- name: Assert userinfo has fields
|
||||||
assert:
|
assert:
|
||||||
that: item in userinfo.openstack_users[0]
|
that:
|
||||||
|
- item in userinfo.openstack_users[0]
|
||||||
loop: "{{ os_expected_user_info_fields }}"
|
loop: "{{ os_expected_user_info_fields }}"
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
@@ -55,7 +57,8 @@
|
|||||||
register: userinfo
|
register: userinfo
|
||||||
- name: Assert results were returned
|
- name: Assert results were returned
|
||||||
assert:
|
assert:
|
||||||
that: "{{ userinfo.openstack_users | length }} > 0"
|
that:
|
||||||
|
- userinfo.openstack_users | length > 0
|
||||||
|
|
||||||
- name: Post-test cleanup
|
- name: Post-test cleanup
|
||||||
block:
|
block:
|
||||||
|
|||||||
@@ -108,30 +108,6 @@
|
|||||||
state: absent
|
state: absent
|
||||||
name: "{{ secgroup_name }}"
|
name: "{{ secgroup_name }}"
|
||||||
|
|
||||||
- name: Test port binding config (runs from train release sdk > 0.28)
|
|
||||||
block:
|
|
||||||
- name: Create port (with binding profile)
|
|
||||||
openstack.cloud.port:
|
|
||||||
cloud: "{{ cloud }}"
|
|
||||||
state: present
|
|
||||||
name: "{{ port_name }}"
|
|
||||||
network: "{{ network_name }}"
|
|
||||||
binding_profile: "{{ binding_profile }}"
|
|
||||||
register: port
|
|
||||||
|
|
||||||
- name: Assert binding:profile exists in created port
|
|
||||||
assert:
|
|
||||||
that: "port.port['binding_profile']"
|
|
||||||
|
|
||||||
- debug: var=port
|
|
||||||
|
|
||||||
- name: Delete port (with binding profile)
|
|
||||||
openstack.cloud.port:
|
|
||||||
cloud: "{{ cloud }}"
|
|
||||||
state: absent
|
|
||||||
name: "{{ port_name }}"
|
|
||||||
when: sdk_version is version(0.28, '>')
|
|
||||||
|
|
||||||
- name: Delete subnet
|
- name: Delete subnet
|
||||||
openstack.cloud.subnet:
|
openstack.cloud.subnet:
|
||||||
cloud: "{{ cloud }}"
|
cloud: "{{ cloud }}"
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
- name: Check info
|
- name: Check info
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- info1.volumes | selectattr("id", "equalto", "{{ info.volumes.0.id }}") | list | length == 1
|
- info1.volumes | selectattr("id", "equalto", info.volumes.0.id) | list | length == 1
|
||||||
- info1.volumes.0.name == 'ansible_test'
|
- info1.volumes.0.name == 'ansible_test'
|
||||||
- info1.volumes.0.status == None
|
- info1.volumes.0.status == None
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Definition of the physical characteristics of this server, used for scheduling purposes
|
- Definition of the physical characteristics of this server, used for scheduling purposes
|
||||||
type: dict
|
type: dict
|
||||||
|
default: {}
|
||||||
suboptions:
|
suboptions:
|
||||||
cpu_arch:
|
cpu_arch:
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -54,10 +54,12 @@ options:
|
|||||||
description:
|
description:
|
||||||
- The minimum disk space (in GB) required to boot this image
|
- The minimum disk space (in GB) required to boot this image
|
||||||
type: int
|
type: int
|
||||||
|
default: 0
|
||||||
min_ram:
|
min_ram:
|
||||||
description:
|
description:
|
||||||
- The minimum ram (in MB) required to boot this image
|
- The minimum ram (in MB) required to boot this image
|
||||||
type: int
|
type: int
|
||||||
|
default: 0
|
||||||
is_public:
|
is_public:
|
||||||
description:
|
description:
|
||||||
- Whether the image can be accessed publicly. Note that publicizing an image requires admin role by default.
|
- Whether the image can be accessed publicly. Note that publicizing an image requires admin role by default.
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ options:
|
|||||||
accessible from.
|
accessible from.
|
||||||
elements: dict
|
elements: dict
|
||||||
type: list
|
type: list
|
||||||
|
default: []
|
||||||
wait:
|
wait:
|
||||||
description:
|
description:
|
||||||
- If the module should wait for the load balancer to be created or
|
- If the module should wait for the load balancer to be created or
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ options:
|
|||||||
- Per driver volume storage quotas. Keys should be
|
- Per driver volume storage quotas. Keys should be
|
||||||
prefixed with C(gigabytes_) values should be ints.
|
prefixed with C(gigabytes_) values should be ints.
|
||||||
type: dict
|
type: dict
|
||||||
|
default: {}
|
||||||
injected_file_size:
|
injected_file_size:
|
||||||
description: Maximum file size in bytes.
|
description: Maximum file size in bytes.
|
||||||
type: int
|
type: int
|
||||||
@@ -116,6 +117,7 @@ options:
|
|||||||
- Per-driver volume snapshot quotas. Keys should be
|
- Per-driver volume snapshot quotas. Keys should be
|
||||||
prefixed with C(snapshots_) values should be ints.
|
prefixed with C(snapshots_) values should be ints.
|
||||||
type: dict
|
type: dict
|
||||||
|
default: {}
|
||||||
subnet:
|
subnet:
|
||||||
description: Number of subnets to allow.
|
description: Number of subnets to allow.
|
||||||
type: int
|
type: int
|
||||||
@@ -130,6 +132,7 @@ options:
|
|||||||
- Per-driver volume count quotas. Keys should be
|
- Per-driver volume count quotas. Keys should be
|
||||||
prefixed with C(volumes_) values should be ints.
|
prefixed with C(volumes_) values should be ints.
|
||||||
type: dict
|
type: dict
|
||||||
|
default: {}
|
||||||
project:
|
project:
|
||||||
description: Unused, kept for compatability
|
description: Unused, kept for compatability
|
||||||
type: int
|
type: int
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Long description of the purpose of the security group
|
- Long description of the purpose of the security group
|
||||||
type: str
|
type: str
|
||||||
|
default: ''
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Should the resource be present or absent.
|
- Should the resource be present or absent.
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ options:
|
|||||||
Only one of network or nics should be supplied.'
|
Only one of network or nics should be supplied.'
|
||||||
type: list
|
type: list
|
||||||
elements: raw
|
elements: raw
|
||||||
|
default: []
|
||||||
suboptions:
|
suboptions:
|
||||||
tag:
|
tag:
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Dictionary of parameters for the stack creation
|
- Dictionary of parameters for the stack creation
|
||||||
type: dict
|
type: dict
|
||||||
|
default: {}
|
||||||
rollback:
|
rollback:
|
||||||
description:
|
description:
|
||||||
- Rollback stack creation
|
- Rollback stack creation
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class DictDataLoader(DataLoader):
|
|||||||
|
|
||||||
def __init__(self, file_mapping=None):
|
def __init__(self, file_mapping=None):
|
||||||
file_mapping = {} if file_mapping is None else file_mapping
|
file_mapping = {} if file_mapping is None else file_mapping
|
||||||
assert type(file_mapping) == dict
|
assert isinstance(file_mapping, dict)
|
||||||
|
|
||||||
super(DictDataLoader, self).__init__()
|
super(DictDataLoader, self).__init__()
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,4 @@ ansible --version
|
|||||||
ansible-test sanity -v \
|
ansible-test sanity -v \
|
||||||
--venv \
|
--venv \
|
||||||
--python ${PY_VER} \
|
--python ${PY_VER} \
|
||||||
--skip-test metaclass-boilerplate \
|
|
||||||
--skip-test future-import-boilerplate \
|
|
||||||
plugins/ docs/ meta/ scripts/
|
plugins/ docs/ meta/ scripts/
|
||||||
|
|||||||
Reference in New Issue
Block a user