Skip to content

Commit

Permalink
[ignore] change all tasks to include FQCN
Browse files Browse the repository at this point in the history
  • Loading branch information
akinross authored and lhercot committed Nov 15, 2023
1 parent 4f3fa75 commit c05901d
Show file tree
Hide file tree
Showing 23 changed files with 188 additions and 188 deletions.
6 changes: 3 additions & 3 deletions tests/integration/targets/nd_backup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
register: add_nexus2

- name: Find backup nexus to ensure that it was created
find:
ansible.builtin.find:
paths: "{{ role_path }}/backups"
patterns: "nexus_{{ ansible_host }}.tgz"
register: find_nexus

- name: Find backup nexus2 to ensure that it was created
find:
ansible.builtin.find:
paths: "{{ role_path }}/backups"
patterns: "nexus2_{{ ansible_host }}.tgz"
register: find_nexus2
Expand Down Expand Up @@ -139,7 +139,7 @@
register: delete_wrong_key_nexus

- name: Verify all assertions
assert:
ansible.builtin.assert:
that:
- cm_add_nexus.changed is true
- cm_add_nexus.current.spec.description == "nexus"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/nd_backup_restore/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
query_all_routes_restored3: "{{ query_all_routes_after_third_import.current | map(attribute='spec') | list | sort(attribute='destination') }}"

- name: Verify all assertions
assert:
ansible.builtin.assert:
that:
- restore_nexus_cm.changed is true
- restore_nexus.changed is true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
register: delete_mgmt_route

- name: Verify all assertions
assert:
ansible.builtin.assert:
that:
- add_data_route_cm.changed is true
- add_data_route.changed is true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

- name: Test that we have an Nexus Dashboard Insights Group and Site Name defined
fail:
ansible.builtin.fail:
msg: "Please define the following variables: insights_group, site_name."
when: insights_group is not defined or site_name is not defined

- name: Set vars
set_fact:
ansible.builtin.set_fact:
ndi_info: &ndi_info
insights_group: '{{ insights_group }}'
ndi_site: &ndi_site
Expand Down Expand Up @@ -41,7 +41,7 @@
register: query_existing

- name: Verify no compliance requirements are present
assert:
ansible.builtin.assert:
that:
- query_existing.current == []

Expand Down Expand Up @@ -133,4 +133,4 @@
- name: Delete a compliance requirement
cisco.nd.nd_compliance_requirement_config_manual:
<<: *requirement_config_manual_bd
state: absent
state: absent
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

- name: Test that we have an Nexus Dashboard Insights Group and Site Name defined
fail:
ansible.builtin.fail:
msg: "Please define the following variables: insights_group, site_name."
when: insights_group is not defined or site_name is not defined

- name: Set vars
set_fact:
ansible.builtin.set_fact:
ndi_info: &ndi_info
insights_group: '{{ insights_group }}'
ndi_base: &ndi_base
Expand Down Expand Up @@ -93,7 +93,7 @@
register: query_existing

- name: Verify no compliance requirements are present
assert:
ansible.builtin.assert:
that:
- query_existing.current == []

Expand Down Expand Up @@ -127,7 +127,7 @@
register: remove_requirement_may_traffic_restriction

- name: Verify create compliance requirement ( type may / TRAFFIC_RESTRICTION )
assert:
ansible.builtin.assert:
that:
- cm_create_requirement_may_traffic_restriction.current.communicationType == "MAY"
- cm_create_requirement_may_traffic_restriction.current.requirementType == "TRAFFIC_RESTRICTION"
Expand Down Expand Up @@ -251,7 +251,7 @@
register: remove_requirement_must_not_traffic_restriction

- name: Verify create compliance requirement ( type must_not / TRAFFIC_RESTRICTION )
assert:
ansible.builtin.assert:
that:
- create_requirement_must_not_traffic_restriction.current.communicationType == "MUST_NOT"
- create_requirement_must_not_traffic_restriction.current.requirementType == "TRAFFIC_RESTRICTION"
Expand All @@ -272,7 +272,7 @@
register: remove_requirement_must_not_segmentation

- name: Verify create compliance requirement ( type must_not / SEGMENTATION )
assert:
ansible.builtin.assert:
that:
- create_requirement_must_not_segmentation.current.communicationType == "MUST_NOT"
- create_requirement_must_not_segmentation.current.requirementType == "SEGMENTATION"
Expand All @@ -294,7 +294,7 @@
register: remove_requirement_must_sla

- name: Verify create compliance requirement ( type must / SLA )
assert:
ansible.builtin.assert:
that:
- create_requirement_must_sla.current.communicationType == "MUST"
- create_requirement_must_sla.current.requirementType == "SLA"
Expand Down Expand Up @@ -345,7 +345,7 @@
register: remove_requirement_description

