Rework tosca converter 00/103400/3
authorsebdet <sebastien.determe@intl.att.com>
Mon, 9 Mar 2020 23:15:19 +0000 (16:15 -0700)
committersebdet <sebastien.determe@intl.att.com>
Tue, 10 Mar 2020 11:22:54 +0000 (04:22 -0700)
Fix the tosca converter template to support json instead of properties file.

Issue-ID: CLAMP-253
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: Id4f839d0b5bfece519b0b1e615e8d6e14e464f16

23 files changed:
docs/swagger/swagger.json
docs/swagger/swagger.pdf
extra/sql/dump/test-data.sql
src/main/java/org/onap/clamp/clds/tosca/update/Extractor.java
src/main/java/org/onap/clamp/clds/tosca/update/Field.java [new file with mode: 0644]
src/main/java/org/onap/clamp/clds/tosca/update/ParserToJson.java
src/main/java/org/onap/clamp/clds/tosca/update/Template.java
src/main/java/org/onap/clamp/clds/tosca/update/TemplateManagement.java
src/main/java/org/onap/clamp/policy/Policy.java
src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyService.java
src/main/resources/META-INF/resources/swagger.html
src/main/resources/application-noaaf.properties
src/main/resources/application.properties
src/main/resources/clds/tosca_update/templates.json [new file with mode: 0644]
src/test/java/org/onap/clamp/clds/tosca/update/ArrayFieldTest.java
src/test/java/org/onap/clamp/clds/tosca/update/ComponentTest.java
src/test/java/org/onap/clamp/clds/tosca/update/ConstraintTest.java
src/test/java/org/onap/clamp/clds/tosca/update/PropertyTest.java
src/test/java/org/onap/clamp/clds/tosca/update/TemplateManagementTest.java
src/test/java/org/onap/clamp/clds/tosca/update/TemplateTest.java
src/test/java/org/onap/clamp/policy/downloader/PolicyEngineControllerTestItCase.java
src/test/resources/application.properties

index e35fba2..3b34182 100644 (file)
@@ -4,13 +4,13 @@
     "version" : "5.0.0-SNAPSHOT",
     "title" : "Clamp Rest API"
   },
-  "host" : "localhost:40597",
+  "host" : "localhost:39237",
   "basePath" : "/restservices/clds/",
   "schemes" : [ "http" ],
   "paths" : {
     "/v2/dictionary" : {
       "get" : {
-        "operationId" : "route80",
+        "operationId" : "route49",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route80"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route49"
       },
       "put" : {
-        "operationId" : "route82",
+        "operationId" : "route51",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
@@ -43,8 +43,8 @@
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route82"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route51"
       }
     },
     "/v2/dictionary/{dictionaryName}" : {
@@ -64,7 +64,7 @@
             }
           }
         },
-        "x-camelContextId" : "camel-3",
+        "x-camelContextId" : "camel-2",
         "x-routeId" : null
       }
     },
             }
           }
         },
-        "x-camelContextId" : "camel-3",
+        "x-camelContextId" : "camel-2",
         "x-routeId" : null
       },
       "delete" : {
-        "operationId" : "route84",
+        "operationId" : "route53",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "name",
         "responses" : {
           "200" : { }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route84"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route53"
       }
     },
     "/v2/dictionary/{name}/elements/{shortName}" : {
         "responses" : {
           "200" : { }
         },
-        "x-camelContextId" : "camel-3",
+        "x-camelContextId" : "camel-2",
         "x-routeId" : null
       }
     },
             }
           }
         },
-        "x-camelContextId" : "camel-3",
+        "x-camelContextId" : "camel-2",
         "x-routeId" : null
       }
     },
     "/v2/loop/{loopName}" : {
       "get" : {
-        "operationId" : "route65",
+        "operationId" : "route34",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route65"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route34"
       }
     },
     "/v2/loop/delete/{loopName}" : {
       "put" : {
-        "operationId" : "route76",
+        "operationId" : "route45",
         "parameters" : [ {
           "name" : "loopName",
           "in" : "path",
         "responses" : {
           "200" : { }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route76"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route45"
       }
     },
     "/v2/loop/deploy/{loopName}" : {
       "put" : {
-        "operationId" : "route70",
+        "operationId" : "route39",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route70"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route39"
       }
     },
     "/v2/loop/getAllNames" : {
       "get" : {
-        "operationId" : "route64",
+        "operationId" : "route33",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route64"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route33"
       }
     },
     "/v2/loop/getstatus/{loopName}" : {
       "get" : {
-        "operationId" : "route77",
+        "operationId" : "route46",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route77"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route46"
       }
     },
     "/v2/loop/refreshOpPolicyJsonSchema/{loopName}" : {
       "put" : {
-        "operationId" : "route71",
+        "operationId" : "route40",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route71"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route40"
       }
     },
     "/v2/loop/restart/{loopName}" : {
       "put" : {
-        "operationId" : "route74",
+        "operationId" : "route43",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route74"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route43"
       }
     },
     "/v2/loop/stop/{loopName}" : {
       "put" : {
-        "operationId" : "route73",
+        "operationId" : "route42",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route73"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route42"
       }
     },
     "/v2/loop/submit/{loopName}" : {
       "put" : {
-        "operationId" : "route75",
+        "operationId" : "route44",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route75"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route44"
       }
     },
     "/v2/loop/svgRepresentation/{loopName}" : {
       "get" : {
-        "operationId" : "route66",
+        "operationId" : "route35",
         "produces" : [ "application/xml" ],
         "parameters" : [ {
           "name" : "loopName",
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route66"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route35"
       }
     },
     "/v2/loop/undeploy/{loopName}" : {
       "put" : {
-        "operationId" : "route72",
+        "operationId" : "route41",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route72"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route41"
       }
     },
     "/v2/loop/updateGlobalProperties/{loopName}" : {
       "post" : {
-        "operationId" : "route67",
+        "operationId" : "route36",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route67"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route36"
       }
     },
     "/v2/loop/updateMicroservicePolicy/{loopName}" : {
       "post" : {
-        "operationId" : "route69",
+        "operationId" : "route38",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route69"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route38"
       }
     },
     "/v2/loop/updateOperationalPolicies/{loopName}" : {
       "post" : {
-        "operationId" : "route68",
+        "operationId" : "route37",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route68"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route37"
       }
     },
     "/v2/policyToscaModels" : {
       "get" : {
-        "operationId" : "route87",
+        "operationId" : "route56",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route87"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route56"
       }
     },
     "/v2/policyToscaModels/{policyModelType}" : {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
+        "x-camelContextId" : "camel-2",
         "x-routeId" : null
       },
       "put" : {
-        "operationId" : "route88",
+        "operationId" : "route57",
         "consumes" : [ "plain/text" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route88"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route57"
       }
     },
     "/v2/policyToscaModels/yaml/{policyModelType}" : {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
+        "x-camelContextId" : "camel-2",
         "x-routeId" : null
       }
     },
     "/v2/templates" : {
       "get" : {
-        "operationId" : "route91",
+        "operationId" : "route60",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route91"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route60"
       }
     },
     "/v2/templates/{templateName}" : {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
+        "x-camelContextId" : "camel-2",
         "x-routeId" : null
       }
     },
             }
           }
         },
