From 3dbee0c77028aeb49da7a95f0df4ee61a5ff8893 Mon Sep 17 00:00:00 2001 From: Sugetha Chandhrasekar Date: Mon, 13 Nov 2023 15:17:17 -0800 Subject: [PATCH] merging changes from pr/589 --- .../arista/cvp/docs/modules/cv_container_v3.md | 11 +++++++---- .../arista/cvp/plugins/modules/cv_container_v3.py | 12 ++++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ansible_collections/arista/cvp/docs/modules/cv_container_v3.md b/ansible_collections/arista/cvp/docs/modules/cv_container_v3.md index f6cd28bbc..b08f20b38 100644 --- a/ansible_collections/arista/cvp/docs/modules/cv_container_v3.md +++ b/ansible_collections/arista/cvp/docs/modules/cv_container_v3.md @@ -6,8 +6,11 @@ Module added in version 3.0.0 ## Synopsis CloudVision Portal Configlet configuration requires a dictionary of containers with their parent, to create and delete containers on CVP side. -Module also supports to configure configlets at container level. -Returns number of created and/or deleted containers +The Module also supports assigning configlets at the container level. +Returns number of created and/or deleted containers. +With the argument `apply_mode` set to `loose` the module will only add new containers. +When `apply_mode` is set to `strict` the module will try to remove unspecified containers from CloudVision. +This will fail if the container has configlets attached to it or devices are placed in the container. ## Module-specific Options @@ -34,7 +37,7 @@ For a full view of the module inputs, please see the [schema documentation](../s gather_facts: no vars: verbose: False - containers: + CVP_CONTAINERS: Fabric: parentContainerName: Tenant Spines: @@ -53,7 +56,7 @@ For a full view of the module inputs, please see the [schema documentation](../s gather_facts: no vars: verbose: False - containers: + CVP_CONTAINERS: Fabric: parentContainerName: Tenant Spines: diff --git a/ansible_collections/arista/cvp/plugins/modules/cv_container_v3.py b/ansible_collections/arista/cvp/plugins/modules/cv_container_v3.py index c21579098..724894222 100644 --- a/ansible_collections/arista/cvp/plugins/modules/cv_container_v3.py +++ b/ansible_collections/arista/cvp/plugins/modules/cv_container_v3.py @@ -35,8 +35,12 @@ description: - CloudVision Portal Configlet configuration requires a dictionary of containers with their parent, to create and delete containers on CVP side. - - Module also supports to configure configlets at container level. - - Returns number of created and/or deleted containers + - The Module also supports assigning configlets at the container level. + - Returns number of created and/or deleted containers. + - With the argument `apply_mode` set to `loose` the module will only add new containers. + - When `apply_mode` is set to `strict` the module will try to remove unspecified containers from CloudVision. + - This will fail if the container has configlets attached to it or devices are placed in the container. + options: topology: description: YAML dictionary to describe intended containers. @@ -66,7 +70,7 @@ gather_facts: no vars: verbose: False - containers: + CVP_CONTAINERS: Fabric: parentContainerName: Tenant Spines: @@ -85,7 +89,7 @@ gather_facts: no vars: verbose: False - containers: + CVP_CONTAINERS: Fabric: parentContainerName: Tenant Spines: