cisco.dnac.application_policy_workflow_manager module – Resource module for managing queuing profiles, applications, application sets and application policies for wired and wireless in Cisco Catalyst Center.

Note

This module is part of the cisco.dnac collection (version 6.39.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

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

To use it in a playbook, specify: cisco.dnac.application_policy_workflow_manager.

New in cisco.dnac 6.31.0

Synopsis

  • Provides functionality to create, update, and delete applications in Cisco Catalyst Center.

  • Provides functionality to create, update, and delete application policies in Cisco Catalyst Center.

  • Provides functionality to create, update, and delete application queuing profiles in Cisco Catalyst Center.

  • Supports managing queuing profiles and application policies for traffic classification and prioritization.

Requirements

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

  • dnacentersdk >= 2.9.3

  • python >= 3.9.19

Parameters

Parameter

Comments

config

list / elements=dictionary / required

A list of dictionaries containing application queuing profile details.

application_policy

list / elements=dictionary

Defines how an application’s traffic is managed and prioritized within a network.

application_queuing_profile_name

string

Defines rules for traffic management by prioritizing network traffic within the application policy.

clause

list / elements=dictionary

Defines specific rules or conditions under which an application set is added to the application policy.

clause_type

string

  • Specifies the type of clause for the application policy.

  • Permissible values:

  • “BUSINESS_RELEVANCE”: Defines the importance of the application to business operations, affecting its priority and

handling in the network policy. - “APPLICATION_POLICY_KNOBS”: Configurable settings that manage the application’s network behavior, such as traffic prioritization and resource allocation.

relevance_details

list / elements=dictionary

Details about how relevant the application is to business operations.

application_set_name

list / elements=string

Include all the application sets for which the application policy has to be created

relevance

string

  • Specifies whether the application set is relevant to the application policy.

  • Permissible values:

  • “BUSINESS_RELEVANT”: The application is critical for business functions.

  • “BUSINESS_IRRELEVANT”: The application is not essential for business operations.

  • “DEFAULT”: A default setting when no specific relevance is assigned.

device_type

string

Indicates whether the device is wired or wireless.

name

string

Name of the application policy

policy_status

string

  • Represents the current status of the application policy.

  • Helps track whether the policy is active, deleted, or restored.

  • Permissible values:

  • “NONE”: The policy is active and in its original, operational state.

  • “DELETED”: The policy has been removed and is no longer active.

  • “RESTORED”: The policy has been reactivated after being deleted.

site_names

list / elements=string

The site or area within the network where the policy should be enforced.

ssid_name

string

Specifies the SSID name for wireless devices. Required if device_type is set to ‘wireless’.

queuing_profile

list / elements=dictionary

Defines queuing profile settings for application traffic shaping and bandwidth allocation.

Each profile specifies whether bandwidth allocation is uniform across all interface speeds or customized per speed.

Changing the value of ‘is_common_between_all_interface_speeds’ (from ‘true’ to ‘false’ or vice versa) is not supported during updates.

To switch between common and per-speed bandwidth settings, create a new queuing profile instead of updating the existing one.

bandwidth_settings

dictionary

Specifies bandwidth allocation details.

interface_speed_settings

list / elements=dictionary

Defines bandwidth allocation for different types of network traffic based on interface speed.

bandwidth_percentages

dictionary

  • Defines the percentage of bandwidth assigned to various traffic categories.

  • The sum of all category allocations must not exceed 100%.

best_effort

string

Bandwidth for non-priority, general-purpose traffic.

broadcast_video

string

Bandwidth for one-to-many video distribution.

bulk_data

string

Bandwidth for large-volume, non-time-sensitive data transfers.

multimedia_conferencing

string

Bandwidth for combined audio-video conferencing traffic.

multimedia_streaming

string

Bandwidth for real-time audio and video streaming.

network_control

string

Bandwidth for traffic related to network management and operation.

ops_admin_mgmt

string

Bandwidth for operations and administration management traffic.

real_time_interactive

string

Bandwidth for low-latency applications requiring immediate response.

scavenger

string

Bandwidth for low-priority traffic that can be delayed or dropped.

signaling

string

Bandwidth for network control messages managing communication sessions.

transactional_data

string

Bandwidth allocated to transactional data traffic.

voip_telephony

string

Bandwidth for voice and video calls over IP.

interface_speed

string

  • Specifies the data transfer rate of a network interface.

  • Permissible values:

  • “ALL”: Applies to all interface speeds.

  • “HUNDRED_GBPS”: 100 Gbps.

  • “TEN_GBPS”: 10 Gbps.

  • “ONE_GBPS”: 1 Gbps.

  • “HUNDRED_MBPS”: 100 Mbps.

  • “TEN_MBPS”: 10 Mbps.

  • “ONE_MBPS”: 1 Mbps.

is_common_between_all_interface_speeds

boolean

Indicates whether bandwidth settings apply uniformly across all interface speeds.

Choices:

  • false

  • true

dscp_settings

dictionary

  • Defines the DSCP (Differentiated Services Code Point) values assigned to different traffic categories.

  • Each DSCP value must be in the range of 0 to 63.

best_effort

string

DSCP value for best-effort traffic, which does not require specific quality or priority guarantees.

broadcast_video

string

DSCP value for broadcast video traffic, typically distributed in a one-to-many model.

bulk_data

string

DSCP value for large-volume data transfers that can tolerate delays or interruptions.

multimedia_conferencing

string

DSCP value for multimedia conferencing traffic, including both audio and video communication.

multimedia_streaming

string

DSCP value for real-time audio and video streaming traffic.

network_control

string

DSCP value for network control traffic related to management and operation.

ops_admin_mgmt

string

DSCP value for operations, administration, and management traffic.

real_time_interactive

string

DSCP value for interactive applications requiring low latency and immediate responsiveness.

scavenger

string

DSCP value for low-priority traffic that can be delayed or dropped in case of congestion.

signaling

string

DSCP value for signaling traffic used to establish, manage, and terminate communication sessions.

transactional_data

string

DSCP value for transactional data traffic, involving data exchanges between systems.

voip_telephony

string

DSCP value for voice and video calls transmitted over IP networks.

new_profile_description

string

New description of the queuing profile.

new_profile_name

string

New name for the queuing profile (used for updates).

profile_description

string

Description of the queuing profile.

profile_name

string

Name of the queuing profile.

Required for create, update, and delete operations.

config_verify

boolean

Set to True to verify the Cisco Catalyst Center after applying the playbook config.

Choices:

  • false

  • true ← (default)

dnac_api_task_timeout

integer

Defines the timeout in seconds for API calls to retrieve task details. If the task details are not received within this period, the process will end, and a timeout notification will be logged.

Default: 1200

dnac_debug

boolean

Indicates whether debugging is enabled in the Cisco Catalyst Center SDK.

Choices:

  • false ← (default)

  • true

dnac_host

string / required

The hostname of the Cisco Catalyst Center.

dnac_log

boolean

Flag to enable/disable playbook execution logging.

When true and dnac_log_file_path is provided, - Create the log file at the execution location with the specified name.

When true and dnac_log_file_path is not provided, - Create the log file at the execution location with the name ‘dnac.log’.

When false, - Logging is disabled.

If the log file doesn’t exist, - It is created in append or write mode based on the “dnac_log_append” flag.

If the log file exists, - It is overwritten or appended based on the “dnac_log_append” flag.

Choices:

  • false ← (default)

  • true

dnac_log_append

boolean

Determines the mode of the file. Set to True for ‘append’ mode. Set to False for ‘write’ mode.

Choices:

  • false

  • true ← (default)

dnac_log_file_path

string

Governs logging. Logs are recorded if dnac_log is True.

If path is not specified, - When ‘dnac_log_append’ is True, ‘dnac.log’ is generated in the current Ansible directory; logs are appended. - When ‘dnac_log_append’ is False, ‘dnac.log’ is generated; logs are overwritten.

If path is specified, - When ‘dnac_log_append’ is True, the file opens in append mode. - When ‘dnac_log_append’ is False, the file opens in write (w) mode. - In shared file scenarios, without append mode, content is overwritten after each module execution. - For a shared log file, set append to False for the 1st module (to overwrite); for subsequent modules, set append to True.

Default: "dnac.log"

dnac_log_level

string

Sets the threshold for log level. Messages with a level equal to or higher than this will be logged. Levels are listed in order of severity [CRITICAL, ERROR, WARNING, INFO, DEBUG].

CRITICAL indicates serious errors halting the program. Displays only CRITICAL messages.

ERROR indicates problems preventing a function. Displays ERROR and CRITICAL messages.

WARNING indicates potential future issues. Displays WARNING, ERROR, CRITICAL messages.

INFO tracks normal operation. Displays INFO, WARNING, ERROR, CRITICAL messages.

DEBUG provides detailed diagnostic info. Displays all log messages.

Default: "WARNING"

dnac_password

string

The password for authentication at the Cisco Catalyst Center.

dnac_port

string

Specifies the port number associated with the Cisco Catalyst Center.

Default: "443"

dnac_task_poll_interval

integer

Specifies the interval in seconds between successive calls to the API to retrieve task details.

Default: 2

dnac_username

aliases: user

string

The username for authentication at the Cisco Catalyst Center.

Default: "admin"

dnac_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

  • false

  • true ← (default)

dnac_version

string

Specifies the version of the Cisco Catalyst Center that the SDK should use.

Default: "2.2.3.3"

state

string

The desired state of the configuration after module execution.

Choices:

  • "merged" ← (default)

  • "deleted"

validate_response_schema

boolean

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

Choices:

  • false

  • true ← (default)

Notes

Note

  • SDK Methods used are - application_policy.ApplicationPolicy.get_application_policy - application_policy.ApplicationPolicy.application_policy_intent - application_policy.ApplicationPolicy.get_application_policy_queuing_profile - application_policy.ApplicationPolicy.update_application_policy_queuing_profile - application_policy.ApplicationPolicy.create_application_policy_queuing_profile - application_policy.ApplicationPolicy.delete_application_policy_queuing_profile

  • Paths used are - GET/dna/intent/api/v1/app-policy - POST/dna/intent/api/v1/app-policy-intent - GET/dna/intent/api/v1/app-policy-queuing-profile - POST/dna/intent/api/v1/app-policy-queuing-profile - PUT/dna/intent/api/v1/app-policy-queuing-profile - DELETE/dna/intent/api/v1/app-policy-queuing-profile/{id}

  • Does not support check_mode

  • The plugin runs on the control node and does not use any ansible connection plugins instead embedded connection manager from Cisco Catalyst Center SDK

  • The parameters starting with dnac_ are used by the Cisco Catalyst Center Python SDK to establish the connection

Examples

---
# Playbook - application queuing profile - type both ("bandwidth", "dscp")
- name: Create Enterprise QoS Profile for Optimized
    Network Performance
  hosts: localhost
  connection: local
  gather_facts: false
  vars_files:
    - "credentials.yml"
  tasks:
    - name: Create Enterprise QoS Profile for Optimized
        Network Performance
      cisco.dnac.application_policy_workflow_manager:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        dnac_log: true
        dnac_log_level: DEBUG
        config_verify: true
        dnac_api_task_timeout: 1000
        dnac_task_poll_interval: 1
        state: merged
        config:
          - queuing_profile:
              - profile_name: "Enterprise-QoS-Profile"
                profile_description: "QoS profile optimized
                  for business-critical applications"
                bandwidth_settings:
                  is_common_between_all_interface_speeds: true
                  interface_speed: "ALL"
                  bandwidth_percentages:
                    transactional_data: "5"
                    best_effort: "10"
                    voip_telephony: "15"
                    multimedia_streaming: "10"
                    real_time_interactive: "20"
                    multimedia_conferencing: "10"
                    signaling: "10"
                    scavenger: "5"
                    ops_admin_mgmt: "5"
                    broadcast_video: "2"
                    network_control: "3"
                    bulk_data: "5"
                dscp_settings:
                  multimedia_conferencing: "20"
                  ops_admin_mgmt: "23"
                  transactional_data: "28"
                  voip_telephony: "45"
                  multimedia_streaming: "27"
                  broadcast_video: "46"
                  network_control: "48"
                  best_effort: "0"
                  signaling: "4"
                  bulk_data: "10"
                  scavenger: "2"
                  real_time_interactive: "34"
# Playbook - Enterprise QoS Profile (Common Across All Interface Speeds)
- name: Deploy Enterprise QoS Profile in Cisco Catalyst
    Center
  hosts: localhost
  connection: local
  gather_facts: false
  vars_files:
    - "credentials.yml"
  tasks:
    - name: Configure Enterprise QoS Profile for Consistent
        Traffic Prioritization
      cisco.dnac.application_policy_workflow_manager:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        dnac_log: true
        dnac_log_level: DEBUG
        config_verify: true
        dnac_api_task_timeout: 1000
        dnac_task_poll_interval: 1
        state: merged
        config:
          - queuing_profile:
              - profile_name: "Enterprise-QoS-All-Speeds"
                profile_description: "Optimized QoS
                  profile for consistent traffic prioritization
                  across all interface speeds"
                bandwidth_settings:
                  is_common_between_all_interface_speeds: true
                  interface_speed: "ALL"
                  bandwidth_percentages:
                    transactional_data: "5"
                    best_effort: "10"
                    voip_telephony: "15"
                    multimedia_streaming: "10"
                    real_time_interactive: "20"
                    multimedia_conferencing: "10"
                    signaling: "10"
                    scavenger: "5"
                    ops_admin_mgmt: "5"
                    broadcast_video: "2"
                    network_control: "3"
                    bulk_data: "5"
# Playbook - QoS Profile Based on Interface Speeds
- name: Deploy Interface-Specific QoS Profile in Cisco
    Catalyst Center
  hosts: localhost
  vars_files:
    - "credentials.yml"
  connection: local
  gather_facts: false
  tasks:
    - name: Configure QoS Profile for Different Interface
        Speeds
      cisco.dnac.application_policy_workflow_manager:
        dnac_host: "{{dnac_host}}"
        dnac_username: "{{dnac_username}}"
        dnac_password: "{{dnac_password}}"
        dnac_verify: "{{dnac_verify}}"
        dnac_port: "{{dnac_port}}"
        dnac_version: "{{dnac_version}}"
        dnac_debug: "{{dnac_debug}}"
        dnac_log: true
        dnac_log_level: DEBUG
        config_verify: false
        dnac_api_task_timeout: 1000
        dnac_task_poll_interval: 1
        state: merged
        config:
          - queuing_profile:
              - profile_name: "Enterprise-Speed-Based-QoS"
                profile_description: "Optimized traffic
                  prioritization based on interface
                  speed"
                bandwidth_settings:
                  is_common_between_all_interface_speeds: false
                  interface_speed_settings:
                    - interface_speed: "HUNDRED_GBPS"
                      bandwidth_percentages:
                        transactional_data: "5"
                        best_effort: "10"
                        voip_telephony: "20"
                        multimedia_streaming: "5"
                        real_time_interactive: "20"
                        multimedia_conferencing: "10"
                        signaling: "10"
                        scavenger: "5"
                        ops_admin_mgmt: "5"
                        broadcast_video: "2"
                        network_control: "3"
                        bulk_data: "5"
                    - interface_speed: "TEN_GBPS"
                      bandwidth_percentages:
                        transactional_data: "5"
                        best_effort: "5"
                        voip_telephony: "25"
                        multimedia_streaming: "5"
                        real_time_interactive: "20"
                        multimedia_conferencing: "5"
                        signaling: "4"
                        scavenger: "6"
                        ops_admin_mgmt: "5"
                        broadcast_video: "2"
                        network_control: "3"
                        bulk_data: "15"
                    - interface_speed: "ONE_GBPS"
                      bandwidth_percentages:
                        transactional_data: "5"
                        best_effort: "10"
                        voip_telephony: "15"
                        multimedia_streaming: "10"
                        real_time_interactive: "20"
                        multimedia_conferencing: "10"
                        signaling: "10"
                        scavenger: "5"
                        ops_admin_mgmt: "5"
                        broadcast_video: "2"
                        network_control: "3"
                        bulk_data: "5"
                    - interface_speed: "HUNDRED_MBPS"
                      bandwidth_percentages:
                        transactional_data: "5"
                        best_effort: "10"
                        voip_telephony: "5"
                        multimedia_streaming: "15"
                        real_time_interactive: "25"
                        multimedia_conferencing: "10"
                        signaling: "10"
                        scavenger: "5"
                        ops_admin_mgmt: "5"
                        broadcast_video: "2"
                        network_control: "3"
                        bulk_data: "5"
                    - interface_speed: "TEN_MBPS"
                      bandwidth_percentages:
                        transactional_data: "5"
                        best_effort: "10"
                        voip_telephony: "15"
                        multimedia_streaming: "10"
                        real_time_interactive: "20"
                        multimedia_conferencing: "10"
                        signaling: "10"
                        scavenger: "5"
                        ops_admin_mgmt: "5"
                        broadcast_video: "2"
                        network_control: "3"
                        bulk_data: "5"
                    - interface_speed: "ONE_MBPS"
                      bandwidth_percentages:
                        transactional_data: "5"
                        best_effort: "5"
                        voip_telephony: "25"
                        multimedia_streaming: "10"
                        real_time_interactive: "20"
                        multimedia_conferencing: "5"
                        signaling: "10"
                        scavenger: "5"
                        ops_admin_mgmt: "5"
                        broadcast_video: "2"
                        network_control: "3"
                        bulk_data: "5"
# Playbook - for some interface speeds having common bandwidth percentage
- name: Configure an Application Queueing Profile for
    Traffic Prioritization
  hosts: localhost
  connection: local
  gather_facts: false
  vars_files:
    - "credentials.yml"
  tasks:
    - name: Create an Application Queueing Profile for
        Traffic Prioritization
      cisco.dnac.application_policy_workflow_manager:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        dnac_log: true
        dnac_log_level: DEBUG
        config_verify: true
        dnac_api_task_timeout: 1000
        dnac_task_poll_interval: 1
        state: merged
        config:
          - queuing_profile:
              - profile_name: "Enterprise_Traffic_Policy"
                profile_description: "Queueing profile
                  for optimizing enterprise application
                  traffic."
                bandwidth_settings:
                  is_common_between_all_interface_speeds: false
                  interface_speed_settings:
                    - interface_speed: "HUNDRED_GBPS"
                      bandwidth_percentages:
                        transactional_data: "5"
                        best_effort: "10"
                        voip_telephony: "20"
                        multimedia_streaming: "5"
                        real_time_interactive: "20"
                        multimedia_conferencing: "10"
                        signaling: "10"
                        scavenger: "5"
                        ops_admin_mgmt: "5"
                        broadcast_video: "2"
                        network_control: "3"
                        bulk_data: "5"
                    - interface_speed: "TEN_GBPS"
                      bandwidth_percentages:
                        transactional_data: "5"
                        best_effort: "5"
                        voip_telephony: "25"
                        multimedia_streaming: "5"
                        real_time_interactive: "20"
                        multimedia_conferencing: "5"
                        signaling: "6"
                        scavenger: "5"
                        ops_admin_mgmt: "4"
                        broadcast_video: "2"
                        network_control: "3"
                        bulk_data: "15"
                    - interface_speed: "HUNDRED_MBPS"
                      bandwidth_percentages:
                        transactional_data: "5"
                        best_effort: "10"
                        voip_telephony: "5"
                        multimedia_streaming: "15"
                        real_time_interactive: "25"
                        multimedia_conferencing: "10"
                        signaling: "10"
                        scavenger: "5"
                        ops_admin_mgmt: "5"
                        broadcast_video: "2"
                        network_control: "3"
                        bulk_data: "5"
                    - interface_speed: TEN_MBPS,ONE_MBPS,ONE_GBPS
                      bandwidth_percentages:
                        transactional_data: "5"
                        best_effort: "10"
                        voip_telephony: "15"
                        multimedia_streaming: "10"
                        real_time_interactive: "20"
                        multimedia_conferencing: "10"
                        signaling: "10"
                        scavenger: "5"
                        ops_admin_mgmt: "5"
                        broadcast_video: "2"
                        network_control: "3"
                        bulk_data: "5"
# Playbook - application queuing profile - type dscp
- name: Configure Application Queuing Profile (DSCP)
    in Cisco Catalyst Center
  hosts: localhost
  connection: local
  gather_facts: false
  vars_files:
    - "credentials.yml"
  tasks:
    - name: Create an Application Queuing Profile with
        DSCP Settings
      cisco.dnac.application_policy_workflow_manager:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        dnac_log: true
        dnac_log_level: DEBUG
        config_verify: true
        dnac_api_task_timeout: 1000
        dnac_task_poll_interval: 1
        state: merged
        config:
          - queuing_profile:
              - profile_name: "Enterprise_DSCP_Profile"
                profile_description: "DSCP-based queuing
                  profile for traffic prioritization."
                dscp_settings:
                  multimedia_conferencing: "20"
                  ops_admin_mgmt: "23"
                  transactional_data: "28"
                  voip_telephony: "45"
                  multimedia_streaming: "27"
                  broadcast_video: "46"
                  network_control: "48"
                  best_effort: "0"
                  signaling: "4"
                  bulk_data: "10"
                  scavenger: "2"
                  real_time_interactive: "34"
# Playbook - update application queuing profile
- name: Application Queuing Profile update in Cisco
    Catalyst Center
  hosts: localhost
  connection: local
  gather_facts: false
  vars_files:
    - "credentials.yml"
  tasks:
    - name: Update Application Queuing Profile in Cisco
        Catalyst Center
      cisco.dnac.application_policy_workflow_manager:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        dnac_log: true
        dnac_log_level: DEBUG
        config_verify: true
        dnac_api_task_timeout: 1000
        dnac_task_poll_interval: 1
        state: merged
        config:
          - queuing_profile:
              - profile_name: "Enterprise_Traffic_Profile"  # Existing profile to be updated
                new_profile_name: "Enterprise_Traffic_Profile_v2"  # New profile name after update
                profile_description: "Traffic queuing
                  profile for enterprise applications."
                new_profile_description: "Updated queuing
                  profile for optimized traffic management."
                bandwidth_settings:
                  is_common_between_all_interface_speeds: true
                  interface_speed: "ALL"
                  bandwidth_percentages:
                    transactional_data: "5"
                    best_effort: "10"
                    voip_telephony: "15"
                    multimedia_streaming: "10"
                    real_time_interactive: "20"
                    multimedia_conferencing: "10"
                    signaling: "10"
                    scavenger: "5"
                    ops_admin_mgmt: "5"
                    broadcast_video: "2"
                    network_control: "3"
                    bulk_data: "5"
                dscp_settings:
                  multimedia_conferencing: "20"
                  ops_admin_mgmt: "23"
                  transactional_data: "28"
                  voip_telephony: "45"
                  multimedia_streaming: "27"
                  broadcast_video: "46"
                  network_control: "48"
                  best_effort: "0"
                  signaling: "4"
                  bulk_data: "10"
                  scavenger: "2"
                  real_time_interactive: "34"
# Playbook - delete application queuing profile
- name: Delete application queuing profile from Cisco
    Catalyst Center
  hosts: localhost
  connection: local
  gather_facts: false
  vars_files:
    - "credentials.yml"
  tasks:
    - name: Delete application queuing profile from
        Cisco Catalyst Center
      cisco.dnac.application_policy_workflow_manager:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        dnac_log: true
        dnac_log_level: DEBUG
        config_verify: true
        dnac_api_task_timeout: 1000
        dnac_task_poll_interval: 1
        state: deleted
        config:
          - queuing_profile:
              - profile_name: "Enterprise_Traffic_Profile"  # Profile to be deleted
# Playbook - create application policy – wired
- name: Create Wired Application Policy in Cisco Catalyst
    Center
  hosts: localhost
  connection: local
  gather_facts: false
  vars_files:
    - "credentials.yml"
  tasks:
    - name: Define and Deploy Wired Application Policy
      cisco.dnac.application_policy_workflow_manager:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        dnac_log: true
        dnac_log_level: DEBUG
        config_verify: true
        dnac_api_task_timeout: 1000
        dnac_task_poll_interval: 1
        state: merged
        config:
          - application_policy:
              - name: "wired_traffic_policy"
                policy_status: "deployed"
                site_names: ["Global/INDIA"]
                device_type: "wired"
                application_queuing_profile_name: "WiredStreamingQueuingProfile"
                clause:
                  - clause_type: "BUSINESS_RELEVANCE"
                    relevance_details:
                      - relevance: "BUSINESS_RELEVANT"
                        application_set_name: ["collaboration-apps"]
                      - relevance: "BUSINESS_IRRELEVANT"
                        application_set_name: ["email", "tunneling"]
                      - relevance: "DEFAULT"
                        application_set_name: ["backup-and-storage", "general-media", "file-sharing"]
# Playbook - create application policy – wireless
- name: Create Wireless Application Policy in Cisco
    Catalyst Center
  hosts: localhost
  connection: local
  gather_facts: false
  vars_files:
    - "credentials.yml"
  tasks:
    - name: Define and Deploy Wireless Application Policy
      cisco.dnac.application_policy_workflow_manager:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        dnac_log: true
        dnac_log_level: DEBUG
        config_verify: true
        dnac_api_task_timeout: 1000
        dnac_task_poll_interval: 1
        state: merged
        config:
          - application_policy:
              - name: "wireless_traffic_policy"
                policy_status: "deployed"
                site_names: ["global/Chennai/FLOOR1"]
                device_type: "wireless"
                ssid_name: "ent-ssid-2-wpa2"
                application_queuing_profile_name: "wireless_streaming_profile"
                clause:
                  - clause_type: "BUSINESS_RELEVANCE"
                    relevance_details:
                      - relevance: "BUSINESS_RELEVANT"
                        application_set_name: ["file-sharing"]
                      - relevance: "BUSINESS_IRRELEVANT"
                        application_set_name: ["email", "backup-and-storage"]
                      - relevance: "DEFAULT"
                        application_set_name: ["collaboration-apps", "tunneling", "general-media"]
# Playbook - delete application policy
- name: Delete Application Policy from Cisco Catalyst
    Center
  hosts: localhost
  connection: local
  vars_files:
    - "credentials.yml"
  tasks:
    - name: Delete application policy from Cisco Catalyst
        Center
      cisco.dnac.application_policy_workflow_manager:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        dnac_log: true
        dnac_log_level: DEBUG
        config_verify: true
        dnac_api_task_timeout: 1000
        dnac_task_poll_interval: 1
        state: deleted
        config:
          - application_policy:
              - name: "ObsoleteTrafficPolicy"

Return Values

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

Key

Description

application_policy_not_found_response_task_execution

dictionary

With task id get details for task execution

Returned: always

Sample: {"msg": "Application policy 'WirelessTrafficOptimizationPolicy' does not present in the cisco catalyst center or its been already deleted", "response": {"taskId": "str", "url": "str"}}

application_queuing_profile_not_found_response_task_execution

dictionary

With task id get details for task execution

Returned: always

Sample: {"msg": "Application queuing profile 'Enterprise-QoS-All-Speeds' does not present in the Cisco Catalyst Center or it has already been deleted.", "response": {"taskId": "str", "url": "str"}}

creation _of_application_queuing_profile_response_task_execution

dictionary

A dictionary with details for successful task execution.

Returned: always

Sample: {"msg": "Application queuing profile 'Enterprise-QoS-Profile' created successfully.", "response": {"taskId": "str", "url": "str"}, "status": "success"}

deletion_of_application_queuing_profile_response_task_execution

dictionary

With task id get details for successful task execution.

Returned: always

Sample: {"msg": "Application policy queuing profile 'Enterprise-QoS-Profile' deleted successfully.", "response": {"taskId": "str", "url": "str"}, "status": "success"}

error_during_application_policy_create_response_task_execution

dictionary

With task id get details for task execution

Returned: always

Sample: {"msg": "( \"Creation of the application policy failed due to - \" \"NCAS10157 The same site cannot be used in two different wired policies. \" \"Current policy 'WiredTrafficOptimizationPolicy' and policy 'ObsoleteTrafficPolicy' are both using \" \"the following site/s 'Chennai/LTTS/FLOOR1'\" )", "response": {"taskId": "str", "url": "str"}}

error_during_application_policy_update_response_task_execution

dictionary

With task id get details for task execution

Returned: always

Sample: {"...'\" )": null, "msg": "( \"Update of the application policy failed due to - \" \"NCAS10157 The same site cannot be used in two different wired policies. \" \"Current policy 'ObsoleteTrafficPolicy' and policy 'WiredTrafficOptimizationPolicy' \" \"are both using the following site/s 'mysore/Mod-x/Mezzanine", "mysore/Mod-x": null, "response": {"taskId": "str", "url": "str"}}

error_during_application_queuing_profile_create_response_task_execution

dictionary

With task id get details for task execution.

Returned: always

Sample: {"msg": "Failed to create application queuing profile reason - NCAS10031: The DSCP value of 'best-effort' traffic class should be '0'", "response": {"taskId": "str", "url": "str"}}

error_during_application_queuing_profile_delete_response_task_execution

dictionary

With task id get details for task execution.

Returned: always

Sample: {"msg": "( \"Deletion of the application policy queuing profile failed due to - \" \"NCAS10011 Queuing profile 'Enterprise-QoS-All-Speeds' cannot be deleted \" \"as it is used by the policy\" )", "response": {"taskId": "str", "url": "str"}}

error_during_application_queuing_profile_update_response_task_execution

dictionary

With task id get details for task execution.

Returned: always

Sample: {"msg": "( \"Update of the application policy queuing profile failed due to \" \"NCAS10025 The sum of bandwidth percentages of all traffic classes \" \"should be '100'. The current sum is '101'.\" )", "response": {"taskId": "str", "url": "str"}}

successful_creation_of_application_policy_response_task_execution

dictionary

With task id get details for successful task execution

Returned: always

Sample: {"msg": "Application policy 'ObsoleteTrafficPolicy' created successfully.", "response": {"taskId": "str", "url": "str"}, "status": "success"}

successful_deletion_of_application_policy_response_task_execution

dictionary

With task id get details for successful task execution

Returned: always

Sample: {"msg": "Application policy 'ObsoleteTrafficPolicy' deleted successfully.", "response": {"taskId": "str", "url": "str"}, "status": "success"}

successful_update_of_application_policy_response_task_execution

dictionary

With task id get details for successful task execution

Returned: always

Sample: {"msg": "Application policy 'ObsoleteTrafficPolicy' updated successfully.", "response": {"taskId": "str", "url": "str"}, "status": "success"}

update_not_required_ for_application_policy_response_task_execution

dictionary

With task id get details for successful task execution

Returned: always

Sample: {"msg": "Application policy 'ObsoleteTrafficPolicy' does not need any update. ", "response": {"taskId": "str", "url": "str"}, "status": "success"}

update_not_required_for_queuing_profile_response_task_execution

dictionary

With task id get details for successful task execution.

Returned: always

Sample: {"msg": "Application queuing profile 'Enterprise-QoS-Profile' does not need any update", "response": {"taskId": "str", "url": "str"}, "status": "success"}

update_of_application_queuing_profile_response_task_execution

dictionary

With task id get details for successful task execution.

Returned: always

Sample: {"msg": "Application policy queuing profile 'Enterprise-QoS-Profile' updated successfully.", "response": {"taskId": "str", "url": "str"}, "status": "success"}

Authors

  • Syed Khadeer Ahmed (@syed-khadeerahmed)

  • Madhan Sankaranarayanan (@madhansansel)