diff options
author | sebdet <sebastien.determe@intl.att.com> | 2019-10-08 17:53:08 +0200 |
---|---|---|
committer | Sébastien Determe <sebastien.determe@intl.att.com> | 2019-10-08 16:41:30 +0000 |
commit | 74303b71e884cbaf6099031973d6c37e31c55bf3 (patch) | |
tree | c73a6112e2db01d7179a4803a6dd046dd4366f4a /src/main/resources | |
parent | 0efeb6b141cb4abe84af8eb38e26d5ed1ab73bb0 (diff) |
DCAE inventory calls in camel
Move the HTTP/HTTPS calls to camel so that there is no issue with the
previous code that does not support the config required for HTTP4 Camel
Issue-ID: CLAMP-532
Change-Id: I83db0da5bbe6906890d0d6aa9b529c264e5f9b20
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/application-noaaf.properties | 7 | ||||
-rw-r--r-- | src/main/resources/application.properties | 9 | ||||
-rw-r--r-- | src/main/resources/clds/camel/routes/dcae-flows.xml | 34 | ||||
-rw-r--r-- | src/main/resources/clds/camel/routes/flexible-flow.xml | 78 |
4 files changed, 37 insertions, 91 deletions
diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties index 580ec3f48..79466c89f 100644 --- a/src/main/resources/application-noaaf.properties +++ b/src/main/resources/application-noaaf.properties @@ -208,15 +208,10 @@ clamp.config.action.insert.test.event=false clamp.config.clds.service.cache.invalidate.after.seconds=120 #DCAE Inventory Url Properties -clamp.config.dcae.inventory.url=http://localhost:8085 +clamp.config.dcae.inventory.url=http4://localhost:8085 clamp.config.dcae.intentory.retry.interval=10000 clamp.config.dcae.intentory.retry.limit=5 -#DCAE Dispatcher Url Properties -clamp.config.dcae.dispatcher.url=http://localhost:8085 -clamp.config.dcae.dispatcher.retry.interval=20000 -clamp.config.dcae.dispatcher.retry.limit=30 - #DCAE Deployment Url Properties clamp.config.dcae.deployment.url=http4://localhost:8085 clamp.config.dcae.deployment.userName=test diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index dcad32ed9..64121c947 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -219,15 +219,10 @@ clamp.config.action.insert.test.event=false clamp.config.clds.service.cache.invalidate.after.seconds=120 #DCAE Inventory Url Properties -clamp.config.dcae.inventory.url=http://dcae.api.simpledemo.onap.org:8080 +clamp.config.dcae.inventory.url=http4://dcae.api.simpledemo.onap.org:8080 clamp.config.dcae.intentory.retry.interval=10000 clamp.config.dcae.intentory.retry.limit=5 -#DCAE Dispatcher Url Properties -clamp.config.dcae.dispatcher.url=http://dcae.api.simpledemo.onap.org:8188 -clamp.config.dcae.dispatcher.retry.interval=20000 -clamp.config.dcae.dispatcher.retry.limit=30 - #DCAE Deployment Url Properties clamp.config.dcae.deployment.url=http4://dcae.api.simpledemo.onap.org:8188 clamp.config.dcae.deployment.userName=test @@ -249,7 +244,7 @@ clamp.config.cadi.keyFile=classpath:/clds/aaf/org.onap.clamp.keyfile clamp.config.cadi.cadiLoglevel=DEBUG clamp.config.cadi.cadiLatitude=10 clamp.config.cadi.cadiLongitude=10 -clamp.config.cadi.aafLocateUrl=https://aaf.api.simpledemo.onap.org:8095 +clamp.config.cadi.aafLocateUrl=https://10.0.0.106:31111 clamp.config.cadi.cadiKeystorePassword=enc:V_kq_EwDNb4itWp_lYfDGXIWJzemHGkhkZOxAQI9IHs clamp.config.cadi.cadiTruststorePassword=enc:Mj0YQqNCUKbKq2lPp1kTFQWeqLxaBXKNwd5F1yB1ukf #clamp.config.cadi.oauthTokenUrl=https://AAF_LOCATE_URL/AAF_NS.token:2.0/token diff --git a/src/main/resources/clds/camel/routes/dcae-flows.xml b/src/main/resources/clds/camel/routes/dcae-flows.xml index 469358190..fb3bc90ec 100644 --- a/src/main/resources/clds/camel/routes/dcae-flows.xml +++ b/src/main/resources/clds/camel/routes/dcae-flows.xml @@ -177,6 +177,40 @@ <to uri="direct:dump-loop-log-http-response" /> </doFinally> </doTry> + </route> + <route id="get-dcae-blueprint-inventory"> + <from uri="direct:get-dcae-blueprint-inventory" /> + <log loggingLevel="INFO" + message="Getting DCAE blueprint id in inventory" /> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Getting blueprint id in inventory')" /> + <doTry> + <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 query Dcae inventory Loop status: {{clamp.config.dcae.inventory.url}}/dcae-service-types?${header[CamelHttpQuery]}"></log> + <toD + uri="{{clamp.config.dcae.inventory.url}}/dcae-service-types?asdcResourceId=${exchangeProperty[blueprintResourceId]}&asdcServiceId=${exchangeProperty[blueprintServiceId]}&typeName=${exchangeProperty[blueprintName]}&bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.dcae.deployment.userName}}&authPassword={{clamp.config.dcae.deployment.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=30000&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 diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml deleted file mode 100644 index bc79fc211..000000000 --- a/src/main/resources/clds/camel/routes/flexible-flow.xml +++ /dev/null @@ -1,78 +0,0 @@ -<routes xmlns="http://camel.apache.org/schema/spring"> - <route id="submit"> - <from uri="direct:processSubmit" /> - <choice> - <when> - <simple> ${exchangeProperty.actionCd} == 'SUBMIT' || - ${exchangeProperty.actionCd} == 'RESUBMIT' - </simple> - <to - uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'INITIATED')" /> - <to uri="bean:org.onap.clamp.clds.client.TcaPolicyDelegate" /> - <to uri="bean:org.onap.clamp.clds.client.HolmesPolicyDelegate" /> - <delay> - <constant>30000</constant> - </delay> - <to - uri="bean:org.onap.clamp.clds.client.OperationalPolicyDelegate" /> - <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDelegate" /> - <to - uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'COMPLETED')" /> - </when> - <when> - <simple> ${exchangeProperty.actionCd} == 'DELETE'</simple> - <to - uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'INITIATED')" /> - <to uri="bean:org.onap.clamp.clds.client.TcaPolicyDeleteDelegate" /> - <to - uri="bean:org.onap.clamp.clds.client.HolmesPolicyDeleteDelegate" /> - <delay> - <constant>30000</constant> - </delay> - <to - uri="bean:org.onap.clamp.clds.client.OperationalPolicyDeleteDelegate" /> - <to - uri="bean:org.onap.clamp.clds.client.GuardPolicyDeleteDelegate" /> - <to uri="bean:org.onap.clamp.clds.client.ModelDeleteDelegate" /> - <to - uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'COMPLETED')" /> - </when> - <when> - <simple> ${exchangeProperty.actionCd} == 'UPDATE'</simple> - <to - uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'INITIATED')" /> - <to uri="bean:org.onap.clamp.clds.client.TcaPolicyDelegate" /> - <to uri="bean:org.onap.clamp.clds.client.HolmesPolicyDelegate" /> - <delay> - <constant>30000</constant> - </delay> - <to - uri="bean:org.onap.clamp.clds.client.OperationalPolicyDelegate" /> - <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDelegate" /> - <to - uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'COMPLETED')" /> - </when> - <when> - <simple> ${exchangeProperty.actionCd} == 'STOP'</simple> - <to - uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'INITIATED')" /> - <to - uri="bean:org.onap.clamp.clds.client.OperationalPolicyDeleteDelegate" /> - <to - uri="bean:org.onap.clamp.clds.client.GuardPolicyDeleteDelegate" /> - <to - uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'COMPLETED')" /> - </when> - <when> - <simple> ${exchangeProperty.actionCd} == 'RESTART'</simple> - <to - uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'INITIATED')" /> - <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDelegate" /> - <to - uri="bean:org.onap.clamp.clds.client.OperationalPolicyDelegate" /> - <to - uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'COMPLETED')" /> - </when> - </choice> - </route> -</routes>
\ No newline at end of file |