1 <rests xmlns="http://camel.apache.org/schema/spring">
3 <get uri="/v2/loop/getAllNames" outType="java.lang.String[]"
4 produces="application/json">
6 <removeHeaders pattern="*" />
9 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop')" />
11 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
13 uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" />
15 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
17 <exception>java.lang.Exception</exception>
19 <constant>false</constant>
22 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
27 <get uri="/v2/loop/{loopName}" outType="org.onap.clamp.loop.Loop"
28 produces="application/json">
30 <removeHeaders pattern="*" excludePattern="loopName" />
33 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Loop')" />
35 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
37 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
39 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
41 <exception>java.lang.Exception</exception>
43 <constant>false</constant>
46 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
51 <get uri="/v2/loop/svgRepresentation/{loopName}"
52 outType="java.lang.String" produces="application/xml">
54 <removeHeaders pattern="*" excludePattern="loopName" />
57 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation')" />
59 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
61 uri="bean:org.onap.clamp.loop.LoopController?method=getSvgRepresentation(${header.loopName})" />
63 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
65 <exception>java.lang.Exception</exception>
67 <constant>false</constant>
70 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
76 <post uri="/v2/loop/updateGlobalProperties/{loopName}"
77 type="com.google.gson.JsonObject" consumes="application/json"
78 outType="org.onap.clamp.loop.Loop" produces="application/json">
80 <removeHeaders pattern="*" excludePattern="loopName" />
83 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')" />
85 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
86 <setHeader headerName="GlobalPropertiesJson">
87 <simple>${body}</simple>
89 <to uri="direct:load-loop" />
91 uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" />
93 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${exchangeProperty[loopObject]})" />
95 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
97 <exception>java.lang.Exception</exception>
99 <constant>false</constant>
102 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
107 <post uri="/v2/loop/updateOperationalPolicies/{loopName}"
108 type="com.google.gson.JsonArray" consumes="application/json"
109 outType="org.onap.clamp.loop.Loop" produces="application/json">
111 <removeHeaders pattern="*" excludePattern="loopName" />
114 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')" />
116 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
117 <setHeader headerName="OperationalPoliciesArray">
118 <simple>${body}</simple>
120 <to uri="direct:load-loop" />
122 uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" />
124 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
126 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
128 <exception>java.lang.Exception</exception>
130 <constant>false</constant>
133 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
138 <post uri="/v2/loop/updateMicroservicePolicy/{loopName}"
139 type="org.onap.clamp.policy.microservice.MicroServicePolicy"
140 consumes="application/json"
141 outType="org.onap.clamp.policy.microservice.MicroServicePolicy"
142 produces="application/json">
144 <removeHeaders pattern="*" excludePattern="loopName" />
147 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')" />
149 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
150 <setProperty propertyName="MicroServicePolicyObject">
151 <simple>${body}</simple>
154 <to uri="direct:load-loop" />
156 uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${exchangeProperty[MicroServicePolicyObject]})" />
158 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
160 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
162 <exception>java.lang.Exception</exception>
164 <constant>false</constant>
167 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
172 <put uri="/v2/loop/deploy/{loopName}"
173 outType="org.onap.clamp.loop.Loop" produces="application/json">
175 <removeHeaders pattern="*" excludePattern="loopName" />
177 <log loggingLevel="INFO"
178 message="DCAE DEPLOY request for loop: ${header.loopName}" />
180 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE DEPLOY request')" />
182 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
183 <to uri="direct:load-loop" />
185 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DCAE DEPLOY request','INFO',${exchangeProperty[loopObject]})" />
187 <to uri="direct:deploy-loop" />
189 <log loggingLevel="INFO"
190 message="DEPLOY request successfully executed for loop: ${header.loopName}" />
192 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" />
194 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
196 <exception>java.lang.Exception</exception>
198 <constant>false</constant>
201 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
202 <log loggingLevel="ERROR"
203 message="DEPLOY request failed for loop: ${header.loopName}" />
205 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
210 <put uri="/v2/loop/refreshOpPolicyJsonSchema/{loopName}"
211 outType="org.onap.clamp.loop.Loop" produces="application/json">
213 <removeHeaders pattern="*" excludePattern="loopName" />
215 <log loggingLevel="INFO"
216 message="Refresh Operational Policy UI for loop: ${header.loopName}" />
218 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH OP Policy UI request')" />
220 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
221 <to uri="direct:load-loop" />
223 uri="bean:org.onap.clamp.loop.LoopController?method=refreshOpPolicyJsonRepresentation(${header.loopName})" />
224 <log loggingLevel="INFO"
225 message="REFRESH request successfully executed for loop: ${header.loopName}" />
227 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH request successfully executed','INFO',${exchangeProperty[loopObject]})" />
229 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
231 <exception>java.lang.Exception</exception>
233 <constant>false</constant>
236 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
237 <log loggingLevel="ERROR"
238 message="REFRESH request failed for loop: ${header.loopName}" />
240 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
245 <put uri="/v2/loop/undeploy/{loopName}"
246 outType="org.onap.clamp.loop.Loop" produces="application/json">
248 <removeHeaders pattern="*" excludePattern="loopName" />
250 <log loggingLevel="INFO"
251 message="DCAE UNDEPLOY request for loop: ${header.loopName}" />
253 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE UNDEPLOY request')" />
255 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
256 <to uri="direct:load-loop" />
258 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DCAE UNDEPLOY request','INFO',${exchangeProperty[loopObject]})" />
259 <to uri="direct:undeploy-loop" />
261 <log loggingLevel="INFO"
262 message="UNDEPLOY request successfully executed for loop: ${header.loopName}" />
264 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" />
266 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
268 <exception>java.lang.Exception</exception>
270 <constant>false</constant>
273 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
274 <log loggingLevel="ERROR"
275 message="UNDEPLOY request failed for loop: ${header.loopName}" />
277 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
282 <put uri="/v2/loop/stop/{loopName}"
283 outType="org.onap.clamp.loop.Loop" produces="application/json">
285 <removeHeaders pattern="*" excludePattern="loopName" />
287 <log loggingLevel="INFO"
288 message="STOP request for loop: ${header.loopName}" />
290 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*,'STOP request')" />
292 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
293 <to uri="direct:load-loop" />
295 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request','INFO',${exchangeProperty[loopObject]})" />
297 <to uri="direct:remove-all-policy-from-active-pdp-group" />
298 <log loggingLevel="INFO"
299 message="STOP request successfully executed for loop: ${header.loopName}" />
301 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${exchangeProperty[loopObject]})" />
303 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
305 <exception>java.lang.Exception</exception>
307 <constant>false</constant>
310 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
311 <log loggingLevel="ERROR"
312 message="STOP request failed for loop: $${header.loopName}" />
314 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
319 <put uri="/v2/loop/restart/{loopName}"
320 outType="org.onap.clamp.loop.Loop" produces="application/json">
322 <removeHeaders pattern="*" excludePattern="loopName" />
324 <log loggingLevel="INFO"
325 message="RESTART request for loop: ${header.loopName}" />
327 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*,'RESTART request')" />
329 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
330 <to uri="direct:load-loop" />
333 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request','INFO',${exchangeProperty[loopObject]})" />
335 <to uri="direct:add-all-to-active-pdp-group" />
336 <log loggingLevel="INFO"
337 message="RESTART request successfully executed for loop: ${header.loopName}" />
339 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request successfully executed','INFO',${exchangeProperty[loopObject]})" />
341 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
343 <exception>java.lang.Exception</exception>
345 <constant>false</constant>
348 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
349 <log loggingLevel="ERROR"
350 message="RESTART request failed for loop: ${header.loopName}" />
352 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','INFO',${exchangeProperty[loopObject]})" />
357 <put uri="/v2/loop/submit/{loopName}"
358 outType="org.onap.clamp.loop.Loop" produces="application/json">
360 <removeHeaders pattern="*" excludePattern="loopName" />
362 <log loggingLevel="INFO"
363 message="POLICY SUBMIT request for loop: ${header.loopName}" />
365 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'POLICY SUBMIT request')" />
367 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
368 <to uri="direct:load-loop" />
370 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('POLICY SUBMIT request','INFO',${exchangeProperty[loopObject]})" />
371 <setProperty propertyName="raiseHttpExceptionFlag">
372 <simple resultType="java.lang.Boolean">false</simple>
374 <to uri="direct:remove-all-policy-from-active-pdp-group" />
375 <log loggingLevel="INFO"
376 message="Processing all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" />
378 <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
380 <setProperty propertyName="policy">
381 <simple>${body}</simple>
383 <log loggingLevel="INFO"
384 message="Processing Micro Service Policy: ${exchangeProperty[policy].getName()}" />
385 <setProperty propertyName="raiseHttpExceptionFlag">
386 <simple resultType="java.lang.Boolean">false</simple>
388 <to uri="direct:delete-policy" />
389 <to uri="direct:create-policy" />
391 <log loggingLevel="INFO"
392 message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" />
394 <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
396 <setProperty propertyName="policy">
397 <simple>${body}</simple>
399 <log loggingLevel="INFO"
400 message="Processing Operational Policy: ${exchangeProperty[policy].getName()}" />
401 <setProperty propertyName="raiseHttpExceptionFlag">
402 <simple resultType="java.lang.Boolean">false</simple>
405 <to uri="direct:delete-policy" />
406 <to uri="direct:create-policy" />
409 <simple>${exchangeProperty['policy'].isLegacy()} == true
411 <log loggingLevel="INFO"
412 message="Processing all GUARD policies (LEGACY) defined in loop ${exchangeProperty[loopObject].getName()}" />
414 <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
416 <setProperty propertyName="guardPolicy">
417 <simple>${body}</simple>
419 <log loggingLevel="INFO"
420 message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
422 <setProperty propertyName="raiseHttpExceptionFlag">
423 <simple resultType="java.lang.Boolean">false</simple>
425 <to uri="direct:delete-guard-policy" />
426 <to uri="direct:create-guard-policy" />
433 <constant>3000</constant>
436 <to uri="direct:add-all-to-active-pdp-group" />
438 <log loggingLevel="INFO"
439 message="SUBMIT request successfully executed for loop: ${header.loopName}" />
441 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${exchangeProperty[loopObject]})" />
443 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
445 <exception>java.lang.Exception</exception>
447 <constant>false</constant>
450 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
451 <log loggingLevel="ERROR"
452 message="SUBMIT request failed for loop: ${header.loopName}" />
454 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
459 <put uri="/v2/loop/delete/{loopName}">
461 <removeHeaders pattern="*" excludePattern="loopName" />
463 <log loggingLevel="INFO"
464 message="DELETE request for loop: ${header.loopName}" />
466 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*,'DELETE request')" />
468 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
469 <to uri="direct:load-loop" />
471 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request','INFO',${exchangeProperty[loopObject]})" />
472 <to uri="direct:undeploy-loop" />
473 <to uri="direct:remove-all-policy-from-active-pdp-group" />
475 <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
477 <setProperty propertyName="microServicePolicy">
478 <simple>${body}</simple>
480 <log loggingLevel="INFO"
481 message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" />
482 <to uri="direct:delete-micro-service-policy" />
485 <log loggingLevel="INFO"
486 message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" />
488 <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
490 <setProperty propertyName="operationalPolicy">
491 <simple>${body}</simple>
493 <log loggingLevel="INFO"
494 message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" />
495 <to uri="direct:delete-operational-policy" />
496 <log loggingLevel="INFO"
497 message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" />
499 <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
501 <setProperty propertyName="guardPolicy">
502 <simple>${body}</simple>
504 <log loggingLevel="INFO"
505 message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
506 <to uri="direct:delete-guard-policy" />
510 uri="bean:org.onap.clamp.loop.log.LoopController?method=deleteLoop(${header.loopName})" />
511 <log loggingLevel="INFO"
512 message="DELETE request successfully executed for loop: ${header.loopName}" />
514 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${exchangeProperty[loopObject]})" />
516 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
518 <exception>java.lang.Exception</exception>
520 <constant>false</constant>
523 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
524 <log loggingLevel="ERROR"
525 message="DELETE request failed for loop: ${header.loopName}" />
527 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
532 <get uri="/v2/loop/getstatus/{loopName}"
533 outType="org.onap.clamp.loop.Loop" produces="application/json">
535 <removeHeaders pattern="*" excludePattern="loopName" />
537 <log loggingLevel="INFO"
538 message="GET STATUS request for loop: ${header.loopName}" />
540 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET STATUS request')" />
542 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
543 <to uri="direct:load-loop" />
545 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request','INFO',${exchangeProperty[loopObject]})" />
547 <to uri="direct:update-policy-status-for-loop" />
548 <to uri="direct:update-dcae-status-for-loop" />
549 <to uri="direct:update-loop-state" />
552 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request successfully executed','INFO',${exchangeProperty[loopObject]})" />
554 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
557 <exception>java.lang.Exception</exception>
559 <constant>false</constant>
562 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
563 <log loggingLevel="ERROR"
564 message="Get Status request failed for loop: ${header.loopName}" />
566 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
570 <simple>${exchangeProperty[loopObject]}</simple>
577 <put uri="/v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}" outType="org.onap.clamp.loop.Loop" produces="application/json">
579 <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion" />
582 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add operational Policy')" />
584 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
585 <to uri="direct:load-loop" />
587 uri="bean:org.onap.clamp.loop.LoopController?method=addOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})" />
589 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
591 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
593 <exception>java.lang.Exception</exception>
595 <constant>false</constant>
598 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
599 <log loggingLevel="ERROR"
600 message="ADD OperationalPolicy request failed for loop: ${header.loopName}" />
602 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" />
607 <put uri="/v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}" outType="org.onap.clamp.loop.Loop" produces="application/json">
609 <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion" />
612 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REMOVE operational Policy')" />
614 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
615 <to uri="direct:load-loop" />
617 uri="bean:org.onap.clamp.loop.LoopController?method=removeOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})" />
619 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
621 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
623 <exception>java.lang.Exception</exception>
625 <constant>false</constant>
628 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
629 <log loggingLevel="ERROR"
630 message="REMOVE OperationalPolicy request failed for loop: ${header.loopName}" />
632 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" />
638 uri="/v2/loop/create/{loopName}?templateName={templateName}"
639 outType="org.onap.clamp.loop.Loop" consumes="application/json"
640 produces="application/json">
644 excludePattern="loopName|templateName" />
647 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Create Loop')" />
649 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
651 uri="bean:org.onap.clamp.loop.LoopController?method=createLoop(${header.loopName}, ${header.templateName})" />
653 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
655 <exception>java.lang.Exception</exception>
657 <constant>true</constant>
659 <setHeader headerName="CamelHttpResponseCode">
660 <constant>500</constant>
663 <simple>ERROR: ${exception.message}</simple>
666 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
671 <get uri="/v2/dictionary"
672 outType="org.onap.clamp.tosca.Dictionary" produces="application/json">
674 <removeHeaders pattern="*" />
677 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionaries')" />
679 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
681 uri="bean:org.onap.clamp.tosca.DictionaryService?method=getAllDictionaries()" />
683 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
685 <exception>java.lang.Exception</exception>
687 <constant>false</constant>
690 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
696 <get uri="/v2/dictionary/secondary/names"
697 outType="java.lang.String[]" produces="application/json">
699 <removeHeaders pattern="*" />
702 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Secondary Dictionary Level Names')" />
704 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
706 uri="bean:org.onap.clamp.tosca.DictionaryService?method=getAllSecondaryLevelDictionaryNames()" />
708 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
710 <exception>java.lang.Exception</exception>
712 <constant>false</constant>
715 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
720 <get uri="/v2/dictionary/{dictionaryName}"
721 outType="org.onap.clamp.tosca.Dictionary" produces="application/json">
723 <removeHeaders pattern="*"
724 excludePattern="dictionaryName" />
727 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionary Elements for a Dictionary Name')" />
729 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
731 uri="bean:org.onap.clamp.tosca.DictionaryService?method=getDictionary(${header.dictionaryName})" />
733 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
735 <exception>java.lang.Exception</exception>
737 <constant>false</constant>
740 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
745 <put uri="/v2/dictionary" type="org.onap.clamp.tosca.Dictionary"
746 outType="org.onap.clamp.tosca.Dictionary" consumes="application/json"
747 produces="application/json">
751 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary')" />
753 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
754 <setProperty propertyName="DictionaryObject">
755 <simple>${body}</simple>
758 uri="bean:org.onap.clamp.tosca.DictionaryService?method=saveOrUpdateDictionary(${exchangeProperty[DictionaryObject]})" />
760 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
762 <exception>java.lang.Exception</exception>
764 <constant>false</constant>
767 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
773 <put uri="/v2/dictionary/{name}"
774 type="org.onap.clamp.tosca.Dictionary"
775 outType="org.onap.clamp.tosca.Dictionary" consumes="application/json"
776 produces="application/json">
778 <removeHeaders pattern="*" excludePattern="name" />
781 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary Element')" />
783 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
784 <setProperty propertyName="DictionaryObject">
785 <simple>${body}</simple>
788 uri="bean:org.onap.clamp.tosca.DictionaryService?method=saveOrUpdateDictionaryElement(${header.name}, ${exchangeProperty[DictionaryObject]})" />
790 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
792 <exception>java.lang.Exception</exception>
794 <constant>false</constant>
797 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
803 <delete uri="/v2/dictionary/{name}" produces="application/json">
805 <removeHeaders pattern="*" excludePattern="name" />
808 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary')" />
810 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
812 uri="bean:org.onap.clamp.tosca.DictionaryService?method=deleteDictionary(${header.name})" />
814 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
816 <exception>java.lang.Exception</exception>
818 <constant>false</constant>
821 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
827 <delete uri="/v2/dictionary/{name}/elements/{shortName}"
828 produces="application/json">
830 <removeHeaders pattern="*"
831 excludePattern="name|shortName" />
834 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary Element')" />
836 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
838 uri="bean:org.onap.clamp.tosca.DictionaryService?method=deleteDictionaryElement(${header.name}, ${header.shortName})" />
840 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
842 <exception>java.lang.Exception</exception>
844 <constant>false</constant>
847 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
853 <get uri="/v2/policyToscaModels"
854 outType="org.onap.clamp.loop.template.PolicyModel"
855 produces="application/json">
857 <removeHeaders pattern="*" />
860 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Tosca Policy Models')" />
862 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
864 uri="bean:org.onap.clamp.loop.template.PolicyModelsService?method=getAllPolicyModels()" />
866 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
868 <exception>java.lang.Exception</exception>
870 <constant>true</constant>
872 <setHeader headerName="CamelHttpResponseCode">
873 <constant>500</constant>
876 <simple>ERROR: ${exception.message}</simple>
879 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
884 <get uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}"
885 outType="org.onap.clamp.loop.template.PolicyModel"
886 produces="application/json">
888 <removeHeaders pattern="*"
889 excludePattern="policyModelType|policyModelVersion" />
892 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model by Name/Version')" />
894 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
896 uri="bean:org.onap.clamp.loop.template.PolicyModelsService?method=getPolicyModelByType(${header.policyModelType},${header.policyModelVersion})" />
898 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
900 <exception>java.lang.Exception</exception>
902 <constant>true</constant>
904 <setHeader headerName="CamelHttpResponseCode">
905 <constant>500</constant>
908 <simple>ERROR: ${exception.message}</simple>
911 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
916 <get uri="/v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}"
917 outType="java.lang.String" produces="application/json">
919 <removeHeaders pattern="*"
920 excludePattern="policyModelType|policyModelVersion" />
923 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model Yaml String by Name/Version')" />
925 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
927 uri="bean:org.onap.clamp.loop.template.PolicyModelsService?method=getPolicyModelTosca(${header.policyModelType},${header.policyModelVersion})" />
929 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
931 <exception>java.lang.Exception</exception>
933 <constant>true</constant>
935 <setHeader headerName="CamelHttpResponseCode">
936 <constant>500</constant>
939 <simple>ERROR: ${exception.message}</simple>
942 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
948 <post uri="/v2/policyToscaModels"
949 type="java.lang.String"
950 outType="org.onap.clamp.loop.template.PolicyModel"
951 consumes="plain/text" produces="application/json">
953 <removeHeaders pattern="*"/>
956 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')" />
958 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
959 <setProperty propertyName="PolicyModelTosca">
960 <simple>${body}</simple>
963 uri="bean:org.onap.clamp.loop.template.PolicyModelsService?method=createNewPolicyModelFromTosca(${exchangeProperty[PolicyModelTosca]})" />
965 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
967 <exception>java.lang.Exception</exception>
969 <constant>true</constant>
971 <setHeader headerName="CamelHttpResponseCode">
972 <constant>404</constant>
975 <simple>ERROR: ${exception.message}</simple>
978 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
983 <put uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}"
984 type="java.lang.String"
985 outType="org.onap.clamp.loop.template.PolicyModel"
986 consumes="plain/text" produces="application/json">
988 <removeHeaders pattern="*"
989 excludePattern="policyModelType|policyModelVersion" />
992 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')" />
994 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
995 <setProperty propertyName="PolicyModelTosca">
996 <simple>${body}</simple>
999 uri="bean:org.onap.clamp.loop.template.PolicyModelsService?method=updatePolicyModelTosca(${header.policyModelType},${policyModelVersion},${exchangeProperty[PolicyModelTosca]})" />
1001 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1003 <exception>java.lang.Exception</exception>
1005 <constant>true</constant>
1007 <setHeader headerName="CamelHttpResponseCode">
1008 <constant>404</constant>
1011 <simple>ERROR: ${exception.message}</simple>
1014 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1020 <get uri="/v2/templates"
1021 outType="org.onap.clamp.loop.template.LoopTemplate"
1022 produces="application/json">
1024 <removeHeaders pattern="*" />
1027 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Templates')" />
1029 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
1031 uri="bean:org.onap.clamp.loop.template.LoopTemplatesService?method=getAllLoopTemplates()" />
1033 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1035 <exception>java.lang.Exception</exception>
1037 <constant>true</constant>
1039 <setHeader headerName="CamelHttpResponseCode">
1040 <constant>500</constant>
1043 <simple>ERROR: ${exception.message}</simple>
1046 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1051 <get uri="/v2/templates/{templateName}"
1052 outType="org.onap.clamp.loop.template.LoopTemplate"
1053 produces="application/json">
1055 <removeHeaders pattern="*"
1056 excludePattern="templateName" />
1059 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET a Template by NAME')" />
1061 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
1063 uri="bean:org.onap.clamp.loop.template.LoopTemplatesService?method=getLoopTemplate(${header.templateName})" />
1065 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1067 <exception>java.lang.Exception</exception>
1069 <constant>true</constant>
1071 <setHeader headerName="CamelHttpResponseCode">
1072 <constant>500</constant>
1075 <simple>ERROR: ${exception.message}</simple>
1078 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1083 <get uri="/v2/templates/names" outType="java.lang.String[]"
1084 produces="application/json">
1086 <removeHeaders pattern="*" />
1089 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop Template Names')" />
1091 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
1093 uri="bean:org.onap.clamp.loop.template.LoopTemplatesService?method=getLoopTemplateNames()" />
1095 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1097 <exception>java.lang.Exception</exception>
1099 <constant>false</constant>
1102 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1107 <get uri="/v2/templates/{templateName}/svgRepresentation"
1108 outType="java.lang.String" produces="application/xml">
1110 <removeHeaders pattern="*" excludePattern="templateName" />
1113 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation for Loop template')" />
1115 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
1117 uri="bean:org.onap.clamp.loop.template.LoopTemplatesService?method=getSvgRepresentation(${header.templateName})" />
1119 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
1121 <exception>java.lang.Exception</exception>
1123 <constant>false</constant>
1126 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
1131 <get uri="/v2/clampInformation" outType="org.onap.clamp.clds.model.ClampInformation"
1132 produces="application/json">
1134 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=getClampInformation()" />