-        "x-camelContextId" : "camel-3",
+        "x-camelContextId" : "camel-2",
         "x-routeId" : null
       }
     },
     "/v1/healthcheck" : {
       "get" : {
-        "operationId" : "route92",
+        "operationId" : "route61",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
             }
           }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route92"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route61"
       }
     },
     "/v1/user/getUser" : {
       "get" : {
-        "operationId" : "route93",
+        "operationId" : "route62",
         "produces" : [ "text/plain" ],
         "responses" : {
           "200" : { }
         },
-        "x-camelContextId" : "camel-3",
-        "x-routeId" : "route93"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route62"
       }
     }
   },
     "JsonPrimitive" : {
       "type" : "object",
       "properties" : {
+        "asInt" : {
+          "type" : "integer",
+          "format" : "int32"
+        },
+        "asDouble" : {
+          "type" : "number",
+          "format" : "double"
+        },
+        "asLong" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "boolean" : {
+          "type" : "boolean"
+        },
         "asBoolean" : {
           "type" : "boolean"
         },
         "asNumber" : {
           "$ref" : "#/definitions/Number"
         },
-        "asDouble" : {
-          "type" : "number",
-          "format" : "double"
-        },
         "asFloat" : {
           "type" : "number",
           "format" : "float"
         },
-        "asLong" : {
-          "type" : "integer",
-          "format" : "int64"
-        },
-        "asInt" : {
-          "type" : "integer",
-          "format" : "int32"
-        },
         "asByte" : {
           "type" : "string",
           "format" : "byte"
           "type" : "integer",
           "format" : "int32"
         },
-        "boolean" : {
-          "type" : "boolean"
-        },
         "string" : {
           "type" : "boolean"
         },
-        "jsonObject" : {
-          "type" : "boolean"
+        "asJsonObject" : {
+          "$ref" : "#/definitions/JsonObject"
         },
         "asJsonArray" : {
           "$ref" : "#/definitions/JsonArray"
         },
-        "asJsonObject" : {
-          "$ref" : "#/definitions/JsonObject"
+        "jsonObject" : {
+          "type" : "boolean"
         },
         "jsonArray" : {
           "type" : "boolean"
     "JsonObject" : {
       "type" : "object",
       "properties" : {
-        "asBoolean" : {
-          "type" : "boolean"
+        "asInt" : {
+          "type" : "integer",
+          "format" : "int32"
         },
-        "jsonObject" : {
-          "type" : "boolean"
+        "asDouble" : {
+          "type" : "number",
+          "format" : "double"
         },
-        "asJsonArray" : {
-          "$ref" : "#/definitions/JsonArray"
+        "asLong" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "asBoolean" : {
+          "type" : "boolean"
         },
         "asJsonObject" : {
           "$ref" : "#/definitions/JsonObject"
         "asString" : {
           "type" : "string"
         },
+        "asJsonArray" : {
+          "$ref" : "#/definitions/JsonArray"
+        },
+        "jsonObject" : {
+          "type" : "boolean"
+        },
         "jsonArray" : {
           "type" : "boolean"
         },
         "asNumber" : {
           "$ref" : "#/definitions/Number"
         },
-        "asDouble" : {
-          "type" : "number",
-          "format" : "double"
-        },
         "asFloat" : {
           "type" : "number",
           "format" : "float"
         },
-        "asLong" : {
-          "type" : "integer",
-          "format" : "int64"
-        },
-        "asInt" : {
-          "type" : "integer",
-          "format" : "int32"
-        },
         "asByte" : {
           "type" : "string",
           "format" : "byte"
     "JsonNull" : {
       "type" : "object",
       "properties" : {
-        "asBoolean" : {
-          "type" : "boolean"
+        "asInt" : {
+          "type" : "integer",
+          "format" : "int32"
         },
-        "jsonObject" : {
-          "type" : "boolean"
+        "asDouble" : {
+          "type" : "number",
+          "format" : "double"
         },
-        "asJsonArray" : {
-          "$ref" : "#/definitions/JsonArray"
+        "asLong" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "asBoolean" : {
+          "type" : "boolean"
         },
         "asJsonObject" : {
           "$ref" : "#/definitions/JsonObject"
         "asString" : {
           "type" : "string"
         },
+        "asJsonArray" : {
+          "$ref" : "#/definitions/JsonArray"
+        },
+        "jsonObject" : {
+          "type" : "boolean"
+        },
         "jsonArray" : {
           "type" : "boolean"
         },
         "asNumber" : {
           "$ref" : "#/definitions/Number"
         },
-        "asDouble" : {
-          "type" : "number",
-          "format" : "double"
-        },
         "asFloat" : {
           "type" : "number",
           "format" : "float"
         },
-        "asLong" : {
-          "type" : "integer",
-          "format" : "int64"
-        },
-        "asInt" : {
-          "type" : "integer",
-          "format" : "int32"
-        },
         "asByte" : {
           "type" : "string",
           "format" : "byte"
     "JsonArray" : {
       "type" : "object",
       "properties" : {
+        "asInt" : {
+          "type" : "integer",
+          "format" : "int32"
+        },
+        "asDouble" : {
+          "type" : "number",
+          "format" : "double"
+        },
+        "asLong" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
         "asBoolean" : {
           "type" : "boolean"
         },
         "asNumber" : {
           "$ref" : "#/definitions/Number"
         },
-        "asDouble" : {
-          "type" : "number",
-          "format" : "double"
-        },
         "asFloat" : {
           "type" : "number",
           "format" : "float"
         },
-        "asLong" : {
-          "type" : "integer",
-          "format" : "int64"
-        },
-        "asInt" : {
-          "type" : "integer",
-          "format" : "int32"
-        },
         "asByte" : {
           "type" : "string",
           "format" : "byte"
           "type" : "integer",
           "format" : "int32"
         },
-        "jsonObject" : {
-          "type" : "boolean"
+        "asJsonObject" : {
+          "$ref" : "#/definitions/JsonObject"
         },
         "asJsonArray" : {
           "$ref" : "#/definitions/JsonArray"
         },
-        "asJsonObject" : {
-          "$ref" : "#/definitions/JsonObject"
+        "jsonObject" : {
+          "type" : "boolean"
         },
         "jsonArray" : {
           "type" : "boolean"
index b97c2cf..a1d7b18 100644 (file)
@@ -4,8 +4,8 @@
 << /Title (Clamp Rest API)
 /Creator (Asciidoctor PDF 1.5.0.alpha.10, based on Prawn 1.3.0)
 /Producer (Asciidoctor PDF 1.5.0.alpha.10, based on Prawn 1.3.0)
-/CreationDate (D:20200309090008-07'00')
-/ModDate (D:20200309090008-07'00')
+/CreationDate (D:20200309160816-07'00')
+/ModDate (D:20200309160816-07'00')
 >>
 endobj
 2 0 obj
@@ -5910,7 +5910,7 @@ ET
 BT
 71.30850000000001 592.176 Td
 /F1.0 10.5 Tf
-<203a206c6f63616c686f73743a3430353937> Tj
+<203a206c6f63616c686f73743a3339323337> Tj
 ET
 
 0.000 0.000 0.000 SCN
@@ -10857,8 +10857,8 @@ endobj
 [72 0 R /XYZ 0 108.12000000000052 null]
 endobj
 82 0 obj
-<< /Limits [(_route77) (_version_information)]
-/Names [(_route77) 94 0 R (_route80) 37 0 R (_route82) 41 0 R (_route84) 69 0 R (_route87) 169 0 R (_route88) 184 0 R (_route91) 193 0 R (_route92) 29 0 R (_route93) 34 0 R (_service) 303 0 R (_uri_scheme) 25 0 R (_v2_dictionary_dictionaryname_get) 55 0 R (_v2_dictionary_name_elements_shortname_delete) 75 0 R (_v2_dictionary_name_put) 62 0 R (_v2_dictionary_secondary_names_get) 50 0 R (_v2_policytoscamodels_policymodeltype_get) 179 0 R (_v2_policytoscamodels_yaml_policymodeltype_get) 173 0 R (_v2_templates_names_get) 198 0 R (_v2_templates_templatename_get) 201 0 R (_version_information) 23 0 R]
+<< /Limits [(_route46) (_version_information)]
+/Names [(_route46) 94 0 R (_route49) 37 0 R (_route51) 41 0 R (_route53) 69 0 R (_route56) 169 0 R (_route57) 184 0 R (_route60) 193 0 R (_route61) 29 0 R (_route62) 34 0 R (_service) 303 0 R (_uri_scheme) 25 0 R (_v2_dictionary_dictionaryname_get) 55 0 R (_v2_dictionary_name_elements_shortname_delete) 75 0 R (_v2_dictionary_name_put) 62 0 R (_v2_dictionary_secondary_names_get) 50 0 R (_v2_policytoscamodels_policymodeltype_get) 179 0 R (_v2_policytoscamodels_yaml_policymodeltype_get) 173 0 R (_v2_templates_names_get) 198 0 R (_v2_templates_templatename_get) 201 0 R (_version_information) 23 0 R]
 >>
 endobj
 83 0 obj
@@ -14929,8 +14929,8 @@ endobj
 [110 0 R /XYZ 0 481.68000000000046 null]
 endobj
 116 0 obj
-<< /Limits [(_responses_5) (_route76)]
-/Names [(_responses_5) 51 0 R (_responses_6) 59 0 R (_responses_7) 65 0 R (_responses_8) 73 0 R (_responses_9) 77 0 R (_route64) 91 0 R (_route65) 162 0 R (_route66) 126 0 R (_route67) 138 0 R (_route68) 154 0 R (_route69) 145 0 R (_route70) 85 0 R (_route71) 101 0 R (_route72) 131 0 R (_route73) 113 0 R (_route74) 106 0 R (_route75) 119 0 R (_route76) 79 0 R]
+<< /Limits [(_responses_5) (_route45)]
+/Names [(_responses_5) 51 0 R (_responses_6) 59 0 R (_responses_7) 65 0 R (_responses_8) 73 0 R (_responses_9) 77 0 R (_route33) 91 0 R (_route34) 162 0 R (_route35) 126 0 R (_route36) 138 0 R (_route37) 154 0 R (_route38) 145 0 R (_route39) 85 0 R (_route40) 101 0 R (_route41) 131 0 R (_route42) 113 0 R (_route43) 106 0 R (_route44) 119 0 R (_route45) 79 0 R]
 >>
 endobj
 117 0 obj
@@ -45551,7 +45551,7 @@ endobj
 endobj
 314 0 obj
 << /Border [0 0 0]
-/Dest (_route92)
+/Dest (_route61)
 /Subtype /Link
 /Rect [60.24000000000001 621.7799999999997 181.64100000000002 636.0599999999998]
 /Type /Annot
@@ -45559,7 +45559,7 @@ endobj
 endobj
 315 0 obj
 << /Border [0 0 0]
-/Dest (_route92)
+/Dest (_route61)
 /Subtype /Link
 /Rect [557.8905 621.7799999999997 563.76 636.0599999999998]
 /Type /Annot
@@ -45599,7 +45599,7 @@ endobj
 endobj
 320 0 obj
 << /Border [0 0 0]
-/Dest (_route93)
+/Dest (_route62)
 /Subtype /Link
 /Rect [60.24000000000001 566.3399999999997 183.8775 580.6199999999998]
 /Type /Annot
@@ -45607,7 +45607,7 @@ endobj
 endobj
 321 0 obj
 << /Border [0 0 0]
-/Dest (_route93)
+/Dest (_route62)
 /Subtype /Link
 /Rect [557.8905 566.3399999999997 563.76 580.6199999999998]
 /Type /Annot
@@ -45647,7 +45647,7 @@ endobj
 endobj
 326 0 obj
 << /Border [0 0 0]
-/Dest (_route80)
+/Dest (_route49)
 /Subtype /Link
 /Rect [60.24000000000001 510.89999999999975 172.716 525.1799999999997]
 /Type /Annot
@@ -45655,7 +45655,7 @@ endobj
 endobj
 327 0 obj
 << /Border [0 0 0]
-/Dest (_route80)
+/Dest (_route49)
 /Subtype /Link
 /Rect [557.8905 510.89999999999975 563.76 525.1799999999997]
 /Type /Annot
@@ -45695,7 +45695,7 @@ endobj
 endobj
 332 0 obj
 << /Border [0 0 0]
-/Dest (_route82)
+/Dest (_route51)
 /Subtype /Link
 /Rect [60.24000000000001 455.4599999999997 172.548 469.73999999999967]
 /Type /Annot
@@ -45703,7 +45703,7 @@ endobj
 endobj
 333 0 obj
 << /Border [0 0 0]
-/Dest (_route82)
+/Dest (_route51)
 /Subtype /Link
 /Rect [557.8905 455.4599999999997 563.76 469.73999999999967]
 /Type /Annot
@@ -45967,7 +45967,7 @@ endobj
 endobj
 366 0 obj
 << /Border [0 0 0]
-/Dest (_route84)
+/Dest (_route53)
 /Subtype /Link
 /Rect [60.24000000000001 141.29999999999953 232.70250000000001 155.57999999999953]
 /Type /Annot
@@ -45975,7 +45975,7 @@ endobj
 endobj
 367 0 obj
 << /Border [0 0 0]
-/Dest (_route84)
+/Dest (_route53)
 /Subtype /Link
 /Rect [557.8905 141.29999999999953 563.76 155.57999999999953]
 /Type /Annot
@@ -46095,7 +46095,7 @@ endobj
 endobj
 382 0 obj
 << /Border [0 0 0]
-/Dest (_route76)
+/Dest (_route45)
 /Subtype /Link
 /Rect [60.24000000000001 704.7599999999999 245.15550000000002 719.04]
 /Type /Annot
@@ -46103,7 +46103,7 @@ endobj
 endobj
 383 0 obj
 << /Border [0 0 0]
-/Dest (_route76)
+/Dest (_route45)
 /Subtype /Link
 /Rect [557.8905 704.7599999999999 563.76 719.04]
 /Type /Annot
@@ -46143,7 +46143,7 @@ endobj
 endobj
 388 0 obj
 << /Border [0 0 0]
-/Dest (_route70)
+/Dest (_route39)
 /Subtype /Link
 /Rect [60.24000000000001 649.3199999999998 248.431294921875 663.5999999999999]
 /Type /Annot
@@ -46151,7 +46151,7 @@ endobj
 endobj
 389 0 obj
 << /Border [0 0 0]
-/Dest (_route70)
+/Dest (_route39)
 /Subtype /Link
 /Rect [557.8905 649.3199999999998 563.76 663.5999999999999]
 /Type /Annot
@@ -46207,7 +46207,7 @@ endobj
 endobj
 396 0 obj
 << /Border [0 0 0]
-/Dest (_route64)
+/Dest (_route33)
 /Subtype /Link
 /Rect [60.24000000000001 575.3999999999997 214.8735 589.6799999999998]
 /Type /Annot
@@ -46215,7 +46215,7 @@ endobj
 endobj
 397 0 obj
 << /Border [0 0 0]
-/Dest (_route64)
+/Dest (_route33)
 /Subtype /Link
 /Rect [557.8905 575.3999999999997 563.76 589.6799999999998]
 /Type /Annot
@@ -46255,7 +46255,7 @@ endobj
 endobj
 402 0 obj
 << /Border [0 0 0]
-/Dest (_route77)
+/Dest (_route46)
 /Subtype /Link
 /Rect [60.24000000000001 519.9599999999998 259.467 534.2399999999998]
 /Type /Annot
@@ -46263,7 +46263,7 @@ endobj
 endobj
 403 0 obj
 << /Border [0 0 0]
-/Dest (_route77)
+/Dest (_route46)
 /Subtype /Link
 /Rect [557.8905 519.9599999999998 563.76 534.2399999999998]
 /Type /Annot
@@ -46319,7 +46319,7 @@ endobj
 endobj
 410 0 obj
 << /Border [0 0 0]
-/Dest (_route71)
+/Dest (_route40)
 /Subtype /Link
 /Rect [60.24000000000001 446.03999999999974 355.8885 460.3199999999997]
 /Type /Annot
@@ -46327,7 +46327,7 @@ endobj
 endobj
 411 0 obj
 << /Border [0 0 0]
-/Dest (_route71)
+/Dest (_route40)
 /Subtype /Link
 /Rect [557.8905 446.03999999999974 563.76 460.3199999999997]
 /Type /Annot
@@ -46383,7 +46383,7 @@ endobj
 endobj
 418 0 obj
 << /Border [0 0 0]
-/Dest (_route74)
+/Dest (_route43)
 /Subtype /Link
 /Rect [60.24000000000001 372.11999999999966 248.45250000000001 386.39999999999964]
 /Type /Annot
@@ -46391,7 +46391,7 @@ endobj
 endobj
 419 0 obj
 << /Border [0 0 0]
-/Dest (_route74)
+/Dest (_route43)
 /Subtype /Link
 /Rect [557.8905 372.11999999999966 563.76 386.39999999999964]
 /Type /Annot
@@ -46447,7 +46447,7 @@ endobj
 endobj
 426 0 obj
 << /Border [0 0 0]
-/Dest (_route73)
+/Dest (_route42)
 /Subtype /Link
 /Rect [60.24000000000001 298.1999999999996 235.842 312.47999999999956]
 /Type /Annot
@@ -46455,7 +46455,7 @@ endobj
 endobj
 427 0 obj
 << /Border [0 0 0]
-/Dest (_route73)
+/Dest (_route42)
 /Subtype /Link
 /Rect [557.8905 298.1999999999996 563.76 312.47999999999956]
 /Type /Annot
@@ -46511,7 +46511,7 @@ endobj
 endobj
 434 0 obj
 << /Border [0 0 0]
-/Dest (_route75)
+/Dest (_route44)
 /Subtype /Link
 /Rect [60.24000000000001 224.27999999999952 249.70200000000003 238.55999999999952]
 /Type /Annot
@@ -46519,7 +46519,7 @@ endobj
 endobj
 435 0 obj
 << /Border [0 0 0]
-/Dest (_route75)
+/Dest (_route44)
 /Subtype /Link
 /Rect [557.8905 224.27999999999952 563.76 238.55999999999952]
 /Type /Annot
@@ -46575,7 +46575,7 @@ endobj
 endobj
 442 0 obj
 << /Border [0 0 0]
-/Dest (_route66)
+/Dest (_route35)
 /Subtype /Link
 /Rect [60.24000000000001 150.35999999999956 307.641 164.63999999999956]
 /Type /Annot
@@ -46583,7 +46583,7 @@ endobj
 endobj
 443 0 obj
 << /Border [0 0 0]
-/Dest (_route66)
+/Dest (_route35)
 /Subtype /Link
 /Rect [557.8905 150.35999999999956 563.76 164.63999999999956]
 /Type /Annot
@@ -46639,7 +46639,7 @@ endobj
 endobj
 450 0 obj
 << /Border [0 0 0]
-/Dest (_route72)
+/Dest (_route41)
 /Subtype /Link
 /Rect [60.24000000000001 76.4399999999996 261.860794921875 90.7199999999996]
 /Type /Annot
@@ -46647,7 +46647,7 @@ endobj
 endobj
 451 0 obj
 << /Border [0 0 0]
-/Dest (_route72)
+/Dest (_route41)
 /Subtype /Link
 /Rect [557.8905 76.4399999999996 563.76 90.7199999999996]
 /Type /Annot
@@ -46703,7 +46703,7 @@ endobj
 endobj
 458 0 obj
 << /Border [0 0 0]
-/Dest (_route67)
+/Dest (_route36)
 /Subtype /Link
 /Rect [60.24000000000001 704.7599999999999 339.560794921875 719.04]
 /Type /Annot
@@ -46711,7 +46711,7 @@ endobj
 endobj
 459 0 obj
 << /Border [0 0 0]
-/Dest (_route67)
+/Dest (_route36)
 /Subtype /Link
 /Rect [552.021 704.7599999999999 563.76 719.04]
 /Type /Annot
@@ -46783,7 +46783,7 @@ endobj
 endobj
 468 0 obj
 << /Border [0 0 0]
-/Dest (_route69)
+/Dest (_route38)
 /Subtype /Link
 /Rect [60.24000000000001 612.3599999999998 350.38629492187505 626.6399999999999]
 /Type /Annot
@@ -46791,7 +46791,7 @@ endobj
 endobj
 469 0 obj
 << /Border [0 0 0]
-/Dest (_route69)
+/Dest (_route38)
 /Subtype /Link
 /Rect [552.021 612.3599999999998 563.76 626.6399999999999]
 /Type /Annot
@@ -46863,7 +46863,7 @@ endobj
 endobj
 478 0 obj
 << /Border [0 0 0]
-/Dest (_route68)
+/Dest (_route37)
 /Subtype /Link
 /Rect [60.24000000000001 519.9599999999998 352.81158984375 534.2399999999998]
 /Type /Annot
@@ -46871,7 +46871,7 @@ endobj
 endobj
 479 0 obj
 << /Border [0 0 0]
-/Dest (_route68)
+/Dest (_route37)
 /Subtype /Link
 /Rect [552.021 519.9599999999998 563.76 534.2399999999998]
 /Type /Annot
@@ -46943,7 +46943,7 @@ endobj
 endobj
 488 0 obj
 << /Border [0 0 0]
-/Dest (_route65)
+/Dest (_route34)
 /Subtype /Link
 /Rect [60.24000000000001 427.5599999999997 212.0595 441.8399999999997]
 /Type /Annot
@@ -46951,7 +46951,7 @@ endobj
 endobj
 489 0 obj
 << /Border [0 0 0]
-/Dest (_route65)
+/Dest (_route34)
 /Subtype /Link
 /Rect [552.021 427.5599999999997 563.76 441.8399999999997]
 /Type /Annot
@@ -47007,7 +47007,7 @@ endobj
 endobj
 496 0 obj
 << /Border [0 0 0]
-/Dest (_route87)
+/Dest (_route56)
 /Subtype /Link
 /Rect [60.24000000000001 353.63999999999965 221.091755859375 367.9199999999996]
 /Type /Annot
@@ -47015,7 +47015,7 @@ endobj
 endobj
 497 0 obj
 << /Border [0 0 0]
-/Dest (_route87)
+/Dest (_route56)
 /Subtype /Link
 /Rect [552.021 353.63999999999965 563.76 367.9199999999996]
 /Type /Annot
@@ -47183,7 +47183,7 @@ endobj
 endobj
 518 0 obj
 << /Border [0 0 0]
-/Dest (_route88)
+/Dest (_route57)
 /Subtype /Link
 /Rect [60.24000000000001 150.35999999999956 318.73125585937504 164.63999999999956]
 /Type /Annot
@@ -47191,7 +47191,7 @@ endobj
 endobj
 519 0 obj
 << /Border [0 0 0]
-/Dest (_route88)
+/Dest (_route57)
 /Subtype /Link
 /Rect [552.021 150.35999999999956 563.76 164.63999999999956]
 /Type /Annot
@@ -47263,7 +47263,7 @@ endobj
 endobj
 528 0 obj
 << /Border [0 0 0]
-/Dest (_route91)
+/Dest (_route60)
 /Subtype /Link
 /Rect [60.24000000000001 57.95999999999961 175.8555 72.23999999999961]
 /Type /Annot
@@ -47271,7 +47271,7 @@ endobj
 endobj
 529 0 obj
 << /Border [0 0 0]
-/Dest (_route91)
+/Dest (_route60)
 /Subtype /Link
 /Rect [552.021 57.95999999999961 563.76 72.23999999999961]
 /Type /Annot
index e85d937..c4e1e0b 100644 (file)
@@ -63,7 +63,7 @@ UNLOCK TABLES;
 
 LOCK TABLES `loop_element_models` WRITE;
 /*!40000 ALTER TABLE `loop_element_models` DISABLE KEYS */;
-INSERT INTO `loop_element_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app',NULL,'2020-03-09 08:58:58.510214','Not found','2020-03-09 08:58:59.405979',NULL,NULL,'MICRO_SERVICE_TYPE',NULL);
+INSERT INTO `loop_element_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app',NULL,'2020-03-09 15:32:37.733946','Not found','2020-03-09 15:32:38.968545',NULL,NULL,'MICRO_SERVICE_TYPE',NULL);
 /*!40000 ALTER TABLE `loop_element_models` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -82,9 +82,9 @@ UNLOCK TABLES;
 
 LOCK TABLES `loop_templates` WRITE;
 /*!40000 ALTER TABLE `loop_templates` DISABLE KEYS */;
-INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_CNV61_v1_0_ResourceInstanceName1_tca','Not found','2020-03-09 08:58:59.283217','Not found','2020-03-09 08:58:59.283217','CLOSED','tosca_definitions_version: cloudify_dsl_1_3\nimports:\n- http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/docker/2.2.0/node-type.yaml\n- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/relationship/1.0.0/node-type.yaml\n- http://onap.org:8081/repository/solutioning01-mte2-raw/type_files/dmaap/dmaap_mr.yaml\ninputs:\n  location_id:\n    type: string\n  service_id:\n    type: string\n  policy_id:\n    type: string\nnode_templates:\n  policy_0:\n    type: dcae.nodes.policy\n    properties:\n      policy_id: \n        get_input: policy_id\n      policy_model_id: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n  cdap_host_host:\n    type: dcae.nodes.StreamingAnalytics.SelectedCDAPInfrastructure\n    properties:\n      location_id:\n        get_input: location_id\n      scn_override: cdap_broker.solutioning-central.dcae.onap.org\n    interfaces:\n      cloudify.interfaces.lifecycle: {\n        }\n  tca_tca:\n    type: dcae.nodes.MicroService.cdap\n    properties:\n      app_config:\n        appDescription: DCAE Analytics Threshold Crossing Alert Application\n        appName: dcae-tca\n        tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n        tcaVESAlertsTableName: TCAVESAlertsTable\n        tcaVESAlertsTableTTLSeconds: \'1728000\'\n        tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n        tcaVESMessageStatusTableTTLSeconds: \'86400\'\n        thresholdCalculatorFlowletInstances: \'2\'\n      app_preferences:\n        publisherContentType: application/json\n        publisherHostName: mrlocal-mtnjftle01.onap.org\n        publisherHostPort: \'3905\'\n        publisherMaxBatchSize: \'10\'\n        publisherMaxRecoveryQueueSize: \'100000\'\n        publisherPollingInterval: \'20000\'\n        publisherProtocol: https\n        publisherTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESPub\n        publisherUserName: test@tca.af.dcae.onap.org\n        publisherUserPassword: password\n        subscriberConsumerGroup: OpenDCAE-c12\n        subscriberConsumerId: c12\n        subscriberContentType: application/json\n        subscriberHostName: mrlocal-mtnjftle01.onap.org\n        subscriberHostPort: \'3905\'\n        subscriberMessageLimit: \'-1\'\n        subscriberPollingInterval: \'20000\'\n        subscriberProtocol: https\n        subscriberTimeoutMS: \'-1\'\n        subscriberTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESSub\n        subscriberUserName: test@tca.af.dcae.onap.org\n        subscriberUserPassword: password\n        tca_policy: null\n      artifact_name: dcae-analytics-tca\n      artifact_version: 1.0.0\n      connections:\n        streams_publishes: [\n          ]\n        streams_subscribes: [\n          ]\n      jar_url: http://somejar\n      location_id:\n        get_input: location_id\n      namespace: cdap_tca_hi_lo\n      programs:\n      - program_id: TCAVESCollectorFlow\n        program_type: flows\n      - program_id: TCADMaaPMRSubscriberWorker\n        program_type: workers\n      - program_id: TCADMaaPMRPublisherWorker\n        program_type: workers\n      service_component_type: cdap_app_tca\n      service_id:\n        get_input: service_id\n      streamname: TCASubscriberOutputStream\n    relationships:\n    - target: topic0\n      type: dcae.relationships.subscribe_to_events\n    - target: topic1\n      type: dcae.relationships.publish_events\n    - target: cdap_host_host\n      type: dcae.relationships.component_contained_in\n    - target: policy_0\n      type: dcae.relationships.depends_on\n  topic0:\n    type: dcae.nodes.Topic\n    properties:\n      topic_name: \'\'\n  topic1:\n    type: dcae.nodes.Topic\n    properties:\n      topic_name: \'\'\n      \n','typeId-c6394acf-9604-4766-bab5-3c282683742c',0,'<svg xmlns=\"http://www.w3.org/2000/svg\"><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"start-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><circle fill=\"none\" r=\"17\" cx=\"18\" cy=\"41\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-ff8e42fd-2556-4455-a947-0beb03e0e43a\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"35\" x2=\"123\" y1=\"41\"/><polygon fill=\"none\" points=\" 121 39 121 43 125 41\"/><polygon points=\" 121 39 121 43 125 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"VES\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"127\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"127\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"177.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">VES</text><line y2=\"83\" fill=\"none\" x1=\"147\" x2=\"147\" y1=\"1\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-95f5e5d1-7bac-400d-8f16-a9892b9c57b9\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"250\" x2=\"338\" y1=\"41\"/><polygon fill=\"none\" points=\" 336 39 336 43 340 41\"/><polygon points=\" 336 39 336 43 340 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"onap.policies.monitoring.cdap.tca.hi.lo.app\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"342\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"342\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"393\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">app</text><line y2=\"61\" fill=\"none\" x1=\"342\" x2=\"465\" y1=\"61\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-88783917-a101-4b9f-b180-6fef42c6cf07\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"465\" x2=\"553\" y1=\"41\"/><polygon fill=\"none\" points=\" 551 39 551 43 555 41\"/><polygon points=\" 551 39 551 43 555 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"stop-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"4\"><circle fill=\"none\" r=\"17\" cx=\"574\" cy=\"41\"/></g></g></g></svg>',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0');
-INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_CNV61_v1_0_ResourceInstanceName1_tca_3','Not found','2020-03-09 08:58:58.973526','Not found','2020-03-09 08:58:58.973526','CLOSED','tosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n  This blueprint deploys/manages the TCA module as a Docker container\n\nimports:\n  - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml\n  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml\ninputs:\n  aaiEnrichmentHost:\n    type: string\n    default: \"aai.onap.svc.cluster.local\"\n  aaiEnrichmentPort:\n    type: string\n    default: \"8443\"\n  enableAAIEnrichment:\n    type: string\n    default: true\n  dmaap_host:\n    type: string\n    default: message-router.onap.svc.cluster.local\n  dmaap_port:\n    type: string\n    default: \"3904\"\n  enableRedisCaching:\n    type: string\n    default: false\n  redisHosts:\n    type: string\n    default: dcae-redis.onap.svc.cluster.local:6379\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0-STAGING-latest\"\n  consul_host:\n    type: string\n    default: consul-server.onap.svc.cluster.local\n  consul_port:\n    type: string\n    default: \"8500\"\n  cbs_host:\n    type: string\n    default: \"config-binding-service.dcae.svc.cluster.local\"\n  cbs_port:\n    type: string\n    default: \"10000\"\n  policy_id:\n    type: string\n    default: \"none\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which CDAPgui is exposed\n    default: \"32012\"\n  policy_model_id:\n    type: string\n    default: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n\nnode_templates:\n  tca_k8s:\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n      - target: tca_policy\n        type: cloudify.relationships.depends_on\n    properties:\n        service_component_type: \'dcaegen2-analytics-tca\'\n        application_config: {}\n        docker_config: {}\n        image:\n          get_input: tag_version\n        log_info:\n          log_directory: \"/opt/app/TCAnalytics/logs\"\n        application_config:\n            app_config:\n                appDescription: DCAE Analytics Threshold Crossing Alert Application\n                appName: dcae-tca\n                tcaAlertsAbatementTableName: TCAAlertsAbatementTable\n                tcaAlertsAbatementTableTTLSeconds: \'1728000\'\n                tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n                tcaVESAlertsTableName: TCAVESAlertsTable\n                tcaVESAlertsTableTTLSeconds: \'1728000\'\n                tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n                tcaVESMessageStatusTableTTLSeconds: \'86400\'\n                thresholdCalculatorFlowletInstances: \'2\'\n            app_preferences:\n                aaiEnrichmentHost:\n                    get_input: aaiEnrichmentHost\n                aaiEnrichmentIgnoreSSLCertificateErrors: \'true\'\n                aaiEnrichmentPortNumber: \'8443\'\n                aaiEnrichmentProtocol: https\n                aaiEnrichmentUserName: dcae@dcae.onap.org\n                aaiEnrichmentUserPassword: demo123456!\n                aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query\n                aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf\n                enableAAIEnrichment:\n                    get_input: enableAAIEnrichment\n                enableRedisCaching:\n                    get_input: enableRedisCaching\n                redisHosts:\n                    get_input: redisHosts\n                enableAlertCEFFormat: \'false\'\n                publisherContentType: application/json\n                publisherHostName:\n                    get_input: dmaap_host\n                publisherHostPort:\n                    get_input: dmaap_port\n                publisherMaxBatchSize: \'1\'\n                publisherMaxRecoveryQueueSize: \'100000\'\n                publisherPollingInterval: \'20000\'\n                publisherProtocol: http\n                publisherTopicName: unauthenticated.DCAE_CL_OUTPUT\n                subscriberConsumerGroup: OpenDCAE-c12\n                subscriberConsumerId: c12\n                subscriberContentType: application/json\n                subscriberHostName:\n                    get_input: dmaap_host\n                subscriberHostPort:\n                    get_input: dmaap_port\n                subscriberMessageLimit: \'-1\'\n                subscriberPollingInterval: \'30000\'\n                subscriberProtocol: http\n                subscriberTimeoutMS: \'-1\'\n                subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT\n                tca_policy: \'\'\n        service_component_type: dcaegen2-analytics_tca\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n                DMAAPHOST:\n                    { get_input: dmaap_host }\n                DMAAPPORT:\n                    { get_input: dmaap_port }\n                DMAAPPUBTOPIC: \"unauthenticated.DCAE_CL_OUTPUT\"\n                DMAAPSUBTOPIC: \"unauthenticated.VES_MEASUREMENT_OUTPUT\"\n                AAIHOST:\n                    { get_input: aaiEnrichmentHost }\n                AAIPORT:\n                    { get_input: aaiEnrichmentPort }\n                CONSUL_HOST:\n                    { get_input: consul_host }\n                CONSUL_PORT:\n                    { get_input: consul_port }\n                CBS_HOST:\n                    { get_input: cbs_host }\n                CBS_PORT:\n                    { get_input: cbs_port }\n                CONFIG_BINDING_SERVICE: \"config_binding_service\"\n            ports:\n              - concat: [\"11011:\", { get_input: external_port }]\n  tca_policy:\n    type: dcae.nodes.policy\n    properties:\n      policy_id:\n           get_input: policy_id\n      policy_model_id: \n           get_input: policy_model_id\n','typeId-1999c0ba-00a3-4121-8fa3-5332a231a56b',0,'<svg xmlns=\"http://www.w3.org/2000/svg\"><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"start-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><circle fill=\"none\" r=\"17\" cx=\"18\" cy=\"41\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-85de1b7b-aa37-4d4f-8c32-8cc3aaaf573e\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"35\" x2=\"123\" y1=\"41\"/><polygon fill=\"none\" points=\" 121 39 121 43 125 41\"/><polygon points=\" 121 39 121 43 125 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"VES\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"127\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"127\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"177.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">VES</text><line y2=\"83\" fill=\"none\" x1=\"147\" x2=\"147\" y1=\"1\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-0f82b7c5-ce03-4925-af74-deca643aafe3\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"250\" x2=\"338\" y1=\"41\"/><polygon fill=\"none\" points=\" 336 39 336 43 340 41\"/><polygon points=\" 336 39 336 43 340 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"onap.policies.monitoring.cdap.tca.hi.lo.app\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"342\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"342\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"393\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">app</text><line y2=\"61\" fill=\"none\" x1=\"342\" x2=\"465\" y1=\"61\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-f7568e7a-da1d-4cef-a3d5-d7eac1ea8afb\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"465\" x2=\"553\" y1=\"41\"/><polygon fill=\"none\" points=\" 551 39 551 43 555 41\"/><polygon points=\" 551 39 551 43 555 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"stop-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"4\"><circle fill=\"none\" r=\"17\" cx=\"574\" cy=\"41\"/></g></g></g></svg>',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0');
-INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_CNV61_v1_0_ResourceInstanceName2_tca_2','Not found','2020-03-09 08:58:58.462343','Not found','2020-03-09 08:58:58.462343','CLOSED','#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n  This blueprint deploys/manages the TCA module as a Docker container\n\nimports:\n  - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml\n#  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml\n  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/clamppolicyplugin/1.0.0/clamppolicyplugin_types.yaml\ninputs:\n  aaiEnrichmentHost:\n    type: string\n    default: \"aai.onap.svc.cluster.local\"\n  aaiEnrichmentPort:\n    type: string\n    default: \"8443\"\n  enableAAIEnrichment:\n    type: string\n    default: true\n  dmaap_host:\n    type: string\n    default: message-router.onap\n  dmaap_port:\n    type: string\n    default: \"3904\"\n  enableRedisCaching:\n    type: string\n    default: false\n  redisHosts:\n    type: string\n    default: dcae-redis.onap.svc.cluster.local:6379\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.1\"\n  consul_host:\n    type: string\n    default: consul-server.onap\n  consul_port:\n    type: string\n    default: \"8500\"\n  cbs_host:\n    type: string\n    default: \"config-binding-servicel\"\n  cbs_port:\n    type: string\n    default: \"10000\"\n  policy_id:\n    type: string\n    default: \"onap.restart.tca\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which CDAPgui is exposed\n    default: \"32012\"\n  policy_model_id:\n    type: string\n    default: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\nnode_templates:\n  tca_k8s:\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n      - target: tca_policy\n        type: cloudify.relationships.depends_on\n    properties:\n        service_component_type: \'dcaegen2-analytics-tca\'\n        application_config: {}\n        docker_config: {}\n        image:\n          get_input: tag_version\n        log_info:\n          log_directory: \"/opt/app/TCAnalytics/logs\"\n        application_config:\n            app_config:\n                appDescription: DCAE Analytics Threshold Crossing Alert Application\n                appName: dcae-tca\n                tcaAlertsAbatementTableName: TCAAlertsAbatementTable\n                tcaAlertsAbatementTableTTLSeconds: \'1728000\'\n                tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n                tcaVESAlertsTableName: TCAVESAlertsTable\n                tcaVESAlertsTableTTLSeconds: \'1728000\'\n                tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n                tcaVESMessageStatusTableTTLSeconds: \'86400\'\n                thresholdCalculatorFlowletInstances: \'2\'\n            app_preferences:\n                aaiEnrichmentHost:\n                    get_input: aaiEnrichmentHost\n                aaiEnrichmentIgnoreSSLCertificateErrors: \'true\'\n                aaiEnrichmentPortNumber: \'8443\'\n                aaiEnrichmentProtocol: https\n                aaiEnrichmentUserName: dcae@dcae.onap.org\n                aaiEnrichmentUserPassword: demo123456!\n                aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query\n                aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf\n                enableAAIEnrichment:\n                    get_input: enableAAIEnrichment\n                enableRedisCaching:\n                    get_input: enableRedisCaching\n                redisHosts:\n                    get_input: redisHosts\n                enableAlertCEFFormat: \'false\'\n                publisherContentType: application/json\n                publisherHostName:\n                    get_input: dmaap_host\n                publisherHostPort:\n                    get_input: dmaap_port\n                publisherMaxBatchSize: \'1\'\n                publisherMaxRecoveryQueueSize: \'100000\'\n                publisherPollingInterval: \'20000\'\n                publisherProtocol: http\n                publisherTopicName: unauthenticated.DCAE_CL_OUTPUT\n                subscriberConsumerGroup: OpenDCAE-clamp\n                subscriberConsumerId: c12\n                subscriberContentType: application/json\n                subscriberHostName:\n                    get_input: dmaap_host\n                subscriberHostPort:\n                    get_input: dmaap_port\n                subscriberMessageLimit: \'-1\'\n                subscriberPollingInterval: \'30000\'\n                subscriberProtocol: http\n                subscriberTimeoutMS: \'-1\'\n                subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT\n#                tca_policy: \'{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"},{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":700,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}\'\n        service_component_type: dcaegen2-analytics_tca\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n                DMAAPHOST:\n                    { get_input: dmaap_host }\n                DMAAPPORT:\n                    { get_input: dmaap_port }\n                DMAAPPUBTOPIC: \"unauthenticated.DCAE_CL_OUTPUT\"\n                DMAAPSUBTOPIC: \"unauthenticated.VES_MEASUREMENT_OUTPUT\"\n                AAIHOST:\n                    { get_input: aaiEnrichmentHost }\n                AAIPORT:\n                    { get_input: aaiEnrichmentPort }\n                CONSUL_HOST:\n                    { get_input: consul_host }\n                CONSUL_PORT:\n                    { get_input: consul_port }\n                CBS_HOST:\n                    { get_input: cbs_host }\n                CBS_PORT:\n                    { get_input: cbs_port }\n                CONFIG_BINDING_SERVICE: \"config_binding_service\"\n            ports:\n              - concat: [\"11011:\", { get_input: external_port }]\n  tca_policy:\n    type: clamp.nodes.policy\n    properties:\n      policy_id:\n           get_input: policy_id\n      policy_model_id: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n','typeId-7d0946d1-cd25-4aea-aca1-e9189029c8aa',0,'<svg xmlns=\"http://www.w3.org/2000/svg\"><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"start-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><circle fill=\"none\" r=\"17\" cx=\"18\" cy=\"41\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-f1d89a33-e32a-4d64-84b7-7cb3065d15fc\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"35\" x2=\"123\" y1=\"41\"/><polygon fill=\"none\" points=\" 121 39 121 43 125 41\"/><polygon points=\" 121 39 121 43 125 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"VES\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"127\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"127\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"177.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">VES</text><line y2=\"83\" fill=\"none\" x1=\"147\" x2=\"147\" y1=\"1\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-17622590-c6b4-4c0e-b61f-c4dfef5bfda8\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"250\" x2=\"338\" y1=\"41\"/><polygon fill=\"none\" points=\" 336 39 336 43 340 41\"/><polygon points=\" 336 39 336 43 340 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"onap.policies.monitoring.cdap.tca.hi.lo.app\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"342\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"342\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"393\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">app</text><line y2=\"61\" fill=\"none\" x1=\"342\" x2=\"465\" y1=\"61\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-453bb83c-0cb3-4658-89bd-16fc4f1c485c\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"465\" x2=\"553\" y1=\"41\"/><polygon fill=\"none\" points=\" 551 39 551 43 555 41\"/><polygon points=\" 551 39 551 43 555 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"stop-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"4\"><circle fill=\"none\" r=\"17\" cx=\"574\" cy=\"41\"/></g></g></g></svg>',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0');
+INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_knKBA_v1_0_ResourceInstanceName1_tca','Not found','2020-03-09 15:32:38.823195','Not found','2020-03-09 15:32:38.823195','CLOSED','tosca_definitions_version: cloudify_dsl_1_3\nimports:\n- http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/docker/2.2.0/node-type.yaml\n- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/relationship/1.0.0/node-type.yaml\n- http://onap.org:8081/repository/solutioning01-mte2-raw/type_files/dmaap/dmaap_mr.yaml\ninputs:\n  location_id:\n    type: string\n  service_id:\n    type: string\n  policy_id:\n    type: string\nnode_templates:\n  policy_0:\n    type: dcae.nodes.policy\n    properties:\n      policy_id: \n        get_input: policy_id\n      policy_model_id: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n  cdap_host_host:\n    type: dcae.nodes.StreamingAnalytics.SelectedCDAPInfrastructure\n    properties:\n      location_id:\n        get_input: location_id\n      scn_override: cdap_broker.solutioning-central.dcae.onap.org\n    interfaces:\n      cloudify.interfaces.lifecycle: {\n        }\n  tca_tca:\n    type: dcae.nodes.MicroService.cdap\n    properties:\n      app_config:\n        appDescription: DCAE Analytics Threshold Crossing Alert Application\n        appName: dcae-tca\n        tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n        tcaVESAlertsTableName: TCAVESAlertsTable\n        tcaVESAlertsTableTTLSeconds: \'1728000\'\n        tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n        tcaVESMessageStatusTableTTLSeconds: \'86400\'\n        thresholdCalculatorFlowletInstances: \'2\'\n      app_preferences:\n        publisherContentType: application/json\n        publisherHostName: mrlocal-mtnjftle01.onap.org\n        publisherHostPort: \'3905\'\n        publisherMaxBatchSize: \'10\'\n        publisherMaxRecoveryQueueSize: \'100000\'\n        publisherPollingInterval: \'20000\'\n        publisherProtocol: https\n        publisherTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESPub\n        publisherUserName: test@tca.af.dcae.onap.org\n        publisherUserPassword: password\n        subscriberConsumerGroup: OpenDCAE-c12\n        subscriberConsumerId: c12\n        subscriberContentType: application/json\n        subscriberHostName: mrlocal-mtnjftle01.onap.org\n        subscriberHostPort: \'3905\'\n        subscriberMessageLimit: \'-1\'\n        subscriberPollingInterval: \'20000\'\n        subscriberProtocol: https\n        subscriberTimeoutMS: \'-1\'\n        subscriberTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESSub\n        subscriberUserName: test@tca.af.dcae.onap.org\n        subscriberUserPassword: password\n        tca_policy: null\n      artifact_name: dcae-analytics-tca\n      artifact_version: 1.0.0\n      connections:\n        streams_publishes: [\n          ]\n        streams_subscribes: [\n          ]\n      jar_url: http://somejar\n      location_id:\n        get_input: location_id\n      namespace: cdap_tca_hi_lo\n      programs:\n      - program_id: TCAVESCollectorFlow\n        program_type: flows\n      - program_id: TCADMaaPMRSubscriberWorker\n        program_type: workers\n      - program_id: TCADMaaPMRPublisherWorker\n        program_type: workers\n      service_component_type: cdap_app_tca\n      service_id:\n        get_input: service_id\n      streamname: TCASubscriberOutputStream\n    relationships:\n    - target: topic0\n      type: dcae.relationships.subscribe_to_events\n    - target: topic1\n      type: dcae.relationships.publish_events\n    - target: cdap_host_host\n      type: dcae.relationships.component_contained_in\n    - target: policy_0\n      type: dcae.relationships.depends_on\n  topic0:\n    type: dcae.nodes.Topic\n    properties:\n      topic_name: \'\'\n  topic1:\n    type: dcae.nodes.Topic\n    properties:\n      topic_name: \'\'\n      \n','typeId-63a27491-910c-4d4d-a730-557bb7214af1',0,'<svg xmlns=\"http://www.w3.org/2000/svg\"><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"start-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><circle fill=\"none\" r=\"17\" cx=\"18\" cy=\"41\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-0e33a2c7-13d4-4f39-8d3c-7b511ac8a4db\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"35\" x2=\"123\" y1=\"41\"/><polygon fill=\"none\" points=\" 121 39 121 43 125 41\"/><polygon points=\" 121 39 121 43 125 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"VES\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"127\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"127\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"177.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">VES</text><line y2=\"83\" fill=\"none\" x1=\"147\" x2=\"147\" y1=\"1\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-90105567-0b99-4a75-85f5-55581c4578ec\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"250\" x2=\"338\" y1=\"41\"/><polygon fill=\"none\" points=\" 336 39 336 43 340 41\"/><polygon points=\" 336 39 336 43 340 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"onap.policies.monitoring.cdap.tca.hi.lo.app\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"342\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"342\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"393\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">app</text><line y2=\"61\" fill=\"none\" x1=\"342\" x2=\"465\" y1=\"61\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-61d6b8a3-4b6c-4df6-8395-ec657f09b7af\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"465\" x2=\"553\" y1=\"41\"/><polygon fill=\"none\" points=\" 551 39 551 43 555 41\"/><polygon points=\" 551 39 551 43 555 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"stop-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"4\"><circle fill=\"none\" r=\"17\" cx=\"574\" cy=\"41\"/></g></g></g></svg>',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0');
+INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_knKBA_v1_0_ResourceInstanceName1_tca_3','Not found','2020-03-09 15:32:38.243680','Not found','2020-03-09 15:32:38.243680','CLOSED','tosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n  This blueprint deploys/manages the TCA module as a Docker container\n\nimports:\n  - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml\n  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml\ninputs:\n  aaiEnrichmentHost:\n    type: string\n    default: \"aai.onap.svc.cluster.local\"\n  aaiEnrichmentPort:\n    type: string\n    default: \"8443\"\n  enableAAIEnrichment:\n    type: string\n    default: true\n  dmaap_host:\n    type: string\n    default: message-router.onap.svc.cluster.local\n  dmaap_port:\n    type: string\n    default: \"3904\"\n  enableRedisCaching:\n    type: string\n    default: false\n  redisHosts:\n    type: string\n    default: dcae-redis.onap.svc.cluster.local:6379\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0-STAGING-latest\"\n  consul_host:\n    type: string\n    default: consul-server.onap.svc.cluster.local\n  consul_port:\n    type: string\n    default: \"8500\"\n  cbs_host:\n    type: string\n    default: \"config-binding-service.dcae.svc.cluster.local\"\n  cbs_port:\n    type: string\n    default: \"10000\"\n  policy_id:\n    type: string\n    default: \"none\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which CDAPgui is exposed\n    default: \"32012\"\n  policy_model_id:\n    type: string\n    default: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n\nnode_templates:\n  tca_k8s:\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n      - target: tca_policy\n        type: cloudify.relationships.depends_on\n    properties:\n        service_component_type: \'dcaegen2-analytics-tca\'\n        application_config: {}\n        docker_config: {}\n        image:\n          get_input: tag_version\n        log_info:\n          log_directory: \"/opt/app/TCAnalytics/logs\"\n        application_config:\n            app_config:\n                appDescription: DCAE Analytics Threshold Crossing Alert Application\n                appName: dcae-tca\n                tcaAlertsAbatementTableName: TCAAlertsAbatementTable\n                tcaAlertsAbatementTableTTLSeconds: \'1728000\'\n                tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n                tcaVESAlertsTableName: TCAVESAlertsTable\n                tcaVESAlertsTableTTLSeconds: \'1728000\'\n                tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n                tcaVESMessageStatusTableTTLSeconds: \'86400\'\n                thresholdCalculatorFlowletInstances: \'2\'\n            app_preferences:\n                aaiEnrichmentHost:\n                    get_input: aaiEnrichmentHost\n                aaiEnrichmentIgnoreSSLCertificateErrors: \'true\'\n                aaiEnrichmentPortNumber: \'8443\'\n                aaiEnrichmentProtocol: https\n                aaiEnrichmentUserName: dcae@dcae.onap.org\n                aaiEnrichmentUserPassword: demo123456!\n                aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query\n                aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf\n                enableAAIEnrichment:\n                    get_input: enableAAIEnrichment\n                enableRedisCaching:\n                    get_input: enableRedisCaching\n                redisHosts:\n                    get_input: redisHosts\n                enableAlertCEFFormat: \'false\'\n                publisherContentType: application/json\n                publisherHostName:\n                    get_input: dmaap_host\n                publisherHostPort:\n                    get_input: dmaap_port\n                publisherMaxBatchSize: \'1\'\n                publisherMaxRecoveryQueueSize: \'100000\'\n                publisherPollingInterval: \'20000\'\n                publisherProtocol: http\n                publisherTopicName: unauthenticated.DCAE_CL_OUTPUT\n                subscriberConsumerGroup: OpenDCAE-c12\n                subscriberConsumerId: c12\n                subscriberContentType: application/json\n                subscriberHostName:\n                    get_input: dmaap_host\n                subscriberHostPort:\n                    get_input: dmaap_port\n                subscriberMessageLimit: \'-1\'\n                subscriberPollingInterval: \'30000\'\n                subscriberProtocol: http\n                subscriberTimeoutMS: \'-1\'\n                subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT\n                tca_policy: \'\'\n        service_component_type: dcaegen2-analytics_tca\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n                DMAAPHOST:\n                    { get_input: dmaap_host }\n                DMAAPPORT:\n                    { get_input: dmaap_port }\n                DMAAPPUBTOPIC: \"unauthenticated.DCAE_CL_OUTPUT\"\n                DMAAPSUBTOPIC: \"unauthenticated.VES_MEASUREMENT_OUTPUT\"\n                AAIHOST:\n                    { get_input: aaiEnrichmentHost }\n                AAIPORT:\n                    { get_input: aaiEnrichmentPort }\n                CONSUL_HOST:\n                    { get_input: consul_host }\n                CONSUL_PORT:\n                    { get_input: consul_port }\n                CBS_HOST:\n                    { get_input: cbs_host }\n                CBS_PORT:\n                    { get_input: cbs_port }\n                CONFIG_BINDING_SERVICE: \"config_binding_service\"\n            ports:\n              - concat: [\"11011:\", { get_input: external_port }]\n  tca_policy:\n    type: dcae.nodes.policy\n    properties:\n      policy_id:\n           get_input: policy_id\n      policy_model_id: \n           get_input: policy_model_id\n','typeId-d7f45a12-2175-467d-b6bc-430370ece032',0,'<svg xmlns=\"http://www.w3.org/2000/svg\"><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"start-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><circle fill=\"none\" r=\"17\" cx=\"18\" cy=\"41\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-cf1cccfc-eb01-44c3-88f0-4e061ad871f5\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"35\" x2=\"123\" y1=\"41\"/><polygon fill=\"none\" points=\" 121 39 121 43 125 41\"/><polygon points=\" 121 39 121 43 125 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"VES\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"127\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"127\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"177.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">VES</text><line y2=\"83\" fill=\"none\" x1=\"147\" x2=\"147\" y1=\"1\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-2ebb4017-210f-4653-885a-63bfead37ec4\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"250\" x2=\"338\" y1=\"41\"/><polygon fill=\"none\" points=\" 336 39 336 43 340 41\"/><polygon points=\" 336 39 336 43 340 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"onap.policies.monitoring.cdap.tca.hi.lo.app\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"342\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"342\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"393\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">app</text><line y2=\"61\" fill=\"none\" x1=\"342\" x2=\"465\" y1=\"61\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-03492e87-6bf6-48d7-a78d-383b76d758cb\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"465\" x2=\"553\" y1=\"41\"/><polygon fill=\"none\" points=\" 551 39 551 43 555 41\"/><polygon points=\" 551 39 551 43 555 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"stop-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"4\"><circle fill=\"none\" r=\"17\" cx=\"574\" cy=\"41\"/></g></g></g></svg>',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0');
+INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_knKBA_v1_0_ResourceInstanceName2_tca_2','Not found','2020-03-09 15:32:37.679097','Not found','2020-03-09 15:32:37.679097','CLOSED','#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n  This blueprint deploys/manages the TCA module as a Docker container\n\nimports:\n  - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml\n#  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml\n  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/clamppolicyplugin/1.0.0/clamppolicyplugin_types.yaml\ninputs:\n  aaiEnrichmentHost:\n    type: string\n    default: \"aai.onap.svc.cluster.local\"\n  aaiEnrichmentPort:\n    type: string\n    default: \"8443\"\n  enableAAIEnrichment:\n    type: string\n    default: true\n  dmaap_host:\n    type: string\n    default: message-router.onap\n  dmaap_port:\n    type: string\n    default: \"3904\"\n  enableRedisCaching:\n    type: string\n    default: false\n  redisHosts:\n    type: string\n    default: dcae-redis.onap.svc.cluster.local:6379\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.1\"\n  consul_host:\n    type: string\n    default: consul-server.onap\n  consul_port:\n    type: string\n    default: \"8500\"\n  cbs_host:\n    type: string\n    default: \"config-binding-servicel\"\n  cbs_port:\n    type: string\n    default: \"10000\"\n  policy_id:\n    type: string\n    default: \"onap.restart.tca\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which CDAPgui is exposed\n    default: \"32012\"\n  policy_model_id:\n    type: string\n    default: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\nnode_templates:\n  tca_k8s:\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n      - target: tca_policy\n        type: cloudify.relationships.depends_on\n    properties:\n        service_component_type: \'dcaegen2-analytics-tca\'\n        application_config: {}\n        docker_config: {}\n        image:\n          get_input: tag_version\n        log_info:\n          log_directory: \"/opt/app/TCAnalytics/logs\"\n        application_config:\n            app_config:\n                appDescription: DCAE Analytics Threshold Crossing Alert Application\n                appName: dcae-tca\n                tcaAlertsAbatementTableName: TCAAlertsAbatementTable\n                tcaAlertsAbatementTableTTLSeconds: \'1728000\'\n                tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n                tcaVESAlertsTableName: TCAVESAlertsTable\n                tcaVESAlertsTableTTLSeconds: \'1728000\'\n                tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n                tcaVESMessageStatusTableTTLSeconds: \'86400\'\n                thresholdCalculatorFlowletInstances: \'2\'\n            app_preferences:\n                aaiEnrichmentHost:\n                    get_input: aaiEnrichmentHost\n                aaiEnrichmentIgnoreSSLCertificateErrors: \'true\'\n                aaiEnrichmentPortNumber: \'8443\'\n                aaiEnrichmentProtocol: https\n                aaiEnrichmentUserName: dcae@dcae.onap.org\n                aaiEnrichmentUserPassword: demo123456!\n                aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query\n                aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf\n                enableAAIEnrichment:\n                    get_input: enableAAIEnrichment\n                enableRedisCaching:\n                    get_input: enableRedisCaching\n                redisHosts:\n                    get_input: redisHosts\n                enableAlertCEFFormat: \'false\'\n                publisherContentType: application/json\n                publisherHostName:\n                    get_input: dmaap_host\n                publisherHostPort:\n                    get_input: dmaap_port\n                publisherMaxBatchSize: \'1\'\n                publisherMaxRecoveryQueueSize: \'100000\'\n                publisherPollingInterval: \'20000\'\n                publisherProtocol: http\n                publisherTopicName: unauthenticated.DCAE_CL_OUTPUT\n                subscriberConsumerGroup: OpenDCAE-clamp\n                subscriberConsumerId: c12\n                subscriberContentType: application/json\n                subscriberHostName:\n                    get_input: dmaap_host\n                subscriberHostPort:\n                    get_input: dmaap_port\n                subscriberMessageLimit: \'-1\'\n                subscriberPollingInterval: \'30000\'\n                subscriberProtocol: http\n                subscriberTimeoutMS: \'-1\'\n                subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT\n#                tca_policy: \'{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"},{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":700,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}\'\n        service_component_type: dcaegen2-analytics_tca\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n                DMAAPHOST:\n                    { get_input: dmaap_host }\n                DMAAPPORT:\n                    { get_input: dmaap_port }\n                DMAAPPUBTOPIC: \"unauthenticated.DCAE_CL_OUTPUT\"\n                DMAAPSUBTOPIC: \"unauthenticated.VES_MEASUREMENT_OUTPUT\"\n                AAIHOST:\n                    { get_input: aaiEnrichmentHost }\n                AAIPORT:\n                    { get_input: aaiEnrichmentPort }\n                CONSUL_HOST:\n                    { get_input: consul_host }\n                CONSUL_PORT:\n                    { get_input: consul_port }\n                CBS_HOST:\n                    { get_input: cbs_host }\n                CBS_PORT:\n                    { get_input: cbs_port }\n                CONFIG_BINDING_SERVICE: \"config_binding_service\"\n            ports:\n              - concat: [\"11011:\", { get_input: external_port }]\n  tca_policy:\n    type: clamp.nodes.policy\n    properties:\n      policy_id:\n           get_input: policy_id\n      policy_model_id: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n','typeId-8d3bfe7e-65e4-4990-9b55-c214c244cdfa',0,'<svg xmlns=\"http://www.w3.org/2000/svg\"><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"start-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><circle fill=\"none\" r=\"17\" cx=\"18\" cy=\"41\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-270b4397-39ba-4111-9ff8-c01f612bc8dd\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"35\" x2=\"123\" y1=\"41\"/><polygon fill=\"none\" points=\" 121 39 121 43 125 41\"/><polygon points=\" 121 39 121 43 125 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"VES\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"127\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"127\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"177.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">VES</text><line y2=\"83\" fill=\"none\" x1=\"147\" x2=\"147\" y1=\"1\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-4aba9863-6f23-4603-b98c-3a161f53dc6d\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"250\" x2=\"338\" y1=\"41\"/><polygon fill=\"none\" points=\" 336 39 336 43 340 41\"/><polygon points=\" 336 39 336 43 340 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"onap.policies.monitoring.cdap.tca.hi.lo.app\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><rect fill=\"none\" x=\"342\" width=\"123\" y=\"1\" height=\"82\"/></g><g fill-opacity=\"0\" fill=\"rgb(0,0,0)\" text-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" stroke=\"rgb(0,0,0)\" stroke-opacity=\"0\" stroke-width=\"2\"><rect x=\"342\" width=\"123\" y=\"1\" height=\"82\" stroke=\"none\"/></g><g text-rendering=\"optimizeQuality\" stroke-width=\"2\" shape-rendering=\"geometricPrecision\" font-family=\"sans-serif\"><text x=\"393\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">app</text><line y2=\"61\" fill=\"none\" x1=\"342\" x2=\"465\" y1=\"61\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"Arrow-17b0ac5c-7c06-44b8-bb3d-097345750f29\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"2\"><line y2=\"41\" fill=\"none\" x1=\"465\" x2=\"553\" y1=\"41\"/><polygon fill=\"none\" points=\" 551 39 551 43 555 41\"/><polygon points=\" 551 39 551 43 555 41\" stroke=\"none\"/></g></g></g><g fill-opacity=\"1\" color-rendering=\"auto\" color-interpolation=\"auto\" text-rendering=\"auto\" stroke=\"black\" stroke-linecap=\"square\" stroke-miterlimit=\"10\" shape-rendering=\"auto\" stroke-opacity=\"1\" fill=\"black\" stroke-dasharray=\"none\" font-weight=\"normal\" stroke-width=\"1\" font-family=\"\'Dialog\'\" font-style=\"normal\" data-element-id=\"stop-circle\" stroke-linejoin=\"miter\" font-size=\"12px\" image-rendering=\"auto\" stroke-dashoffset=\"0\"><!--Generated by the Batik Graphics2D SVG Generator--><defs id=\"genericDefs\"/><g><g shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeQuality\" stroke-width=\"4\"><circle fill=\"none\" r=\"17\" cx=\"574\" cy=\"41\"/></g></g></g></svg>',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0');
 /*!40000 ALTER TABLE `loop_templates` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -122,9 +122,9 @@ UNLOCK TABLES;
 
 LOCK TABLES `looptemplates_to_loopelementmodels` WRITE;
 /*!40000 ALTER TABLE `looptemplates_to_loopelementmodels` DISABLE KEYS */;
-INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_CNV61_v1_0_ResourceInstanceName1_tca',0);
-INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_CNV61_v1_0_ResourceInstanceName1_tca_3',0);
-INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_CNV61_v1_0_ResourceInstanceName2_tca_2',0);
+INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_knKBA_v1_0_ResourceInstanceName1_tca',0);
+INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_knKBA_v1_0_ResourceInstanceName1_tca_3',0);
+INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_knKBA_v1_0_ResourceInstanceName2_tca_2',0);
 /*!40000 ALTER TABLE `looptemplates_to_loopelementmodels` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -152,13 +152,13 @@ UNLOCK TABLES;
 
 LOCK TABLES `policy_models` WRITE;
 /*!40000 ALTER TABLE `policy_models` DISABLE KEYS */;
-INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.Blacklist','1.0.0','Not found','2020-03-09 08:59:10.073127','Not found','2020-03-09 08:59:10.390629','Blacklist','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.controlloop.guard.Common:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: |\n            This is the base Policy Type for Guard policies that guard the execution of Operational\n            Policies.\n        properties:\n            actor:\n                type: string\n                description: Specifies the Actor the guard applies to.\n                required: true\n            operation:\n                type: string\n                description: Specified the operation that the actor is performing the guard applies to.\n                required: true\n            timeRange:\n                type: tosca.datatypes.TimeInterval\n                description: |\n                    An optional range of time during the day the guard policy is valid for.\n                required: false\n            id:\n                type: string\n                description: The Control Loop id this applies to.\n                required: false\n    onap.policies.controlloop.guard.common.Blacklist:\n        derived_from: onap.policies.controlloop.guard.Common\n        type_version: 1.0.0\n        version: 1.0.0\n        description: Supports blacklist of entity id\'s from performing control loop actions on.\n        properties:\n            blacklist:\n                type: list\n                description: List of entity id\'s\n                required: true\n                entry_schema:\n                    type: string','{\n  \"supportedPdpGroups\": [\n    {\n      \"controlloop\": [\n        \"xacml\"\n      ]\n    }\n  ]\n}');
-INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.FrequencyLimiter','1.0.0','Not found','2020-03-09 08:59:10.071862','Not found','2020-03-09 08:59:10.403262','FrequencyLimiter','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.controlloop.guard.Common:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: |\n            This is the base Policy Type for Guard policies that guard the execution of Operational\n            Policies.\n        properties:\n            actor:\n                type: string\n                description: Specifies the Actor the guard applies to.\n                required: true\n            operation:\n                type: string\n                description: Specified the operation that the actor is performing the guard applies to.\n                required: true\n            timeRange:\n                type: tosca.datatypes.TimeInterval\n                description: |\n                    An optional range of time during the day the guard policy is valid for.\n                required: false\n            id:\n                type: string\n                description: The Control Loop id this applies to.\n                required: false\n    onap.policies.controlloop.guard.common.FrequencyLimiter:\n        derived_from: onap.policies.controlloop.guard.Common\n        type_version: 1.0.0\n        version: 1.0.0\n        description: Supports limiting the frequency of actions being taken by a Actor.\n        properties:\n            timeWindow:\n                type: integer\n                description: The time window to count the actions against.\n                required: true\n            timeUnits:\n                type: string\n                description: The units of time the window is counting.\n                constraints:\n                - valid_values: [\"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"year\"]\n            limit:\n                type: integer\n                description: The limit\n                required: true\n                constraints:\n                -   greater_than: 0','{\n  \"supportedPdpGroups\": [\n    {\n      \"controlloop\": [\n        \"xacml\"\n      ]\n    }\n  ]\n}');
-INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.MinMax','2.0.0','Not found','2020-03-09 08:59:10.074684','Not found','2020-03-09 08:59:10.074684','MinMax','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.controlloop.guard.Common:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: |\n            This is the base Policy Type for Guard policies that guard the execution of Operational\n            Policies.\n        properties:\n            actor:\n                type: string\n                description: Specifies the Actor the guard applies to.\n                required: true\n            operation:\n                type: string\n                description: Specified the operation that the actor is performing the guard applies to.\n                required: true\n            timeRange:\n                type: tosca.datatypes.TimeInterval\n                description: |\n                    An optional range of time during the day the guard policy is valid for.\n                required: false\n            id:\n                type: string\n                description: The Control Loop id this applies to.\n                required: false\n    onap.policies.controlloop.guard.common.MinMax:\n        derived_from: onap.policies.controlloop.guard.Common\n        type_version: 1.0.0\n        version: 1.0.0\n        description: Supports Min/Max number of entity for scaling operations\n        properties:\n            min:\n                type: integer\n                required: true\n                description: The minimum instances of this entity\n            max:\n                type: integer\n                required: false\n                description: The maximum instances of this entity',NULL);
-INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Apex','1.0.0','Not found','2020-03-09 08:59:10.073775','Not found','2020-03-09 08:59:10.413855','Apex','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.controlloop.operational.common.Apex:\n        derived_from: onap.policies.controlloop.operational.Common\n        type_version: 1.0.0\n        version: 1.0.0\n        description: Operational policies for Apex PDP\n        properties:\n            engineServiceParameters:\n                type: string\n                description: The engine parameters like name, instanceCount, policy implementation, parameters etc.\n                required: true\n            eventInputParameters:\n                type: string\n                description: The event input parameters.\n                required: true\n            eventOutputParameters:\n                type: string\n                description: The event output parameters.\n                required: true\n            javaProperties:\n                type: string\n                description: Name/value pairs of properties to be set for APEX if needed.\n                required: false\n    onap.policies.controlloop.operational.Common:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: |\n            Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n            Policy Types. This does NOT support the legacy Policy YAML policy type.\n        properties:\n            id:\n                type: string\n                description: The unique control loop id.\n                required: true\n            timeout:\n                type: integer\n                description: |\n                    Overall timeout for executing all the operations. This timeout should equal or exceed the total\n                    timeout for each operation listed.\n                required: true\n            abatement:\n                type: boolean\n                description: Whether an abatement event message will be expected for the control loop from DCAE.\n                required: true\n                default: false\n            trigger:\n                type: string\n                description: Initial operation to execute upon receiving an Onset event message for the Control Loop.\n                required: true\n            operations:\n                type: list\n                description: List of operations to be performed when Control Loop is triggered.\n                required: true\n                entry_schema:\n                    type: onap.datatype.controlloop.Operation\ndata_types:\n    onap.datatype.controlloop.Target:\n        derived_from: tosca.datatypes.Root\n        description: Definition for a entity in A&AI to perform a control loop operation on\n        properties:\n            targetType:\n                type: string\n                description: Category for the target type\n                required: true\n                constraints:\n                - valid_values: [VNF, VM, VFMODULE, PNF]\n            entityIds:\n                type: map\n                description: |\n                    Map of values that identify the resource. If none are provided, it is assumed that the\n                    entity that generated the ONSET event will be the target.\n                required: false\n                entry_schema:\n                    type: string\n\n    onap.datatype.controlloop.Actor:\n        derived_from: tosca.datatypes.Root\n        description: An actor/operation/target definition\n        properties:\n            actor:\n                type: string\n                description: The actor performing the operation.\n                required: true\n            operation:\n                type: string\n                description: The operation the actor is performing.\n                required: true\n            target:\n                type: onap.datatype.controlloop.Target\n                description: The resource the operation should be performed on.\n                required: true\n                metadata:\n                    clamp_possible_values: <string:see clamp project for syntax>\n            payload:\n                type: map\n                description: Name/value pairs of payload information passed by Policy to the actor\n                required: false\n                entry_schema:\n                    type: string\n\n    onap.datatype.controlloop.Operation:\n        derived_from: tosca.datatypes.Root\n        description: An operation supported by an actor\n        properties:\n            id:\n                type: string\n                description: Unique identifier for the operation\n                required: true\n            description:\n                type: string\n                description: A user-friendly description of the intent for the operation\n                required: false\n            operation:\n                type: onap.datatype.controlloop.Actor\n                description: The definition of the operation to be performed.\n                required: true\n                metadata:\n                    clamp_possible_values: <string:see clamp project for syntax>\n            timeout:\n                type: integer\n                description: The amount of time for the actor to perform the operation.\n                required: true\n            retries:\n                type: integer\n                description: The number of retries the actor should attempt to perform the operation.\n                required: true\n                default: 0\n            success:\n                type: string\n                description: Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.\n                required: false\n                default: final_success\n            failure:\n                type: string\n                description: Points to the operation to invoke on Actor operation failure.\n                required: false\n                default: final_failure\n            failure_timeout:\n                type: string\n                description: Points to the operation to invoke when the time out for the operation occurs.\n                required: false\n                default: final_failure_timeout\n            failure_retries:\n                type: string\n                description: Points to the operation to invoke when the current operation has exceeded its max retries.\n                required: false\n                default: final_failure_retries\n            failure_exception:\n                type: string\n                description: Points to the operation to invoke when the current operation causes an exception.\n                required: false\n                default: final_failure_exception\n            failure_guard:\n                type: string\n                description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.\n                required: false\n                default: final_failure_guard','{\n  \"supportedPdpGroups\": [\n    {\n      \"controlloop\": [\n        \"drools\"\n      ]\n    }\n  ]\n}');
-INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Drools','1.0.0','Not found','2020-03-09 08:59:10.138733','Not found','2020-03-09 08:59:10.429203','Drools','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.controlloop.operational.common.Drools:\n        derived_from: onap.policies.controlloop.operational.Common\n        type_version: 1.0.0\n        version: 1.0.0\n        description: Operational policies for Drools PDP\n        properties:\n            controllerName:\n                type: string\n                description: Drools controller properties\n                required: false\n    onap.policies.controlloop.operational.Common:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: |\n            Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n            Policy Types. This does NOT support the legacy Policy YAML policy type.\n        properties:\n            id:\n                type: string\n                description: The unique control loop id.\n                required: true\n            timeout:\n                type: integer\n                description: |\n                    Overall timeout for executing all the operations. This timeout should equal or exceed the total\n                    timeout for each operation listed.\n                required: true\n            abatement:\n                type: boolean\n                description: Whether an abatement event message will be expected for the control loop from DCAE.\n                required: true\n                default: false\n            trigger:\n                type: string\n                description: Initial operation to execute upon receiving an Onset event message for the Control Loop.\n                required: true\n            operations:\n                type: list\n                description: List of operations to be performed when Control Loop is triggered.\n                required: true\n                entry_schema:\n                    type: onap.datatype.controlloop.Operation\ndata_types:\n    onap.datatype.controlloop.Target:\n        derived_from: tosca.datatypes.Root\n        description: Definition for a entity in A&AI to perform a control loop operation on\n        properties:\n            targetType:\n                type: string\n                description: Category for the target type\n                required: true\n                constraints:\n                - valid_values: [VNF, VM, VFMODULE, PNF]\n            entityIds:\n                type: map\n                description: |\n                    Map of values that identify the resource. If none are provided, it is assumed that the\n                    entity that generated the ONSET event will be the target.\n                required: false\n                entry_schema:\n                    type: string\n\n    onap.datatype.controlloop.Actor:\n        derived_from: tosca.datatypes.Root\n        description: An actor/operation/target definition\n        properties:\n            actor:\n                type: string\n                description: The actor performing the operation.\n                required: true\n            operation:\n                type: string\n                description: The operation the actor is performing.\n                required: true\n            target:\n                type: onap.datatype.controlloop.Target\n                description: The resource the operation should be performed on.\n                required: true\n                metadata:\n                    clamp_possible_values: <string:see clamp project for syntax>\n            payload:\n                type: map\n                description: Name/value pairs of payload information passed by Policy to the actor\n                required: false\n                entry_schema:\n                    type: string\n\n    onap.datatype.controlloop.Operation:\n        derived_from: tosca.datatypes.Root\n        description: An operation supported by an actor\n        properties:\n            id:\n                type: string\n                description: Unique identifier for the operation\n                required: true\n            description:\n                type: string\n                description: A user-friendly description of the intent for the operation\n                required: false\n            operation:\n                type: onap.datatype.controlloop.Actor\n                description: The definition of the operation to be performed.\n                required: true\n                metadata:\n                    clamp_possible_values: <string:see clamp project for syntax>\n            timeout:\n                type: integer\n                description: The amount of time for the actor to perform the operation.\n                required: true\n            retries:\n                type: integer\n                description: The number of retries the actor should attempt to perform the operation.\n                required: true\n                default: 0\n            success:\n                type: string\n                description: Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.\n                required: false\n                default: final_success\n            failure:\n                type: string\n                description: Points to the operation to invoke on Actor operation failure.\n                required: false\n                default: final_failure\n            failure_timeout:\n                type: string\n                description: Points to the operation to invoke when the time out for the operation occurs.\n                required: false\n                default: final_failure_timeout\n            failure_retries:\n                type: string\n                description: Points to the operation to invoke when the current operation has exceeded its max retries.\n                required: false\n                default: final_failure_retries\n            failure_exception:\n                type: string\n                description: Points to the operation to invoke when the current operation causes an exception.\n                required: false\n                default: final_failure_exception\n            failure_guard:\n                type: string\n                description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.\n                required: false\n                default: final_failure_guard','{\n  \"supportedPdpGroups\": [\n    {\n      \"controlloop\": [\n        \"drools\"\n      ]\n    }\n  ]\n}');
-INSERT INTO `policy_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','1.0.0','Not found','2020-03-09 08:58:58.533621','Not found','2020-03-09 08:59:10.447184','app','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n   onap.policies.Monitoring:\n      derived_from: tosca.policies.Root\n      version: 1.0.0\n      description: a base policy type for all policies that govern monitoring provisioning\n   onap.policies.monitoring.cdap.tca.hi.lo.app:\n      derived_from: onap.policies.Monitoring\n      version: 1.0.0\n      properties:\n         tca_policy:\n            type: onap.datatypes.monitoring.tca_policy\n            description: TCA Policy JSON\n            required: true\ndata_types:\n   onap.datatypes.monitoring.metricsPerEventName:\n      derived_from: tosca.datatypes.Root\n      properties:\n         controlLoopSchemaType:\n            type: string\n            required: true\n            description: Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\n            constraints:\n            -  valid_values:\n               - VM\n               - VNF\n         eventName:\n            type: string\n            required: true\n            description: Event name to which thresholds need to be applied\n         policyName:\n            type: string\n            required: true\n            description: TCA Policy Scope Name\n         policyScope:\n            type: string\n            required: true\n            description: TCA Policy Scope\n         policyVersion:\n            type: string\n            required: true\n            description: TCA Policy Scope Version\n         thresholds:\n            type: list\n            required: true\n            description: Thresholds associated with eventName\n            entry_schema:\n               type: onap.datatypes.monitoring.thresholds\n   onap.datatypes.monitoring.tca_policy:\n      derived_from: tosca.datatypes.Root\n      properties:\n         domain:\n            type: string\n            required: true\n            description: Domain name to which TCA needs to be applied\n            default: measurementsForVfScaling\n            constraints:\n            -  equal: measurementsForVfScaling\n         metricsPerEventName:\n            type: list\n            required: true\n            description: Contains eventName and threshold details that need to be applied to given eventName\n            entry_schema:\n               type: onap.datatypes.monitoring.metricsPerEventName\n   onap.datatypes.monitoring.thresholds:\n      derived_from: tosca.datatypes.Root\n      properties:\n         closedLoopControlName:\n            type: string\n            required: true\n            description: Closed Loop Control Name associated with the threshold\n         closedLoopEventStatus:\n            type: string\n            required: true\n            description: Closed Loop Event Status of the threshold\n            constraints:\n            -  valid_values:\n               - ONSET\n               - ABATED\n         direction:\n            type: string\n            required: true\n            description: Direction of the threshold\n            constraints:\n            -  valid_values:\n               - LESS\n               - LESS_OR_EQUAL\n               - GREATER\n               - GREATER_OR_EQUAL\n               - EQUAL\n         fieldPath:\n            type: string\n            required: true\n            description: Json field Path as per CEF message which needs to be analyzed for TCA\n            constraints:\n            -  valid_values:\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage\n               - $.event.measurementsForVfScalingFields.meanRequestLatency\n               - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered\n               - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached\n               - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured\n               - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree\n               - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed\n               - $.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\n         severity:\n            type: string\n            required: true\n            description: Threshold Event Severity\n            constraints:\n            -  valid_values:\n               - CRITICAL\n               - MAJOR\n               - MINOR\n               - WARNING\n               - NORMAL\n         thresholdValue:\n            type: integer\n            required: true\n            description: Threshold value for the field Path inside CEF message\n         version:\n            type: string\n            required: true\n            description: Version number associated with the threshold','{\n  \"supportedPdpGroups\": [\n    {\n      \"monitoring\": [\n        \"xacml\"\n      ]\n    }\n  ]\n}');
-INSERT INTO `policy_models` VALUES ('onap.policies.operational.legacy','1.0.0','Not found','2020-03-09 08:58:07.743663','Not found','2020-03-09 08:58:07.743663','OperationalPolicyLegacy','',NULL);
+INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.Blacklist','1.0.0','Not found','2020-03-09 15:32:42.528466','Not found','2020-03-09 15:32:43.229545','Blacklist','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.controlloop.guard.Common:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: |\n            This is the base Policy Type for Guard policies that guard the execution of Operational\n            Policies.\n        properties:\n            actor:\n                type: string\n                description: Specifies the Actor the guard applies to.\n                required: true\n            operation:\n                type: string\n                description: Specified the operation that the actor is performing the guard applies to.\n                required: true\n            timeRange:\n                type: tosca.datatypes.TimeInterval\n                description: |\n                    An optional range of time during the day the guard policy is valid for.\n                required: false\n            id:\n                type: string\n                description: The Control Loop id this applies to.\n                required: false\n    onap.policies.controlloop.guard.common.Blacklist:\n        derived_from: onap.policies.controlloop.guard.Common\n        type_version: 1.0.0\n        version: 1.0.0\n        description: Supports blacklist of entity id\'s from performing control loop actions on.\n        properties:\n            blacklist:\n                type: list\n                description: List of entity id\'s\n                required: true\n                entry_schema:\n                    type: string','{\n  \"supportedPdpGroups\": [\n    {\n      \"controlloop\": [\n        \"xacml\"\n      ]\n    }\n  ]\n}');
+INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.FrequencyLimiter','1.0.0','Not found','2020-03-09 15:32:42.464419','Not found','2020-03-09 15:32:43.255365','FrequencyLimiter','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.controlloop.guard.Common:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: |\n            This is the base Policy Type for Guard policies that guard the execution of Operational\n            Policies.\n        properties:\n            actor:\n                type: string\n                description: Specifies the Actor the guard applies to.\n                required: true\n            operation:\n                type: string\n                description: Specified the operation that the actor is performing the guard applies to.\n                required: true\n            timeRange:\n                type: tosca.datatypes.TimeInterval\n                description: |\n                    An optional range of time during the day the guard policy is valid for.\n                required: false\n            id:\n                type: string\n                description: The Control Loop id this applies to.\n                required: false\n    onap.policies.controlloop.guard.common.FrequencyLimiter:\n        derived_from: onap.policies.controlloop.guard.Common\n        type_version: 1.0.0\n        version: 1.0.0\n        description: Supports limiting the frequency of actions being taken by a Actor.\n        properties:\n            timeWindow:\n                type: integer\n                description: The time window to count the actions against.\n                required: true\n            timeUnits:\n                type: string\n                description: The units of time the window is counting.\n                constraints:\n                - valid_values: [\"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"year\"]\n            limit:\n                type: integer\n                description: The limit\n                required: true\n                constraints:\n                -   greater_than: 0','{\n  \"supportedPdpGroups\": [\n    {\n      \"controlloop\": [\n        \"xacml\"\n      ]\n    }\n  ]\n}');
+INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.MinMax','2.0.0','Not found','2020-03-09 15:32:42.424488','Not found','2020-03-09 15:32:42.424488','MinMax','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.controlloop.guard.Common:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: |\n            This is the base Policy Type for Guard policies that guard the execution of Operational\n            Policies.\n        properties:\n            actor:\n                type: string\n                description: Specifies the Actor the guard applies to.\n                required: true\n            operation:\n                type: string\n                description: Specified the operation that the actor is performing the guard applies to.\n                required: true\n            timeRange:\n                type: tosca.datatypes.TimeInterval\n                description: |\n                    An optional range of time during the day the guard policy is valid for.\n                required: false\n            id:\n                type: string\n                description: The Control Loop id this applies to.\n                required: false\n    onap.policies.controlloop.guard.common.MinMax:\n        derived_from: onap.policies.controlloop.guard.Common\n        type_version: 1.0.0\n        version: 1.0.0\n        description: Supports Min/Max number of entity for scaling operations\n        properties:\n            min:\n                type: integer\n                required: true\n                description: The minimum instances of this entity\n            max:\n                type: integer\n                required: false\n                description: The maximum instances of this entity',NULL);
+INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Apex','1.0.0','Not found','2020-03-09 15:32:42.460317','Not found','2020-03-09 15:32:43.280860','Apex','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.controlloop.operational.common.Apex:\n        derived_from: onap.policies.controlloop.operational.Common\n        type_version: 1.0.0\n        version: 1.0.0\n        description: Operational policies for Apex PDP\n        properties:\n            engineServiceParameters:\n                type: string\n                description: The engine parameters like name, instanceCount, policy implementation, parameters etc.\n                required: true\n            eventInputParameters:\n                type: string\n                description: The event input parameters.\n                required: true\n            eventOutputParameters:\n                type: string\n                description: The event output parameters.\n                required: true\n            javaProperties:\n                type: string\n                description: Name/value pairs of properties to be set for APEX if needed.\n                required: false\n    onap.policies.controlloop.operational.Common:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: |\n            Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n            Policy Types. This does NOT support the legacy Policy YAML policy type.\n        properties:\n            id:\n                type: string\n                description: The unique control loop id.\n                required: true\n            timeout:\n                type: integer\n                description: |\n                    Overall timeout for executing all the operations. This timeout should equal or exceed the total\n                    timeout for each operation listed.\n                required: true\n            abatement:\n                type: boolean\n                description: Whether an abatement event message will be expected for the control loop from DCAE.\n                required: true\n                default: false\n            trigger:\n                type: string\n                description: Initial operation to execute upon receiving an Onset event message for the Control Loop.\n                required: true\n            operations:\n                type: list\n                description: List of operations to be performed when Control Loop is triggered.\n                required: true\n                entry_schema:\n                    type: onap.datatype.controlloop.Operation\ndata_types:\n    onap.datatype.controlloop.Target:\n        derived_from: tosca.datatypes.Root\n        description: Definition for a entity in A&AI to perform a control loop operation on\n        properties:\n            targetType:\n                type: string\n                description: Category for the target type\n                required: true\n                constraints:\n                - valid_values: [VNF, VM, VFMODULE, PNF]\n            entityIds:\n                type: map\n                description: |\n                    Map of values that identify the resource. If none are provided, it is assumed that the\n                    entity that generated the ONSET event will be the target.\n                required: false\n                entry_schema:\n                    type: string\n\n    onap.datatype.controlloop.Actor:\n        derived_from: tosca.datatypes.Root\n        description: An actor/operation/target definition\n        properties:\n            actor:\n                type: string\n                description: The actor performing the operation.\n                required: true\n            operation:\n                type: string\n                description: The operation the actor is performing.\n                required: true\n            target:\n                type: onap.datatype.controlloop.Target\n                description: The resource the operation should be performed on.\n                required: true\n                metadata:\n                    clamp_possible_values: <string:see clamp project for syntax>\n            payload:\n                type: map\n                description: Name/value pairs of payload information passed by Policy to the actor\n                required: false\n                entry_schema:\n                    type: string\n\n    onap.datatype.controlloop.Operation:\n        derived_from: tosca.datatypes.Root\n        description: An operation supported by an actor\n        properties:\n            id:\n                type: string\n                description: Unique identifier for the operation\n                required: true\n            description:\n                type: string\n                description: A user-friendly description of the intent for the operation\n                required: false\n            operation:\n                type: onap.datatype.controlloop.Actor\n                description: The definition of the operation to be performed.\n                required: true\n                metadata:\n                    clamp_possible_values: <string:see clamp project for syntax>\n            timeout:\n                type: integer\n                description: The amount of time for the actor to perform the operation.\n                required: true\n            retries:\n                type: integer\n                description: The number of retries the actor should attempt to perform the operation.\n                required: true\n                default: 0\n            success:\n                type: string\n                description: Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.\n                required: false\n                default: final_success\n            failure:\n                type: string\n                description: Points to the operation to invoke on Actor operation failure.\n                required: false\n                default: final_failure\n            failure_timeout:\n                type: string\n                description: Points to the operation to invoke when the time out for the operation occurs.\n                required: false\n                default: final_failure_timeout\n            failure_retries:\n                type: string\n                description: Points to the operation to invoke when the current operation has exceeded its max retries.\n                required: false\n                default: final_failure_retries\n            failure_exception:\n                type: string\n                description: Points to the operation to invoke when the current operation causes an exception.\n                required: false\n                default: final_failure_exception\n            failure_guard:\n                type: string\n                description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.\n                required: false\n                default: final_failure_guard','{\n  \"supportedPdpGroups\": [\n    {\n      \"controlloop\": [\n        \"drools\"\n      ]\n    }\n  ]\n}');
+INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Drools','1.0.0','Not found','2020-03-09 15:32:42.385667','Not found','2020-03-09 15:32:43.309310','Drools','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.controlloop.operational.common.Drools:\n        derived_from: onap.policies.controlloop.operational.Common\n        type_version: 1.0.0\n        version: 1.0.0\n        description: Operational policies for Drools PDP\n        properties:\n            controllerName:\n                type: string\n                description: Drools controller properties\n                required: false\n    onap.policies.controlloop.operational.Common:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: |\n            Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n            Policy Types. This does NOT support the legacy Policy YAML policy type.\n        properties:\n            id:\n                type: string\n                description: The unique control loop id.\n                required: true\n            timeout:\n                type: integer\n                description: |\n                    Overall timeout for executing all the operations. This timeout should equal or exceed the total\n                    timeout for each operation listed.\n                required: true\n            abatement:\n                type: boolean\n                description: Whether an abatement event message will be expected for the control loop from DCAE.\n                required: true\n                default: false\n            trigger:\n                type: string\n                description: Initial operation to execute upon receiving an Onset event message for the Control Loop.\n                required: true\n            operations:\n                type: list\n                description: List of operations to be performed when Control Loop is triggered.\n                required: true\n                entry_schema:\n                    type: onap.datatype.controlloop.Operation\ndata_types:\n    onap.datatype.controlloop.Target:\n        derived_from: tosca.datatypes.Root\n        description: Definition for a entity in A&AI to perform a control loop operation on\n        properties:\n            targetType:\n                type: string\n                description: Category for the target type\n                required: true\n                constraints:\n                - valid_values: [VNF, VM, VFMODULE, PNF]\n            entityIds:\n                type: map\n                description: |\n                    Map of values that identify the resource. If none are provided, it is assumed that the\n                    entity that generated the ONSET event will be the target.\n                required: false\n                entry_schema:\n                    type: string\n\n    onap.datatype.controlloop.Actor:\n        derived_from: tosca.datatypes.Root\n        description: An actor/operation/target definition\n        properties:\n            actor:\n                type: string\n                description: The actor performing the operation.\n                required: true\n            operation:\n                type: string\n                description: The operation the actor is performing.\n                required: true\n            target:\n                type: onap.datatype.controlloop.Target\n                description: The resource the operation should be performed on.\n                required: true\n                metadata:\n                    clamp_possible_values: <string:see clamp project for syntax>\n            payload:\n                type: map\n                description: Name/value pairs of payload information passed by Policy to the actor\n                required: false\n                entry_schema:\n                    type: string\n\n    onap.datatype.controlloop.Operation:\n        derived_from: tosca.datatypes.Root\n        description: An operation supported by an actor\n        properties:\n            id:\n                type: string\n                description: Unique identifier for the operation\n                required: true\n            description:\n                type: string\n                description: A user-friendly description of the intent for the operation\n                required: false\n            operation:\n                type: onap.datatype.controlloop.Actor\n                description: The definition of the operation to be performed.\n                required: true\n                metadata:\n                    clamp_possible_values: <string:see clamp project for syntax>\n            timeout:\n                type: integer\n                description: The amount of time for the actor to perform the operation.\n                required: true\n            retries:\n                type: integer\n                description: The number of retries the actor should attempt to perform the operation.\n                required: true\n                default: 0\n            success:\n                type: string\n                description: Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.\n                required: false\n                default: final_success\n            failure:\n                type: string\n                description: Points to the operation to invoke on Actor operation failure.\n                required: false\n                default: final_failure\n            failure_timeout:\n                type: string\n                description: Points to the operation to invoke when the time out for the operation occurs.\n                required: false\n                default: final_failure_timeout\n            failure_retries:\n                type: string\n                description: Points to the operation to invoke when the current operation has exceeded its max retries.\n                required: false\n                default: final_failure_retries\n            failure_exception:\n                type: string\n                description: Points to the operation to invoke when the current operation causes an exception.\n                required: false\n                default: final_failure_exception\n            failure_guard:\n                type: string\n                description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.\n                required: false\n                default: final_failure_guard','{\n  \"supportedPdpGroups\": [\n    {\n      \"controlloop\": [\n        \"drools\"\n      ]\n    }\n  ]\n}');
+INSERT INTO `policy_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','1.0.0','Not found','2020-03-09 15:32:37.762082','Not found','2020-03-09 15:32:43.330702','app','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n   onap.policies.Monitoring:\n      derived_from: tosca.policies.Root\n      version: 1.0.0\n      description: a base policy type for all policies that govern monitoring provisioning\n   onap.policies.monitoring.cdap.tca.hi.lo.app:\n      derived_from: onap.policies.Monitoring\n      version: 1.0.0\n      properties:\n         tca_policy:\n            type: onap.datatypes.monitoring.tca_policy\n            description: TCA Policy JSON\n            required: true\ndata_types:\n   onap.datatypes.monitoring.metricsPerEventName:\n      derived_from: tosca.datatypes.Root\n      properties:\n         controlLoopSchemaType:\n            type: string\n            required: true\n            description: Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\n            constraints:\n            -  valid_values:\n               - VM\n               - VNF\n         eventName:\n            type: string\n            required: true\n            description: Event name to which thresholds need to be applied\n         policyName:\n            type: string\n            required: true\n            description: TCA Policy Scope Name\n         policyScope:\n            type: string\n            required: true\n            description: TCA Policy Scope\n         policyVersion:\n            type: string\n            required: true\n            description: TCA Policy Scope Version\n         thresholds:\n            type: list\n            required: true\n            description: Thresholds associated with eventName\n            entry_schema:\n               type: onap.datatypes.monitoring.thresholds\n   onap.datatypes.monitoring.tca_policy:\n      derived_from: tosca.datatypes.Root\n      properties:\n         domain:\n            type: string\n            required: true\n            description: Domain name to which TCA needs to be applied\n            default: measurementsForVfScaling\n            constraints:\n            -  equal: measurementsForVfScaling\n         metricsPerEventName:\n            type: list\n            required: true\n            description: Contains eventName and threshold details that need to be applied to given eventName\n            entry_schema:\n               type: onap.datatypes.monitoring.metricsPerEventName\n   onap.datatypes.monitoring.thresholds:\n      derived_from: tosca.datatypes.Root\n      properties:\n         closedLoopControlName:\n            type: string\n            required: true\n            description: Closed Loop Control Name associated with the threshold\n         closedLoopEventStatus:\n            type: string\n            required: true\n            description: Closed Loop Event Status of the threshold\n            constraints:\n            -  valid_values:\n               - ONSET\n               - ABATED\n         direction:\n            type: string\n            required: true\n            description: Direction of the threshold\n            constraints:\n            -  valid_values:\n               - LESS\n               - LESS_OR_EQUAL\n               - GREATER\n               - GREATER_OR_EQUAL\n               - EQUAL\n         fieldPath:\n            type: string\n            required: true\n            description: Json field Path as per CEF message which needs to be analyzed for TCA\n            constraints:\n            -  valid_values:\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait\n               - $.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage\n               - $.event.measurementsForVfScalingFields.meanRequestLatency\n               - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered\n               - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached\n               - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured\n               - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree\n               - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed\n               - $.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\n         severity:\n            type: string\n            required: true\n            description: Threshold Event Severity\n            constraints:\n            -  valid_values:\n               - CRITICAL\n               - MAJOR\n               - MINOR\n               - WARNING\n               - NORMAL\n         thresholdValue:\n            type: integer\n            required: true\n            description: Threshold value for the field Path inside CEF message\n         version:\n            type: string\n            required: true\n            description: Version number associated with the threshold','{\n  \"supportedPdpGroups\": [\n    {\n      \"monitoring\": [\n        \"xacml\"\n      ]\n    }\n  ]\n}');
+INSERT INTO `policy_models` VALUES ('onap.policies.operational.legacy','1.0.0','Not found','2020-03-09 15:31:28.413120','Not found','2020-03-09 15:31:28.413120','OperationalPolicyLegacy','',NULL);
 /*!40000 ALTER TABLE `policy_models` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -180,4 +180,4 @@ UNLOCK TABLES;
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
--- Dump completed on 2020-03-09 16:00:40
+-- Dump completed on 2020-03-09 22:34:15
index b0bf827..c6eabcd 100644 (file)
@@ -23,7 +23,6 @@
 
 package org.onap.clamp.clds.tosca.update;
 
-import java.io.IOException;
 import java.util.LinkedHashMap;
 import java.util.Map.Entry;
 import org.yaml.snakeyaml.Yaml;
@@ -33,14 +32,18 @@ public class Extractor {
     private String source;
     private String nativeComponent;
 
-    @SuppressWarnings("unchecked")
-    public Extractor(String toParse, String nativeComponent) throws IOException {
+    /**
+     * Constructor.
+     *
+     * @param toParse Tosca to parse
+     * @param nativeComponent The policy type to scan
+     */
+    public Extractor(String toParse, String nativeComponent) {
 
         this.source = toParse;
         this.nativeComponent = nativeComponent;
         allItems = new LinkedHashMap<String, Component>();
         getAllAsMaps();
-
     }
 
     public LinkedHashMap<String, Component> getAllItems() {
diff --git a/src/main/java/org/onap/clamp/clds/tosca/update/Field.java b/src/main/java/org/onap/clamp/clds/tosca/update/Field.java
new file mode 100644 (file)
index 0000000..e01f14c
--- /dev/null
@@ -0,0 +1,147 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2020 AT&T Intellectual Property. All rights
+ *                             reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ *
+ */
+
+package org.onap.clamp.clds.tosca.update;
+
+public class Field {
+    private String title;
+    private Object value;
+    private Boolean visible;
+    private Boolean staticValue;
+
+    public Field(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param title       The title
+     * @param value       The value
+     * @param visible     visible or not
+     * @param staticValue The static value
+     */
+    public Field(String title, Object value, Boolean visible, Boolean staticValue) {
+        this.title = title;
+        this.value = value;
+        this.visible = visible;
+        this.staticValue = staticValue;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public Object getValue() {
+        return value;
+    }
+
+    public void setValue(Object value) {
+        this.value = value;
+    }
+
+    public Boolean getVisible() {
+        return visible;
+    }
+
+    public void setVisible(Boolean visible) {
+        this.visible = visible;
+    }
+
+    public Boolean getStaticValue() {
+        return staticValue;
+    }
+
+    public void setStaticValue(Boolean staticValue) {
+        this.staticValue = staticValue;
+    }
+
+    public String toString() {
+        return title + " " + value + " " + visible + " " + staticValue;
+    }
+
+    /**
+     * This method compares two fields.
+     *
+     * @param otherField Compare the current object with the one specified
+     * @return true if they are totally equals, false otherwise
+     */
+    public boolean compareWithField(Object otherField) {
+        if (this == otherField) {
+            return true;
+        }
+        if (otherField == null || getClass() != otherField.getClass()) {
+            return false;
+        }
+
+        Field field = (Field) otherField;
+
+        if (title != null ? !title.equals(field.title) : field.title != null) {
+            return false;
+        }
+        if (value != null ? !value.equals(field.value) : field.value != null) {
+            return false;
+        }
+        if (visible != null ? !visible.equals(field.visible) : field.visible != null) {
+            return false;
+        }
+        return staticValue != null ? staticValue.equals(field.staticValue) : field.staticValue == null;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (object == null || getClass() != object.getClass()) {
+            return false;
+        }
+
+        Field field = (Field) object;
+
+        return title != null ? title.equals(field.title) : field.title == null;
+    }
+
+    @Override
+    public int hashCode() {
+        return title != null ? title.hashCode() : 0;
+    }
+
+    /**
+     * This method test the entire equality.
+     *
+     * @param field1 object one
+     * @param field2 object two
+     * @return true if they are totally equals (all attributes, false otherwise
+     */
+    public static boolean fieldsEquals(Field field1, Field field2) {
+        return (field2.getTitle().equals(field1.getTitle()) && field2.getValue().equals(field1.getValue())
+                && field2.getVisible().equals(field1.getVisible())
+                && field2.getStaticValue().equals(field1.getStaticValue()));
+    }
+
+}
index 7bf629d..3c5cf97 100644 (file)
@@ -227,7 +227,7 @@ public class ParserToJson {
 
                         switch ((String) property.getItems().get("type")) {
                             case "map": // Get it as an object
-                                JsonObject componentAsProperty = child.getJsonProcess(nameComponent,"object");
+                                JsonObject componentAsProperty = child.getJsonProcess(nameComponent, "object");
                                 propertiesContainer.add(nameComponent, componentAsProperty);
                                 if (currentPropertyTemplate.hasFields("properties")) {
                                     propertiesInJson.add("properties", propertiesContainer);
@@ -247,13 +247,13 @@ public class ParserToJson {
                         JsonObject itemContainer = new JsonObject();
                         String valueInEntrySchema = this.extractSpecificFieldFromMap(property, "entry_schema");
                         itemContainer.addProperty("type", valueInEntrySchema);
-                          propertiesInJson.add("items", itemContainer);
-                    }
-                    else {//map
-                        // propertiesInJson.add("key?", valueInEntrySchema);
+                        propertiesInJson.add("items", itemContainer);
                     }
+                    // MAP Case, for now nothing
+
                     break;
-                default://Each classical field : type, description, default..
+                default:
+                    //Each classical field : type, description, default..
                     if (currentPropertyTemplate.hasFields(propertyField) && !propertyField.equals("required")) {
                         property.addFieldToJson(propertiesInJson, propertyField,
                                 property.getItems().get(propertyField));
index 3445906..4507e3d 100644 (file)
@@ -23,7 +23,9 @@
 
 package org.onap.clamp.clds.tosca.update;
 
+import com.google.gson.JsonObject;
 import java.util.ArrayList;
+import java.util.List;
 
 public class Template {
 
@@ -31,14 +33,14 @@ public class Template {
      * name parameter is used as "key", in the LinkedHashMap of Templates.
      */
     private String name;
-    private ArrayList<String> fields;
+    private List<Field> fields;
 
     public Template(String name) {
         this.name = name;
-        this.fields = new ArrayList<String>();
+        this.fields = new ArrayList<>();
     }
 
-    public Template(String name, ArrayList<String> fields) {
+    public Template(String name, List<Field> fields) {
         this.name = name;
         this.fields = fields;
     }
@@ -51,26 +53,94 @@ public class Template {
         this.name = name;
     }
 
-    public ArrayList<String> getFields() {
+    public List<Field> getFields() {
         return fields;
     }
 
-    public void setFields(ArrayList<String> fields) {
+    public void setFields(List<Field> fields) {
         this.fields = fields;
     }
 
-    public boolean hasFields(String name) {
-        return fields.contains(name);
+    /**
+     * Search in fields if fieldName exists.
+     *
+     * @param fieldName The field name
+     * @return Ture if it exists, false otherwise
+     */
+    public boolean hasFields(String fieldName) {
+        for (Field field : this.getFields()) {
+            if (field.getTitle().equals(fieldName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Get a specific Field.
+     *
+     * @param fieldName The field name
+     * @return THe Field found
+     */
+    public Field getSpecificField(String fieldName) {
+        for (Field field : this.getFields()) {
+            if (field.getTitle().equals(fieldName)) {
+                return field;
+            }
+        }
+        return null;
     }
 
-    public void addField(String field) {
+    public void addField(Field field) {
         fields.add(field);
     }
 
-    public void removeField(String field) {
+    public void removeField(Field field) {
         fields.remove(field);
     }
 
+    /**
+     * Enable or disable the visibility.
+     *
+     * @param nameField THe field name
+     * @param state True or false
+     */
+    public void setVisibility(String nameField, boolean state) {
+        for (Field field : this.fields) {
+            if (field.getTitle().equals(nameField)) {
+                field.setVisible(state);
+            }
+        }
+    }
+
+    /**
+     * This method defines if a field is static or not.
+     *
+     * @param nameField The name of the field
+     * @param state true or false
+     */
+    public void setStatic(String nameField, boolean state) {
+        for (Field field : this.fields) {
+            if (field.getTitle().equals(nameField)) {
+                field.setStaticValue(state);
+            }
+        }
+    }
+
+    /**
+     * This method updates the value of a specfic field.
+     *
+     * @param nameField The name of the field
+     * @param newValue The new value as Object
+     */
+    public void updateValueField(String nameField, Object newValue) {
+        for (Field field : this.fields) {
+            if (field.getTitle().equals(nameField)) {
+                field.setValue(newValue);
+            }
+        }
+    }
+
     /**
      * Compare two templates : size and their contents.
      *
@@ -78,15 +148,15 @@ public class Template {
      * @return a boolean
      */
     public boolean checkFields(Template template) {
-
         boolean duplicateFields = false;
         if (template.getFields().size() == this.getFields().size()) {
             int countMatchingFields = 0;
             //loop each component of first
-            for (String templateField : template.getFields()) {
-                //if component.key is present in the second
-                if (this.getFields().contains(templateField)) {
-                    countMatchingFields++;
+            for (Field templateFieldToCheck : template.getFields()) {
+                for (Field templateField : this.getFields()) {
+                    if (templateFieldToCheck.compareWithField(templateField)) {
+                        countMatchingFields++;
+                    }
                 }
             }
 
@@ -97,6 +167,56 @@ public class Template {
         return duplicateFields;
     }
 
+    /**
+     * This method gets the specific field status.
+     *
+     * @param field The field name
+     * @return true or false
+     */
+    public boolean fieldStaticStatus(String field) {
+        if (this.hasFields(field) && this.getSpecificField(field).getStaticValue().equals(true)
+                && this.getSpecificField(field).getValue() != null) {
+            return true;
+        }
+        return false;
+    }
+
+    public boolean isVisible(String field) {
+        return this.getSpecificField(field).getVisible();
+    }
+
+    /**
+     * Set the value of a property of the Field in the json.
+     *
+     * @param jsonSchema The Json schema
+     * @param fieldName The Field name
+     * @param value The value
+     */
+    public void setValue(JsonObject jsonSchema, String fieldName, String value) {
+        if (isVisible(fieldName)) {
+            if (fieldStaticStatus(fieldName)) {
+                String defaultValue = (String) this.getSpecificField(fieldName).getValue();
+                jsonSchema.addProperty(fieldName, defaultValue);
+            }
+            else {
+                jsonSchema.addProperty(fieldName, value);
+            }
+        }
+    }
+
+    /**
+     * Inject a static value in the json.
+     *
+     * @param jsonSchema The json schema object
+     * @param fieldName The field name
+     */
+    public void injectStaticValue(JsonObject jsonSchema, String fieldName) {
+        if (isVisible(fieldName)) {
+            Field toInject = this.getSpecificField(fieldName);
+            jsonSchema.addProperty(fieldName, (String) toInject.getValue());
+        }
+    }
+
     @Override
     public String toString() {
         return " fields : " + fields;
index ce5cdb8..7430771 100644 (file)
 
 package org.onap.clamp.clds.tosca.update;
 
+import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import java.io.IOException;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.LinkedHashMap;
-import java.util.Properties;
+import java.util.List;
+import java.util.Map;
+import org.onap.clamp.clds.util.JsonUtils;
 
 public class TemplateManagement {
 
@@ -93,7 +93,7 @@ public class TemplateManagement {
      * @param name   name
      * @param fields fields
      */
-    public void addTemplate(String name, ArrayList<String> fields) {
+    public void addTemplate(String name, List<Field> fields) {
         Template template = new Template(name, fields);
         //If it is true, the operation does not have any interest :
         // replace OR put two different object with the same body
@@ -115,17 +115,17 @@ public class TemplateManagement {
      * Update Template : adding with true flag, removing with false.
      *
      * @param nameTemplate name template
-     * @param fieldName    field name
+     * @param field        field name
      * @param operation    operation
      */
-    public void updateTemplate(String nameTemplate, String fieldName, Boolean operation) {
+    public void updateTemplate(String nameTemplate, Field field, Boolean operation) {
         // Operation = true && field is not present => add Field
-        if (operation && !this.templates.get(nameTemplate).getFields().contains(fieldName)) {
-            this.templates.get(nameTemplate).addField(fieldName);
+        if (operation && !this.templates.get(nameTemplate).getFields().contains(field)) {
+            this.templates.get(nameTemplate).addField(field);
         }
         // Operation = false && field is present => remove Field
-        else if (!operation && this.templates.get(nameTemplate).getFields().contains(fieldName)) {
-            this.templates.get(nameTemplate).removeField(fieldName);
+        else if (!operation && this.templates.get(nameTemplate).getFields().contains(field)) {
+            this.templates.get(nameTemplate).removeField(field);
         }
     }
 
@@ -162,20 +162,30 @@ public class TemplateManagement {
     /**
      * Create and complete several Templates from file.properties.
      *
-     * @param templateProperties The template properties as String
+     * @param jsonTemplates The template properties as String
      * @return a map
      */
-    private LinkedHashMap<String, Template> initializeTemplates(String templateProperties) throws IOException {
-        LinkedHashMap<String, Template> generatedTemplates = new LinkedHashMap<>();
-        Properties templates = new Properties();
-        templates.load(new StringReader(templateProperties));
+    @SuppressWarnings("unused")
+    private LinkedHashMap<String, Template> initializeTemplates(String jsonTemplates) {
 
-        for (Object key : templates.keySet()) {
-            String fields = (String) templates.get(key);
-            String[] fieldsInArray = fields.split(",");
-            Template template = new Template((String) key, new ArrayList<>(Arrays.asList(fieldsInArray)));
+        LinkedHashMap<String, Template> generatedTemplates = new LinkedHashMap<>();
+        JsonObject templates = JsonUtils.GSON.fromJson(jsonTemplates, JsonObject.class);
+
+        for (Map.Entry<String, JsonElement> templateAsJson : templates.entrySet()) {
+            Template template = new Template(templateAsJson.getKey());
+            JsonObject templateBody = (JsonObject) templateAsJson.getValue();
+            for (Map.Entry<String, JsonElement> field : templateBody.entrySet()) {
+                String fieldName = field.getKey();
+                JsonObject bodyFieldAsJson = (JsonObject) field.getValue();
+                Object fieldValue = bodyFieldAsJson.get("defaultValue").getAsString();
+                Boolean fieldVisible = bodyFieldAsJson.get("visible").getAsBoolean();
+                Boolean fieldStatic = bodyFieldAsJson.get("static").getAsBoolean();
+                Field bodyField = new Field(fieldName, fieldValue, fieldVisible, fieldStatic);
+                template.getFields().add(bodyField);
+            }
             generatedTemplates.put(template.getName(), template);
         }
         return generatedTemplates;
     }
+
 }
index 004c450..d52e418 100644 (file)
@@ -294,7 +294,7 @@ public abstract class Policy extends AuditEntity {
      * @param policyModelType The tosca model type (the policy_type entry in the tosca) that will used to create the
      *                        json schema
      * @return THe Json Schema as JsonObject
-     * @throws IOException In case of failure when opening the templates.properties file
+     * @throws IOException In case of failure when opening the templates.json file
      * @throws UnknownComponentException If the policyModelType is not found in the tosca model
      */
     public static JsonObject generateJsonRepresentationFromToscaModel(String policyToscaModel,
@@ -302,7 +302,7 @@ public abstract class Policy extends AuditEntity {
             throws IOException, UnknownComponentException {
         return new TemplateManagement(policyToscaModel,ResourceFileUtil.getResourceAsString(
                 "clds/tosca_update/defaultToscaTypes.yaml"),
-                ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"))
+                ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"))
                 .launchTranslation(policyModelType);
     }
 }
index 96b3a09..b8093cc 100644 (file)
@@ -108,7 +108,9 @@ public class MicroServicePolicy extends Policy implements Serializable {
         this.setPolicyModel(policyModel);
         this.shared = shared;
         try {
-            this.setJsonRepresentation(Policy.generateJsonRepresentationFromToscaModel(policyModel.getPolicyModelTosca(),policyModel.getPolicyModelType()));
+            this.setJsonRepresentation(
+                    Policy.generateJsonRepresentationFromToscaModel(policyModel.getPolicyModelTosca(),
+                            policyModel.getPolicyModelType()));
         } catch (UnknownComponentException | NullPointerException | IOException e) {
             logger.error("Unable to generate the microservice policy Schema ... ", e);
             this.setJsonRepresentation(new JsonObject());
@@ -130,7 +132,8 @@ public class MicroServicePolicy extends Policy implements Serializable {
      * @param pdpSubgroup        The Pdp Subgrouop info
      */
     public MicroServicePolicy(String name, PolicyModel policyModel, Boolean shared,
-                              JsonObject jsonRepresentation, LoopElementModel loopElementModel, String pdpGroup, String pdpSubgroup) {
+                              JsonObject jsonRepresentation, LoopElementModel loopElementModel, String pdpGroup,
+                              String pdpSubgroup) {
         this.name = name;
         this.setPolicyModel(policyModel);
         this.shared = shared;
@@ -265,7 +268,8 @@ public class MicroServicePolicy extends Policy implements Serializable {
             if (other.name != null) {
                 return false;
             }
-        } else if (!name.equals(other.name)) {
+        }
+        else if (!name.equals(other.name)) {
             return false;
         }
         return true;
index 3ad97c5..9bc641c 100644 (file)
@@ -63,11 +63,12 @@ public class MicroServicePolicyService implements PolicyService<MicroServicePoli
         return repository.save(
                 repository.findById(policy.getName()).map(p -> updateMicroservicePolicyProperties(p, policy, loop))
                         .orElse(new MicroServicePolicy(policy.getName(), policy.getPolicyModel(),
-                                policy.getShared(), policy.getJsonRepresentation(),null, policy.getPdpGroup(), policy.getPdpSubgroup())));
+                                policy.getShared(), policy.getJsonRepresentation(), null, policy.getPdpGroup(),
+                                policy.getPdpSubgroup())));
     }
 
     private MicroServicePolicy updateMicroservicePolicyProperties(MicroServicePolicy oldPolicy,
-            MicroServicePolicy newPolicy, Loop loop) {
+                                                                  MicroServicePolicy newPolicy, Loop loop) {
         oldPolicy.setConfigurationsJson(newPolicy.getConfigurationsJson());
         if (!oldPolicy.getUsedByLoops().contains(loop)) {
             oldPolicy.getUsedByLoops().add(loop);
@@ -85,7 +86,7 @@ public class MicroServicePolicyService implements PolicyService<MicroServicePoli
      * @param deploymentUrl      The Deployment URL as returned by DCAE
      */
     public void updateDcaeDeploymentFields(MicroServicePolicy microServicePolicy, String deploymentId,
-            String deploymentUrl) {
+                                           String deploymentUrl) {
         microServicePolicy.setDcaeDeploymentId(deploymentId);
         microServicePolicy.setDcaeDeploymentStatusUrl(deploymentUrl);
         repository.save(microServicePolicy);
index 62f3000..69e9c7c 100644 (file)
@@ -444,25 +444,25 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </li>
 <li><a href="#_paths">2. Paths</a>
 <ul class="sectlevel2">
-<li><a href="#_route92">2.1. GET /v1/healthcheck</a>
+<li><a href="#_route61">2.1. GET /v1/healthcheck</a>
 <ul class="sectlevel3">
 <li><a href="#_responses">2.1.1. Responses</a></li>
 <li><a href="#_produces">2.1.2. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route93">2.2. GET /v1/user/getUser</a>
+<li><a href="#_route62">2.2. GET /v1/user/getUser</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_2">2.2.1. Responses</a></li>
 <li><a href="#_produces_2">2.2.2. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route80">2.3. GET /v2/dictionary</a>
+<li><a href="#_route49">2.3. GET /v2/dictionary</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_3">2.3.1. Responses</a></li>
 <li><a href="#_produces_3">2.3.2. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route82">2.4. PUT /v2/dictionary</a>
+<li><a href="#_route51">2.4. PUT /v2/dictionary</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters">2.4.1. Parameters</a></li>
 <li><a href="#_responses_4">2.4.2. Responses</a></li>
@@ -491,7 +491,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 <li><a href="#_produces_7">2.7.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route84">2.8. DELETE /v2/dictionary/{name}</a>
+<li><a href="#_route53">2.8. DELETE /v2/dictionary/{name}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_4">2.8.1. Parameters</a></li>
 <li><a href="#_responses_8">2.8.2. Responses</a></li>
@@ -505,75 +505,75 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 <li><a href="#_produces_9">2.9.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route76">2.10. PUT /v2/loop/delete/{loopName}</a>
+<li><a href="#_route45">2.10. PUT /v2/loop/delete/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_6">2.10.1. Parameters</a></li>
 <li><a href="#_responses_10">2.10.2. Responses</a></li>
 </ul>
 </li>
-<li><a href="#_route70">2.11. PUT /v2/loop/deploy/{loopName}</a>
+<li><a href="#_route39">2.11. PUT /v2/loop/deploy/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_7">2.11.1. Parameters</a></li>
 <li><a href="#_responses_11">2.11.2. Responses</a></li>
 <li><a href="#_produces_10">2.11.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route64">2.12. GET /v2/loop/getAllNames</a>
+<li><a href="#_route33">2.12. GET /v2/loop/getAllNames</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_12">2.12.1. Responses</a></li>
 <li><a href="#_produces_11">2.12.2. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route77">2.13. GET /v2/loop/getstatus/{loopName}</a>
+<li><a href="#_route46">2.13. GET /v2/loop/getstatus/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_8">2.13.1. Parameters</a></li>
 <li><a href="#_responses_13">2.13.2. Responses</a></li>
 <li><a href="#_produces_12">2.13.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route71">2.14. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</a>
+<li><a href="#_route40">2.14. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_9">2.14.1. Parameters</a></li>
 <li><a href="#_responses_14">2.14.2. Responses</a></li>
 <li><a href="#_produces_13">2.14.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route74">2.15. PUT /v2/loop/restart/{loopName}</a>
+<li><a href="#_route43">2.15. PUT /v2/loop/restart/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_10">2.15.1. Parameters</a></li>
 <li><a href="#_responses_15">2.15.2. Responses</a></li>
 <li><a href="#_produces_14">2.15.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route73">2.16. PUT /v2/loop/stop/{loopName}</a>
+<li><a href="#_route42">2.16. PUT /v2/loop/stop/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_11">2.16.1. Parameters</a></li>
 <li><a href="#_responses_16">2.16.2. Responses</a></li>
 <li><a href="#_produces_15">2.16.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route75">2.17. PUT /v2/loop/submit/{loopName}</a>
+<li><a href="#_route44">2.17. PUT /v2/loop/submit/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_12">2.17.1. Parameters</a></li>
 <li><a href="#_responses_17">2.17.2. Responses</a></li>
 <li><a href="#_produces_16">2.17.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route66">2.18. GET /v2/loop/svgRepresentation/{loopName}</a>
+<li><a href="#_route35">2.18. GET /v2/loop/svgRepresentation/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_13">2.18.1. Parameters</a></li>
 <li><a href="#_responses_18">2.18.2. Responses</a></li>
 <li><a href="#_produces_17">2.18.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route72">2.19. PUT /v2/loop/undeploy/{loopName}</a>
+<li><a href="#_route41">2.19. PUT /v2/loop/undeploy/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_14">2.19.1. Parameters</a></li>
 <li><a href="#_responses_19">2.19.2. Responses</a></li>
 <li><a href="#_produces_18">2.19.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route67">2.20. POST /v2/loop/updateGlobalProperties/{loopName}</a>
+<li><a href="#_route36">2.20. POST /v2/loop/updateGlobalProperties/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_15">2.20.1. Parameters</a></li>
 <li><a href="#_responses_20">2.20.2. Responses</a></li>
@@ -581,7 +581,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 <li><a href="#_produces_19">2.20.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route69">2.21. POST /v2/loop/updateMicroservicePolicy/{loopName}</a>
+<li><a href="#_route38">2.21. POST /v2/loop/updateMicroservicePolicy/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_16">2.21.1. Parameters</a></li>
 <li><a href="#_responses_21">2.21.2. Responses</a></li>
@@ -589,7 +589,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 <li><a href="#_produces_20">2.21.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route68">2.22. POST /v2/loop/updateOperationalPolicies/{loopName}</a>
+<li><a href="#_route37">2.22. POST /v2/loop/updateOperationalPolicies/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_17">2.22.1. Parameters</a></li>
 <li><a href="#_responses_22">2.22.2. Responses</a></li>
@@ -597,14 +597,14 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 <li><a href="#_produces_21">2.22.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route65">2.23. GET /v2/loop/{loopName}</a>
+<li><a href="#_route34">2.23. GET /v2/loop/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_18">2.23.1. Parameters</a></li>
 <li><a href="#_responses_23">2.23.2. Responses</a></li>
 <li><a href="#_produces_22">2.23.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route87">2.24. GET /v2/policyToscaModels</a>
+<li><a href="#_route56">2.24. GET /v2/policyToscaModels</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_24">2.24.1. Responses</a></li>
 <li><a href="#_produces_23">2.24.2. Produces</a></li>
@@ -624,7 +624,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 <li><a href="#_produces_25">2.26.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route88">2.27. PUT /v2/policyToscaModels/{policyModelType}</a>
+<li><a href="#_route57">2.27. PUT /v2/policyToscaModels/{policyModelType}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_21">2.27.1. Parameters</a></li>
 <li><a href="#_responses_27">2.27.2. Responses</a></li>
@@ -632,7 +632,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 <li><a href="#_produces_26">2.27.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route91">2.28. GET /v2/templates</a>
+<li><a href="#_route60">2.28. GET /v2/templates</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_28">2.28.1. Responses</a></li>
 <li><a href="#_produces_27">2.28.2. Produces</a></li>
@@ -692,7 +692,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 <div class="sect2">
 <h3 id="_uri_scheme"><a class="anchor" href="#_uri_scheme"></a><a class="link" href="#_uri_scheme">1.2. URI scheme</a></h3>
 <div class="paragraph">
-<p><em>Host</em> : localhost:40597<br>
+<p><em>Host</em> : localhost:39237<br>
 <em>BasePath</em> : /restservices/clds/<br>
 <em>Schemes</em> : HTTP</p>
 </div>
@@ -703,7 +703,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 <h2 id="_paths"><a class="anchor" href="#_paths"></a><a class="link" href="#_paths">2. Paths</a></h2>
 <div class="sectionbody">
 <div class="sect2">
-<h3 id="_route92"><a class="anchor" href="#_route92"></a><a class="link" href="#_route92">2.1. GET /v1/healthcheck</a></h3>
+<h3 id="_route61"><a class="anchor" href="#_route61"></a><a class="link" href="#_route61">2.1. GET /v1/healthcheck</a></h3>
 <div class="sect3">
 <h4 id="_responses"><a class="anchor" href="#_responses"></a><a class="link" href="#_responses">2.1.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -740,7 +740,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route93"><a class="anchor" href="#_route93"></a><a class="link" href="#_route93">2.2. GET /v1/user/getUser</a></h3>
+<h3 id="_route62"><a class="anchor" href="#_route62"></a><a class="link" href="#_route62">2.2. GET /v1/user/getUser</a></h3>
 <div class="sect3">
 <h4 id="_responses_2"><a class="anchor" href="#_responses_2"></a><a class="link" href="#_responses_2">2.2.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -774,7 +774,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route80"><a class="anchor" href="#_route80"></a><a class="link" href="#_route80">2.3. GET /v2/dictionary</a></h3>
+<h3 id="_route49"><a class="anchor" href="#_route49"></a><a class="link" href="#_route49">2.3. GET /v2/dictionary</a></h3>
 <div class="sect3">
 <h4 id="_responses_3"><a class="anchor" href="#_responses_3"></a><a class="link" href="#_responses_3">2.3.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -811,7 +811,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route82"><a class="anchor" href="#_route82"></a><a class="link" href="#_route82">2.4. PUT /v2/dictionary</a></h3>
+<h3 id="_route51"><a class="anchor" href="#_route51"></a><a class="link" href="#_route51">2.4. PUT /v2/dictionary</a></h3>
 <div class="sect3">
 <h4 id="_parameters"><a class="anchor" href="#_parameters"></a><a class="link" href="#_parameters">2.4.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1060,7 +1060,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route84"><a class="anchor" href="#_route84"></a><a class="link" href="#_route84">2.8. DELETE /v2/dictionary/{name}</a></h3>
+<h3 id="_route53"><a class="anchor" href="#_route53"></a><a class="link" href="#_route53">2.8. DELETE /v2/dictionary/{name}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_4"><a class="anchor" href="#_parameters_4"></a><a class="link" href="#_parameters_4">2.8.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1184,7 +1184,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route76"><a class="anchor" href="#_route76"></a><a class="link" href="#_route76">2.10. PUT /v2/loop/delete/{loopName}</a></h3>
+<h3 id="_route45"><a class="anchor" href="#_route45"></a><a class="link" href="#_route45">2.10. PUT /v2/loop/delete/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_6"><a class="anchor" href="#_parameters_6"></a><a class="link" href="#_parameters_6">2.10.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1233,7 +1233,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route70"><a class="anchor" href="#_route70"></a><a class="link" href="#_route70">2.11. PUT /v2/loop/deploy/{loopName}</a></h3>
+<h3 id="_route39"><a class="anchor" href="#_route39"></a><a class="link" href="#_route39">2.11. PUT /v2/loop/deploy/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_7"><a class="anchor" href="#_parameters_7"></a><a class="link" href="#_parameters_7">2.11.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1295,7 +1295,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route64"><a class="anchor" href="#_route64"></a><a class="link" href="#_route64">2.12. GET /v2/loop/getAllNames</a></h3>
+<h3 id="_route33"><a class="anchor" href="#_route33"></a><a class="link" href="#_route33">2.12. GET /v2/loop/getAllNames</a></h3>
 <div class="sect3">
 <h4 id="_responses_12"><a class="anchor" href="#_responses_12"></a><a class="link" href="#_responses_12">2.12.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1332,7 +1332,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route77"><a class="anchor" href="#_route77"></a><a class="link" href="#_route77">2.13. GET /v2/loop/getstatus/{loopName}</a></h3>
+<h3 id="_route46"><a class="anchor" href="#_route46"></a><a class="link" href="#_route46">2.13. GET /v2/loop/getstatus/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_8"><a class="anchor" href="#_parameters_8"></a><a class="link" href="#_parameters_8">2.13.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1394,7 +1394,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route71"><a class="anchor" href="#_route71"></a><a class="link" href="#_route71">2.14. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</a></h3>
+<h3 id="_route40"><a class="anchor" href="#_route40"></a><a class="link" href="#_route40">2.14. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_9"><a class="anchor" href="#_parameters_9"></a><a class="link" href="#_parameters_9">2.14.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1456,7 +1456,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route74"><a class="anchor" href="#_route74"></a><a class="link" href="#_route74">2.15. PUT /v2/loop/restart/{loopName}</a></h3>
+<h3 id="_route43"><a class="anchor" href="#_route43"></a><a class="link" href="#_route43">2.15. PUT /v2/loop/restart/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_10"><a class="anchor" href="#_parameters_10"></a><a class="link" href="#_parameters_10">2.15.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1518,7 +1518,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route73"><a class="anchor" href="#_route73"></a><a class="link" href="#_route73">2.16. PUT /v2/loop/stop/{loopName}</a></h3>
+<h3 id="_route42"><a class="anchor" href="#_route42"></a><a class="link" href="#_route42">2.16. PUT /v2/loop/stop/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_11"><a class="anchor" href="#_parameters_11"></a><a class="link" href="#_parameters_11">2.16.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1580,7 +1580,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route75"><a class="anchor" href="#_route75"></a><a class="link" href="#_route75">2.17. PUT /v2/loop/submit/{loopName}</a></h3>
+<h3 id="_route44"><a class="anchor" href="#_route44"></a><a class="link" href="#_route44">2.17. PUT /v2/loop/submit/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_12"><a class="anchor" href="#_parameters_12"></a><a class="link" href="#_parameters_12">2.17.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1642,7 +1642,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route66"><a class="anchor" href="#_route66"></a><a class="link" href="#_route66">2.18. GET /v2/loop/svgRepresentation/{loopName}</a></h3>
+<h3 id="_route35"><a class="anchor" href="#_route35"></a><a class="link" href="#_route35">2.18. GET /v2/loop/svgRepresentation/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_13"><a class="anchor" href="#_parameters_13"></a><a class="link" href="#_parameters_13">2.18.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1704,7 +1704,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route72"><a class="anchor" href="#_route72"></a><a class="link" href="#_route72">2.19. PUT /v2/loop/undeploy/{loopName}</a></h3>
+<h3 id="_route41"><a class="anchor" href="#_route41"></a><a class="link" href="#_route41">2.19. PUT /v2/loop/undeploy/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_14"><a class="anchor" href="#_parameters_14"></a><a class="link" href="#_parameters_14">2.19.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1766,7 +1766,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route67"><a class="anchor" href="#_route67"></a><a class="link" href="#_route67">2.20. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3>
+<h3 id="_route36"><a class="anchor" href="#_route36"></a><a class="link" href="#_route36">2.20. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_15"><a class="anchor" href="#_parameters_15"></a><a class="link" href="#_parameters_15">2.20.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1844,7 +1844,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route69"><a class="anchor" href="#_route69"></a><a class="link" href="#_route69">2.21. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3>
+<h3 id="_route38"><a class="anchor" href="#_route38"></a><a class="link" href="#_route38">2.21. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_16"><a class="anchor" href="#_parameters_16"></a><a class="link" href="#_parameters_16">2.21.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1922,7 +1922,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route68"><a class="anchor" href="#_route68"></a><a class="link" href="#_route68">2.22. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3>
+<h3 id="_route37"><a class="anchor" href="#_route37"></a><a class="link" href="#_route37">2.22. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_17"><a class="anchor" href="#_parameters_17"></a><a class="link" href="#_parameters_17">2.22.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -2000,7 +2000,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route65"><a class="anchor" href="#_route65"></a><a class="link" href="#_route65">2.23. GET /v2/loop/{loopName}</a></h3>
+<h3 id="_route34"><a class="anchor" href="#_route34"></a><a class="link" href="#_route34">2.23. GET /v2/loop/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_18"><a class="anchor" href="#_parameters_18"></a><a class="link" href="#_parameters_18">2.23.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -2062,7 +2062,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route87"><a class="anchor" href="#_route87"></a><a class="link" href="#_route87">2.24. GET /v2/policyToscaModels</a></h3>
+<h3 id="_route56"><a class="anchor" href="#_route56"></a><a class="link" href="#_route56">2.24. GET /v2/policyToscaModels</a></h3>
 <div class="sect3">
 <h4 id="_responses_24"><a class="anchor" href="#_responses_24"></a><a class="link" href="#_responses_24">2.24.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -2223,7 +2223,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route88"><a class="anchor" href="#_route88"></a><a class="link" href="#_route88">2.27. PUT /v2/policyToscaModels/{policyModelType}</a></h3>
+<h3 id="_route57"><a class="anchor" href="#_route57"></a><a class="link" href="#_route57">2.27. PUT /v2/policyToscaModels/{policyModelType}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_21"><a class="anchor" href="#_parameters_21"></a><a class="link" href="#_parameters_21">2.27.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -2301,7 +2301,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route91"><a class="anchor" href="#_route91"></a><a class="link" href="#_route91">2.28. GET /v2/templates</a></h3>
+<h3 id="_route60"><a class="anchor" href="#_route60"></a><a class="link" href="#_route60">2.28. GET /v2/templates</a></h3>
 <div class="sect3">
 <h4 id="_responses_28"><a class="anchor" href="#_responses_28"></a><a class="link" href="#_responses_28">2.28.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
index 320e0c2..288511b 100644 (file)
@@ -173,4 +173,7 @@ clamp.config.security.permission.type.template=org.onap.clamp.clds.template
 clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca
 #This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties
 clamp.config.security.permission.instance=dev
-clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal
\ No newline at end of file
+clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal
+
+## Tosca converter
+clamp.config.tosca.converter.templates=classpath:/clds/tosca_updates/templates.json
\ No newline at end of file
index ed7f4ef..a249d2d 100644 (file)
@@ -189,7 +189,7 @@ clamp.config.cadi.aafUrl=https://AAF_LOCATE_URL/onap.org.osaaf.aaf.service:2.1
 clamp.config.cadi.cadiX509Issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_9, OU=OSAAF, O=ONAP, C=US
 
 ## Tosca converter
-clamp.config.tosca.converter.templates=classpath:/clds/tosca_updates/templates.properties
+clamp.config.tosca.converter.templates=classpath:/clds/tosca_updates/templates.json
 
 # Configuration settings for CDS
 clamp.config.cds.url=http4://blueprints-processor-http:8080
diff --git a/src/main/resources/clds/tosca_update/templates.json b/src/main/resources/clds/tosca_update/templates.json
new file mode 100644 (file)
index 0000000..f709e2f
--- /dev/null
@@ -0,0 +1,398 @@
+{
+       "integer":{
+               "type":{
+                       "defaultValue":"integer",
+                       "visible":true,
+                       "static":false
+               },
+               "description":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "title":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+
+               },
+               "deprecated":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "default":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "enum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "const":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "multipleOf":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "maximum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "exclusiveMaximum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "minimum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "exclusiveMinimum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               }
+       },
+       "number":{
+               "type":{
+                       "defaultValue":"number",
+                       "visible":true,
+                       "static":false
+               },
+               "description":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "title":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+
+               },
+               "deprecated":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "default":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "enum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "const":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "multipleOf":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "maximum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "exclusiveMaximum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "minimum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "exclusiveMinimum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               }
+       },
+       "boolean":{
+               "type":{
+                       "defaultValue":"boolean",
+                       "visible":true,
+                       "static":false
+               },
+               "description":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "title":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "deprecated":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "default":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "const":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               }
+       },
+       "string":{
+               "type":{
+                       "defaultValue":"string",
+                       "visible":true,
+                       "static":false
+               },
+               "description":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "title":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "deprecated":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "default":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "enum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "const":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "length":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "minLength":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "maxLength":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "pattern":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "format":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               }
+       },
+       "timestamp":{
+               "type":{
+                       "defaultValue":"string",
+                       "visible":true,
+                       "static":false
+               },
+               "description":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "title":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "deprecated":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "default":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "enum":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "const":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "length":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "minLength":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "maxLength":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "pattern":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "format":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               }
+       },
+       "array":{
+               "type":{
+                       "defaultValue":"array",
+                       "visible":true,
+                       "static":false
+               },
+               "description":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "title":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "deprecated":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "default":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "const":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "uniqueItems":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "properties":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "minContains":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "maxContains":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "minItems":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "maxItems":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               }
+       },
+       "object":{
+               "type":{
+                       "defaultValue":"object",
+                       "visible":true,
+                       "static":false
+               },
+               "description":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":true
+               },
+               "title":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "format":{
+                       "defaultValue":"tabs",
+                       "visible":true,
+                       "static":true
+               },
+               "required":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "minProperties":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "maxProperties":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "properties":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "dependentRequired":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               },
+               "dependencies":{
+                       "defaultValue":"",
+                       "visible":true,
+                       "static":false
+               }
+       }
+}
\ No newline at end of file
index c65c84a..a99d4ab 100644 (file)
@@ -40,7 +40,7 @@ public class ArrayFieldTest extends TestCase {
         TemplateManagement templateManagement = new TemplateManagement(ResourceFileUtil.getResourceAsString(
                 "tosca/new-converter/sampleOperationalPoliciesEXTENTED.yaml"),ResourceFileUtil.getResourceAsString(
                 "clds/tosca_update/defaultToscaTypes.yaml"),
-                ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         Component component = templateManagement.getComponents().get("onap.datatype.controlloop.Actor");
         Property property = component.getProperties().get("actor");
         ArrayField arrayParser = new ArrayField((ArrayList<Object>) property.getItems().get("default"));
index f5d2fe6..565547e 100644 (file)
@@ -42,7 +42,7 @@ public class ComponentTest extends TestCase {
                 new TemplateManagement(\r
                         ResourceFileUtil.getResourceAsString("tosca/new-converter/sampleOperationalPolicies.yaml"),\r
                         ResourceFileUtil.getResourceAsString("clds/tosca_update/defaultToscaTypes.yaml"),\r
-                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));\r
+                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));\r
         Component component = templateManagement.getComponents().get("onap.datatype.controlloop.Actor");\r
         assertEquals(reference, component.propertiesNames());\r
     }\r
index 6f1046e..a4d329e 100644 (file)
@@ -34,7 +34,7 @@ public class ConstraintTest extends TestCase {
     TemplateManagement templateManagement = new TemplateManagement(
             ResourceFileUtil.getResourceAsString("tosca/new-converter/constraints.yaml"),
             ResourceFileUtil.getResourceAsString("clds/tosca_update/defaultToscaTypes.yaml"),
-            ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+            ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
 
     Component component = templateManagement.getComponents().get("onap.datatype.controlloop.Operation");
 
index 5a99559..62def32 100644 (file)
@@ -43,7 +43,7 @@ public class PropertyTest extends TestCase {
         TemplateManagement templateManagement = new TemplateManagement(
                 ResourceFileUtil.getResourceAsString("tosca/new-converter/sampleOperationalPoliciesEXTENTED.yaml"),
                 ResourceFileUtil.getResourceAsString("clds/tosca_update/defaultToscaTypes.yaml"),
-                ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         Component component = templateManagement.getComponents().get("onap.datatype.controlloop.Actor");
         Property property = component.getProperties().get("actor");
         JsonArray toTest = property.parseArray((ArrayList<Object>) property.getItems().get("default"));
@@ -59,7 +59,7 @@ public class PropertyTest extends TestCase {
         TemplateManagement templateManagement = new TemplateManagement(
                 ResourceFileUtil.getResourceAsString("tosca/new-converter/sampleOperationalPolicies.yaml"),
                 ResourceFileUtil.getResourceAsString("clds/tosca_update/defaultToscaTypes.yaml"),
-                ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         Component component = templateManagement.getComponents().get("onap.datatype.controlloop.operation.Failure");
         Property property = component.getProperties().get("category");
         Template template = templateManagement.getTemplates().get("string");
index 4447a98..aaa5493 100644 (file)
@@ -26,6 +26,7 @@ package org.onap.clamp.clds.tosca.update;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 import junit.framework.TestCase;
 import org.onap.clamp.clds.util.ResourceFileUtil;
 
@@ -44,7 +45,7 @@ public class TemplateManagementTest extends TestCase {
                                 + ".policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0&#63;"
                                 + "connectionTimeToLive=5000/.file"), ResourceFileUtil.getResourceAsString(
                         "clds/tosca_update/defaultToscaTypes.yaml"),
-                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         assertNull(templateManagement.getParseToJson());
         String componentName = "onap.policies.monitoring.cdap.tca.hi.lo.app";
         templateManagement.launchTranslation(componentName);
@@ -64,7 +65,7 @@ public class TemplateManagementTest extends TestCase {
                                 + ".policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0&#63;"
                                 + "connectionTimeToLive=5000/.file"), ResourceFileUtil.getResourceAsString(
                         "clds/tosca_update/defaultToscaTypes.yaml"),
-                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         assertNull(templateManagement.getParseToJson());
         String componentName = "onap.policies.controlloop.guard.common.FrequencyLimiter";
         templateManagement.launchTranslation(componentName);
@@ -84,7 +85,7 @@ public class TemplateManagementTest extends TestCase {
                                 + ".policies.controlloop.operational.common.Apex/versions/1.0.0&#63;"
                                 + "connectionTimeToLive=5000/.file"), ResourceFileUtil.getResourceAsString(
                         "clds/tosca_update/defaultToscaTypes.yaml"),
-                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         assertNull(templateManagement.getParseToJson());
         String componentName = "onap.policies.controlloop.operational.common.Apex";
         templateManagement.launchTranslation(componentName);
@@ -104,7 +105,7 @@ public class TemplateManagementTest extends TestCase {
                                 + ".policies.controlloop.operational.common.Drools/versions/1.0.0&#63;"
                                 + "connectionTimeToLive=5000/.file"), ResourceFileUtil.getResourceAsString(
                         "clds/tosca_update/defaultToscaTypes.yaml"),
-                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         assertNull(templateManagement.getParseToJson());
         String componentName = "onap.policies.controlloop.operational.common.Drools";
         templateManagement.launchTranslation(componentName);
@@ -122,7 +123,7 @@ public class TemplateManagementTest extends TestCase {
                 new TemplateManagement(
                         ResourceFileUtil.getResourceAsString("tosca/new-converter/sampleOperationalPolicies.yaml"),
                         ResourceFileUtil.getResourceAsString("clds/tosca_update/defaultToscaTypes.yaml"),
-                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         assertNull(templateManagement.getParseToJson());
         String componentName = "onap.policies.controlloop.operational.common.Drools";
         templateManagement.launchTranslation(componentName);
@@ -139,10 +140,12 @@ public class TemplateManagementTest extends TestCase {
                 new TemplateManagement(
                         ResourceFileUtil.getResourceAsString("tosca/new-converter/sampleOperationalPolicies.yaml"),
                         ResourceFileUtil.getResourceAsString("clds/tosca_update/defaultToscaTypes.yaml"),
-                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         int count = templateManagement.getTemplates().size();
-        ArrayList<String> templateFields =
-                new ArrayList<>(Arrays.asList("type", "description", "required", "metadata", "constraints"));
+        List<Field> templateFields = new ArrayList<>(Arrays.asList(new Field("type"), new Field("description"),
+                new Field(
+                "required"),
+                new Field("metadata"), new Field("constraints")));
         templateManagement.addTemplate("test", templateFields);
         assertNotSame(count, templateManagement.getTemplates().size());
     }
@@ -157,7 +160,7 @@ public class TemplateManagementTest extends TestCase {
                 new TemplateManagement(
                         ResourceFileUtil.getResourceAsString("tosca/new-converter/sampleOperationalPolicies.yaml"),
                         ResourceFileUtil.getResourceAsString("clds/tosca_update/defaultToscaTypes.yaml"),
-                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         int count = templateManagement.getTemplates().size();
         templateManagement.removeTemplate("string");
         assertNotSame(count, templateManagement.getTemplates().size());
@@ -173,9 +176,9 @@ public class TemplateManagementTest extends TestCase {
                 new TemplateManagement(
                         ResourceFileUtil.getResourceAsString("tosca/new-converter/sampleOperationalPolicies.yaml"),
                         ResourceFileUtil.getResourceAsString("clds/tosca_update/defaultToscaTypes.yaml"),
-                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         int count = templateManagement.getTemplates().get("integer").getFields().size();
-        templateManagement.updateTemplate("integer", "type", false);
+        templateManagement.updateTemplate("integer", new Field("type"), false);
         assertNotSame(count, templateManagement.getTemplates().get("integer").getFields().size());
     }
 
@@ -189,10 +192,11 @@ public class TemplateManagementTest extends TestCase {
                 new TemplateManagement(
                         ResourceFileUtil.getResourceAsString("tosca/new-converter/sampleOperationalPolicies.yaml"),
                         ResourceFileUtil.getResourceAsString("clds/tosca_update/defaultToscaTypes.yaml"),
-                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.properties"));
+                        ResourceFileUtil.getResourceAsString("clds/tosca_update/templates.json"));
         boolean has = true;
-        ArrayList<String> templateFieldsString =
-                new ArrayList<>(Arrays.asList("type", "description", "required", "metadata", "constraints"));
+        List<Field> templateFieldsString =
+                new ArrayList<>(Arrays.asList(new Field("type"), new Field("description"), new Field("required"),
+                        new Field("metadata"), new Field("constraints")));
         Template templateTest = new Template("String", templateFieldsString);
         has = templateManagement.hasTemplate(templateTest);
         assertEquals(false, has);
index ebc119f..4ffb4e2 100644 (file)
@@ -25,6 +25,7 @@ package org.onap.clamp.clds.tosca.update;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 import junit.framework.TestCase;
 
 public class TemplateTest extends TestCase {
@@ -34,7 +35,8 @@ public class TemplateTest extends TestCase {
      */
     public void testCheckFields() {
         Template toTest = new Template("toTest");
-        ArrayList<String> fields = new ArrayList<>(Arrays.asList("type", "description", "enum"));
+        List<Field> fields = new ArrayList<>(Arrays.asList(new Field("type"), new Field("description"),new Field(
+                "enum")));
         toTest.setFields(fields);
         Template reference = new Template("toTest");
         reference.setFields(fields);
index f08e86e..03b2e50 100644 (file)
@@ -77,7 +77,8 @@ public class PolicyEngineControllerTestItCase {
                 .contains(new PolicyModel("onap.policies.controlloop.guard.common.FrequencyLimiter", null, "1.0.0"));
         assertThat(policyModelsList)
                 .contains(new PolicyModel("onap.policies.controlloop.guard.common.Blacklist", null, "1.0.0"));
-        assertThat(policyModelsList).contains(new PolicyModel("onap.policies.controlloop.guard.common.MinMax", null, "2.0.0"));
+        assertThat(policyModelsList)
+                .contains(new PolicyModel("onap.policies.controlloop.guard.common.MinMax", null, "2.0.0"));
 
         // Re-do it to check that there is no issue with duplicate key
         policyController.synchronizeAllPolicies();
index 54ba090..0e45353 100644 (file)
@@ -165,4 +165,7 @@ clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Princ
 # Configuration settings for CDS
 clamp.config.cds.url=http4://localhost:${docker.http-cache.port.host}
 clamp.config.cds.userName=ccsdkapps
-clamp.config.cds.password=ccsdkapps
\ No newline at end of file
+clamp.config.cds.password=ccsdkapps
+
+## Tosca converter
+clamp.config.tosca.converter.templates=classpath:/clds/tosca_updates/templates.json
\ No newline at end of file