diff options
author | xuegao <xg353y@intl.att.com> | 2020-02-18 14:20:23 +0100 |
---|---|---|
committer | xuegao <xg353y@intl.att.com> | 2020-02-26 15:59:25 +0100 |
commit | 3a26471260e56f7a87533f0147fc63530d6ea08c (patch) | |
tree | 400059c05ccb58b0e10d3ce1309085a944e394b8 /src/main/resources/clds/camel/routes/policy-flows.xml | |
parent | e0d0fdb5484d2c02669358160a11d6751ada4f3a (diff) |
Create get Pdp Groups flow
Create a camel flow to get the list of Pdp Groups info from Policy.
Create a scheduler to trigger the camel flow regularly and store
the Pdp Groups info into DB.
Issue-ID: CLAMP-644, CLAMP-649
Change-Id: I6427202cc0186cd85428d5d25b28a8622e4d7ca4
Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel/routes/policy-flows.xml')
-rw-r--r-- | src/main/resources/clds/camel/routes/policy-flows.xml | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml index c28e45435..ce37fe1d6 100644 --- a/src/main/resources/clds/camel/routes/policy-flows.xml +++ b/src/main/resources/clds/camel/routes/policy-flows.xml @@ -175,7 +175,7 @@ message="Endpoint to get policy model: {{clamp.config.policy.pap.url}}/policy/api/v1/policytypes/${exchangeProperty[policyModelName]}/versions/${exchangeProperty[policyModelVersion]}"></log> <toD uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyModelName]}/versions/${exchangeProperty[policyModelVersion]}?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> - <convertBodyTo type="java.lang.String"/> + <convertBodyTo type="java.lang.String"/> <doFinally> <to uri="direct:reset-raise-http-exception-flag"/> <to @@ -584,4 +584,38 @@ </doFinally> </doTry> </route> + <route id="get-all-pdp-groups"> + <from uri="direct:get-all-pdp-groups"/> + <doTry> + <log loggingLevel="INFO" + message="Getting the list of PDP Groups"/> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Getting the PDP Group list')"/> + <setHeader headerName="CamelHttpMethod"> + <constant>GET</constant> + </setHeader> + <setHeader headerName="X-ONAP-RequestID"> + <simple>${exchangeProperty[X-ONAP-RequestID]} + </simple> + </setHeader> + <setHeader headerName="X-ONAP-InvocationID"> + <simple>${exchangeProperty[X-ONAP-InvocationID]} + </simple> + </setHeader> + <setHeader headerName="X-ONAP-PartnerName"> + <simple>${exchangeProperty[X-ONAP-PartnerName]} + </simple> + </setHeader> + <log loggingLevel="INFO" + message="Endpoint to get policy model: {{clamp.config.policy.pap.url}}/policy/pap/v1/pdps"></log> + <toD + uri="{{clamp.config.policy.api.url}}/policy/pap/v1/pdps?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> + <convertBodyTo type="java.lang.String" /> + <doFinally> + <to uri="direct:reset-raise-http-exception-flag"/> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()"/> + </doFinally> + </doTry> + </route> </routes>
\ No newline at end of file |