cisco.catalystcenter.sda_extranet_policies module -- Resource module for Sda Extranet Policies

Note

This module is part of the cisco.catalystcenter collection (version 2.2.2).

To install it, use: ansible-galaxy collection install cisco.catalystcenter. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cisco.catalystcenter.sda_extranet_policies.

New in cisco.catalystcenter 6.14.0

Synopsis

  • Manage operations create, update and delete of the resource Sda Extranet Policies.

  • Adds an extranet policy based on user input.

  • Deletes an extranet policy based on id.

  • Deletes extranet policies based on user input.

  • Updates an extranet policy based on user input.

Note

This module has a corresponding action plugin.

Requirements

The below requirements are needed on the host that executes this module.

  • catalystcentersdk >= 3.1.3.0.0

  • python >= 3.5

Parameters

Parameter

Comments

catalystcenter_api_port

integer

The Cisco Catalyst Center port.

Default: :ansible-option-default:`443`

catalystcenter_debug

boolean

Flag for Cisco Catalyst Center SDK to enable debugging.

Choices:

catalystcenter_host

string / required

The Cisco Catalyst Center hostname.

catalystcenter_password

string

The Cisco Catalyst Center password to authenticate.

catalystcenter_username

string

The Cisco Catalyst Center username to authenticate.

Default: :ansible-option-default:`"admin"`

catalystcenter_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

catalystcenter_version

string

Informs the SDK which version of Cisco Catalyst Center to use.

Default: :ansible-option-default:`"2.3.7.6"`

extranetPolicyName

string

ExtranetPolicyName query parameter. Name of the extranet policy.

id

string

Id path parameter. ID of the extranet policy.

payload

list / elements=dictionary

Sda Extranet Policies's payload.

extranetPolicyName

string

Name of the existing extranet policy (updating this field is not allowed).

fabricIds

list / elements=string

IDs of the fabric sites associated with this extranet policy.

id

string

ID of the existing extranet policy (updating this field is not allowed).

providerVirtualNetworkName

string

Name of the existing provider virtual network (updating this field is not allowed).

subscriberVirtualNetworkNames

list / elements=string

Name of the subscriber virtual networks.

validate_response_schema

boolean

Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema.

Choices:

Notes

Note

  • SDK Method used are sda.Sda.add_extranet_policy, sda.Sda.delete_extranet_policy_by_id, sda.Sda.update_extranet_policy,

  • Paths used are post /dna/intent/api/v1/sda/extranetPolicies, delete /dna/intent/api/v1/sda/extranetPolicies, delete /dna/intent/api/v1/sda/extranetPolicies/{id}, put /dna/intent/api/v1/sda/extranetPolicies,

  • Does not support check_mode

  • The plugin runs on the control node and does not use any ansible connection plugins,

  • but instead uses the embedded connection manager from Cisco CATALYST SDK

See Also

See also

Cisco DNA Center documentation for SDA AddExtranetPolicy

Complete reference of the AddExtranetPolicy API.

Cisco DNA Center documentation for SDA DeleteExtranetPolicies

Complete reference of the DeleteExtranetPolicies API.

Cisco DNA Center documentation for SDA DeleteExtranetPolicyById

Complete reference of the DeleteExtranetPolicyById API.

Cisco DNA Center documentation for SDA UpdateExtranetPolicy

Complete reference of the UpdateExtranetPolicy API.

Examples

---
- name: Delete all
  cisco.catalystcenter.sda_extranet_policies:
    catalystcenter_host: "{{catalystcenter_host}}"
    catalystcenter_username: "{{catalystcenter_username}}"
    catalystcenter_password: "{{catalystcenter_password}}"
    catalystcenter_verify: "{{catalystcenter_verify}}"
    catalystcenter_api_port: "{{catalystcenter_api_port}}"
    catalystcenter_version: "{{catalystcenter_version}}"
    catalystcenter_debug: "{{catalystcenter_debug}}"
    state: absent
    extranetPolicyName: string
- name: Update all
  cisco.catalystcenter.sda_extranet_policies:
    catalystcenter_host: "{{catalystcenter_host}}"
    catalystcenter_username: "{{catalystcenter_username}}"
    catalystcenter_password: "{{catalystcenter_password}}"
    catalystcenter_verify: "{{catalystcenter_verify}}"
    catalystcenter_api_port: "{{catalystcenter_api_port}}"
    catalystcenter_version: "{{catalystcenter_version}}"
    catalystcenter_debug: "{{catalystcenter_debug}}"
    state: present
    payload:
      - extranetPolicyName: string
        fabricIds:
          - string
        id: string
        providerVirtualNetworkName: string
        subscriberVirtualNetworkNames:
          - string
- name: Create
  cisco.catalystcenter.sda_extranet_policies:
    catalystcenter_host: "{{catalystcenter_host}}"
    catalystcenter_username: "{{catalystcenter_username}}"
    catalystcenter_password: "{{catalystcenter_password}}"
    catalystcenter_verify: "{{catalystcenter_verify}}"
    catalystcenter_api_port: "{{catalystcenter_api_port}}"
    catalystcenter_version: "{{catalystcenter_version}}"
    catalystcenter_debug: "{{catalystcenter_debug}}"
    state: present
    payload:
      - extranetPolicyName: string
        fabricIds:
          - string
        providerVirtualNetworkName: string
        subscriberVirtualNetworkNames:
          - string
- name: Delete by id
  cisco.catalystcenter.sda_extranet_policies:
    catalystcenter_host: "{{catalystcenter_host}}"
    catalystcenter_username: "{{catalystcenter_username}}"
    catalystcenter_password: "{{catalystcenter_password}}"
    catalystcenter_verify: "{{catalystcenter_verify}}"
    catalystcenter_api_port: "{{catalystcenter_api_port}}"
    catalystcenter_version: "{{catalystcenter_version}}"
    catalystcenter_debug: "{{catalystcenter_debug}}"
    state: absent
    id: string

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

dnac_response

dictionary

A dictionary or list with the response returned by the Cisco CATALYST Python SDK

Returned: always

Sample: :ansible-rv-sample-value:`{"response": {"taskId": "string", "url": "string"}, "version": "string"}`

Authors

  • Rafael Campos (@racampos)