cisco.catalystcenter.applications_v2 module -- Resource module for Applications V2

Note

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

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.applications_v2.

New in cisco.catalystcenter 1.0.0

Synopsis

  • Manage operations create, update and delete of the resource Applications V2.

  • Create new custom application/s.

  • Delete existing custom application by id.

  • Edit the attributes of an existing application.

Note

This module has a corresponding action plugin.

Requirements

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

  • catalystcentersdk >= 3.2.3.0.0

  • python >= 3.12

Parameters

Parameter

Comments

catalystcenter_debug

aliases: dnac_debug

boolean

Flag for Cisco Catalyst Center SDK to enable debugging.

Choices:

catalystcenter_host

aliases: dnac_host

string / required

The Cisco Catalyst Center hostname.

catalystcenter_password

aliases: dnac_password

string

The Cisco Catalyst Center password to authenticate.

catalystcenter_port

aliases: dnac_port, catalystcenter_api_port

integer

The Cisco Catalyst Center port.

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

catalystcenter_username

aliases: dnac_username, user

string

The Cisco Catalyst Center username to authenticate.

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

catalystcenter_verify

aliases: dnac_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

catalystcenter_version

aliases: dnac_version

string

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

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

id

string

Id path parameter. Id of custom application to delete.

payload

list / elements=dictionary

Applications V2's payload.

displayName

string

Display name.

id

string

Application id.

indicativeNetworkIdentity

list / elements=dictionary

Indicative network identity.

displayName

string

Display name.

id

string

Id.

lowerPort

float

Lower port.

ports

string

Ports.

protocol

string

Protocol.

upperPort

float

Upper port.

instanceId

integer

Instance id.

instanceVersion

float

Instance version.

name

string

Application name.

namespace

string

Namespace.

networkApplications

list / elements=dictionary

Network applications.

applicationSubType

string

Application sub type, LEARNED discovered application, NONE nbar and custom application.

applicationType

string

Application type, DEFAULT nbar application, DEFAULT_MODIFIED nbar modified application, CUSTOM custom application.

appProtocol

string

App protocol.

categoryId

string

Category id.

displayName

string

Display name.

dscp

string

Dscp.

engineId

string

Engine id.

helpString

string

Help string.

id

string

Id.

ignoreConflict

boolean

longDescription

string

Long description.

name

string

Application name.

popularity

float

Popularity.

rank

integer

Rank, any value between 1 to 65535.

selectorId

string

Selector id.

serverName

string

Server name.

trafficClass

string

Traffic class.

url

string

Url.

networkIdentity

list / elements=dictionary

Network identity.

displayName

string

Display name.

id

string

Id.

ipv4Subnet

list / elements=string

Ipv4 subnet.

ipv6Subnet

list / elements=string

Ipv6 subnet.

lowerPort

float

Lower port.

ports

string

Ports.

protocol

string

Protocol.

upperPort

float

Upper port.

parentScalableGroup

dictionary

Parent scalable group.

idRef

string

Id reference to parent application set.

qualifier

string

Qualifier, valid value application.

scalableGroupExternalHandle

string

Scalable group external handle, should be equal to Application name.

scalableGroupType

string

Scalable group type, valid value APPLICATION.

type

string

Type, valid value scalablegroup.

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 application_policy.ApplicationPolicy.create_applications, application_policy.ApplicationPolicy.delete_application, application_policy.ApplicationPolicy.edit_applications,

  • Paths used are post /dna/intent/api/v2/applications, delete /dna/intent/api/v2/applications/{id}, put /dna/intent/api/v2/applications,

  • 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

  • Requires Python >= 3.10, matching the controller Python versions supported by the collection's minimum ansible-core version (see the collection README for the current ansible-core / Python compatibility range)

See Also

See also

Cisco Catalyst Center documentation for Application Policy CreateApplications

Complete reference of the CreateApplications API.

Cisco Catalyst Center documentation for Application Policy DeleteApplication

Complete reference of the DeleteApplication API.

Cisco Catalyst Center documentation for Application Policy EditApplications

Complete reference of the EditApplications API.

Examples

---
- name: Delete by id
  cisco.catalystcenter.applications_v2:
    catalystcenter_host: "{{catalystcenter_host}}"
    catalystcenter_username: "{{catalystcenter_username}}"
    catalystcenter_password: "{{catalystcenter_password}}"
    catalystcenter_verify: "{{catalystcenter_verify}}"
    catalystcenter_port: "{{catalystcenter_port}}"
    catalystcenter_version: "{{catalystcenter_version}}"
    catalystcenter_debug: "{{catalystcenter_debug}}"
    state: absent
    id: string
- name: Update all
  cisco.catalystcenter.applications_v2:
    catalystcenter_host: "{{catalystcenter_host}}"
    catalystcenter_username: "{{catalystcenter_username}}"
    catalystcenter_password: "{{catalystcenter_password}}"
    catalystcenter_verify: "{{catalystcenter_verify}}"
    catalystcenter_port: "{{catalystcenter_port}}"
    catalystcenter_version: "{{catalystcenter_version}}"
    catalystcenter_debug: "{{catalystcenter_debug}}"
    state: present
    payload:
      - displayName: string
        id: string
        indicativeNetworkIdentity:
          - displayName: string
            id: string
            lowerPort: 0
            ports: string
            protocol: string
            upperPort: 0
        instanceId: 0
        instanceVersion: 0
        name: string
        namespace: string
        networkApplications:
          - appProtocol: string
            applicationSubType: string
            applicationType: string
            categoryId: string
            displayName: string
            dscp: string
            engineId: string
            helpString: string
            id: string
            ignoreConflict: true
            longDescription: string
            name: string
            popularity: 0
            rank: 0
            selectorId: string
            serverName: string
            trafficClass: string
            url: string
        networkIdentity:
          - displayName: string
            id: string
            ipv4Subnet:
              - string
            ipv6Subnet: []
            lowerPort: 0
            ports: string
            protocol: string
            upperPort: 0
        parentScalableGroup:
          idRef: string
        qualifier: string
        scalableGroupExternalHandle: string
        scalableGroupType: string
        type: string
- name: Create
  cisco.catalystcenter.applications_v2:
    catalystcenter_host: "{{catalystcenter_host}}"
    catalystcenter_username: "{{catalystcenter_username}}"
    catalystcenter_password: "{{catalystcenter_password}}"
    catalystcenter_verify: "{{catalystcenter_verify}}"
    catalystcenter_port: "{{catalystcenter_port}}"
    catalystcenter_version: "{{catalystcenter_version}}"
    catalystcenter_debug: "{{catalystcenter_debug}}"
    state: present
    payload:
      - indicativeNetworkIdentity:
          - ipv4Subnet:
              - string
            ipv6Subnet:
              - string
            lowerPort: 0
            ports: string
            protocol: string
            upperPort: 0
        name: string
        networkApplications:
          - appProtocol: string
            applicationType: string
            categoryId: string
            dscp: string
            engineId: 0
            helpString: string
            ignoreConflict: true
            rank: 0
            serverName: string
            trafficClass: string
            type: string
            url: string
        networkIdentity:
          - ipv4Subnet:
              - string
            lowerPort: 0
            ports: string
            protocol: string
            upperPort: 0
        parentScalableGroup:
          idRef: string
        scalableGroupType: string
        type: string

Return Values

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

Key

Description

catalystcenter_response

dictionary

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

Returned: always

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

Authors

  • Bryan Vargas (@bvargasre)