sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame^] | 1 | <rests xmlns="http://camel.apache.org/schema/spring"> |
| 2 | <rest> |
| 3 | <get |
| 4 | uri="/v2/loop/getAllNames" |
| 5 | outType="java.lang.String[]" |
| 6 | produces="application/json"> |
| 7 | <route> |
| 8 | <to |
| 9 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> |
| 10 | <to |
| 11 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" /> |
| 12 | </route> |
| 13 | </get> |
| 14 | <get |
| 15 | uri="/v2/loop/{loopName}" |
| 16 | outType="org.onap.clamp.loop.Loop" |
| 17 | produces="application/json"> |
| 18 | <route> |
| 19 | <to |
| 20 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> |
| 21 | <to |
| 22 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> |
| 23 | </route> |
| 24 | </get> |
| 25 | <get |
| 26 | uri="/v2/loop/svgRepresentation/{loopName}" |
| 27 | outType="java.lang.String" |
| 28 | produces="application/xml"> |
| 29 | <route> |
| 30 | <to |
| 31 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> |
| 32 | <to |
| 33 | uri="bean:org.onap.clamp.loop.LoopController?method=getSVGRepresentation(${header.loopName})" /> |
| 34 | </route> |
| 35 | </get> |
michal.banka | 89695a3 | 2019-03-12 13:01:26 +0100 | [diff] [blame] | 36 | |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame^] | 37 | <post |
| 38 | uri="/v2/loop/updateGlobalProperties/{loopName}" |
| 39 | type="com.google.gson.JsonObject" |
| 40 | consumes="application/json" |
| 41 | outType="org.onap.clamp.loop.Loop" |
| 42 | produces="application/json"> |
| 43 | <route> |
| 44 | <to |
| 45 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 46 | <to |
| 47 | uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${body})" /> |
| 48 | </route> |
| 49 | </post> |
| 50 | <post |
| 51 | uri="/v2/loop/updateOperationalPolicies/{loopName}" |
| 52 | type="com.google.gson.JsonArray" |
| 53 | consumes="application/json" |
| 54 | outType="org.onap.clamp.loop.Loop" |
| 55 | produces="application/json"> |
| 56 | <route> |
| 57 | <to |
| 58 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 59 | <to |
| 60 | uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${body})" /> |
| 61 | </route> |
| 62 | </post> |
| 63 | <post |
| 64 | uri="/v2/loop/updateMicroservicePolicy/{loopName}" |
| 65 | type="org.onap.clamp.policy.microservice.MicroServicePolicy" |
| 66 | consumes="application/json" |
| 67 | outType="org.onap.clamp.policy.microservice.MicroServicePolicy" |
| 68 | produces="application/json"> |
| 69 | <route> |
| 70 | <to |
| 71 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 72 | <to |
| 73 | uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${body})" /> |
| 74 | </route> |
| 75 | </post> |
| 76 | <put |
| 77 | uri="/v2/loop/deployLoop/{loopName}" |
| 78 | outType="org.onap.clamp.loop.Loop" |
| 79 | produces="application/json"> |
| 80 | <route> |
| 81 | <to |
| 82 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 83 | <to |
| 84 | uri="bean:org.onap.clamp.operation.LoopOperation?method=deployLoop(*,${header.loopName})" /> |
| 85 | </route> |
| 86 | </put> |
| 87 | <put |
| 88 | uri="/v2/loop/undeployLoop/{loopName}" |
| 89 | outType="org.onap.clamp.loop.Loop" |
| 90 | produces="application/json"> |
| 91 | <route> |
| 92 | <to |
| 93 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 94 | <to |
| 95 | uri="bean:org.onap.clamp.operation.LoopOperation?method=unDeployLoop(${header.loopName})" /> |
| 96 | </route> |
| 97 | </put> |
| 98 | <put uri="/v2/loop/submit/{loopName}"> |
| 99 | <route> |
| 100 | <setBody> |
| 101 | <simple>${header.loopName}</simple> |
| 102 | </setBody> |
| 103 | <log |
| 104 | loggingLevel="INFO" |
| 105 | message="Loop name received: ${body}"></log> |
| 106 | <to |
| 107 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 108 | <setHeader headerName="LoopObject"> |
| 109 | <method |
| 110 | ref="org.onap.clamp.loop.LoopService" |
| 111 | method="getLoop" /> |
| 112 | </setHeader> |
| 113 | <split streaming="true"> |
| 114 | <simple>${header.LoopObject.getMicroServicePolicies()} |
| 115 | </simple> |
| 116 | <setHeader headerName="HttpQueryException"> |
| 117 | <simple resultType="java.lang.Boolean">false</simple> |
| 118 | </setHeader> |
| 119 | <to uri="direct:delete-micro-service"/> |
| 120 | |
| 121 | <setHeader headerName="HttpQueryException"> |
| 122 | <simple resultType="java.lang.Boolean">true</simple> |
| 123 | </setHeader> |
| 124 | <setBody> |
| 125 | <simple>${body.createPolicyPayload()}</simple> |
| 126 | </setBody> |
| 127 | <to uri="direct:create-micro-service"/> |
| 128 | |
| 129 | </split> |
| 130 | </route> |
| 131 | </put> |
| 132 | <put |
| 133 | uri="/v2/loop/delete/{loopName}"> |
| 134 | <route> |
| 135 | <to |
| 136 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 137 | <to |
| 138 | uri="bean:org.onap.clamp.operation.LoopOperation?method=deleteMsPolicies(${header.loopName})" /> |
| 139 | <to |
| 140 | uri="bean:org.onap.clamp.operation.LoopOperation?method=deleteOpPolicy(${header.loopName})" /> |
| 141 | <to |
| 142 | uri="bean:org.onap.clamp.operation.LoopOperation?method=deleteGuardPolicy(${header.loopName})" /> |
| 143 | </route> |
| 144 | </put> |
| 145 | </rest> |
Krysiak Adam | 5f14c7a | 2019-03-01 15:32:19 +0100 | [diff] [blame] | 146 | </rests> |
| 147 | |