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:
Nathaniel Case 2017-04-06 12:26:17 -04:00 committed by GitHub
parent 637e9942ff
commit 98c23a3342
5 changed files with 21 additions and 60 deletions

View file

@ -25,7 +25,7 @@ DOCUMENTATION = '''
module: nxos_mtu
extends_documentation_fragment: nxos
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.
description:
- Manages MTU settings on Nexus switch.
@ -42,12 +42,12 @@ options:
default: null
mtu:
description:
- MTU for a specific interface.
- MTU for a specific interface. Must be an even number between 576 and 9216.
required: false
default: null
sysmtu:
description:
- System jumbo MTU.
- System jumbo MTU. Must be an even number between 576 and 9216.
required: false
default: null
state:

View file

@ -32,29 +32,19 @@
that:
- "result.changed == false"
- name: configure interface mtu
- name: configure invalid (odd) interface mtu
nxos_mtu:
interface: Ethernet3/1
mtu: 2001
provider: "{{ cli }}"
register: result
ignore_errors: yes
- assert:
that:
- "result.changed == true"
- "result.failed == true"
- name: verify interface mtu
nxos_mtu:
interface: Ethernet3/1
mtu: 2001
provider: "{{ cli }}"
register: result
- assert:
that:
- "result.changed == false"
- name: invalid mtu setting
- name: configure invalid (large) mtu setting
nxos_mtu:
interface: Ethernet3/1
mtu: 100000

View file

@ -11,7 +11,6 @@
nxos_mtu:
sysmtu: 2000
provider: "{{ cli }}"
transport: nxapi
register: result
- assert:
@ -28,29 +27,20 @@
that:
- "result.changed == false"
- name: update system mtu
- name: configure invalid (odd) system mtu
nxos_mtu:
sysmtu: 2001
provider: "{{ cli }}"
register: result
ignore_errors: yes
- assert:
that:
- "result.changed == true"
- "result.failed == true"
- name: verify system mtu
- name: configure invalid (large) system mtu setting
nxos_mtu:
sysmtu: 2001
provider: "{{ cli }}"
register: result
- assert:
that:
- "result.changed == false"
- name: invalid setting
nxos_mtu:
sysmtu: 3000
sysmtu: 10000
provider: "{{ cli }}"
register: result
ignore_errors: yes

View file

@ -32,29 +32,19 @@
that:
- "result.changed == false"
- name: configure interface mtu
- name: configure invalid (odd) interface mtu
nxos_mtu:
interface: Ethernet3/1
mtu: 2001
provider: "{{ nxapi }}"
register: result
ignore_errors: yes
- assert:
that:
- "result.changed == true"
- "result.failed == true"
- name: verify interface mtu
nxos_mtu:
interface: Ethernet3/1
mtu: 2001
provider: "{{ nxapi }}"
register: result
- assert:
that:
- "result.changed == false"
- name: invalid mtu setting
- name: configure invalid (large) mtu setting
nxos_mtu:
interface: Ethernet3/1
mtu: 100000

View file

@ -27,29 +27,20 @@
that:
- "result.changed == false"
- name: update system mtu
- name: configure invalid (odd) system mtu
nxos_mtu:
sysmtu: 2001
provider: "{{ nxapi }}"
register: result
ignore_errors: yes
- assert:
that:
- "result.changed == true"
- "result.failed == true"
- name: verify system mtu
- name: configure invalid (large) system mtu setting
nxos_mtu:
sysmtu: 2001
provider: "{{ nxapi }}"
register: result
- assert:
that:
- "result.changed == false"
- name: invalid setting
nxos_mtu:
sysmtu: 3000
sysmtu: 10000
provider: "{{ nxapi }}"
register: result
ignore_errors: yes