Attempt to clear up nxos_mtu tests and documentation (#23361)
nxos_system wasn't added until 2.3, so nxos_mtu should have been deprecated then.
This commit is contained in:
parent
637e9942ff
commit
98c23a3342
5 changed files with 21 additions and 60 deletions
|
@ -25,7 +25,7 @@ DOCUMENTATION = '''
|
||||||
module: nxos_mtu
|
module: nxos_mtu
|
||||||
extends_documentation_fragment: nxos
|
extends_documentation_fragment: nxos
|
||||||
version_added: "2.2"
|
version_added: "2.2"
|
||||||
deprecated: Deprecated in 2.2 use M(nxos_system)'s C(mtu) option.
|
deprecated: Deprecated in 2.3 use M(nxos_system)'s C(mtu) option.
|
||||||
short_description: Manages MTU settings on Nexus switch.
|
short_description: Manages MTU settings on Nexus switch.
|
||||||
description:
|
description:
|
||||||
- Manages MTU settings on Nexus switch.
|
- Manages MTU settings on Nexus switch.
|
||||||
|
@ -42,12 +42,12 @@ options:
|
||||||
default: null
|
default: null
|
||||||
mtu:
|
mtu:
|
||||||
description:
|
description:
|
||||||
- MTU for a specific interface.
|
- MTU for a specific interface. Must be an even number between 576 and 9216.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default: null
|
||||||
sysmtu:
|
sysmtu:
|
||||||
description:
|
description:
|
||||||
- System jumbo MTU.
|
- System jumbo MTU. Must be an even number between 576 and 9216.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default: null
|
||||||
state:
|
state:
|
||||||
|
|
|
@ -32,29 +32,19 @@
|
||||||
that:
|
that:
|
||||||
- "result.changed == false"
|
- "result.changed == false"
|
||||||
|
|
||||||
- name: configure interface mtu
|
- name: configure invalid (odd) interface mtu
|
||||||
nxos_mtu:
|
nxos_mtu:
|
||||||
interface: Ethernet3/1
|
interface: Ethernet3/1
|
||||||
mtu: 2001
|
mtu: 2001
|
||||||
provider: "{{ cli }}"
|
provider: "{{ cli }}"
|
||||||
register: result
|
register: result
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.failed == true"
|
||||||
|
|
||||||
- name: verify interface mtu
|
- name: configure invalid (large) mtu setting
|
||||||
nxos_mtu:
|
|
||||||
interface: Ethernet3/1
|
|
||||||
mtu: 2001
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
|
||||||
|
|
||||||
- assert:
|
|
||||||
that:
|
|
||||||
- "result.changed == false"
|
|
||||||
|
|
||||||
- name: invalid mtu setting
|
|
||||||
nxos_mtu:
|
nxos_mtu:
|
||||||
interface: Ethernet3/1
|
interface: Ethernet3/1
|
||||||
mtu: 100000
|
mtu: 100000
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
nxos_mtu:
|
nxos_mtu:
|
||||||
sysmtu: 2000
|
sysmtu: 2000
|
||||||
provider: "{{ cli }}"
|
provider: "{{ cli }}"
|
||||||
transport: nxapi
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -28,29 +27,20 @@
|
||||||
that:
|
that:
|
||||||
- "result.changed == false"
|
- "result.changed == false"
|
||||||
|
|
||||||
- name: update system mtu
|
- name: configure invalid (odd) system mtu
|
||||||
nxos_mtu:
|
nxos_mtu:
|
||||||
sysmtu: 2001
|
sysmtu: 2001
|
||||||
provider: "{{ cli }}"
|
provider: "{{ cli }}"
|
||||||
register: result
|
register: result
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.failed == true"
|
||||||
|
|
||||||
- name: verify system mtu
|
- name: configure invalid (large) system mtu setting
|
||||||
nxos_mtu:
|
nxos_mtu:
|
||||||
sysmtu: 2001
|
sysmtu: 10000
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
|
||||||
|
|
||||||
- assert:
|
|
||||||
that:
|
|
||||||
- "result.changed == false"
|
|
||||||
|
|
||||||
- name: invalid setting
|
|
||||||
nxos_mtu:
|
|
||||||
sysmtu: 3000
|
|
||||||
provider: "{{ cli }}"
|
provider: "{{ cli }}"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
|
@ -32,29 +32,19 @@
|
||||||
that:
|
that:
|
||||||
- "result.changed == false"
|
- "result.changed == false"
|
||||||
|
|
||||||
- name: configure interface mtu
|
- name: configure invalid (odd) interface mtu
|
||||||
nxos_mtu:
|
nxos_mtu:
|
||||||
interface: Ethernet3/1
|
interface: Ethernet3/1
|
||||||
mtu: 2001
|
mtu: 2001
|
||||||
provider: "{{ nxapi }}"
|
provider: "{{ nxapi }}"
|
||||||
register: result
|
register: result
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.failed == true"
|
||||||
|
|
||||||
- name: verify interface mtu
|
- name: configure invalid (large) mtu setting
|
||||||
nxos_mtu:
|
|
||||||
interface: Ethernet3/1
|
|
||||||
mtu: 2001
|
|
||||||
provider: "{{ nxapi }}"
|
|
||||||
register: result
|
|
||||||
|
|
||||||
- assert:
|
|
||||||
that:
|
|
||||||
- "result.changed == false"
|
|
||||||
|
|
||||||
- name: invalid mtu setting
|
|
||||||
nxos_mtu:
|
nxos_mtu:
|
||||||
interface: Ethernet3/1
|
interface: Ethernet3/1
|
||||||
mtu: 100000
|
mtu: 100000
|
||||||
|
|
|
@ -27,29 +27,20 @@
|
||||||
that:
|
that:
|
||||||
- "result.changed == false"
|
- "result.changed == false"
|
||||||
|
|
||||||
- name: update system mtu
|
- name: configure invalid (odd) system mtu
|
||||||
nxos_mtu:
|
nxos_mtu:
|
||||||
sysmtu: 2001
|
sysmtu: 2001
|
||||||
provider: "{{ nxapi }}"
|
provider: "{{ nxapi }}"
|
||||||
register: result
|
register: result
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.failed == true"
|
||||||
|
|
||||||
- name: verify system mtu
|
- name: configure invalid (large) system mtu setting
|
||||||
nxos_mtu:
|
nxos_mtu:
|
||||||
sysmtu: 2001
|
sysmtu: 10000
|
||||||
provider: "{{ nxapi }}"
|
|
||||||
register: result
|
|
||||||
|
|
||||||
- assert:
|
|
||||||
that:
|
|
||||||
- "result.changed == false"
|
|
||||||
|
|
||||||
- name: invalid setting
|
|
||||||
nxos_mtu:
|
|
||||||
sysmtu: 3000
|
|
||||||
provider: "{{ nxapi }}"
|
provider: "{{ nxapi }}"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
Loading…
Reference in a new issue