From ee7faff4b6e292237ccdac5e19cd0b438ea91e52 Mon Sep 17 00:00:00 2001 From: "saul.gill" Date: Wed, 9 Jun 2021 14:24:00 +0100 Subject: Create camel endpoint to get tosca from runtime Endpoint points to Runtime Tosca Service Template endpoint Added new authorization role for control loop Credentials in configuration file Issue-ID: POLICY-3222 Change-Id: I86f8cc5751547abfa15e10903d7e2fb2854f1ece Signed-off-by: saul.gill --- .../main/resources/META-INF/resources/swagger.html | 201 +++++++++++++-------- .../main/resources/application-noaaf.properties | 7 +- runtime/src/main/resources/application.properties | 7 +- .../resources/clds/camel/rest/clamp-api-v2.xml | 38 ++++ .../clds/camel/routes/controlloop-flows.xml | 33 ++++ 5 files changed, 205 insertions(+), 81 deletions(-) create mode 100644 runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml (limited to 'runtime/src/main') diff --git a/runtime/src/main/resources/META-INF/resources/swagger.html b/runtime/src/main/resources/META-INF/resources/swagger.html index f7fbeb039..64530f1c3 100644 --- a/runtime/src/main/resources/META-INF/resources/swagger.html +++ b/runtime/src/main/resources/META-INF/resources/swagger.html @@ -444,31 +444,31 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • 2. Paths
  • 3. Definitions @@ -748,7 +754,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    1.2. URI scheme

    -

    Host : localhost:37747
    +

    Host : localhost:33201
    BasePath : /restservices/clds/
    Schemes : HTTP

    @@ -759,7 +765,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    2. Paths

    -

    2.1. GET /v1/healthcheck

    +

    2.1. GET /v1/healthcheck

    2.1.1. Responses

    @@ -796,7 +802,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -830,7 +836,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -867,7 +873,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -904,7 +910,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -976,7 +982,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1013,7 +1019,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1075,7 +1081,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1153,7 +1159,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1212,7 +1218,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1277,7 +1283,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1351,7 +1357,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1429,7 +1435,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1478,7 +1484,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1540,7 +1546,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1577,7 +1583,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1639,7 +1645,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1707,7 +1713,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1775,7 +1781,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1855,7 +1861,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1917,7 +1923,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -1979,7 +1985,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2041,7 +2047,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2103,7 +2109,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2181,7 +2187,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2259,7 +2265,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2337,7 +2343,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2399,7 +2405,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2436,7 +2442,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2495,7 +2501,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2554,7 +2560,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2650,7 +2656,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2717,7 +2723,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2754,7 +2760,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2822,7 +2828,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2890,7 +2896,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2927,7 +2933,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -2964,7 +2970,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    @@ -3025,6 +3031,43 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b +
    +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    Output type

    string

    +
    +
    +

    2.39.2. Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    +
    +
    +
    @@ -4501,8 +4544,8 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    - + \ No newline at end of file diff --git a/runtime/src/main/resources/application-noaaf.properties b/runtime/src/main/resources/application-noaaf.properties index 1145b393d..a8f4399c4 100644 --- a/runtime/src/main/resources/application-noaaf.properties +++ b/runtime/src/main/resources/application-noaaf.properties @@ -187,4 +187,9 @@ clamp.config.tosca.converter.dictionary.support.enabled=true # Configuration settings for CDS clamp.config.cds.url=http://cds-blueprints-processor-http:8080 clamp.config.cds.userName=ccsdkapps -clamp.config.cds.password=ccsdkapps \ No newline at end of file +clamp.config.cds.password=ccsdkapps + +# Configuration settings for ControlLoop Runtime Rest API +clamp.config.controlloop.runtime.url=http://localhost:6969 +clamp.config.controlloop.runtime.userName=healthcheck +clamp.config.controlloop.runtime.password=zb!XztG34 diff --git a/runtime/src/main/resources/application.properties b/runtime/src/main/resources/application.properties index 3cbb7e8af..64097e88e 100644 --- a/runtime/src/main/resources/application.properties +++ b/runtime/src/main/resources/application.properties @@ -200,4 +200,9 @@ clamp.config.tosca.converter.dictionary.support.enabled=true # Configuration settings for CDS clamp.config.cds.url=http://cds-blueprints-processor-http:8080 clamp.config.cds.userName=ccsdkapps -clamp.config.cds.password=ccsdkapps \ No newline at end of file +clamp.config.cds.password=ccsdkapps + +# Configuration settings for ControlLoop Runtime Rest API +clamp.config.controlloop.runtime.url=http://localhost:6969 +clamp.config.controlloop.runtime.userName=healthcheck +clamp.config.controlloop.runtime.password=zb!XztG34 diff --git a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml index 4659a90bf..6a5da8710 100644 --- a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -1461,6 +1461,44 @@ + + + + + + + + application/json + + + true + + + + + java.lang.Exception + + true + + + + + 500 + + + GET Tosca Service Template JSON FAILED + + + + + + diff --git a/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml b/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml new file mode 100644 index 000000000..b1fad103b --- /dev/null +++ b/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml @@ -0,0 +1,33 @@ + + + + + + + + GET + + + application/json + + + ${header.name} + + + ${header.version} + + + + + + + + + + + -- cgit 1.2.3-korg