Skip to content

Commit

Permalink
Bump: required ansible version to pass certification (#683)
Browse files Browse the repository at this point in the history
Co-authored-by: Carl Buchmann <[email protected]>
  • Loading branch information
sugetha24 and carlbuchmann authored Dec 4, 2023
1 parent f00de07 commit 8f923c7
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 121 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/pull-request-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python_version: [3.9]
python_version: ['3.9','3.10','3.11']
steps:
- name: 'set environment variables'
run: |
Expand All @@ -120,7 +120,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python_version: [3.9]
python_version: ['3.9','3.10','3.11']
steps:
- name: 'set environment variables'
run: |
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python_version: [3.9]
python_version: ['3.9']
steps:
- name: 'set environment variables'
run: |
Expand All @@ -269,6 +269,4 @@ jobs:
- name: 'ansible-test linting'
run: |
cd ansible_collections/arista/cvp/
rm -rf molecule/
ansible-test sanity -v --requirements --docker --python ${{ matrix.python_version }}
rm -rf tests/output/
2 changes: 1 addition & 1 deletion ansible_collections/arista/cvp/meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
requires_ansible: '>=2.11.3'
requires_ansible: '>=2.14.0,<2.17.0'
plugin_routing:
modules:
cv_facts:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cv_change_control_v3
cv_configlet_v3
cv_device_v3
cv_tag_v3
cv_container_v3
cv_facts_v3
cv_task_v3
cv_image_v3
cv_validate_v3
11 changes: 11 additions & 0 deletions ansible_collections/arista/cvp/molecule/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,14 @@ destroy: ## destroy all molecule scenarios
cd ./molecule ; \
fi \
done

.PHONY: test-molecule-v3
test-molecule-v3:## Run V3 molecule scenarios
@while read -r MOLECULE_SCENARIO; do \
if [ -d "$$MOLECULE_SCENARIO" ]; then\
echo "Run scenario for "$$MOLECULE_SCENARIO && \
cd .. ; \
molecule converge --scenario-name $$MOLECULE_SCENARIO -- $(ANSIBLE_OPTIONS); \
cd ./molecule ; \
fi \
done <MOLECULE_SCENARIOS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
- name: "Testing create bundle"
ansible.builtin.assert:
that:
- create_bundle_data.data.data == "Bundle : Test_bundle successfully created"
# To disable error: "colons: too many spaces before colon"
- create_bundle_data.data.data == "Bundle : Test_bundle successfully created" # yamllint disable-line rule:colons

- name: "Create second bundle for test"
arista.cvp.cv_image_v3:
Expand All @@ -78,7 +79,8 @@
- name: "Testing create bundle"
ansible.builtin.assert:
that:
- create_bundle_data_2.data.data == "Bundle : vEOS-lab-4.30.1F successfully created"
# To disable error: "colons: too many spaces before colon"
- create_bundle_data_2.data.data == "Bundle : vEOS-lab-4.30.1F successfully created" # yamllint disable-line rule:colons

- name: Build Container Topology with image bundle On {{ inventory_hostname }}
arista.cvp.cv_container_v3:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
requests.packages.urllib3.disable_warnings()

# Setting variables
RECONCILE = 'RECONCILE_' # Prefix for the configlet name
RECONCILE = 'RECONCILE_' # Prefix for the configlet name
fixture_file = 'molecule/fixtures/cv_device_v3.yaml'

with open(fixture_file, encoding="utf-8") as f:
Expand Down Expand Up @@ -36,4 +36,4 @@
rc = clnt.api.get_device_configuration(dev_mac)
name = RECONCILE + device['serialNumber']
update = clnt.api.update_reconcile_configlet(dev_mac, rc, "", name, True)
addcfg = clnt.api.apply_configlets_to_device("auto-reconciling", device,[update['data']])
addcfg = clnt.api.apply_configlets_to_device("auto-reconciling", device, [update['data']])
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
scenario:
test_sequence:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- node : 192.168.0.5
- node: 192.168.0.5
username: arista
password: ""
device: s1-leaf1
16 changes: 1 addition & 15 deletions ansible_collections/arista/cvp/plugins/modules/cv_validate_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,7 @@
# that can be found in the LICENSE file.
# coding: utf-8 -*-
#
# Copyright 2023 Arista Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Required by Ansible and CVP

from __future__ import absolute_import, division, print_function

__metaclass__ = type
Expand Down
4 changes: 2 additions & 2 deletions ansible_collections/arista/cvp/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ansible-core>=2.12.6,<2.15.0,!=2.13.0
ansible-core>=2.14.0,<2.17.0
ansible-builder
ansible-lint>=6.13.0
galaxy-importer>=0.3.1
Expand All @@ -10,7 +10,7 @@ pre-commit>=2.9.2
pre-commit-hooks>=3.3.0
identify>=1.4.20
docker
molecule>=5.0.0
molecule>=3.2.0,<6.0
molecule-docker>=0.2.4
mitogen
pytest
Expand Down
13 changes: 0 additions & 13 deletions ansible_collections/arista/cvp/tests/sanity/ignore-2.11.txt

This file was deleted.

79 changes: 0 additions & 79 deletions ansible_collections/arista/cvp/tests/sanity/ignore-2.13.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins/modules/cv_facts_v3.py validate-modules:missing-gplv3-license
plugins/modules/cv_facts.py validate-modules:missing-gplv3-license
plugins/modules/cv_image_v3.py validate-modules:missing-gplv3-license
plugins/modules/cv_tag_v3.py validate-modules:missing-gplv3-license
plugins/modules/cv_validate_v3.py validate-modules:missing-gplv3-license
plugins/modules/cv_task_v3.py validate-modules:missing-gplv3-license
plugins/modules/cv_task.py validate-modules:missing-gplv3-license
plugins/module_utils/change_tools.py compile-2.7!skip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins/modules/cv_facts_v3.py validate-modules:missing-gplv3-license
plugins/modules/cv_facts.py validate-modules:missing-gplv3-license
plugins/modules/cv_image_v3.py validate-modules:missing-gplv3-license
plugins/modules/cv_tag_v3.py validate-modules:missing-gplv3-license
plugins/modules/cv_validate_v3.py validate-modules:missing-gplv3-license
plugins/modules/cv_task_v3.py validate-modules:missing-gplv3-license
plugins/modules/cv_task.py validate-modules:missing-gplv3-license
plugins/module_utils/change_tools.py compile-2.7!skip
Expand Down

0 comments on commit 8f923c7

Please sign in to comment.