diff options
author | Ganesh Nalawade <ganesh634@gmail.com> | 2017-08-15 15:39:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-15 15:39:44 +0200 |
commit | 38c0b581c3c6df3e0ba57cf2178508aaddcf2d40 (patch) | |
tree | 7ee1201b304613c5a8b5662b93b7bf774f49b0b7 /test | |
parent | doc: fix a typo (#28215) (diff) | |
download | ansible-38c0b581c3c6df3e0ba57cf2178508aaddcf2d40.tar.xz ansible-38c0b581c3c6df3e0ba57cf2178508aaddcf2d40.zip |
Handle common argument in aggregate parameter for vyos module (#28182)
* Handle common agrument in aggregate parameter for vyos module
* Add supoort to set parameter in aggregate to it's respctive
top level argument if value not provided in aggregate.
* Aggregate argument spec validation
* Documentation for aggregate
* Fix unit test failure
Diffstat (limited to 'test')
4 files changed, 38 insertions, 30 deletions
diff --git a/test/integration/targets/net_interface/tests/vyos/basic.yaml b/test/integration/targets/net_interface/tests/vyos/basic.yaml index 777016964a..fa7d7f6603 100644 --- a/test/integration/targets/net_interface/tests/vyos/basic.yaml +++ b/test/integration/targets/net_interface/tests/vyos/basic.yaml @@ -138,8 +138,9 @@ - name: Disable interface on aggregate net_interface: aggregate: - - { name: eth1, description: test-interface-1, speed: 100, duplex: half, mtu: 512, enabled: False} - - { name: eth2, description: test-interface-2, speed: 1000, duplex: full, mtu: 256, enabled: False} + - name: eth1 + - name: eth2 + enabled: False register: result - assert: @@ -151,8 +152,9 @@ - name: Enable interface on aggregate net_interface: aggregate: - - { name: eth1, description: test-interface-1, speed: 100, duplex: half, mtu: 512, enabled: True} - - { name: eth2, description: test-interface-2, speed: 1000, duplex: full, mtu: 256, enabled: True} + - name: eth1 + - name: eth2 + enabled: True register: result - assert: @@ -164,8 +166,9 @@ - name: Delete interface aggregate net_interface: aggregate: - - { name: eth1, state: absent} - - { name: eth2, state: absent} + - name: eth1 + - name: eth2 + state: absent register: result - assert: @@ -177,8 +180,9 @@ - name: Delete interface aggregate (idempotent) net_interface: aggregate: - - { name: eth1, state: absent} - - { name: eth2, state: absent} + - name: eth1 + - name: eth2 + state: absent register: result - assert: diff --git a/test/integration/targets/vyos_interface/tests/cli/basic.yaml b/test/integration/targets/vyos_interface/tests/cli/basic.yaml index a4c3a7cd40..83c2a27b9a 100644 --- a/test/integration/targets/vyos_interface/tests/cli/basic.yaml +++ b/test/integration/targets/vyos_interface/tests/cli/basic.yaml @@ -167,8 +167,9 @@ - name: Disable interface on aggregate vyos_interface: aggregate: - - { name: eth1, description: test-interface-1, enabled: False} - - { name: eth2, description: test-interface-2, enabled: False} + - name: eth1 + - name: eth2 + enabled: False register: result - assert: @@ -180,8 +181,9 @@ - name: Enable interface on aggregate vyos_interface: aggregate: - - { name: eth1, description: test-interface-1, enabled: True} - - { name: eth2, description: test-interface-2, enabled: True} + - name: eth1 + - name: eth2 + enabled: True register: result - assert: @@ -193,8 +195,9 @@ - name: Delete interface aggregate vyos_interface: aggregate: - - { name: eth1, state: absent} - - { name: eth2, state: absent} + - name: eth1 + - name: eth2 + state: absent register: result - assert: @@ -206,8 +209,9 @@ - name: Delete interface aggregate (idempotent) vyos_interface: aggregate: - - { name: eth1, state: absent} - - { name: eth2, state: absent} + - name: eth1 + - name: eth2 + state: absent register: result - assert: diff --git a/test/integration/targets/vyos_linkagg/tests/cli/basic.yaml b/test/integration/targets/vyos_linkagg/tests/cli/basic.yaml index 0b66905de4..27c2df1209 100644 --- a/test/integration/targets/vyos_linkagg/tests/cli/basic.yaml +++ b/test/integration/targets/vyos_linkagg/tests/cli/basic.yaml @@ -156,8 +156,8 @@ - name: Remove collection of linkagg definitions vyos_linkagg: aggregate: - - { name: bond0 } - - { name: bond1 } + - name: bond0 + - name: bond1 state: absent register: result @@ -172,8 +172,8 @@ - name: Remove collection of linkagg definitions again (idempotent) vyos_linkagg: aggregate: - - { name: bond0 } - - { name: bond1 } + - name: bond0 + - name: bond1 state: absent register: result diff --git a/test/integration/targets/vyos_lldp_interface/tests/cli/basic.yaml b/test/integration/targets/vyos_lldp_interface/tests/cli/basic.yaml index 53c8f4c47a..089d9b7a98 100644 --- a/test/integration/targets/vyos_lldp_interface/tests/cli/basic.yaml +++ b/test/integration/targets/vyos_lldp_interface/tests/cli/basic.yaml @@ -90,8 +90,8 @@ - name: Create aggregate of LLDP interface configurations vyos_lldp_interface: aggregate: - - { name: eth1 } - - { name: eth2 } + - name: eth1 + - name: eth2 state: present register: result @@ -104,8 +104,8 @@ - name: Create aggregate of LLDP interface configurations again (idempotent) vyos_lldp_interface: aggregate: - - { name: eth1 } - - { name: eth2 } + - name: eth1 + - name: eth2 state: present register: result @@ -116,7 +116,7 @@ - name: Override LLDP interface configuration on aggregate vyos_lldp_interface: aggregate: - - { name: eth1 } + - name: eth1 - { name: eth2, state: disabled } state: present register: result @@ -129,7 +129,7 @@ - name: Override LLDP interface configuration on aggregate again (idempotent) vyos_lldp_interface: aggregate: - - { name: eth1 } + - name: eth1 - { name: eth2, state: disabled } state: present register: result @@ -141,8 +141,8 @@ - name: Delete aggregate of LLDP interface configurations vyos_lldp_interface: aggregate: - - { name: eth1 } - - { name: eth2 } + - name: eth1 + - name: eth2 state: absent register: result @@ -155,8 +155,8 @@ - name: Delete aggregate of LLDP interface configurations (idempotent) vyos_lldp_interface: aggregate: - - { name: eth1 } - - { name: eth2 } + - name: eth1 + - name: eth2 state: absent register: result |