blob: 22c309bd4526aae023436b5e09cc1a100e68b440 (
plain)
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
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
DOCUMENTATION = r"""
---
module: applications
short_description: Resource module for Applications
description:
- Manage operations create, update and delete of the resource Applications.
- Create new Custom application.
- Delete existing application by its id.
- Edit the attributes of an existing application.
version_added: '3.1.0'
extends_documentation_fragment:
- cisco.dnac.module
author: Rafael Campos (@racampos)
options:
id:
description: Id query parameter. Application's Id.
type: str
payload:
description: Applications's payload.
elements: dict
suboptions:
applicationSet:
description: Applications's applicationSet.
suboptions:
idRef:
description: Id Ref.
type: str
type: dict
indicativeNetworkIdentity:
description: Applications's indicativeNetworkIdentity.
elements: dict
suboptions:
displayName:
description: DisplayName.
type: str
id:
description: Id.
type: str
lowerPort:
description: LowerPort.
type: int
ports:
description: Ports.
type: str
protocol:
description: Protocol.
type: str
upperPort:
description: UpperPort.
type: int
type: list
name:
description: Name.
type: str
networkApplications:
description: Applications's networkApplications.
elements: dict
suboptions:
appProtocol:
description: App Protocol.
type: str
applicationSubType:
description: Application Sub Type.
type: str
applicationType:
description: Application Type.
type: str
categoryId:
description: Category Id.
type: str
displayName:
description: Display Name.
type: str
dscp:
description: Dscp.
type: str
engineId:
description: Engine Id.
type: str
helpString:
description: Help String.
type: str
ignoreConflict:
description: Ignore Conflict.
type: str
longDescription:
description: Long Description.
type: str
name:
description: Name.
type: str
popularity:
description: Popularity.
type: str
rank:
description: Rank.
type: str
serverName:
description: Server Name.
type: str
trafficClass:
description: Traffic Class.
type: str
url:
description: Url.
type: str
type: list
networkIdentity:
description: Applications's networkIdentity.
elements: dict
suboptions:
displayName:
description: Display Name.
type: str
lowerPort:
description: Lower Port.
type: str
ports:
description: Ports.
type: str
protocol:
description: Protocol.
type: str
upperPort:
description: Upper Port.
type: str
type: list
type: list
requirements:
- dnacentersdk >= 2.5.5
- python >= 3.5
seealso:
- name: Cisco DNA Center documentation for Application Policy CreateApplication
description: Complete reference of the CreateApplication API.
link: https://developer.cisco.com/docs/dna-center/#!create-application
- name: Cisco DNA Center documentation for Application Policy DeleteApplication
description: Complete reference of the DeleteApplication API.
link: https://developer.cisco.com/docs/dna-center/#!delete-application
- name: Cisco DNA Center documentation for Application Policy EditApplication
description: Complete reference of the EditApplication API.
link: https://developer.cisco.com/docs/dna-center/#!edit-application
notes:
- SDK Method used are
application_policy.ApplicationPolicy.create_application,
application_policy.ApplicationPolicy.delete_application,
application_policy.ApplicationPolicy.edit_application,
- Paths used are
post /dna/intent/api/v1/applications,
delete /dna/intent/api/v1/applications,
put /dna/intent/api/v1/applications,
"""
EXAMPLES = r"""
- name: Create
cisco.dnac.applications:
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}}"
state: present
payload:
- applicationSet:
idRef: string
indicativeNetworkIdentity:
- displayName: string
id: string
lowerPort: 0
ports: string
protocol: string
upperPort: 0
name: string
networkApplications:
- appProtocol: string
applicationSubType: string
applicationType: string
categoryId: string
displayName: string
dscp: string
engineId: string
helpString: string
ignoreConflict: string
longDescription: string
name: string
popularity: string
rank: string
serverName: string
trafficClass: string
url: string
networkIdentity:
- displayName: string
lowerPort: string
ports: string
protocol: string
upperPort: string
- name: Update all
cisco.dnac.applications:
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}}"
state: present
payload:
- applicationSet:
idRef: string
id: string
name: string
networkApplications:
- appProtocol: string
applicationSubType: string
applicationType: string
categoryId: string
displayName: string
dscp: string
engineId: string
helpString: string
id: string
ignoreConflict: string
longDescription: string
name: string
popularity: string
rank: string
serverName: string
trafficClass: string
url: string
networkIdentity:
- displayName: string
id: string
lowerPort: string
ports: string
protocol: string
upperPort: string
- name: Delete all
cisco.dnac.applications:
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}}"
state: absent
id: string
"""
RETURN = r"""
dnac_response:
description: A dictionary or list with the response returned by the Cisco DNAC Python SDK
returned: always
type: dict
sample: >
{
"taskId": "string",
"url": "string"
}
"""
|