mirror of https://github.com/ansible/ansible.git
nxos bugfixes cherry-pick (#38091)
* Fix nxos_switchport (#37328) (cherry picked from commitpull/37668/mergeff57fd0bb4
) * Fix nxos_l2_interface and test typo (#37336) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commitba5e562c76
) * fix ios_l2_interface (#37389) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commitdd37857884
) * fix required args for nxos_snapshot and docs improvement (#37232) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commita10df8b0b5
) * add nxos_snapshot test for missing required param (#37248) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commit2501834c42
) * Ensure network_cli nxos test is run only once - remove unnecessary files (#37462) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commit957ab02e52
) * Integration Tests only: nxos_user (#37852) * add new integration file to nxos_user * fix shippable error * change nxapi to connection * review comments (cherry picked from commit63da50e1d8
) * fix UnboundLocalError nxos_bgp_af module (#37610) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commit00abe6dbe7
) * Fix nxos_vrf issues (#37092) * fix nxos_vrf issues * fix doc (cherry picked from commitdc61f4c6b1
) * fix nxos_vrf_af issues (#37211) (cherry picked from commit74e79d9f5e
) * fix nxos_udld issues (#37418) (cherry picked from commit05b266cc66
) * fix nxos_vlan issues (#38008) (cherry picked from commit6f2cb28bb9
) * add changelog Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
parent
60e7aa0dbd
commit
a716fe97e3
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- ios_l2_interface - fix removal of trunk vlans (https://github.com/ansible/ansible/pull/37389)
|
@ -0,0 +1,11 @@
|
||||
bugfixes:
|
||||
- _nxos_switchport - fix removal of trunk vlans (https://github.com/ansible/ansible/pull/37328)
|
||||
- nxos_l2_interface - fix removal of trunk vlans (https://github.com/ansible/ansible/pull/37336)
|
||||
- nxos_snapshot - fix documentation and add required parameter logic (https://github.com/ansible/ansible/pull/37232, https://github.com/ansible/ansible/pull/37248)
|
||||
- Improve integration test - Ensure each transport test runs only once (https://github.com/ansible/ansible/pull/37462)
|
||||
- nxos_user - Integration test (https://github.com/ansible/ansible/pull/37852)
|
||||
- nxos_bgp_af - Fix UnboundLocalError (https://github.com/ansible/ansible/pull/37610)
|
||||
- nxos_vrf - Fix nxos_vrf issues (https://github.com/ansible/ansible/pull/37092)
|
||||
- nxos_vrf_af - Fix nxos_vrf_af issues (https://github.com/ansible/ansible/pull/37211)
|
||||
- nxos_udld - Fix nxos_udld issues (https://github.com/ansible/ansible/pull/37418)
|
||||
- nxos_vlan - Fix nxos_vlan issues (https://github.com/ansible/ansible/pull/38008)
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_hsrp/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_hsrp/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_ntp/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_ntp/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_ospf_vrf/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_ospf_vrf/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: "{{ role_path }}/tests/common/sanity.yaml"
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: "{{ role_path }}/tests/common/sanity.yaml"
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: "{{ role_path }}/tests/common/sanity.yaml"
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: "{{ role_path }}/tests/common/sanity.yaml"
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_snapshot/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_snapshot/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: "{{ role_path }}/tests/common/sanity.yaml"
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: "{{ role_path }}/tests/common/sanity.yaml"
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: "{{ role_path }}/tests/common/sanity.yaml"
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: "{{ role_path }}/tests/common/sanity.yaml"
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_snmp_user/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_snmp_user/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_static_route/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_static_route/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_udld/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_udld/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_udld_interface/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_udld_interface/tests/common/sanity.yaml
|
@ -0,0 +1,117 @@
|
||||
---
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_user parameter test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: idem="true"
|
||||
- set_fact: idem="false"
|
||||
when: ((platform is search('N7K')) and (imagetag and (imagetag is version_compare('D1', 'eq'))))
|
||||
|
||||
- block:
|
||||
- name: Create user
|
||||
nxos_user: &configure
|
||||
name: netend
|
||||
configured_password: Hello!23$
|
||||
update_password: on_create
|
||||
roles: network-operator
|
||||
state: present
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: &true
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
|
||||
- block:
|
||||
- name: conf idempotency
|
||||
nxos_user: *configure
|
||||
register: result
|
||||
|
||||
- assert: &false
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
when: idem
|
||||
|
||||
- name: Remove user
|
||||
nxos_user: &remove
|
||||
name: netend
|
||||
state: absent
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: remove idempotency
|
||||
nxos_user: *remove
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
- debug: msg="skipping sshkey test as the key needs to be created on the server first"
|
||||
|
||||
# - name: create a new user
|
||||
# nxos_user: &conf1
|
||||
# name: ansible
|
||||
# sshkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
|
||||
# state: present
|
||||
# provider: "{{ connection }}"
|
||||
# register: result
|
||||
#
|
||||
# - assert: *true
|
||||
|
||||
# - block:
|
||||
# - name: user idempotency
|
||||
# nxos_user: *conf1
|
||||
# register: result
|
||||
#
|
||||
# - assert: *false
|
||||
#
|
||||
# when: idem
|
||||
|
||||
- name: Collection of users
|
||||
nxos_user: &coll
|
||||
users:
|
||||
- name: test1
|
||||
- name: test2
|
||||
configured_password: Hello!23$
|
||||
update_password: on_create
|
||||
state: present
|
||||
roles:
|
||||
- network-admin
|
||||
- network-operator
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- block:
|
||||
- name: users idempotency
|
||||
nxos_user: *coll
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
when: idem
|
||||
|
||||
- name: tearDown
|
||||
nxos_user: &tear
|
||||
name: ansible
|
||||
purge: yes
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: teardown idempotency
|
||||
nxos_user: *tear
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
always:
|
||||
- name: tearDown
|
||||
nxos_user: *tear
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_user parameter test"
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_vpc/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_vpc/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_vpc_interface/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_vpc_interface/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_vrf_af/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_vrf_af/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ cli }}"
|
||||
|
||||
- import_tasks: targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- set_fact: connection="{{ nxapi }}"
|
||||
|
||||
- import_tasks: targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml
|
Loading…
Reference in New Issue