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
This commit is contained in:
Ganesh Nalawade
2017-08-15 19:09:44 +05:30
committed by GitHub
parent 3f9d6aa0f1
commit 38c0b581c3
18 changed files with 353 additions and 165 deletions

View File

@@ -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: