summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohit Thakur <rohitthakur2590@outlook.com>2020-05-06 17:32:09 +0530
committerRohit Thakur <rohitthakur2590@outlook.com>2020-05-06 17:32:09 +0530
commitdf5f503a3603164cc4ba74723aa39e7f33be6605 (patch)
tree4affb38a217cde4e1552d224f45aecd29b11969d
parentb125abe2ac135589a2c3455ef74e1580f435489c (diff)
downloadvyos-ansible-collection-df5f503a3603164cc4ba74723aa39e7f33be6605.tar.gz
vyos-ansible-collection-df5f503a3603164cc4ba74723aa39e7f33be6605.zip
common comments incorporated
Signed-off-by: Rohit Thakur <rohitthakur2590@outlook.com>
-rw-r--r--plugins/modules/vyos_lldp_interfaces.py8
-rw-r--r--tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml11
-rw-r--r--tests/integration/targets/vyos_lldp_interfaces/tests/cli/parsed.yaml10
-rw-r--r--tests/integration/targets/vyos_lldp_interfaces/tests/cli/rendered.yaml11
4 files changed, 5 insertions, 35 deletions
diff --git a/plugins/modules/vyos_lldp_interfaces.py b/plugins/modules/vyos_lldp_interfaces.py
index 9567511..b26da49 100644
--- a/plugins/modules/vyos_lldp_interfaces.py
+++ b/plugins/modules/vyos_lldp_interfaces.py
@@ -30,11 +30,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
-ANSIBLE_METADATA = {
- "metadata_version": "1.1",
- "status": ["preview"],
- "supported_by": "network",
-}
+ANSIBLE_METADATA = {"metadata_version": "1.1", "supported_by": "Ansible"}
DOCUMENTATION = """module: vyos_lldp_interfaces
short_description: LLDP interfaces resource module
@@ -42,6 +38,7 @@ description: This module manages attributes of lldp interfaces on VyOS network d
notes:
- Tested against VyOS 1.1.8 (helium).
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
+version_added: "1.0.0"
author:
- Rohit Thakur (@rohitthakur2590)
options:
@@ -120,7 +117,6 @@ options:
it into Ansible structured data as per the resource module's argspec and the value is then
returned in the I(parsed) key within the result.
type: str
- version_added: "1.0.0"
state:
description:
- The state of the configuration after module completion.
diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml
index d440b53..30b804a 100644
--- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml
@@ -9,7 +9,7 @@
- block:
- - name: Merge the provided configuration with the exisiting running configuration
+ - name: Gather the provided configuration with the exisiting running configuration
register: result
vyos.vyos.vyos_lldp_interfaces: &id001
config:
@@ -20,15 +20,6 @@
that:
- "{{ populate | symmetric_difference(result['gathered']) |length == 0\
\ }}"
-
- - name: Gather the existing running configuration (IDEMPOTENT)
- register: result
- vyos.vyos.vyos_lldp_interfaces: *id001
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - result['changed'] == false
always:
- include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/parsed.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/parsed.yaml
index 7842152..c549ce7 100644
--- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/parsed.yaml
+++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/parsed.yaml
@@ -19,7 +19,7 @@
- name: Provide the running configuration for parsing (config to be parsed)
register: result
- vyos.vyos.vyos_lldp_interfaces: &id001
+ vyos.vyos.vyos_lldp_interfaces:
running_config: "{{ lookup('file', '_parsed_config.cfg') }}"
state: parsed
@@ -28,14 +28,6 @@
that: "{{ ansible_facts['network_resources']['lldp_interfaces'] | symmetric_difference(result['parsed'])\
\ |length == 0 }}"
- - name: Gather the existing running configuration (IDEMPOTENT)
- register: result
- vyos.vyos.vyos_lldp_interfaces: *id001
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - result['changed'] == false
always:
- include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/rendered.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/rendered.yaml
index 6bb9f5a..d69e1c5 100644
--- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/rendered.yaml
@@ -11,7 +11,7 @@
- name: Structure provided configuration into device specific commands
register: result
- vyos.vyos.vyos_lldp_interfaces: &id001
+ vyos.vyos.vyos_lldp_interfaces:
config:
- name: eth1
location:
@@ -34,15 +34,6 @@
that:
- "{{ rendered['commands'] | symmetric_difference(result['rendered'])\
\ |length == 0 }}"
-
- - name: Structure provided configuration into device specific commands (IDEMPOTENT)
- register: result
- vyos.vyos.vyos_lldp_interfaces: *id001
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - result['changed'] == false
always:
- include_tasks: _remove_config.yaml