fc7dbd492ee663c15d17f7888b0423e2c202e272
[clamp.git] / src / main / resources / clds / camel / rest / clamp-api-v2.xml
1 <rests xmlns="http://camel.apache.org/schema/spring">
2         <rest>
3                 <get uri="/v2/loop/getAllNames" outType="java.lang.String[]"
4                         produces="application/json">
5                         <route>
6                                 <removeHeaders pattern="*" />
7                                 <doTry>
8                                         <to
9                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop')" />
10                                         <to
11                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
12                                         <to
13                                                 uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" />
14                                         <to
15                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
16                                         <doCatch>
17                                                 <exception>java.lang.Exception</exception>
18                                                 <handled>
19                                                         <constant>true</constant>
20                                                 </handled>
21                                                 <to
22                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
23                                                 <log loggingLevel="ERROR"
24                                                          message="GET All Loop names FAILED: ${exception.stacktrace}" />
25
26                                                 <setHeader headerName="CamelHttpResponseCode">
27                                                         <constant>500</constant>
28                                                 </setHeader>
29                                                 <setBody>
30                                                         <simple>GET All Loop names FAILED</simple>
31                                                 </setBody>
32                                         </doCatch>
33                                 </doTry>
34                         </route>
35                 </get>
36                 <get uri="/v2/loop/{loopName}" outType="org.onap.clamp.loop.Loop"
37                         produces="application/json">
38                         <route>
39                                 <removeHeaders pattern="*" excludePattern="loopName" />
40                                 <doTry>
41                                         <to
42                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Loop')" />
43                                         <to
44                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
45                                         <to
46                                                 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
47                                         <to
48                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
49                                         <doCatch>
50                                                 <exception>java.lang.Exception</exception>
51                                                 <handled>
52                                                         <constant>true</constant>
53                                                 </handled>
54                                                 <to
55                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
56                                                 <log loggingLevel="ERROR"
57                                                          message="GET Loop request failed for loop: ${header.loopName}, ${exception.stacktrace}" />
58
59                                                 <setHeader headerName="CamelHttpResponseCode">
60                                                         <constant>500</constant>
61                                                 </setHeader>
62                                                 <setBody>
63                                                         <simple>GET Loop FAILED</simple>
64                                                 </setBody>
65                                         </doCatch>
66                                 </doTry>
67                         </route>
68                 </get>
69                 <get uri="/v2/loop/svgRepresentation/{loopName}"
70                         outType="java.lang.String" produces="application/xml">
71                         <route>
72                                 <removeHeaders pattern="*" excludePattern="loopName" />
73                                 <doTry>
74                                         <to
75                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation')" />
76                                         <to
77                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
78                                         <to
79                                                 uri="bean:org.onap.clamp.loop.LoopController?method=getSvgRepresentation(${header.loopName})" />
80                                         <to
81                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
82                                         <doCatch>
83                                                 <exception>java.lang.Exception</exception>
84                                                 <handled>
85                                                         <constant>true</constant>
86                                                 </handled>
87                                                 <to
88                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
89                                                 <log loggingLevel="ERROR"
90                                                          message="GET SVG request failed for loop: ${header.loopName}, ${exception.stacktrace}" />
91
92                                                 <setHeader headerName="CamelHttpResponseCode">
93                                                         <constant>500</constant>
94                                                 </setHeader>
95                                                 <setBody>
96                                                         <simple>GET SVG For loop FAILED</simple>
97                                                 </setBody>
98                                         </doCatch>
99                                 </doTry>
100                         </route>
101                 </get>
102
103                 <post uri="/v2/loop/updateGlobalProperties/{loopName}"
104                         type="com.google.gson.JsonObject" consumes="application/json"
105                         outType="org.onap.clamp.loop.Loop" produces="application/json">
106                         <route>
107                                 <removeHeaders pattern="*" excludePattern="loopName" />
108                                 <doTry>
109                                         <to
110                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')" />
111                                         <to
112                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
113                                         <setHeader headerName="GlobalPropertiesJson">
114                                                 <simple>${body}</simple>
115                                         </setHeader>
116                                         <to uri="direct:load-loop" />
117                                         <to
118                                                 uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" />
119                                         <to
120                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${exchangeProperty[loopObject]})" />
121                                         <to
122                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
123                                         <doCatch>
124                                                 <exception>java.lang.Exception</exception>
125                                                 <handled>
126                                                         <constant>true</constant>
127                                                 </handled>
128                                                 <to
129                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
130                                                 <log loggingLevel="ERROR"
131                                                          message="UPDATE Global properties FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
132
133                                                 <setHeader headerName="CamelHttpResponseCode">
134                                                         <constant>500</constant>
135                                                 </setHeader>
136                                                 <setBody>
137                                                         <simple>UPDATE Global properties FAILED </simple>
138                                                 </setBody>
139                                         </doCatch>
140                                 </doTry>
141                         </route>
142                 </post>
143                 <post uri="/v2/loop/updateOperationalPolicies/{loopName}"
144                         type="com.google.gson.JsonArray" consumes="application/json"
145                         outType="org.onap.clamp.loop.Loop" produces="application/json">
146                         <route>
147                                 <removeHeaders pattern="*" excludePattern="loopName" />
148                                 <doTry>
149                                         <to
150                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')" />
151                                         <to
152                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
153                                         <setHeader headerName="OperationalPoliciesArray">
154                                                 <simple>${body}</simple>
155                                         </setHeader>
156                                         <to uri="direct:load-loop" />
157                                         <to
158                                                 uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" />
159                                         <to
160                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
161                                         <to
162                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
163                                         <doCatch>
164                                                 <exception>java.lang.Exception</exception>
165                                                 <handled>
166                                                         <constant>true</constant>
167                                                 </handled>
168                                                 <to
169                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
170                                                 <log loggingLevel="ERROR"
171                                                          message="UPDATE Operational policies FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
172                                                 <to
173                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UPDATE Operational policies request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" />
174
175                                                 <setHeader headerName="CamelHttpResponseCode">
176                                                         <constant>500</constant>
177                                                 </setHeader>
178                                                 <setBody>
179                                                         <simple>UPDATE Operational policies FAILED</simple>
180                                                 </setBody>
181                                         </doCatch>
182                                 </doTry>
183                         </route>
184                 </post>
185                 <post uri="/v2/loop/updateMicroservicePolicy/{loopName}"
186                         type="org.onap.clamp.policy.microservice.MicroServicePolicy"
187                         consumes="application/json"
188                         outType="org.onap.clamp.policy.microservice.MicroServicePolicy"
189                         produces="application/json">
190                         <route>
191                                 <removeHeaders pattern="*" excludePattern="loopName" />
192                                 <doTry>
193                                         <to
194                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')" />
195                                         <to
196                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
197                                         <setProperty propertyName="MicroServicePolicyObject">
198                                                 <simple>${body}</simple>
199                                         </setProperty>
200
201                                         <to uri="direct:load-loop" />
202                                         <to
203                                                 uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${exchangeProperty[MicroServicePolicyObject]})" />
204                                         <to
205                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
206                                         <to
207                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
208                                         <doCatch>
209                                                 <exception>java.lang.Exception</exception>
210                                                 <handled>
211                                                         <constant>true</constant>
212                                                 </handled>
213                                                 <to
214                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
215                                                 <log loggingLevel="ERROR"
216                                                          message="UPDATE MicroService policy FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
217                                                 <to
218                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UPDATE MicroService policy request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" />
219                                                 <setHeader headerName="CamelHttpResponseCode">
220                                                         <constant>500</constant>
221                                                 </setHeader>
222                                                 <setBody>
223                                                         <simple>UPDATE MicroService policy FAILED</simple>
224                                                 </setBody>
225                                         </doCatch>
226                                 </doTry>
227                         </route>
228                 </post>
229                 <put uri="/v2/loop/deploy/{loopName}"
230                         outType="org.onap.clamp.loop.Loop" produces="application/json">
231                         <route>
232                                 <removeHeaders pattern="*" excludePattern="loopName" />
233                                 <doTry>
234                                         <log loggingLevel="INFO"
235                                                 message="DCAE DEPLOY request for loop: ${header.loopName}" />
236                                         <to
237                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE DEPLOY request')" />
238                                         <to
239                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
240                                         <to uri="direct:load-loop" />
241                                         <to
242                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DCAE DEPLOY request','INFO',${exchangeProperty[loopObject]})" />
243
244                                         <to uri="direct:deploy-loop" />
245
246                                         <log loggingLevel="INFO"
247                                                 message="DEPLOY request successfully executed for loop: ${header.loopName}" />
248                                         <to
249                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" />
250                                         <to
251                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
252                                         <doCatch>
253                                                 <exception>java.lang.Exception</exception>
254                                                 <handled>
255                                                         <constant>true</constant>
256                                                 </handled>
257                                                 <to
258                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
259                                                 <log loggingLevel="ERROR"
260                                                          message="DEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
261                                                 <to
262                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
263                                                 <setHeader headerName="CamelHttpResponseCode">
264                                                         <constant>500</constant>
265                                                 </setHeader>
266                                                 <setBody>
267                                                         <simple>DEPLOY request FAILED</simple>
268                                                 </setBody>
269                                         </doCatch>
270                                 </doTry>
271                         </route>
272                 </put>
273                 <put uri="/v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}"
274                          outType="org.onap.clamp.loop.Loop" produces="application/json">
275                         <route>
276                                 <removeHeaders pattern="*" excludePattern="loopName|microServicePolicyName" />
277                                 <doTry>
278                                         <log loggingLevel="INFO"
279                                                  message="Refresh Micro Service Policy UI for loop: ${header.loopName} and ${header.microServicePolicyName}" />
280                                         <to
281                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Micro Service Policy UI request')" />
282                                         <to
283                                                         uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
284                                         <to uri="direct:load-loop" />
285                                         <to
286                                                         uri="bean:org.onap.clamp.loop.LoopController?method=refreshMicroServicePolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.microServicePolicyName}})" />
287                                         <log loggingLevel="INFO"
288                                                  message="REFRESH Micro Service policy request successfully executed for loop: ${header.loopName}" />
289                                         <to
290                                                         uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Micro Service policy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
291                                         <to
292                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
293                                         <doCatch>
294                                                 <exception>java.lang.Exception</exception>
295                                                 <handled>
296                                                         <constant>true</constant>
297                                                 </handled>
298                                                 <to
299                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
300                                                 <log loggingLevel="ERROR"
301                                                          message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
302                                                 <to
303                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
304                                                 <setHeader headerName="CamelHttpResponseCode">
305                                                         <constant>500</constant>
306                                                 </setHeader>
307                                                 <setBody>
308                                                         <simple>REFRESH json schema request FAILED</simple>
309                                                 </setBody>
310                                         </doCatch>
311                                 </doTry>
312                         </route>
313                 </put>
314                 <put uri="/v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}"
315                         outType="org.onap.clamp.loop.Loop" produces="application/json">
316                         <route>
317                                 <removeHeaders pattern="*" excludePattern="loopName|operationalPolicyName" />
318                                 <doTry>
319                                         <log loggingLevel="INFO"
320                                                 message="Refresh Operational Policy UI for loop: ${header.loopName} and ${header.operationalPolicyName}" />
321                                         <to
322                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Operational Policy UI request')" />
323                                         <to
324                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
325                                         <to uri="direct:load-loop" />
326                                         <to
327                                                 uri="bean:org.onap.clamp.loop.LoopController?method=refreshOperationalPolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.operationalPolicyName}})" />
328                                         <log loggingLevel="INFO"
329                                                 message="REFRESH operational policy request successfully executed for loop: ${header.loopName}" />
330                                         <to
331                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH operational policy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
332                                         <to
333                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
334                                         <doCatch>
335                                                 <exception>java.lang.Exception</exception>
336                                                 <handled>
337                                                         <constant>true</constant>
338                                                 </handled>
339                                                 <to
340                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
341                                                 <log loggingLevel="ERROR"
342                                                          message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
343                                                 <to
344                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
345                                                 <setHeader headerName="CamelHttpResponseCode">
346                                                         <constant>500</constant>
347                                                 </setHeader>
348                                                 <setBody>
349                                                         <simple>REFRESH json schema request FAILED</simple>
350                                                 </setBody>
351                                         </doCatch>
352                                 </doTry>
353                         </route>
354                 </put>
355                 <put uri="/v2/loop/undeploy/{loopName}"
356                         outType="org.onap.clamp.loop.Loop" produces="application/json">
357                         <route>
358                                 <removeHeaders pattern="*" excludePattern="loopName" />
359                                 <doTry>
360                                         <log loggingLevel="INFO"
361                                                 message="DCAE UNDEPLOY request for loop: ${header.loopName}" />
362                                         <to
363                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE UNDEPLOY request')" />
364                                         <to
365                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
366                                         <to uri="direct:load-loop" />
367                                         <to
368                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DCAE UNDEPLOY request','INFO',${exchangeProperty[loopObject]})" />
369                                         <to uri="direct:undeploy-loop" />
370
371                                         <log loggingLevel="INFO"
372                                                 message="UNDEPLOY request successfully executed for loop: ${header.loopName}" />
373                                         <to
374                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" />
375                                         <to
376                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
377                                         <doCatch>
378                                                 <exception>java.lang.Exception</exception>
379                                                 <handled>
380                                                         <constant>true</constant>
381                                                 </handled>
382                                                 <to
383                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
384                                                 <log loggingLevel="ERROR"
385                                                          message="UNDEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
386                                                 <to
387                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
388                                                 <setHeader headerName="CamelHttpResponseCode">
389                                                         <constant>500</constant>
390                                                 </setHeader>
391                                                 <setBody>
392                                                         <simple>UNDEPLOY request FAILED</simple>
393                                                 </setBody>
394                                         </doCatch>
395                                 </doTry>
396                         </route>
397                 </put>
398                 <put uri="/v2/loop/stop/{loopName}"
399                         outType="org.onap.clamp.loop.Loop" produces="application/json">
400                         <route>
401                                 <removeHeaders pattern="*" excludePattern="loopName" />
402                                 <doTry>
403                                         <log loggingLevel="INFO"
404                                                 message="STOP request for loop: ${header.loopName}" />
405                                         <to
406                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*,'STOP request')" />
407                                         <to
408                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
409                                         <to uri="direct:load-loop" />
410                                         <to
411                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request','INFO',${exchangeProperty[loopObject]})" />
412
413                                         <to uri="direct:remove-all-policy-from-active-pdp-group" />
414                                         <log loggingLevel="INFO"
415                                                 message="STOP request successfully executed for loop: ${header.loopName}" />
416                                         <to
417                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${exchangeProperty[loopObject]})" />
418                                         <to
419                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
420                                         <doCatch>
421                                                 <exception>java.lang.Exception</exception>
422                                                 <handled>
423                                                         <constant>true</constant>
424                                                 </handled>
425                                                 <to
426                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
427                                                 <log loggingLevel="ERROR"
428                                                          message="STOP request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
429                                                 <to
430                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
431                                                 <setHeader headerName="CamelHttpResponseCode">
432                                                         <constant>500</constant>
433                                                 </setHeader>
434                                                 <setBody>
435                                                         <simple>STOP request FAILED</simple>
436                                                 </setBody>
437                                         </doCatch>
438                                 </doTry>
439                         </route>
440                 </put>
441                 <put uri="/v2/loop/restart/{loopName}"
442                         outType="org.onap.clamp.loop.Loop" produces="application/json">
443                         <route>
444                                 <removeHeaders pattern="*" excludePattern="loopName" />
445                                 <doTry>
446                                         <log loggingLevel="INFO"
447                                                 message="RESTART request for loop: ${header.loopName}" />
448                                         <to
449                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*,'RESTART request')" />
450                                         <to
451                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
452                                         <to uri="direct:load-loop" />
453
454                                         <to
455                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request','INFO',${exchangeProperty[loopObject]})" />
456
457                                         <to uri="direct:add-all-to-active-pdp-group" />
458                                         <log loggingLevel="INFO"
459                                                 message="RESTART request successfully executed for loop: ${header.loopName}" />
460                                         <to
461                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request successfully executed','INFO',${exchangeProperty[loopObject]})" />
462                                         <to
463                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
464                                         <doCatch>
465                                                 <exception>java.lang.Exception</exception>
466                                                 <handled>
467                                                         <constant>true</constant>
468                                                 </handled>
469                                                 <to
470                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
471                                                 <log loggingLevel="ERROR"
472                                                          message="RESTART request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
473                                                 <to
474                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
475                                                 <setHeader headerName="CamelHttpResponseCode">
476                                                         <constant>500</constant>
477                                                 </setHeader>
478                                                 <setBody>
479                                                         <simple>RESTART request FAILED</simple>
480                                                 </setBody>
481                                         </doCatch>
482                                 </doTry>
483                         </route>
484                 </put>
485                 <put uri="/v2/loop/submit/{loopName}"
486                         outType="org.onap.clamp.loop.Loop" produces="application/json">
487                         <route>
488                                 <removeHeaders pattern="*" excludePattern="loopName" />
489                                 <doTry>
490                                         <log loggingLevel="INFO"
491                                                 message="POLICY SUBMIT request for loop: ${header.loopName}" />
492                                         <to
493                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'POLICY SUBMIT request')" />
494                                         <to
495                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
496                                         <to uri="direct:load-loop" />
497                                         <to
498                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('POLICY SUBMIT request','INFO',${exchangeProperty[loopObject]})" />
499                                         <setProperty propertyName="raiseHttpExceptionFlag">
500                                                 <simple resultType="java.lang.Boolean">false</simple>
501                                         </setProperty>
502                                         <to uri="direct:remove-all-policy-from-active-pdp-group" />
503                                         <log loggingLevel="INFO"
504                                                 message="Processing all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" />
505                                         <split>
506                                                 <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
507                                                 </simple>
508                                                 <setProperty propertyName="policy">
509                                                         <simple>${body}</simple>
510                                                 </setProperty>
511                                                 <log loggingLevel="INFO"
512                                                         message="Processing Micro Service Policy: ${exchangeProperty[policy].getName()}" />
513                                                 <setProperty propertyName="raiseHttpExceptionFlag">
514                                                         <simple resultType="java.lang.Boolean">false</simple>
515                                                 </setProperty>
516                                                 <to uri="direct:delete-policy" />
517                                                 <to uri="direct:create-policy" />
518                                         </split>
519                                         <log loggingLevel="INFO"
520                                                 message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" />
521                                         <split>
522                                                 <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
523                                                 </simple>
524                                                 <setProperty propertyName="policy">
525                                                         <simple>${body}</simple>
526                                                 </setProperty>
527                                                 <log loggingLevel="INFO"
528                                                         message="Processing Operational Policy: ${exchangeProperty[policy].getName()}" />
529                                                 <setProperty propertyName="raiseHttpExceptionFlag">
530                                                         <simple resultType="java.lang.Boolean">false</simple>
531                                                 </setProperty>
532
533                                                 <to uri="direct:delete-policy" />
534                                                 <to uri="direct:create-policy" />
535                                                 <choice>
536                                                         <when>
537                                                                 <simple>${exchangeProperty['policy'].isLegacy()} == true
538                                                                 </simple>
539                                                                 <log loggingLevel="INFO"
540                                                                         message="Processing all GUARD policies (LEGACY) defined in loop ${exchangeProperty[loopObject].getName()}" />
541                                                                 <split>
542                                                                         <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
543                                                                         </simple>
544                                                                         <setProperty propertyName="guardPolicy">
545                                                                                 <simple>${body}</simple>
546                                                                         </setProperty>
547                                                                         <log loggingLevel="INFO"
548                                                                                 message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
549
550                                                                         <setProperty propertyName="raiseHttpExceptionFlag">
551                                                                                 <simple resultType="java.lang.Boolean">false</simple>
552                                                                         </setProperty>
553                                                                         <to uri="direct:delete-guard-policy" />
554                                                                         <to uri="direct:create-guard-policy" />
555                                                                 </split>
556                                                         </when>
557                                                 </choice>
558                                         </split>
559
560                                         <delay>
561                                                 <constant>3000</constant>
562                                         </delay>
563
564                                         <to uri="direct:add-all-to-active-pdp-group" />
565
566                                         <log loggingLevel="INFO"
567                                                 message="SUBMIT request successfully executed for loop: ${header.loopName}" />
568                                         <to
569                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${exchangeProperty[loopObject]})" />
570                                         <to
571                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
572                                         <doCatch>
573                                                 <exception>java.lang.Exception</exception>
574                                                 <handled>
575                                                         <constant>true</constant>
576                                                 </handled>
577                                                 <to
578                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
579                                                 <log loggingLevel="ERROR"
580                                                          message="SUBMIT request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
581                                                 <to
582                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
583                                                 <setHeader headerName="CamelHttpResponseCode">
584                                                         <constant>500</constant>
585                                                 </setHeader>
586                                                 <setBody>
587                                                         <simple>SUBMIT request FAILED</simple>
588                                                 </setBody>
589                                         </doCatch>
590                                 </doTry>
591                         </route>
592                 </put>
593                 <put uri="/v2/loop/delete/{loopName}">
594                         <route>
595                                 <removeHeaders pattern="*" excludePattern="loopName" />
596                                 <doTry>
597                                         <log loggingLevel="INFO"
598                                                 message="DELETE request for loop: ${header.loopName}" />
599                                         <to
600                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*,'DELETE request')" />
601                                         <to
602                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
603                                         <to uri="direct:load-loop" />
604                                         <to
605                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request','INFO',${exchangeProperty[loopObject]})" />
606                                         <to uri="direct:undeploy-loop" />
607                                         <to uri="direct:remove-all-policy-from-active-pdp-group" />
608                                         <log loggingLevel="INFO"
609                                                 message="Deleting all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" />
610                                         <split>
611                                                 <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
612                                                 </simple>
613                                                 <setProperty propertyName="policy">
614                                                         <simple>${body}</simple>
615                                                 </setProperty>
616                                                 <log loggingLevel="INFO"
617                                                         message="Deleting Micro Service Policy: ${exchangeProperty[policy].getName()}" />
618                                                 <setProperty propertyName="raiseHttpExceptionFlag">
619                                                         <simple resultType="java.lang.Boolean">false</simple>
620                                                 </setProperty>
621                                                 <to uri="direct:delete-policy" />
622                                         </split>
623                                         <log loggingLevel="INFO"
624                                                 message="Deleting all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" />
625                                         <split>
626                                                 <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
627                                                 </simple>
628                                                 <setProperty propertyName="policy">
629                                                         <simple>${body}</simple>
630                                                 </setProperty>
631                                                 <log loggingLevel="INFO"
632                                                         message="Deleting Operational Policy: ${exchangeProperty[policy].getName()}" />
633                                                 <setProperty propertyName="raiseHttpExceptionFlag">
634                                                         <simple resultType="java.lang.Boolean">false</simple>
635                                                 </setProperty>
636                                                 <to uri="direct:delete-policy" />
637                                                 <choice>
638                                                         <when>
639                                                                 <simple>${exchangeProperty['policy'].isLegacy()} == true
640                                                                 </simple>
641                                                                 <log loggingLevel="INFO"
642                                                                         message="Deleting all GUARD policies (LEGACY) defined in loop ${exchangeProperty[loopObject].getName()}" />
643                                                                 <split>
644                                                                         <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
645                                                                         </simple>
646                                                                         <setProperty propertyName="guardPolicy">
647                                                                                 <simple>${body}</simple>
648                                                                         </setProperty>
649                                                                         <log loggingLevel="INFO"
650                                                                                 message="Deleting Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
651                                                                         <setProperty propertyName="raiseHttpExceptionFlag">
652                                                                                 <simple resultType="java.lang.Boolean">false</simple>
653                                                                         </setProperty>
654                                                                         <to uri="direct:delete-guard-policy" />
655                                                                 </split>
656                                                         </when>
657                                                 </choice>
658                                         </split>
659                                         <to
660                                                 uri="bean:org.onap.clamp.loop.LoopController?method=deleteLoop(${header.loopName})" />
661                                         <log loggingLevel="INFO"
662                                                 message="DELETE request successfully executed for loop: ${header.loopName}" />
663                                         <to
664                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
665                                         <doCatch>
666                                                 <exception>java.lang.Exception</exception>
667                                                 <handled>
668                                                         <constant>true</constant>
669                                                 </handled>
670                                                 <to
671                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
672                                                 <log loggingLevel="ERROR"
673                                                          message="DELETE request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
674                                                 <to
675                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
676                                                 <setHeader headerName="CamelHttpResponseCode">
677                                                         <constant>500</constant>
678                                                 </setHeader>
679                                                 <setBody>
680                                                         <simple>DELETE request FAILED</simple>
681                                                 </setBody>
682                                         </doCatch>
683                                 </doTry>
684                         </route>
685                 </put>
686                 <get uri="/v2/loop/getstatus/{loopName}"
687                         outType="org.onap.clamp.loop.Loop" produces="application/json">
688                         <route>
689                                 <removeHeaders pattern="*" excludePattern="loopName" />
690                                 <doTry>
691                                         <log loggingLevel="INFO"
692                                                 message="GET STATUS request for loop: ${header.loopName}" />
693                                         <to
694                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET STATUS request')" />
695                                         <to
696                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
697                                         <to uri="direct:load-loop" />
698                                         <to
699                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request','INFO',${exchangeProperty[loopObject]})" />
700                                         <doTry>
701                                                 <to uri="direct:update-policy-status-for-loop" />
702                                                 <to uri="direct:update-dcae-status-for-loop" />
703                                                 <to uri="direct:update-loop-state" />
704
705                                                 <to
706                                                         uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request successfully executed','INFO',${exchangeProperty[loopObject]})" />
707                                                 <to
708                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
709                                         </doTry>
710                                         <doCatch>
711                                                 <exception>java.lang.Exception</exception>
712                                                 <handled>
713                                                         <constant>true</constant>
714                                                 </handled>
715                                                 <to
716                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
717                                                 <log loggingLevel="ERROR"
718                                                          message="GET STATUS request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
719                                                 <to
720                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
721                                                 <setHeader headerName="CamelHttpResponseCode">
722                                                         <constant>500</constant>
723                                                 </setHeader>
724                                                 <setBody>
725                                                         <simple>GET STATUS request FAILED</simple>
726                                                 </setBody>
727                                         </doCatch>
728                                         <doFinally>
729                                                 <setBody>
730                                                         <simple>${exchangeProperty[loopObject]}</simple>
731                                                 </setBody>
732                                         </doFinally>
733                                 </doTry>
734                         </route>
735                 </get>
736
737                 <put uri="/v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}" outType="org.onap.clamp.loop.Loop" produces="application/json">
738                         <route>
739                                 <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion" />
740                                 <doTry>
741                                         <to
742                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add operational Policy')" />
743                                         <to
744                                                         uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
745                                         <to uri="direct:load-loop" />
746                                         <to
747                                                         uri="bean:org.onap.clamp.loop.LoopController?method=addOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})" />
748                                         <to
749                                                         uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
750                                         <to
751                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
752                                         <doCatch>
753                                                 <exception>java.lang.Exception</exception>
754                                                 <handled>
755                                                         <constant>true</constant>
756                                                 </handled>
757                                                 <to
758                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
759                                                 <log loggingLevel="ERROR"
760                                                          message="ADD operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
761                                                 <to
762                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" />
763                                                 <setHeader headerName="CamelHttpResponseCode">
764                                                         <constant>500</constant>
765                                                 </setHeader>
766                                                 <setBody>
767                                                         <simple>ADD Operational policy request FAILED</simple>
768                                                 </setBody>
769                                         </doCatch>
770                                 </doTry>
771                         </route>
772                 </put>
773                 <put uri="/v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}" outType="org.onap.clamp.loop.Loop" produces="application/json">
774                         <route>
775                                 <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion|policyName" />
776                                 <doTry>
777                                         <to
778                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REMOVE operational Policy')" />
779                                         <to
780                                                         uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
781                                         <to uri="direct:load-loop" />
782                                         <setProperty propertyName="policyName">
783                                                 <simple>${header.policyName}</simple>
784                                         </setProperty>
785                                         <setProperty propertyName="policy">
786                                                 <simple>${exchangeProperty[loopObject].getOperationalPolicy(header.policyName)}</simple>
787                                         </setProperty>
788                                         <setProperty propertyName="raiseHttpExceptionFlag">
789                                                 <simple resultType="java.lang.Boolean">false</simple>
790                                         </setProperty>
791                                         <to uri="direct:remove-one-policy-from-active-pdp-group" />
792                                         <setProperty propertyName="raiseHttpExceptionFlag">
793                                                 <simple resultType="java.lang.Boolean">false</simple>
794                                         </setProperty>
795                                         <to uri="direct:delete-policy" />
796                                         <to
797                                                         uri="bean:org.onap.clamp.loop.LoopController?method=removeOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})" />
798                                         <to
799                                                         uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
800                                         <to
801                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
802                                         <doCatch>
803                                                 <exception>java.lang.Exception</exception>
804                                                 <handled>
805                                                         <constant>true</constant>
806                                                 </handled>
807                                                 <to
808                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
809                                                 <log loggingLevel="ERROR"
810                                                          message="REMOVE operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
811                                                 <to
812                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" />
813                                                 <setHeader headerName="CamelHttpResponseCode">
814                                                         <constant>500</constant>
815                                                 </setHeader>
816                                                 <setBody>
817                                                         <simple>REMOVE Operational policy request FAILED</simple>
818                                                 </setBody>
819                                         </doCatch>
820                                 </doTry>
821                         </route>
822                 </put>
823                 <post
824                                 uri="/v2/loop/create/{loopName}?templateName={templateName}"
825                                 outType="org.onap.clamp.loop.Loop" consumes="application/json"
826                                 produces="application/json">
827                         <route>
828                                 <removeHeaders
829                                                 pattern="*"
830                                                 excludePattern="loopName|templateName" />
831                                 <doTry>
832                                         <to
833                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Create Loop')" />
834                                         <to
835                                                         uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
836                                         <to
837                                                         uri="bean:org.onap.clamp.loop.LoopController?method=createLoop(${header.loopName}, ${header.templateName})" />
838                                         <to
839                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
840                                         <doCatch>
841                                                 <exception>java.lang.Exception</exception>
842                                                 <handled>
843                                                         <constant>true</constant>
844                                                 </handled>
845                                                 <to
846                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
847                                                 <log loggingLevel="ERROR"
848                                                          message="CREATE Loop from Template request failed for loop: ${header.loopName}, ${exception.stacktrace}" />
849                                                 <to
850                                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('CREATE Loop from template request failed','ERROR',${exchangeProperty[loopObject]})" />
851                                                 <setHeader headerName="CamelHttpResponseCode">
852                                                         <constant>500</constant>
853                                                 </setHeader>
854                                                 <setBody>
855                                                         <simple>CREATE Loop from template FAILED</simple>
856                                                 </setBody>
857                                         </doCatch>
858                                 </doTry>
859                         </route>
860                 </post>
861                 <get uri="/v2/dictionary"
862                         outType="org.onap.clamp.tosca.Dictionary" produces="application/json">
863                         <route>
864                                 <removeHeaders pattern="*" />
865                                 <doTry>
866                                         <to
867                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionaries')" />
868                                         <to
869                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
870                                         <to
871                                                 uri="bean:org.onap.clamp.tosca.DictionaryService?method=getAllDictionaries()" />
872                                         <to
873                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
874                                         <doCatch>
875                                                 <exception>java.lang.Exception</exception>
876                                                 <handled>
877                                                         <constant>true</constant>
878                                                 </handled>
879                                                 <to
880                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
881                                                 <log loggingLevel="ERROR"
882                                                          message="GET Dictionary request failed: ${exception.stacktrace}" />
883                                                 <setHeader headerName="CamelHttpResponseCode">
884                                                         <constant>500</constant>
885                                                 </setHeader>
886                                                 <setBody>
887                                                         <simple>GET Dictionary FAILED</simple>
888                                                 </setBody>
889                                         </doCatch>
890                                 </doTry>
891                         </route>
892                 </get>
893
894                 <get uri="/v2/dictionary/secondary/names"
895                         outType="java.lang.String[]" produces="application/json">
896                         <route>
897                                 <removeHeaders pattern="*" />
898                                 <doTry>
899                                         <to
900                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Secondary Dictionary Level Names')" />
901                                         <to
902                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
903                                         <to
904                                                 uri="bean:org.onap.clamp.tosca.DictionaryService?method=getAllSecondaryLevelDictionaryNames()" />
905                                         <to
906                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
907                                         <doCatch>
908                                                 <exception>java.lang.Exception</exception>
909                                                 <handled>
910                                                         <constant>true</constant>
911                                                 </handled>
912                                                 <to
913                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
914                                                 <log loggingLevel="ERROR"
915                                                          message="GET Dictionary request failed: ${exception.stacktrace}" />
916                                                 <setHeader headerName="CamelHttpResponseCode">
917                                                         <constant>500</constant>
918                                                 </setHeader>
919                                                 <setBody>
920                                                         <simple>GET Dictionary FAILED</simple>
921                                                 </setBody>
922                                         </doCatch>
923                                 </doTry>
924                         </route>
925                 </get>
926                 <get uri="/v2/dictionary/{dictionaryName}"
927                         outType="org.onap.clamp.tosca.Dictionary" produces="application/json">
928                         <route>
929                                 <removeHeaders pattern="*"
930                                         excludePattern="dictionaryName" />
931                                 <doTry>
932                                         <to
933                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionary Elements for a Dictionary Name')" />
934                                         <to
935                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
936                                         <to
937                                                 uri="bean:org.onap.clamp.tosca.DictionaryService?method=getDictionary(${header.dictionaryName})" />
938                                         <to
939                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
940                                         <doCatch>
941                                                 <exception>java.lang.Exception</exception>
942                                                 <handled>
943                                                         <constant>true</constant>
944                                                 </handled>
945                                                 <to
946                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
947                                                 <log loggingLevel="ERROR"
948                                                          message="GET Dictionary request failed for: ${header.dictionaryName}, ${exception.stacktrace}" />
949                                                 <setHeader headerName="CamelHttpResponseCode">
950                                                         <constant>500</constant>
951                                                 </setHeader>
952                                                 <setBody>
953                                                         <simple>GET Dictionary FAILED</simple>
954                                                 </setBody>
955                                         </doCatch>
956                                 </doTry>
957                         </route>
958                 </get>
959                 <put uri="/v2/dictionary" type="org.onap.clamp.tosca.Dictionary"
960                         outType="org.onap.clamp.tosca.Dictionary" consumes="application/json"
961                         produces="application/json">
962                         <route>
963                                 <doTry>
964                                         <to
965                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary')" />
966                                         <to
967                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
968                                         <setProperty propertyName="DictionaryObject">
969                                                 <simple>${body}</simple>
970                                         </setProperty>
971                                         <to
972                                                 uri="bean:org.onap.clamp.tosca.DictionaryService?method=saveOrUpdateDictionary(${exchangeProperty[DictionaryObject]})" />
973                                         <to
974                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
975                                         <doCatch>
976                                                 <exception>java.lang.Exception</exception>
977                                                 <handled>
978                                                         <constant>true</constant>
979                                                 </handled>
980                                                 <to
981                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
982                                                 <log loggingLevel="ERROR"
983                                                          message="PUT Dictionary request failed for: ${exception.stacktrace}" />
984                                                 <setHeader headerName="CamelHttpResponseCode">
985                                                         <constant>500</constant>
986                                                 </setHeader>
987                                                 <setBody>
988                                                         <simple>PUT Dictionary FAILED</simple>
989                                                 </setBody>
990                                         </doCatch>
991                                 </doTry>
992                         </route>
993                 </put>
994
995                 <put uri="/v2/dictionary/{name}"
996                         type="org.onap.clamp.tosca.Dictionary"
997                         outType="org.onap.clamp.tosca.Dictionary" consumes="application/json"
998                         produces="application/json">
999                         <route>
1000                                 <removeHeaders pattern="*" excludePattern="name" />
1001                                 <doTry>
1002                                         <to
1003                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary Element')" />
1004                                         <to
1005                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
1006                                         <setProperty propertyName="DictionaryObject">
1007                                                 <simple>${body}</simple>
1008                                         </setProperty>
1009                                         <to
1010                                                 uri="bean:org.onap.clamp.tosca.DictionaryService?method=saveOrUpdateDictionaryElement(${header.name}, ${exchangeProperty[DictionaryObject]})" />
1011                                         <to
1012                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1013                                         <doCatch>
1014                                                 <exception>java.lang.Exception</exception>
1015                                                 <handled>
1016                                                         <constant>true</constant>
1017                                                 </handled>
1018                                                 <to
1019                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1020                                                 <log loggingLevel="ERROR"
1021                                                          message="PUT Dictionary request failed for: ${header.name}, ${exception.stacktrace}" />
1022                                                 <setHeader headerName="CamelHttpResponseCode">
1023                                                         <constant>500</constant>
1024                                                 </setHeader>
1025                                                 <setBody>
1026                                                         <simple>PUT Dictionary FAILED</simple>
1027                                                 </setBody>
1028                                         </doCatch>
1029                                 </doTry>
1030                         </route>
1031                 </put>
1032
1033                 <delete uri="/v2/dictionary/{name}" produces="application/json">
1034                         <route>
1035                                 <removeHeaders pattern="*" excludePattern="name" />
1036                                 <doTry>
1037                                         <to
1038                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary')" />
1039                                         <to
1040                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
1041                                         <to
1042                                                 uri="bean:org.onap.clamp.tosca.DictionaryService?method=deleteDictionary(${header.name})" />
1043                                         <to
1044                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1045                                         <doCatch>
1046                                                 <exception>java.lang.Exception</exception>
1047                                                 <handled>
1048                                                         <constant>true</constant>
1049                                                 </handled>
1050                                                 <to
1051                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1052                                                 <log loggingLevel="ERROR"
1053                                                          message="DELETE Dictionary request failed for: ${header.name}, ${exception.stacktrace}" />
1054                                                 <setHeader headerName="CamelHttpResponseCode">
1055                                                         <constant>500</constant>
1056                                                 </setHeader>
1057                                                 <setBody>
1058                                                         <simple>DELETE Dictionary FAILED</simple>
1059                                                 </setBody>
1060                                         </doCatch>
1061                                 </doTry>
1062                         </route>
1063                 </delete>
1064
1065                 <delete uri="/v2/dictionary/{name}/elements/{shortName}"
1066                         produces="application/json">
1067                         <route>
1068                                 <removeHeaders pattern="*"
1069                                         excludePattern="name|shortName" />
1070                                 <doTry>
1071                                         <to
1072                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary Element')" />
1073                                         <to
1074                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
1075                                         <to
1076                                                 uri="bean:org.onap.clamp.tosca.DictionaryService?method=deleteDictionaryElement(${header.name}, ${header.shortName})" />
1077                                         <to
1078                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1079                                         <doCatch>
1080                                                 <exception>java.lang.Exception</exception>
1081                                                 <handled>
1082                                                         <constant>true</constant>
1083                                                 </handled>
1084                                                 <to
1085                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1086                                                 <log loggingLevel="ERROR"
1087                                                          message="DELETE Dictionary element request failed for: ${header.name}, ${exception.stacktrace}" />
1088                                                 <setHeader headerName="CamelHttpResponseCode">
1089                                                         <constant>500</constant>
1090                                                 </setHeader>
1091                                                 <setBody>
1092                                                         <simple>DELETE Dictionary element FAILED</simple>
1093                                                 </setBody>
1094                                         </doCatch>
1095                                 </doTry>
1096                         </route>
1097                 </delete>
1098
1099                 <get uri="/v2/policyToscaModels"
1100                         outType="org.onap.clamp.loop.template.PolicyModel"
1101                         produces="application/json">
1102                         <route>
1103                                 <removeHeaders pattern="*" />
1104                                 <doTry>
1105                                         <to
1106                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Tosca Policy Models')" />
1107                                         <to
1108                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
1109                                         <to
1110                                                 uri="bean:org.onap.clamp.loop.template.PolicyModelsService?method=getAllPolicyModels()" />
1111                                         <to
1112                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1113                                         <doCatch>
1114                                                 <exception>java.lang.Exception</exception>
1115                                                 <handled>
1116                                                         <constant>true</constant>
1117                                                 </handled>
1118                                                 <to
1119                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1120                                                 <log loggingLevel="ERROR"
1121                                                          message="GET Policy Models request failed for: ${exception.stacktrace}" />
1122                                                 <setHeader headerName="CamelHttpResponseCode">
1123                                                         <constant>500</constant>
1124                                                 </setHeader>
1125                                                 <setBody>
1126                                                         <simple>GET Policy models FAILED</simple>
1127                                                 </setBody>
1128                                         </doCatch>
1129                                 </doTry>
1130                         </route>
1131                 </get>
1132                 <get uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}"
1133                         outType="org.onap.clamp.loop.template.PolicyModel"
1134                         produces="application/json">
1135                         <route>
1136                                 <removeHeaders pattern="*"
1137                                         excludePattern="policyModelType|policyModelVersion" />
1138                                 <doTry>
1139                                         <to
1140                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model by Name/Version')" />
1141                                         <to
1142                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
1143                                         <to
1144                                                 uri="bean:org.onap.clamp.loop.template.PolicyModelsService?method=getPolicyModelByType(${header.policyModelType},${header.policyModelVersion})" />
1145                                         <to
1146                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1147                                         <doCatch>
1148                                                 <exception>java.lang.Exception</exception>
1149                                                 <handled>
1150                                                         <constant>true</constant>
1151                                                 </handled>
1152                                                 <to
1153                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1154                                                 <log loggingLevel="ERROR"
1155                                                          message="GET Policy Model request failed for type: ${header.policyModelType}, ${exception.stacktrace}" />
1156                                                 <setHeader headerName="CamelHttpResponseCode">
1157                                                         <constant>500</constant>
1158                                                 </setHeader>
1159                                                 <setBody>
1160                                                         <simple>GET Policy model FAILED</simple>
1161                                                 </setBody>
1162                                         </doCatch>
1163                                 </doTry>
1164                         </route>
1165                 </get>
1166                 <get uri="/v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}"
1167                         outType="java.lang.String" produces="application/json">
1168                         <route>
1169                                 <removeHeaders pattern="*"
1170                                         excludePattern="policyModelType|policyModelVersion" />
1171                                 <doTry>
1172                                         <to
1173                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model Yaml String by Name/Version')" />
1174                                         <to
1175                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
1176                                         <to
1177                                                 uri="bean:org.onap.clamp.loop.template.PolicyModelsService?method=getPolicyModelTosca(${header.policyModelType},${header.policyModelVersion})" />
1178                                         <to
1179                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1180                                         <doCatch>
1181                                                 <exception>java.lang.Exception</exception>
1182                                                 <handled>
1183                                                         <constant>true</constant>
1184                                                 </handled>
1185                                                 <to
1186                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1187                                                 <log loggingLevel="ERROR"
1188                                                          message="GET Policy Model YAML request failed for type: ${header.policyModelType}, ${exception.stacktrace}" />
1189                                                 <setHeader headerName="CamelHttpResponseCode">
1190                                                         <constant>500</constant>
1191                                                 </setHeader>
1192                                                 <setBody>
1193                                                         <simple>GET Policy model YAML FAILED</simple>
1194                                                 </setBody>
1195                                         </doCatch>
1196                                 </doTry>
1197                         </route>
1198                 </get>
1199
1200                 <post uri="/v2/policyToscaModels"
1201                         type="java.lang.String"
1202                         outType="org.onap.clamp.loop.template.PolicyModel"
1203                         consumes="plain/text" produces="application/json">
1204                         <route>
1205                                 <removeHeaders pattern="*"/>
1206                                 <doTry>
1207                                         <to
1208                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')" />
1209                                         <to
1210                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
1211                                         <setProperty propertyName="PolicyModelTosca">
1212                                                 <simple>${body}</simple>
1213                                         </setProperty>
1214                                         <to
1215                                                 uri="bean:org.onap.clamp.loop.template.PolicyModelsService?method=createNewPolicyModelFromTosca(${exchangeProperty[PolicyModelTosca]})" />
1216                                         <to
1217                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1218                                         <doCatch>
1219                                                 <exception>java.lang.Exception</exception>
1220                                                 <handled>
1221                                                         <constant>true</constant>
1222                                                 </handled>
1223                                                 <to
1224                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1225                                                 <log loggingLevel="ERROR"
1226                                                          message="POST Policy Model YAML request failed: ${exception.stacktrace}" />
1227                                                 <setHeader headerName="CamelHttpResponseCode">
1228                                                         <constant>500</constant>
1229                                                 </setHeader>
1230                                                 <setBody>
1231                                                         <simple>POST Policy model YAML FAILED</simple>
1232                                                 </setBody>
1233                                         </doCatch>
1234                                 </doTry>
1235                         </route>
1236                 </post>
1237                 <put uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}"
1238                           type="java.lang.String"
1239                           outType="org.onap.clamp.loop.template.PolicyModel"
1240                           consumes="plain/text" produces="application/json">
1241                         <route>
1242                                 <removeHeaders pattern="*"
1243                                                            excludePattern="policyModelType|policyModelVersion" />
1244                                 <doTry>
1245                                         <to
1246                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')" />
1247                                         <to
1248                                                         uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
1249                                         <setProperty propertyName="PolicyModelTosca">
1250                                                 <simple>${body}</simple>
1251                                         </setProperty>
1252                                         <to
1253                                                         uri="bean:org.onap.clamp.loop.template.PolicyModelsService?method=updatePolicyModelTosca(${header.policyModelType},${policyModelVersion},${exchangeProperty[PolicyModelTosca]})" />
1254                                         <to
1255                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1256                                         <doCatch>
1257                                                 <exception>java.lang.Exception</exception>
1258                                                 <handled>
1259                                                         <constant>true</constant>
1260                                                 </handled>
1261                                                 <to
1262                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1263                                                 <log loggingLevel="ERROR"
1264                                                          message="MODIFY Policy Model YAML request failed: ${exception.stacktrace}" />
1265                                                 <setHeader headerName="CamelHttpResponseCode">
1266                                                         <constant>500</constant>
1267                                                 </setHeader>
1268                                                 <setBody>
1269                                                         <simple>MODIFY Policy model YAML FAILED</simple>
1270                                                 </setBody>
1271                                         </doCatch>
1272                                 </doTry>
1273                         </route>
1274                 </put>
1275
1276                 <get uri="/v2/templates"
1277                         outType="org.onap.clamp.loop.template.LoopTemplate"
1278                         produces="application/json">
1279                         <route>
1280                                 <removeHeaders pattern="*" />
1281                                 <doTry>
1282                                         <to
1283                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Templates')" />
1284                                         <to
1285                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
1286                                         <to
1287                                                 uri="bean:org.onap.clamp.loop.template.LoopTemplatesService?method=getAllLoopTemplates()" />
1288                                         <to
1289                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1290                                         <doCatch>
1291                                                 <exception>java.lang.Exception</exception>
1292                                                 <handled>
1293                                                         <constant>true</constant>
1294                                                 </handled>
1295                                                 <to
1296                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1297                                                 <log loggingLevel="ERROR"
1298                                                          message="GET ALL templates request failed: ${exception.stacktrace}" />
1299                                                 <setHeader headerName="CamelHttpResponseCode">
1300                                                         <constant>500</constant>
1301                                                 </setHeader>
1302                                                 <setBody>
1303                                                         <simple>GET ALL templates FAILED</simple>
1304                                                 </setBody>
1305                                         </doCatch>
1306                                 </doTry>
1307                         </route>
1308                 </get>
1309                 <get uri="/v2/templates/{templateName}"
1310                         outType="org.onap.clamp.loop.template.LoopTemplate"
1311                         produces="application/json">
1312                         <route>
1313                                 <removeHeaders pattern="*"
1314                                         excludePattern="templateName" />
1315                                 <doTry>
1316                                         <to
1317                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET a Template by NAME')" />
1318                                         <to
1319                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
1320                                         <to
1321                                                 uri="bean:org.onap.clamp.loop.template.LoopTemplatesService?method=getLoopTemplate(${header.templateName})" />
1322                                         <to
1323                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1324                                         <doCatch>
1325                                                 <exception>java.lang.Exception</exception>
1326                                                 <handled>
1327                                                         <constant>true</constant>
1328                                                 </handled>
1329                                                 <to
1330                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1331                                                 <log loggingLevel="ERROR"
1332                                                          message="GET Template request failed for template: ${header.templateName},  ${exception.stacktrace}" />
1333                                                 <setHeader headerName="CamelHttpResponseCode">
1334                                                         <constant>500</constant>
1335                                                 </setHeader>
1336                                                 <setBody>
1337                                                         <simple>GET Template FAILED</simple>
1338                                                 </setBody>
1339                                         </doCatch>
1340                                 </doTry>
1341                         </route>
1342                 </get>
1343                 <get uri="/v2/templates/names" outType="java.lang.String[]"
1344                         produces="application/json">
1345                         <route>
1346                                 <removeHeaders pattern="*" />
1347                                 <doTry>
1348                                         <to
1349                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop Template Names')" />
1350                                         <to
1351                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
1352                                         <to
1353                                                 uri="bean:org.onap.clamp.loop.template.LoopTemplatesService?method=getLoopTemplateNames()" />
1354                                         <to
1355                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1356                                         <doCatch>
1357                                                 <exception>java.lang.Exception</exception>
1358                                                 <handled>
1359                                                         <constant>true</constant>
1360                                                 </handled>
1361                                                 <to
1362                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1363                                                 <log loggingLevel="ERROR"
1364                                                          message="GET All Template names request failed for template:  ${exception.stacktrace}" />
1365                                                 <setHeader headerName="CamelHttpResponseCode">
1366                                                         <constant>500</constant>
1367                                                 </setHeader>
1368                                                 <setBody>
1369                                                         <simple>GET All Template names FAILED</simple>
1370                                                 </setBody>
1371                                         </doCatch>
1372                                 </doTry>
1373                         </route>
1374                 </get>
1375                 <get uri="/v2/templates/{templateName}/svgRepresentation"
1376                          outType="java.lang.String" produces="application/xml">
1377                         <route>
1378                                 <removeHeaders pattern="*" excludePattern="templateName" />
1379                                 <doTry>
1380                                         <to
1381                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation for Loop template')" />
1382                                         <to
1383                                                         uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
1384                                         <to
1385                                                         uri="bean:org.onap.clamp.loop.template.LoopTemplatesService?method=getSvgRepresentation(${header.templateName})" />
1386                                         <to
1387                                                         uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1388                                         <doCatch>
1389                                                 <exception>java.lang.Exception</exception>
1390                                                 <handled>
1391                                                         <constant>true</constant>
1392                                                 </handled>
1393                                                 <to
1394                                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1395                                                 <log loggingLevel="ERROR"
1396                                                          message="GET SVG for template failed for template: ${header.templateName},  ${exception.stacktrace}" />
1397                                                 <setHeader headerName="CamelHttpResponseCode">
1398                                                         <constant>500</constant>
1399                                                 </setHeader>
1400                                                 <setBody>
1401                                                         <simple>GET SVG for Template FAILED</simple>
1402                                                 </setBody>
1403                                         </doCatch>
1404                                 </doTry>
1405                         </route>
1406                 </get>
1407                 <get uri="/v2/clampInformation" outType="org.onap.clamp.clds.model.ClampInformation"
1408                          produces="application/json">
1409                         <to
1410                                         uri="bean:org.onap.clamp.authorization.AuthorizationController?method=getClampInformation()" />
1411                 </get>
1412         </rest>
1413 </rests>