forked from cisco-en-programmability/catalystcenter-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication_policy_workflow_manager.py
More file actions
7308 lines (6389 loc) · 305 KB
/
Copy pathapplication_policy_workflow_manager.py
File metadata and controls
7308 lines (6389 loc) · 305 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# !/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2025, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
__author__ = "Syed Khadeer Ahmed, Madhan Sankaranarayanan"
DOCUMENTATION = r"""
---
module: application_policy_workflow_manager
short_description: >
Resource module for managing queuing profiles, applications,
application sets and application policies for wired
and wireless in Cisco Catalyst Center.
description:
- 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.
version_added: "6.31.0"
extends_documentation_fragment:
- cisco.catalystcenter.workflow_manager_params
author:
- Syed Khadeer Ahmed (@syed-khadeerahmed)
- Madhan Sankaranarayanan (@madhansansel)
options:
config_verify:
description: Set to True to verify the Cisco Catalyst
Center after applying the playbook config.
type: bool
default: true
state:
description: The desired state of the configuration
after module execution.
type: str
choices: ["merged", "deleted"]
default: merged
config:
description: A list of dictionaries containing application
queuing profile details.
type: list
elements: dict
required: true
suboptions:
queuing_profile:
description:
- 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.
type: list
elements: dict
suboptions:
profile_name:
description:
- Name of the queuing profile.
- Required for create, update, and delete
operations.
type: str
new_profile_name:
description: New name for the queuing profile
(used for updates).
type: str
profile_description:
description: Description of the queuing
profile.
type: str
new_profile_description:
description: New description of the queuing
profile.
type: str
bandwidth_settings:
description: Specifies bandwidth allocation
details.
type: dict
suboptions:
is_common_between_all_interface_speeds:
description: Indicates whether bandwidth
settings apply uniformly across all
interface speeds.
type: bool
interface_speed_settings:
description: Defines bandwidth allocation
for different types of network traffic
based on interface speed.
type: list
elements: dict
suboptions:
interface_speed:
description: |
- 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.
type: str
bandwidth_percentages:
description: |
- Defines the percentage of bandwidth assigned to various traffic categories.
- The sum of all category allocations must not exceed 100%.
type: dict
suboptions:
transactional_data:
description: Bandwidth allocated
to transactional data traffic.
type: str
best_effort:
description: Bandwidth for non-priority,
general-purpose traffic.
type: str
voip_telephony:
description: Bandwidth for voice
and video calls over IP.
type: str
multimedia_streaming:
description: Bandwidth for real-time
audio and video streaming.
type: str
real_time_interactive:
description: Bandwidth for low-latency
applications requiring immediate
response.
type: str
multimedia_conferencing:
description: Bandwidth for combined
audio-video conferencing traffic.
type: str
signaling:
description: Bandwidth for network
control messages managing
communication sessions.
type: str
scavenger:
description: Bandwidth for low-priority
traffic that can be delayed
or dropped.
type: str
ops_admin_mgmt:
description: Bandwidth for operations
and administration management
traffic.
type: str
broadcast_video:
description: Bandwidth for one-to-many
video distribution.
type: str
network_control:
description: Bandwidth for traffic
related to network management
and operation.
type: str
bulk_data:
description: Bandwidth for large-volume,
non-time-sensitive data transfers.
type: str
dscp_settings:
description: |
- 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.
type: dict
suboptions:
transactional_data:
description: DSCP value for transactional
data traffic, involving data exchanges
between systems.
type: str
best_effort:
description: DSCP value for best-effort
traffic, which does not require specific
quality or priority guarantees.
type: str
voip_telephony:
description: DSCP value for voice and
video calls transmitted over IP networks.
type: str
multimedia_streaming:
description: DSCP value for real-time
audio and video streaming traffic.
type: str
real_time_interactive:
description: DSCP value for interactive
applications requiring low latency
and immediate responsiveness.
type: str
multimedia_conferencing:
description: DSCP value for multimedia
conferencing traffic, including both
audio and video communication.
type: str
signaling:
description: DSCP value for signaling
traffic used to establish, manage,
and terminate communication sessions.
type: str
scavenger:
description: DSCP value for low-priority
traffic that can be delayed or dropped
in case of congestion.
type: str
ops_admin_mgmt:
description: DSCP value for operations,
administration, and management traffic.
type: str
broadcast_video:
description: DSCP value for broadcast
video traffic, typically distributed
in a one-to-many model.
type: str
network_control:
description: DSCP value for network
control traffic related to management
and operation.
type: str
bulk_data:
description: DSCP value for large-volume
data transfers that can tolerate delays
or interruptions.
type: str
application_policy:
description: Defines how an application's traffic
is managed and prioritized within a network.
type: list
elements: dict
suboptions:
name:
description: Name of the application policy
type: str
policy_status:
description: |
- 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.
type: str
site_names:
description: The site or area within the
network where the policy should be enforced.
type: list
elements: str
device_type:
description: Indicates whether the device
is wired or wireless.
type: str
ssid_name:
description: Specifies the SSID name for
wireless devices. Required if device_type
is set to 'wireless'.
type: str
application_queuing_profile_name:
description: Defines rules for traffic management
by prioritizing network traffic within
the application policy.
type: str
clause:
description:
- Defines specific rules or conditions
under which application sets are added
to or removed from the application
policy.
- When C(state=merged), the clause defines
application sets to add to the policy.
- When C(state=deleted) and clause is
provided, it specifies which application
sets to remove from the policy.
- If C(relevance_details) contains only
C(relevance) without
C(application_set_name), all application
sets under that relevance level are
removed.
- If C(relevance_details) contains both
C(relevance) and C(application_set_name),
only those specific application sets
are removed.
- If clause is omitted during a delete
operation, the entire application
policy is deleted.
- Only C(clause_type)
C(BUSINESS_RELEVANCE) supports partial
deletion of application sets. The
C(APPLICATION_POLICY_KNOBS) clause type
is not affected by delete operations.
type: list
elements: dict
suboptions:
clause_type:
description: |
- 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.
type: str
relevance_details:
description: Details about how relevant
the application is to business operations.
type: list
elements: dict
suboptions:
relevance:
description: |
- Specifies the relevance level
of the application set within
the application policy.
- When C(state=merged), determines
which relevance group the
application sets are added to.
- When C(state=deleted), specifies
which relevance level to target
for application set removal.
- 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.
type: str
application_set_name:
description:
- List of application set names to
associate with or remove from
the specified relevance level.
- Matched against the application
set names currently associated
with the policy in Cisco
Catalyst Center.
- When C(state=merged), includes
the application sets to add to
the policy under this relevance
level.
- When C(state=deleted), specifies
which application sets to
remove from the given relevance
level.
- If omitted with C(state=deleted),
all application sets under the
specified relevance level are
removed.
- Scoped per C(relevance_details)
entry, not globally across the
entire clause.
- "For example: ['file-sharing',
'collaboration-apps']."
type: list
elements: str
requirements:
- catalystcentersdk >= 3.1.6.0.2
- python >= 3.12
notes:
- 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}
"""
EXAMPLES = r"""
---
# 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.catalystcenter.application_policy_workflow_manager:
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 }}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: true
catalystcenter_api_task_timeout: 1000
catalystcenter_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.catalystcenter.application_policy_workflow_manager:
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 }}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: true
catalystcenter_api_task_timeout: 1000
catalystcenter_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.catalystcenter.application_policy_workflow_manager:
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}}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: false
catalystcenter_api_task_timeout: 1000
catalystcenter_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.catalystcenter.application_policy_workflow_manager:
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 }}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: true
catalystcenter_api_task_timeout: 1000
catalystcenter_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.catalystcenter.application_policy_workflow_manager:
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 }}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: true
catalystcenter_api_task_timeout: 1000
catalystcenter_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.catalystcenter.application_policy_workflow_manager:
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 }}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: true
catalystcenter_api_task_timeout: 1000
catalystcenter_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.catalystcenter.application_policy_workflow_manager:
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 }}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: true
catalystcenter_api_task_timeout: 1000
catalystcenter_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.catalystcenter.application_policy_workflow_manager:
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 }}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: true
catalystcenter_api_task_timeout: 1000
catalystcenter_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.catalystcenter.application_policy_workflow_manager:
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 }}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: true
catalystcenter_api_task_timeout: 1000
catalystcenter_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.catalystcenter.application_policy_workflow_manager:
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 }}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: true
catalystcenter_api_task_timeout: 1000
catalystcenter_task_poll_interval: 1
state: deleted
config:
- application_policy:
- name: "ObsoleteTrafficPolicy"
# Playbook - delete all application sets under a specific
# relevance level from an application policy
- name: Remove all application sets under a relevance
level from an application policy
hosts: localhost
connection: local
gather_facts: false
vars_files:
- "credentials.yml"
tasks:
- name: Delete all BUSINESS_RELEVANT application
sets from policy
cisco.catalystcenter.application_policy_workflow_manager:
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 }}"
catalystcenter_log: true
catalystcenter_log_level: DEBUG
config_verify: true
catalystcenter_api_task_timeout: 1000
catalystcenter_task_poll_interval: 1
state: deleted
config:
- application_policy:
- name: "wired_traffic_policy"
clause:
- clause_type: "BUSINESS_RELEVANCE"
relevance_details:
- relevance: "BUSINESS_RELEVANT"
# Playbook - delete specific application set(s) from
# an application policy