- name: Verify create compliance requirement ( with description )
assert:
ansible.builtin.assert:
that:
- create_requirement_description_none.current.description is not defined
- create_requirement_description.current.description == "ansible-test-description"
Expand Down Expand Up @@ -416,7 +416,7 @@
register: query_pattern_none_again

- name: Verify create compliance requirement ( pattern == None )
assert:
ansible.builtin.assert:
that:
- query_pattern_none.current.objectSelectorA.includes.0.matches.0.vrfMatch.vrf.pattern == ""
- query_pattern_value.current.objectSelectorA.includes.0.matches.0.vrfMatch.vrf.pattern == "value"
Expand All @@ -429,7 +429,7 @@
register: remove_pattern_none

- name: Verify delete non existing compliance requirement
assert:
ansible.builtin.assert:
that:
- remove_pattern_none.current == {}

Expand Down Expand Up @@ -512,7 +512,7 @@
register: flags_not_set_to_ack

- name: Verify create compliance with flags
assert:
ansible.builtin.assert:
that:
- reverse_port_true.current.complianceTrafficSelector.includes.selectors.0.selectors.0.reversePort == true
- reverse_port_true.current.complianceTrafficSelector.includes.selectors.0.selectors.0.portSelectorAtoB.tcpFlagsNotSet == []
Expand Down Expand Up @@ -564,7 +564,7 @@
register: query_existing

- name: Verify 2 compliance requirements are present
assert:
ansible.builtin.assert:
that:
- query_existing.current | length == 2

Expand All @@ -582,7 +582,7 @@
register: query_existing

- name: Verify no compliance requirements are present
assert:
ansible.builtin.assert:
that:
- query_existing.current == []

Expand All @@ -593,7 +593,7 @@
register: query_non_existing

- name: Verify no compliance requirements are present
assert:
ansible.builtin.assert:
that:
- query_non_existing.current == {}

Expand Down Expand Up @@ -629,7 +629,7 @@
register: requirement_change_end

- name: Verify no compliance requirements are present
assert:
ansible.builtin.assert:
that:
- cm_requirement_change_start is changed
- nm_requirement_change_start is changed
Expand All @@ -652,7 +652,7 @@
register: nm_remove_requirement_change

- name: Verify no compliance requirement is removed
assert:
ansible.builtin.assert:
that:
- cm_remove_requirement_change.current == {}
- nm_remove_requirement_change.current == {}
Expand Down Expand Up @@ -787,12 +787,12 @@
register: flags_not_set_wrong_choice_error

- name: Verify wrong choice error
assert:
ansible.builtin.assert:
that:
- 'type_wrong_choice_error.msg == "value of type must be one of: must, must_not, may, got: wrong_choice"'
- 'object_type_wrong_choice_error.msg == "value of type must be one of: tenant, vrf, bd, epg, ap, l3out, l3instp, l2out, l2instp, filter, subject, contract, got: wrong_choice found in from_object -> includes"'
- 'attribute_wrong_choice_error.msg == "value of attribute must be one of: DN, got: wrong_choice found in from_object -> includes"'
- 'match_type_wrong_choice_error.msg == "value of type must be one of: tenant, vrf, bd, epg, ap, l3out, l3instp, l2out, l2instp, filter, subject, contract, got: wrong_choice found in from_object -> includes -> patterns"'
- 'operator_type_wrong_choice_error.msg == "value of operator must be one of: contains, begins_with, ends_with, equal_to, not_equal_to, not_contains, not_begins_with, not_ends_with, got: wrong_choice found in from_object -> includes -> patterns"'
- 'flags_set_wrong_choice_error.msg == "value of tcp_flags must be one or more of: ack, est, fin, res, syn. Got no match for: wrong_choice found in traffic_selector_rules -> from_object"'
- 'flags_not_set_wrong_choice_error.msg == "value of tcp_flags_not_set must be one or more of: ack, est, fin, res, syn. Got no match for: wrong_choice found in traffic_selector_rules -> from_object"'
- 'flags_not_set_wrong_choice_error.msg == "value of tcp_flags_not_set must be one or more of: ack, est, fin, res, syn. Got no match for: wrong_choice found in traffic_selector_rules -> from_object"'
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

- name: Test that we have an Nexus Dashboard Insights Group and Site Name defined
fail:
ansible.builtin.fail:
msg: "Please define the following variables: insights_group, site_name."
when: insights_group is not defined or site_name is not defined

