forked from aristanetworks/avd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test: New cvp integration molecule test (aristanetworks#3500)
Co-authored-by: Claus Holbech <[email protected]> Co-authored-by: Tamas Plugor <[email protected]>
- Loading branch information
1 parent
9264f7f
commit f33ad97
Showing
43 changed files
with
1,988 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
ansible_collections/arista/avd/molecule/cv_workflow/Readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## How to test | ||
|
||
NOTE: Can only be run on aawg-ci tenant. | ||
|
||
1. Create a service account token on cvaas | ||
2. Load the token as environment variable on your local machine | ||
3. `bash# export CVAAS_AAWG_CI=<your token here>` | ||
4. `bash# cd avd/ansible_collections/arista/avd` | ||
5. `bash# molecule test -s cv_workflow` | ||
6. You can add the `-- -vvv` option to get extended logs | ||
7. Verify that the molecule test completes without any errors | ||
|
||
## Test Suite | ||
|
||
1. Use the `cv_workflow` action plugin to deploy configs to CV with the following options | ||
1. `ws_req_state: submitted` | ||
2. `cc_requested_state: running` | ||
2. Test strict tags functionality with | ||
1. `strict_tags: true` | ||
3. Test tags value change | ||
1. Change the value an already existing tag | ||
4. Dotted hostname | ||
1. Change hostname of the switch to have dots in it | ||
2. use `cv_workflow` to deploy configs to CV |
59 changes: 59 additions & 0 deletions
59
ansible_collections/arista/avd/molecule/cv_workflow/cleanup.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
- name: Converge - Configuration deployment with CVP | ||
hosts: localhost | ||
connection: local | ||
gather_facts: false | ||
vars: | ||
cv_server: www.cv-staging.corp.arista.io | ||
# token: "{{ lookup('file', playbook_dir ~ '/token-aawg-ci.tok')}}" | ||
token: "{{ lookup('env', 'CVAAS_AAWG_CI') }}" | ||
configuration_dir: "{{ playbook_dir }}/intended/configs/base_configs" | ||
structured_config_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" | ||
|
||
tasks: | ||
- name: Generate random string | ||
ansible.builtin.set_fact: | ||
r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" | ||
run_once: true | ||
|
||
- name: Set facts | ||
ansible.builtin.set_fact: | ||
ws_name: avd-static-studio-cleanup-{{ r }} | ||
ws_description: sample description | ||
ws_req_state: submitted | ||
ws_force: true | ||
cc_name: cc_avd_studio-cleanup-{{ r }} | ||
cc_requested_state: completed | ||
cc_description: sample description | ||
run_once: true | ||
|
||
- name: Clean up and provision CVP with with base AVD configuration | ||
run_once: true | ||
delegate_to: localhost | ||
arista.avd.cv_workflow: | ||
configuration_dir: "{{ configuration_dir }}" | ||
structured_config_dir: "{{ structured_config_dir }}" | ||
# structured_config_suffix: "yml" | ||
# device_list: "{{ ansible_play_hosts }}" | ||
device_list: ["ci-s1-leaf1", "ci-s1-leaf2", "ci-s1-leaf3", "ci-s1-leaf4", "ci-s1-spine1", "ci-s1-spine2"] | ||
strict_tags: true | ||
# skip_strict_devices: false | ||
# configlet_name_template: "AVD-${hostname}" | ||
cv_servers: [ '{{ cv_server }}' ] | ||
cv_token: '{{ token }}' | ||
# cv_verify_certs: True | ||
workspace: | ||
name: '{{ ws_name }}' | ||
description: '{{ ws_description }}' | ||
id: '{{ ws_name }}' | ||
requested_state: '{{ ws_req_state }}' | ||
force: '{{ ws_force }}' | ||
change_control: | ||
name: '{{ cc_name }}' | ||
description: '{{ cc_description }}' | ||
requested_state: '{{ cc_requested_state }}' | ||
# timeouts: | ||
# workspace_build_timeout: 300.0 | ||
# change_control_creation_timeout: 300.0 | ||
return_details: true | ||
register: cvp_results |
Oops, something went wrong.