mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-03-26 21:43:02 +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:
|
||||
- tox-pep8
|
||||
- openstack-tox-linters-ansible-devel
|
||||
- openstack-tox-linters-ansible-2.12
|
||||
- ansible-collections-openstack-functional-devstack-releases:
|
||||
dependencies: &deps_unit_lint
|
||||
dependencies:
|
||||
- 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:
|
||||
jobs:
|
||||
- tox-pep8
|
||||
- openstack-tox-linters-ansible-2.12
|
||||
- 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:
|
||||
jobs:
|
||||
|
||||
@@ -42,10 +42,12 @@
|
||||
register: userinfo
|
||||
- name: Assert only one result exists
|
||||
assert:
|
||||
that: "{{ userinfo.openstack_users | length }} == 1"
|
||||
that:
|
||||
- userinfo.openstack_users | length == 1
|
||||
- name: Assert userinfo has fields
|
||||
assert:
|
||||
that: item in userinfo.openstack_users[0]
|
||||
that:
|
||||
- item in userinfo.openstack_users[0]
|
||||
loop: "{{ os_expected_user_info_fields }}"
|
||||
|
||||
- block:
|
||||
@@ -55,7 +57,8 @@
|
||||
register: userinfo
|
||||
- name: Assert results were returned
|
||||
assert:
|
||||
that: "{{ userinfo.openstack_users | length }} > 0"
|
||||
that:
|
||||
- userinfo.openstack_users | length > 0
|
||||
|
||||
- name: Post-test cleanup
|
||||
block:
|
||||
|
||||
@@ -108,30 +108,6 @@
|
||||
state: absent
|
||||
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
|
||||
openstack.cloud.subnet:
|
||||
cloud: "{{ cloud }}"
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
- name: Check info
|
||||
assert:
|
||||
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.status == None
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ options:
|
||||
description:
|
||||
- Definition of the physical characteristics of this server, used for scheduling purposes
|
||||
type: dict
|
||||
default: {}
|
||||
suboptions:
|
||||
cpu_arch:
|
||||
description:
|
||||
|
||||
@@ -54,10 +54,12 @@ options:
|
||||
description:
|
||||
- The minimum disk space (in GB) required to boot this image
|
||||
type: int
|
||||
default: 0
|
||||
min_ram:
|
||||
description:
|
||||
- The minimum ram (in MB) required to boot this image
|
||||
type: int
|
||||
default: 0
|
||||
is_public:
|
||||
description:
|
||||
- Whether the image can be accessed publicly. Note that publicizing an image requires admin role by default.
|
||||
|
||||
@@ -124,6 +124,7 @@ options:
|
||||
accessible from.
|
||||
elements: dict
|
||||
type: list
|
||||
default: []
|
||||
wait:
|
||||
description:
|
||||
- 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
|
||||
prefixed with C(gigabytes_) values should be ints.
|
||||
type: dict
|
||||
default: {}
|
||||
injected_file_size:
|
||||
description: Maximum file size in bytes.
|
||||
type: int
|
||||
@@ -116,6 +117,7 @@ options:
|
||||
- Per-driver volume snapshot quotas. Keys should be
|
||||
prefixed with C(snapshots_) values should be ints.
|
||||
type: dict
|
||||
default: {}
|
||||
subnet:
|
||||
description: Number of subnets to allow.
|
||||
type: int
|
||||
@@ -130,6 +132,7 @@ options:
|
||||
- Per-driver volume count quotas. Keys should be
|
||||
prefixed with C(volumes_) values should be ints.
|
||||
type: dict
|
||||
default: {}
|
||||
project:
|
||||
description: Unused, kept for compatability
|
||||
type: int
|
||||
|
||||
@@ -22,6 +22,7 @@ options:
|
||||
description:
|
||||
- Long description of the purpose of the security group
|
||||
type: str
|
||||
default: ''
|
||||
state:
|
||||
description:
|
||||
- Should the resource be present or absent.
|
||||
|
||||
@@ -82,6 +82,7 @@ options:
|
||||
Only one of network or nics should be supplied.'
|
||||
type: list
|
||||
elements: raw
|
||||
default: []
|
||||
suboptions:
|
||||
tag:
|
||||
description:
|
||||
|
||||
@@ -41,6 +41,7 @@ options:
|
||||
description:
|
||||
- Dictionary of parameters for the stack creation
|
||||
type: dict
|
||||
default: {}
|
||||
rollback:
|
||||
description:
|
||||
- Rollback stack creation
|
||||
|
||||
@@ -28,7 +28,7 @@ class DictDataLoader(DataLoader):
|
||||
|
||||
def __init__(self, file_mapping=None):
|
||||
file_mapping = {} if file_mapping is None else file_mapping
|
||||
assert type(file_mapping) == dict
|
||||
assert isinstance(file_mapping, dict)
|
||||
|
||||
super(DictDataLoader, self).__init__()
|
||||
|
||||
|
||||
@@ -31,6 +31,4 @@ ansible --version
|
||||
ansible-test sanity -v \
|
||||
--venv \
|
||||
--python ${PY_VER} \
|
||||
--skip-test metaclass-boilerplate \
|
||||
--skip-test future-import-boilerplate \
|
||||
plugins/ docs/ meta/ scripts/
|
||||
|
||||
Reference in New Issue
Block a user