- name: Set vars
set_fact:
ansible.builtin.set_fact:
ndi_info: &ndi_info
insights_group: '{{ insights_group }}'
ndi_base: &ndi_base
Expand Down Expand Up @@ -41,7 +41,7 @@
register: query_existing

- name: Verify no compliance requirements are present
assert:
ansible.builtin.assert:
that:
- query_existing.current == []

Expand Down Expand Up @@ -88,7 +88,7 @@
register: nm_remove_requirement

- name: Verify create compliance requirement
assert:
ansible.builtin.assert:
that:
- cm_create_requirement.current.associatedSites | length == 1
- cm_create_requirement.current.configurationType == "JSON_XML_BASED_CONFIGURATION_COMPLIANCE"
Expand Down Expand Up @@ -155,7 +155,7 @@
register: remove_requirement_description

- name: Verify create compliance requirement ( with description )
assert:
ansible.builtin.assert:
that:
- create_requirement_description_none.current.description is not defined
- create_requirement_description.current.description == "ansible-test-description"
Expand Down Expand Up @@ -191,7 +191,7 @@
state: absent

- name: Verify incorrect file name and invalid file content error
assert:
ansible.builtin.assert:
that:
- err_change_requirement_file.msg == "The provided filename 'ansible-test-fail.json' is not matching the filename 'ansible-test.json' uploaded to the existing import configuration type compliance requirement"
- 'err_create_requirement_incorrect_file.payload.messages.0.message == "The configuration file has invalid content. Found unexpected MO structure: {}"'
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

- name: Test that we have an Nexus Dashboard Insights Group and Site Name defined
fail:
ansible.builtin.fail:
msg: "Please define the following variables: insights_group, site_name."
when: insights_group is not defined or site_name is not defined

- name: Set vars
set_fact:
ansible.builtin.set_fact:
ndi_info: &ndi_info
insights_group: '{{ insights_group }}'
ndi_base: &ndi_base
Expand Down Expand Up @@ -58,7 +58,7 @@
register: query_existing

- name: Verify no compliance requirements are present
assert:
ansible.builtin.assert:
that:
- query_existing.current == []

Expand Down Expand Up @@ -107,7 +107,7 @@
register: nm_remove_requirement

- name: Verify create compliance requirement
assert:
ansible.builtin.assert:
that:
- cm_create_requirement.current.associatedSites | length == 1
- cm_create_requirement.current.configComplianceParameter.andParameters.0.operator == "CONTAINS"
Expand Down Expand Up @@ -189,7 +189,7 @@
register: remove_requirement_description

- name: Verify create compliance requirement ( with description )
assert:
ansible.builtin.assert:
that:
- create_requirement_description_none.current.description is not defined
- create_requirement_description.current.description == "ansible-test-description"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

- name: Test that we have an Nexus Dashboard Insights Group and Site Name defined
fail:
ansible.builtin.fail:
msg: "Please define the following variables: insights_group, site_name."
when: insights_group is not defined or site_name is not defined

- name: Set vars
set_fact:
ansible.builtin.set_fact:
ndi_info: &ndi_info
insights_group: '{{ insights_group }}'
ndi_site: &ndi_site
Expand Down Expand Up @@ -43,7 +43,7 @@
register: query_existing

- name: Verify no compliance requirements are present
assert:
ansible.builtin.assert:
that:
- query_existing.current == []

Expand Down Expand Up @@ -90,7 +90,7 @@
register: nm_remove_requirement

- name: Verify create compliance requirement
assert:
ansible.builtin.assert:
that:
- cm_create_requirement.current.associatedSites | length == 1
- cm_create_requirement.current.baseEpochId is defined
Expand Down Expand Up @@ -132,7 +132,7 @@
register: nm_remove_requirement_epoch_id

- name: Verify create compliance requirement
assert:
ansible.builtin.assert:
that:
- nm_remove_requirement_epoch_id.current == {}
- nm_create_requirement_epoch_id.current.baseEpochId == "{{ period_latest.current.epochId }}"
Expand Down Expand Up @@ -179,7 +179,7 @@
register: remove_requirement_description

- name: Verify create compliance requirement ( descriptions )
assert:
ansible.builtin.assert:
that:
- create_requirement_description_none.current.description is not defined
- create_requirement_description.current.description == "ansible-test-description"
Expand All @@ -197,6 +197,6 @@
register: err_create_requirement_epoch_id_invalid

- name: Verify invalid epoch id
assert:
ansible.builtin.assert:
that:
- err_create_requirement_epoch_id_invalid.payload.messages.0.message == "The epoch with id invalid is not valid."
Loading

0 comments on commit c05901d

Please sign in to comment.