Add template and tosca model entities and repositories

Add Control loop template, tosca model and model policy properties
hibernate entity classes and crud repositories

Issue-ID: CLAMP-555
Change-Id: Ib7f07aca5ad2ddf5caff7c98ea9341bdc147e817
Signed-off-by: nrpandya <neenendra.pandya@att.com>
diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json
index 0738c6f..32113cc 100644
--- a/docs/swagger/swagger.json
+++ b/docs/swagger/swagger.json
@@ -1,16 +1,16 @@
 {
   "swagger" : "2.0",
   "info" : {
-    "version" : "4.1.2-SNAPSHOT",
+    "version" : "4.2.0-SNAPSHOT",
     "title" : "Clamp Rest API"
   },
-  "host" : "localhost:34219",
+  "host" : "localhost:33953",
   "basePath" : "/restservices/clds/",
   "schemes" : [ "http" ],
   "paths" : {
     "/v2/loop/{loopName}" : {
       "get" : {
-        "operationId" : "route3",
+        "operationId" : "route20",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -26,13 +26,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route3"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route20"
       }
     },
     "/v2/loop/delete/{loopName}" : {
       "put" : {
-        "operationId" : "route13",
+        "operationId" : "route30",
         "parameters" : [ {
           "name" : "loopName",
           "in" : "path",
@@ -42,13 +42,13 @@
         "responses" : {
           "200" : { }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route13"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route30"
       }
     },
     "/v2/loop/deploy/{loopName}" : {
       "put" : {
-        "operationId" : "route8",
+        "operationId" : "route25",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -64,13 +64,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route8"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route25"
       }
     },
     "/v2/loop/getAllNames" : {
       "get" : {
-        "operationId" : "route2",
+        "operationId" : "route19",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
@@ -83,13 +83,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route2"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route19"
       }
     },
     "/v2/loop/getstatus/{loopName}" : {
       "get" : {
-        "operationId" : "route14",
+        "operationId" : "route31",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -105,13 +105,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route14"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route31"
       }
     },
     "/v2/loop/restart/{loopName}" : {
       "put" : {
-        "operationId" : "route11",
+        "operationId" : "route28",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -127,13 +127,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route11"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route28"
       }
     },
     "/v2/loop/stop/{loopName}" : {
       "put" : {
-        "operationId" : "route10",
+        "operationId" : "route27",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -149,13 +149,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route10"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route27"
       }
     },
     "/v2/loop/submit/{loopName}" : {
       "put" : {
-        "operationId" : "route12",
+        "operationId" : "route29",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -171,13 +171,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route12"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route29"
       }
     },
     "/v2/loop/svgRepresentation/{loopName}" : {
       "get" : {
-        "operationId" : "route4",
+        "operationId" : "route21",
         "produces" : [ "application/xml" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -193,13 +193,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route4"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route21"
       }
     },
     "/v2/loop/undeploy/{loopName}" : {
       "put" : {
-        "operationId" : "route9",
+        "operationId" : "route26",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -215,13 +215,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route9"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route26"
       }
     },
     "/v2/loop/updateGlobalProperties/{loopName}" : {
       "post" : {
-        "operationId" : "route5",
+        "operationId" : "route22",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
@@ -245,13 +245,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route5"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route22"
       }
     },
     "/v2/loop/updateMicroservicePolicy/{loopName}" : {
       "post" : {
-        "operationId" : "route7",
+        "operationId" : "route24",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
@@ -275,13 +275,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route7"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route24"
       }
     },
     "/v2/loop/updateOperationalPolicies/{loopName}" : {
       "post" : {
-        "operationId" : "route6",
+        "operationId" : "route23",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
@@ -305,13 +305,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route6"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route23"
       }
     },
     "/v1/clds/cldsInfo" : {
       "get" : {
-        "operationId" : "route15",
+        "operationId" : "route32",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
@@ -321,13 +321,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route15"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route32"
       }
     },
     "/v1/healthcheck" : {
       "get" : {
-        "operationId" : "route16",
+        "operationId" : "route33",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
@@ -337,19 +337,19 @@
             }
           }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route16"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route33"
       }
     },
     "/v1/user/getUser" : {
       "get" : {
-        "operationId" : "route17",
+        "operationId" : "route34",
         "produces" : [ "text/plain" ],
         "responses" : {
           "200" : { }
         },
-        "x-camelContextId" : "camel-1",
-        "x-routeId" : "route17"
+        "x-camelContextId" : "camel-2",
+        "x-routeId" : "route34"
       }
     }
   },
@@ -357,6 +357,20 @@
     "Loop" : {
       "type" : "object",
       "properties" : {
+        "createdDate" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "updatedDate" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "updatedBy" : {
+          "type" : "string"
+        },
+        "createdBy" : {
+          "type" : "string"
+        },
         "name" : {
           "type" : "string"
         },
@@ -375,8 +389,8 @@
         "globalPropertiesJson" : {
           "$ref" : "#/definitions/JsonObject"
         },
-        "modelPropertiesJson" : {
-          "$ref" : "#/definitions/JsonObject"
+        "modelService" : {
+          "$ref" : "#/definitions/Service"
         },
         "blueprint" : {
           "type" : "string"
@@ -411,6 +425,9 @@
           "items" : {
             "$ref" : "#/definitions/LoopLog"
           }
+        },
+        "loopTemplate" : {
+          "$ref" : "#/definitions/LoopTemplate"
         }
       },
       "x-className" : {
@@ -418,128 +435,62 @@
         "format" : "org.onap.clamp.loop.Loop"
       }
     },
-    "JsonArray" : {
+    "MicroServiceModel" : {
+      "type" : "object",
+      "properties" : {
+        "createdDate" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "updatedDate" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "updatedBy" : {
+          "type" : "string"
+        },
+        "createdBy" : {
+          "type" : "string"
+        },
+        "name" : {
+          "type" : "string"
+        },
+        "policyType" : {
+          "type" : "string"
+        },
+        "blueprint" : {
+          "type" : "string"
+        },
+        "policyModel" : {
+          "$ref" : "#/definitions/PolicyModel"
+        },
+        "usedByLoopTemplates" : {
+          "type" : "array",
+          "uniqueItems" : true,
+          "items" : {
+            "$ref" : "#/definitions/TemplateMicroServiceModel"
+          }
+        }
+      }
+    },
+    "JsonPrimitive" : {
       "type" : "object",
       "properties" : {
         "asBoolean" : {
           "type" : "boolean"
         },
-        "asNumber" : {
-          "$ref" : "#/definitions/Number"
-        },
-        "asString" : {
-          "type" : "string"
-        },
-        "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"
-        },
-        "asCharacter" : {
-          "type" : "string"
-        },
-        "asBigDecimal" : {
-          "type" : "number"
-        },
-        "asBigInteger" : {
-          "type" : "integer"
-        },
-        "asShort" : {
-          "type" : "integer",
-          "format" : "int32"
-        },
-        "asJsonPrimitive" : {
-          "$ref" : "#/definitions/JsonPrimitive"
-        },
-        "asJsonNull" : {
-          "$ref" : "#/definitions/JsonNull"
-        },
-        "jsonArray" : {
-          "type" : "boolean"
-        },
-        "jsonObject" : {
-          "type" : "boolean"
-        },
-        "jsonNull" : {
-          "type" : "boolean"
-        },
-        "jsonPrimitive" : {
-          "type" : "boolean"
-        },
-        "asJsonObject" : {
-          "$ref" : "#/definitions/JsonObject"
-        },
-        "asJsonArray" : {
-          "$ref" : "#/definitions/JsonArray"
-        }
-      },
-      "x-className" : {
-        "type" : "string",
-        "format" : "com.google.gson.JsonArray"
-      }
-    },
-    "LoopLog" : {
-      "type" : "object",
-      "properties" : {
-        "id" : {
-          "type" : "integer",
-          "format" : "int64"
-        },
-        "logType" : {
-          "type" : "string",
-          "enum" : [ "INFO", "WARNING", "ERROR" ]
-        },
-        "logComponent" : {
-          "type" : "string"
-        },
-        "message" : {
-          "type" : "string"
-        },
-        "loop" : {
-          "$ref" : "#/definitions/Loop"
-        },
-        "logInstant" : {
-          "type" : "integer",
-          "format" : "int64"
-        }
-      }
-    },
-    "Number" : {
-      "type" : "object"
-    },
-    "JsonPrimitive" : {
-      "type" : "object",
-      "properties" : {
         "boolean" : {
           "type" : "boolean"
         },
         "number" : {
           "type" : "boolean"
         },
-        "asBoolean" : {
-          "type" : "boolean"
+        "asString" : {
+          "type" : "string"
         },
         "asNumber" : {
           "$ref" : "#/definitions/Number"
         },
-        "asString" : {
-          "type" : "string"
-        },
         "asDouble" : {
           "type" : "number",
           "format" : "double"
@@ -576,41 +527,61 @@
         "string" : {
           "type" : "boolean"
         },
+        "asJsonObject" : {
+          "$ref" : "#/definitions/JsonObject"
+        },
+        "asJsonArray" : {
+          "$ref" : "#/definitions/JsonArray"
+        },
         "asJsonPrimitive" : {
           "$ref" : "#/definitions/JsonPrimitive"
         },
-        "asJsonNull" : {
-          "$ref" : "#/definitions/JsonNull"
-        },
         "jsonArray" : {
           "type" : "boolean"
         },
         "jsonObject" : {
           "type" : "boolean"
         },
-        "jsonNull" : {
-          "type" : "boolean"
-        },
         "jsonPrimitive" : {
           "type" : "boolean"
         },
-        "asJsonObject" : {
-          "$ref" : "#/definitions/JsonObject"
+        "jsonNull" : {
+          "type" : "boolean"
         },
-        "asJsonArray" : {
-          "$ref" : "#/definitions/JsonArray"
+        "asJsonNull" : {
+          "$ref" : "#/definitions/JsonNull"
         }
       }
     },
     "MicroServicePolicy" : {
       "type" : "object",
       "properties" : {
+        "createdDate" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "updatedDate" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "updatedBy" : {
+          "type" : "string"
+        },
+        "createdBy" : {
+          "type" : "string"
+        },
         "name" : {
           "type" : "string"
         },
         "modelType" : {
           "type" : "string"
         },
+        "context" : {
+          "type" : "string"
+        },
+        "deviceTypeScope" : {
+          "type" : "string"
+        },
         "properties" : {
           "$ref" : "#/definitions/JsonObject"
         },
@@ -629,6 +600,9 @@
           "items" : {
             "$ref" : "#/definitions/Loop"
           }
+        },
+        "microServiceModel" : {
+          "$ref" : "#/definitions/MicroServiceModel"
         }
       },
       "x-className" : {
@@ -639,21 +613,39 @@
     "JsonObject" : {
       "type" : "object",
       "properties" : {
+        "asBoolean" : {
+          "type" : "boolean"
+        },
+        "asJsonObject" : {
+          "$ref" : "#/definitions/JsonObject"
+        },
+        "asString" : {
+          "type" : "string"
+        },
+        "asJsonArray" : {
+          "$ref" : "#/definitions/JsonArray"
+        },
         "asJsonPrimitive" : {
           "$ref" : "#/definitions/JsonPrimitive"
         },
+        "jsonArray" : {
+          "type" : "boolean"
+        },
+        "jsonObject" : {
+          "type" : "boolean"
+        },
+        "jsonPrimitive" : {
+          "type" : "boolean"
+        },
+        "jsonNull" : {
+          "type" : "boolean"
+        },
         "asJsonNull" : {
           "$ref" : "#/definitions/JsonNull"
         },
-        "asBoolean" : {
-          "type" : "boolean"
-        },
         "asNumber" : {
           "$ref" : "#/definitions/Number"
         },
-        "asString" : {
-          "type" : "string"
-        },
         "asDouble" : {
           "type" : "number",
           "format" : "double"
@@ -686,24 +678,6 @@
         "asShort" : {
           "type" : "integer",
           "format" : "int32"
-        },
-        "jsonArray" : {
-          "type" : "boolean"
-        },
-        "jsonObject" : {
-          "type" : "boolean"
-        },
-        "jsonNull" : {
-          "type" : "boolean"
-        },
-        "jsonPrimitive" : {
-          "type" : "boolean"
-        },
-        "asJsonObject" : {
-          "$ref" : "#/definitions/JsonObject"
-        },
-        "asJsonArray" : {
-          "$ref" : "#/definitions/JsonArray"
         }
       },
       "x-className" : {
@@ -711,14 +685,51 @@
         "format" : "com.google.gson.JsonObject"
       }
     },
-    "ExternalComponent" : {
+    "PolicyModel" : {
       "type" : "object",
       "properties" : {
-        "state" : {
-          "$ref" : "#/definitions/ExternalComponentState"
+        "createdDate" : {
+          "type" : "integer",
+          "format" : "int64"
         },
-        "componentName" : {
+        "updatedDate" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "updatedBy" : {
           "type" : "string"
+        },
+        "createdBy" : {
+          "type" : "string"
+        },
+        "policyModelType" : {
+          "type" : "string"
+        },
+        "version" : {
+          "type" : "string"
+        },
+        "policyModelTosca" : {
+          "type" : "string"
+        },
+        "policyAcronym" : {
+          "type" : "string"
+        },
+        "policyVariant" : {
+          "type" : "string"
+        }
+      }
+    },
+    "Service" : {
+      "type" : "object",
+      "properties" : {
+        "serviceUuid" : {
+          "type" : "string"
+        },
+        "serviceDetails" : {
+          "$ref" : "#/definitions/JsonObject"
+        },
+        "resourceDetails" : {
+          "$ref" : "#/definitions/JsonObject"
         }
       }
     },
@@ -734,44 +745,97 @@
         "loop" : {
           "$ref" : "#/definitions/Loop"
         },
+        "policyModel" : {
+          "$ref" : "#/definitions/PolicyModel"
+        },
         "jsonRepresentation" : {
           "$ref" : "#/definitions/JsonObject"
         }
       }
     },
-    "ExternalComponentState" : {
-      "type" : "object",
-      "properties" : {
-        "stateName" : {
-          "type" : "string"
-        },
-        "description" : {
-          "type" : "string"
-        },
-        "level" : {
-          "type" : "integer",
-          "format" : "int32"
-        }
-      }
-    },
     "JsonNull" : {
       "type" : "object",
       "properties" : {
+        "asBoolean" : {
+          "type" : "boolean"
+        },
+        "asJsonObject" : {
+          "$ref" : "#/definitions/JsonObject"
+        },
+        "asString" : {
+          "type" : "string"
+        },
+        "asJsonArray" : {
+          "$ref" : "#/definitions/JsonArray"
+        },
         "asJsonPrimitive" : {
           "$ref" : "#/definitions/JsonPrimitive"
         },
+        "jsonArray" : {
+          "type" : "boolean"
+        },
+        "jsonObject" : {
+          "type" : "boolean"
+        },
+        "jsonPrimitive" : {
+          "type" : "boolean"
+        },
+        "jsonNull" : {
+          "type" : "boolean"
+        },
         "asJsonNull" : {
           "$ref" : "#/definitions/JsonNull"
         },
-        "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"
+        },
+        "asCharacter" : {
+          "type" : "string"
+        },
+        "asBigDecimal" : {
+          "type" : "number"
+        },
+        "asBigInteger" : {
+          "type" : "integer"
+        },
+        "asShort" : {
+          "type" : "integer",
+          "format" : "int32"
+        }
+      }
+    },
+    "JsonArray" : {
+      "type" : "object",
+      "properties" : {
+        "asBoolean" : {
+          "type" : "boolean"
+        },
         "asString" : {
           "type" : "string"
         },
+        "asNumber" : {
+          "$ref" : "#/definitions/Number"
+        },
         "asDouble" : {
           "type" : "number",
           "format" : "double"
@@ -805,23 +869,145 @@
           "type" : "integer",
           "format" : "int32"
         },
+        "asJsonObject" : {
+          "$ref" : "#/definitions/JsonObject"
+        },
+        "asJsonArray" : {
+          "$ref" : "#/definitions/JsonArray"
+        },
+        "asJsonPrimitive" : {
+          "$ref" : "#/definitions/JsonPrimitive"
+        },
         "jsonArray" : {
           "type" : "boolean"
         },
         "jsonObject" : {
           "type" : "boolean"
         },
-        "jsonNull" : {
-          "type" : "boolean"
-        },
         "jsonPrimitive" : {
           "type" : "boolean"
         },
-        "asJsonObject" : {
-          "$ref" : "#/definitions/JsonObject"
+        "jsonNull" : {
+          "type" : "boolean"
         },
-        "asJsonArray" : {
-          "$ref" : "#/definitions/JsonArray"
+        "asJsonNull" : {
+          "$ref" : "#/definitions/JsonNull"
+        }
+      },
+      "x-className" : {
+        "type" : "string",
+        "format" : "com.google.gson.JsonArray"
+      }
+    },
+    "LoopLog" : {
+      "type" : "object",
+      "properties" : {
+        "id" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "logType" : {
+          "type" : "string",
+          "enum" : [ "INFO", "WARNING", "ERROR" ]
+        },
+        "logComponent" : {
+          "type" : "string"
+        },
+        "message" : {
+          "type" : "string"
+        },
+        "loop" : {
+          "$ref" : "#/definitions/Loop"
+        },
+        "logInstant" : {
+          "type" : "integer",
+          "format" : "int64"
+        }
+      }
+    },
+    "TemplateMicroServiceModel" : {
+      "type" : "object",
+      "properties" : {
+        "loopTemplate" : {
+          "$ref" : "#/definitions/LoopTemplate"
+        },
+        "microServiceModel" : {
+          "$ref" : "#/definitions/MicroServiceModel"
+        },
+        "flowOrder" : {
+          "type" : "integer",
+          "format" : "int32"
+        }
+      }
+    },
+    "Number" : {
+      "type" : "object"
+    },
+    "ExternalComponent" : {
+      "type" : "object",
+      "properties" : {
+        "state" : {
+          "$ref" : "#/definitions/ExternalComponentState"
+        },
+        "componentName" : {
+          "type" : "string"
+        }
+      }
+    },
+    "LoopTemplate" : {
+      "type" : "object",
+      "properties" : {
+        "createdDate" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "updatedDate" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "updatedBy" : {
+          "type" : "string"
+        },
+        "createdBy" : {
+          "type" : "string"
+        },
+        "name" : {
+          "type" : "string"
+        },
+        "blueprint" : {
+          "type" : "string"
+        },
+        "svgRepresentation" : {
+          "type" : "string"
+        },
+        "microServiceModelUsed" : {
+          "type" : "array",
+          "uniqueItems" : true,
+          "items" : {
+            "$ref" : "#/definitions/TemplateMicroServiceModel"
+          }
+        },
+        "modelService" : {
+          "$ref" : "#/definitions/Service"
+        },
+        "maximumInstancesAllowed" : {
+          "type" : "integer",
+          "format" : "int32"
+        }
+      }
+    },
+    "ExternalComponentState" : {
+      "type" : "object",
+      "properties" : {
+        "stateName" : {
+          "type" : "string"
+        },
+        "description" : {
+          "type" : "string"
+        },
+        "level" : {
+          "type" : "integer",
+          "format" : "int32"
         }
       }
     },
diff --git a/docs/swagger/swagger.pdf b/docs/swagger/swagger.pdf
index 2997589..8a34cb5 100644
--- a/docs/swagger/swagger.pdf
+++ b/docs/swagger/swagger.pdf
Binary files differ
diff --git a/extra/sql/bulkload/create-tables.sql b/extra/sql/bulkload/create-tables.sql
index 6e9ff7c..c5b52d7 100644
--- a/extra/sql/bulkload/create-tables.sql
+++ b/extra/sql/bulkload/create-tables.sql
@@ -1,4 +1,29 @@
 
+    create table dictionary (
+       name varchar(255) not null,
+        created_by varchar(255),
+        created_timestamp datetime(6) not null,
+        updated_by varchar(255),
+        updated_timestamp datetime(6) not null,
+        dictionary_second_level integer,
+        dictionary_type varchar(255),
+        primary key (name)
+    ) engine=InnoDB;
+
+    create table dictionary_elements (
+       name varchar(255) not null,
+        created_by varchar(255),
+        created_timestamp datetime(6) not null,
+        updated_by varchar(255),
+        updated_timestamp datetime(6) not null,
+        description varchar(255),
+        short_name varchar(255) not null,
+        subdictionary_id varchar(255) not null,
+        type varchar(255) not null,
+        dictionary_id varchar(255),
+        primary key (name)
+    ) engine=InnoDB;
+
     create table hibernate_sequence (
        next_val bigint
     ) engine=InnoDB;
@@ -15,8 +40,25 @@
         primary key (id)
     ) engine=InnoDB;
 
+    create table loop_templates (
+       name varchar(255) not null,
+        created_by varchar(255),
+        created_timestamp datetime(6) not null,
+        updated_by varchar(255),
+        updated_timestamp datetime(6) not null,
+        blueprint_yaml MEDIUMTEXT not null,
+        maximum_instances_allowed integer,
+        svg_representation MEDIUMTEXT,
+        service_uuid varchar(255),
+        primary key (name)
+    ) engine=InnoDB;
+
     create table loops (
        name varchar(255) not null,
+        created_by varchar(255),
+        created_timestamp datetime(6) not null,
+        updated_by varchar(255),
+        updated_timestamp datetime(6) not null,
         blueprint_yaml MEDIUMTEXT not null,
         dcae_blueprint_id varchar(255),
         dcae_deployment_id varchar(255),
@@ -24,6 +66,7 @@
         global_properties_json json,
         last_computed_state varchar(255) not null,
         svg_representation MEDIUMTEXT,
+        loop_template_name varchar(255),
         service_uuid varchar(255),
         primary key (name)
     ) engine=InnoDB;
@@ -34,13 +77,33 @@
         primary key (loop_id, microservicepolicy_id)
     ) engine=InnoDB;
 
+    create table micro_service_models (
+       name varchar(255) not null,
+        created_by varchar(255),
+        created_timestamp datetime(6) not null,
+        updated_by varchar(255),
+        updated_timestamp datetime(6) not null,
+        blueprint_yaml varchar(255) not null,
+        policy_type varchar(255) not null,
+        policy_model_type varchar(255),
+        policy_model_version varchar(255),
+        primary key (name)
+    ) engine=InnoDB;
+
     create table micro_service_policies (
        name varchar(255) not null,
+        created_by varchar(255),
+        created_timestamp datetime(6) not null,
+        updated_by varchar(255),
+        updated_timestamp datetime(6) not null,
+        context varchar(255),
+        device_type_scope varchar(255),
         json_representation json not null,
-        model_type varchar(255) not null,
+        policy_model_type varchar(255) not null,
         policy_tosca MEDIUMTEXT not null,
         properties json,
         shared bit not null,
+        micro_service_model_id varchar(255),
         primary key (name)
     ) engine=InnoDB;
 
@@ -49,9 +112,24 @@
         configurations_json json,
         json_representation json not null,
         loop_id varchar(255) not null,
+        policy_model_type varchar(255),
+        policy_model_version varchar(255),
         primary key (name)
     ) engine=InnoDB;
 
+    create table policy_models (
+       policy_model_type varchar(255) not null,
+        version varchar(255) not null,
+        created_by varchar(255),
+        created_timestamp datetime(6) not null,
+        updated_by varchar(255),
+        updated_timestamp datetime(6) not null,
+        policy_acronym varchar(255),
+        policy_tosca MEDIUMTEXT,
+        policy_variant varchar(255),
+        primary key (policy_model_type, version)
+    ) engine=InnoDB;
+
     create table services (
        service_uuid varchar(255) not null,
         name varchar(255) not null,
@@ -61,11 +139,36 @@
         primary key (service_uuid)
     ) engine=InnoDB;
 
+    create table templates_microservicemodels (
+       loop_template_name varchar(255) not null,
+        micro_service_model_name varchar(255) not null,
+        flow_order integer not null,
+        primary key (loop_template_name, micro_service_model_name)
+    ) engine=InnoDB;
+
+    alter table dictionary_elements 
+       add constraint UK_qxkrvsrhp26m60apfvxphpl3d unique (short_name);
+
+    alter table dictionary_elements 
+       add constraint FKn87bpgpm9i56w7uko585rbkgn 
+       foreign key (dictionary_id) 
+       references dictionary (name);
+
     alter table loop_logs 
        add constraint FK1j0cda46aickcaoxqoo34khg2 
        foreign key (loop_id) 
        references loops (name);
 
+    alter table loop_templates 
+       add constraint FKn692dk6281wvp1o95074uacn6 
+       foreign key (service_uuid) 
+       references services (service_uuid);
+
+    alter table loops 
+       add constraint FK844uwy82wt0l66jljkjqembpj 
+       foreign key (loop_template_name) 
+       references loop_templates (name);
+
     alter table loops 
        add constraint FK4b9wnqopxogwek014i1shqw7w 
        foreign key (service_uuid) 
@@ -81,7 +184,32 @@
        foreign key (loop_id) 
        references loops (name);
 
+    alter table micro_service_models 
+       add constraint FKlkcffpnuavcg65u5o4tr66902 
+       foreign key (policy_model_type, policy_model_version) 
+       references policy_models (policy_model_type, version);
+
+    alter table micro_service_policies 
+       add constraint FK5p7lipy9m2v7d4n3fvlclwse 
+       foreign key (micro_service_model_id) 
+       references micro_service_models (name);
+
     alter table operational_policies 
        add constraint FK1ddoggk9ni2bnqighv6ecmuwu 
        foreign key (loop_id) 
        references loops (name);
+
+    alter table operational_policies 
+       add constraint FKlsyhfkoqvkwj78ofepxhoctip 
+       foreign key (policy_model_type, policy_model_version) 
+       references policy_models (policy_model_type, version);
+
+    alter table templates_microservicemodels 
+       add constraint FKq2gqg5q9jrkx8voosn7x5plqo 
+       foreign key (loop_template_name) 
+       references loop_templates (name);
+
+    alter table templates_microservicemodels 
+       add constraint FKphn3m81suxavmj9c4u06cchju 
+       foreign key (micro_service_model_name) 
+       references micro_service_models (name);
diff --git a/extra/sql/dump/test-data.sql b/extra/sql/dump/test-data.sql
index a68914f..e3f5072 100644
--- a/extra/sql/dump/test-data.sql
+++ b/extra/sql/dump/test-data.sql
@@ -21,12 +21,30 @@
 USE `cldsdb4`;
 
 --
+-- Dumping data for table `dictionary`
+--
+
+LOCK TABLES `dictionary` WRITE;
+/*!40000 ALTER TABLE `dictionary` DISABLE KEYS */;
+/*!40000 ALTER TABLE `dictionary` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Dumping data for table `dictionary_elements`
+--
+
+LOCK TABLES `dictionary_elements` WRITE;
+/*!40000 ALTER TABLE `dictionary_elements` DISABLE KEYS */;
+/*!40000 ALTER TABLE `dictionary_elements` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
 -- Dumping data for table `hibernate_sequence`
 --
 
 LOCK TABLES `hibernate_sequence` WRITE;
 /*!40000 ALTER TABLE `hibernate_sequence` DISABLE KEYS */;
-INSERT INTO `hibernate_sequence` VALUES (3);
+INSERT INTO `hibernate_sequence` VALUES (4);
 /*!40000 ALTER TABLE `hibernate_sequence` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -40,14 +58,23 @@
 UNLOCK TABLES;
 
 --
+-- Dumping data for table `loop_templates`
+--
+
+LOCK TABLES `loop_templates` WRITE;
+/*!40000 ALTER TABLE `loop_templates` DISABLE KEYS */;
+/*!40000 ALTER TABLE `loop_templates` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
 -- Dumping data for table `loops`
 --
 
 LOCK TABLES `loops` WRITE;
 /*!40000 ALTER TABLE `loops` DISABLE KEYS */;
-INSERT INTO `loops` VALUES ('LOOP_yHsgu_v1_0_ResourceInstanceName1_tca','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-cea8ab39-c2a6-467c-8392-f5940cb06903',NULL,NULL,'{\n  \"dcaeDeployParameters\": {\n    \"location_id\": \"\",\n    \"service_id\": \"\",\n    \"policy_id\": \"TCA_yHsgu_v1_0_ResourceInstanceName1_tca\"\n  }\n}','DESIGN','{\n  \"serviceDetails\": {\n    \"serviceType\": \"\",\n    \"namingPolicy\": \"\",\n    \"environmentContext\": \"General_Revenue-Bearing\",\n    \"serviceEcompNaming\": \"true\",\n    \"serviceRole\": \"\",\n    \"name\": \"vLoadBalancerMS\",\n    \"description\": \"vLBMS\",\n    \"invariantUUID\": \"30ec5b59-4799-48d8-ac5f-1058a6b0e48f\",\n    \"ecompGeneratedNaming\": \"true\",\n    \"category\": \"Network L4+\",\n    \"type\": \"Service\",\n    \"UUID\": \"63cac700-ab9a-4115-a74f-7eac85e3fce0\",\n    \"instantiationType\": \"A-la-carte\"\n  },\n  \"resourceDetails\": {\n    \"CP\": {},\n    \"VL\": {},\n    \"VF\": {\n      \"vLoadBalancerMS 0\": {\n        \"resourceVendor\": \"Test\",\n        \"resourceVendorModelNumber\": \"\",\n        \"name\": \"vLoadBalancerMS\",\n        \"description\": \"vLBMS\",\n        \"invariantUUID\": \"1a31b9f2-e50d-43b7-89b3-a040250cf506\",\n        \"subcategory\": \"Load Balancer\",\n        \"category\": \"Application L4+\",\n        \"type\": \"VF\",\n        \"UUID\": \"b4c4f3d7-929e-4b6d-a1cd-57e952ddc3e6\",\n        \"version\": \"1.0\",\n        \"resourceVendorRelease\": \"1.0\",\n        \"customizationUUID\": \"465246dc-7748-45f4-a013-308d92922552\"\n      }\n    },\n    \"CR\": {},\n    \"VFC\": {},\n    \"PNF\": {},\n    \"Service\": {},\n    \"CVFC\": {},\n    \"Service Proxy\": {},\n    \"Configuration\": {},\n    \"AllottedResource\": {},\n    \"VFModule\": {\n      \"Vloadbalancerms..vpkg..module-1\": {\n        \"vfModuleModelInvariantUUID\": \"ca052563-eb92-4b5b-ad41-9111768ce043\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..vpkg..module-1\",\n        \"vfModuleModelUUID\": \"1e725ccc-b823-4f67-82b9-4f4367070dbc\",\n        \"vfModuleModelCustomizationUUID\": \"1bffdc31-a37d-4dee-b65c-dde623a76e52\",\n        \"min_vf_module_instances\": 0,\n        \"vf_module_label\": \"vpkg\",\n        \"max_vf_module_instances\": 1,\n        \"vf_module_type\": \"Expansion\",\n        \"isBase\": false,\n        \"initial_count\": 0,\n        \"volume_group\": false\n      },\n      \"Vloadbalancerms..vdns..module-3\": {\n        \"vfModuleModelInvariantUUID\": \"4c10ba9b-f88f-415e-9de3-5d33336047fa\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..vdns..module-3\",\n        \"vfModuleModelUUID\": \"4fa73b49-8a6c-493e-816b-eb401567b720\",\n        \"vfModuleModelCustomizationUUID\": \"bafcdab0-801d-4d81-9ead-f464640a38b1\",\n        \"min_vf_module_instances\": 0,\n        \"vf_module_label\": \"vdns\",\n        \"max_vf_module_instances\": 50,\n        \"vf_module_type\": \"Expansion\",\n        \"isBase\": false,\n        \"initial_count\": 0,\n        \"volume_group\": false\n      },\n      \"Vloadbalancerms..base_template..module-0\": {\n        \"vfModuleModelInvariantUUID\": \"921f7c96-ebdd-42e6-81b9-1cfc0c9796f3\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..base_template..module-0\",\n        \"vfModuleModelUUID\": \"63734409-f745-4e4d-a38b-131638a0edce\",\n        \"vfModuleModelCustomizationUUID\": \"86baddea-c730-4fb8-9410-cd2e17fd7f27\",\n        \"min_vf_module_instances\": 1,\n        \"vf_module_label\": \"base_template\",\n        \"max_vf_module_instances\": 1,\n        \"vf_module_type\": \"Base\",\n        \"isBase\": true,\n        \"initial_count\": 1,\n        \"volume_group\": false\n      },\n      \"Vloadbalancerms..vlb..module-2\": {\n        \"vfModuleModelInvariantUUID\": \"a772a1f4-0064-412c-833d-4749b15828dd\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..vlb..module-2\",\n        \"vfModuleModelUUID\": \"0f5c3f6a-650a-4303-abb6-fff3e573a07a\",\n        \"vfModuleModelCustomizationUUID\": \"96a78aad-4ffb-4ef0-9c4f-deb03bf1d806\",\n        \"min_vf_module_instances\": 0,\n        \"vf_module_label\": \"vlb\",\n        \"max_vf_module_instances\": 1,\n        \"vf_module_type\": \"Expansion\",\n        \"isBase\": false,\n        \"initial_count\": 0,\n        \"volume_group\": false\n      }\n    }\n  }\n}','{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs\",\n    \"type\": \"array\",\n    \"minItems\": 1,\n    \"maxItems\": 1,\n    \"title\": \"Operational policies\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"Operational Policy Item\",\n      \"id\": \"operational_policy_item\",\n      \"headerTemplate\": \"{{self.name}}\",\n      \"required\": [\n        \"name\",\n        \"configurationsJson\"\n      ],\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\",\n          \"title\": \"Operational policy name\",\n          \"readOnly\": \"True\"\n        },\n        \"configurationsJson\": {\n          \"type\": \"object\",\n          \"title\": \"Configuration\",\n          \"required\": [\n            \"operational_policy\",\n            \"guard_policies\"\n          ],\n          \"properties\": {\n            \"operational_policy\": {\n              \"type\": \"object\",\n              \"title\": \"Related Parameters\",\n              \"required\": [\n                \"controlLoop\",\n                \"policies\"\n              ],\n              \"properties\": {\n                \"controlLoop\": {\n                  \"type\": \"object\",\n                  \"title\": \"Control Loop details\",\n                  \"required\": [\n                    \"timeout\",\n                    \"abatement\",\n                    \"trigger_policy\",\n                    \"controlLoopName\"\n                  ],\n                  \"properties\": {\n                    \"timeout\": {\n                      \"type\": \"string\",\n                      \"title\": \"Overall Time Limit\",\n                      \"default\": \"0\",\n                      \"format\": \"number\"\n                    },\n                    \"abatement\": {\n                      \"type\": \"string\",\n                      \"title\": \"Abatement\",\n                      \"enum\": [\n                        \"True\",\n                        \"False\"\n                      ]\n                    },\n                    \"trigger_policy\": {\n                      \"type\": \"string\",\n                      \"title\": \"Policy Decision Entry\"\n                    },\n                    \"controlLoopName\": {\n                      \"type\": \"string\",\n                      \"title\": \"Control loop name\",\n                      \"readOnly\": \"True\"\n                    }\n                  }\n                },\n                \"policies\": {\n                  \"uniqueItems\": \"true\",\n                  \"id\": \"policies_array\",\n                  \"type\": \"array\",\n                  \"title\": \"Policy Decision Tree\",\n                  \"format\": \"tabs-top\",\n                  \"items\": {\n                    \"title\": \"Policy Decision\",\n                    \"type\": \"object\",\n                    \"id\": \"policy_item\",\n                    \"headerTemplate\": \"{{self.id}} - {{self.recipe}}\",\n                    \"format\": \"categories\",\n                    \"basicCategoryTitle\": \"recipe\",\n                    \"required\": [\n                      \"id\",\n                      \"recipe\",\n                      \"retry\",\n                      \"timeout\",\n                      \"actor\",\n                      \"success\",\n                      \"failure\",\n                      \"failure_timeout\",\n                      \"failure_retries\",\n                      \"failure_exception\",\n                      \"failure_guard\",\n                      \"target\"\n                    ],\n                    \"properties\": {\n                      \"id\": {\n                        \"default\": \"Policy 1\",\n                        \"title\": \"Policy ID\",\n                        \"type\": \"string\"\n                      },\n                      \"recipe\": {\n                        \"title\": \"Recipe\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"Restart\",\n                          \"Rebuild\",\n                          \"Migrate\",\n                          \"Health-Check\",\n                          \"ModifyConfig\",\n                          \"VF Module Create\",\n                          \"VF Module Delete\",\n                          \"Reroute\"\n                        ]\n                      },\n                      \"retry\": {\n                        \"default\": \"0\",\n                        \"title\": \"Number of Retry\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"timeout\": {\n                        \"default\": \"0\",\n                        \"title\": \"Timeout\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"actor\": {\n                        \"title\": \"Actor\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"APPC\",\n                          \"SO\",\n                          \"VFC\",\n                          \"SDNC\",\n                          \"SDNR\"\n                        ]\n                      },\n                      \"payload\": {\n                        \"title\": \"Payload (YAML)\",\n                        \"type\": \"string\",\n                        \"format\": \"textarea\"\n                      },\n                      \"success\": {\n                        \"default\": \"final_success\",\n                        \"title\": \"When Success\",\n                        \"type\": \"string\"\n                      },\n                      \"failure\": {\n                        \"default\": \"final_failure\",\n                        \"title\": \"When Failure\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_timeout\": {\n                        \"default\": \"final_failure_timeout\",\n                        \"title\": \"When Failure Timeout\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_retries\": {\n                        \"default\": \"final_failure_retries\",\n                        \"title\": \"When Failure Retries\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_exception\": {\n                        \"default\": \"final_failure_exception\",\n                        \"title\": \"When Failure Exception\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_guard\": {\n                        \"default\": \"final_failure_guard\",\n                        \"title\": \"When Failure Guard\",\n                        \"type\": \"string\"\n                      },\n                      \"target\": {\n                        \"type\": \"object\",\n                        \"required\": [\n                          \"type\",\n                          \"resourceID\"\n                        ],\n                        \"anyOf\": [\n                          {\n                            \"title\": \"User Defined\",\n                            \"additionalProperties\": \"True\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\",\n                                \"enum\": [\n                                  \"VNF\",\n                                  \"VFMODULE\",\n                                  \"VM\"\n                                ]\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VNF-vLoadBalancerMS 0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VNF\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"vLoadBalancerMS\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vpkg..module-1\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"ca052563-eb92-4b5b-ad41-9111768ce043\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"1e725ccc-b823-4f67-82b9-4f4367070dbc\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"1bffdc31-a37d-4dee-b65c-dde623a76e52\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vdns..module-3\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4c10ba9b-f88f-415e-9de3-5d33336047fa\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4fa73b49-8a6c-493e-816b-eb401567b720\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"bafcdab0-801d-4d81-9ead-f464640a38b1\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..base_template..module-0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"921f7c96-ebdd-42e6-81b9-1cfc0c9796f3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"63734409-f745-4e4d-a38b-131638a0edce\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"86baddea-c730-4fb8-9410-cd2e17fd7f27\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vlb..module-2\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"a772a1f4-0064-412c-833d-4749b15828dd\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"0f5c3f6a-650a-4303-abb6-fff3e573a07a\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"96a78aad-4ffb-4ef0-9c4f-deb03bf1d806\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          }\n                        ]\n                      }\n                    }\n                  }\n                }\n              }\n            },\n            \"guard_policies\": {\n              \"type\": \"array\",\n              \"format\": \"tabs-top\",\n              \"title\": \"Associated Guard policies\",\n              \"items\": {\n                \"headerTemplate\": \"{{self.policy-id}} - {{self.content.recipe}}\",\n                \"anyOf\": [\n                  {\n                    \"title\": \"Guard MinMax\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.minmax.new\",\n                        \"pattern\": \"^(guard.minmax\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"min\": {\n                            \"type\": \"string\",\n                            \"default\": \"0\"\n                          },\n                          \"max\": {\n                            \"type\": \"string\",\n                            \"default\": \"1\"\n                          }\n                        }\n                      }\n                    }\n                  },\n                  {\n                    \"title\": \"Guard Frequency\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.frequency.new\",\n                        \"pattern\": \"^(guard.frequency\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"limit\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeWindow\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeUnits\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"minute\",\n                              \"hour\",\n                              \"day\",\n                              \"week\",\n                              \"month\",\n                              \"year\"\n                            ]\n                          }\n                        }\n                      }\n                    }\n                  }\n                ]\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','<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-714265dd-ecd5-4898-842c-d276a9bf18eb\" 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=\"176.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-5c38d9f9-6640-448d-978a-da41e6085f95\" 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=\"TCA_yHsgu_v1_0_ResourceInstanceName1_tca\" 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=\"392\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">TCA</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-3d999b13-01f2-4544-a7f9-b20b39f01e9b\" 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=\"OperationalPolicy\" 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=\"557\" 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=\"557\" 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=\"564.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">OperationalPolicy</text><line y2=\"1\" fill=\"none\" x1=\"557\" x2=\"618\" y1=\"42\"/></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-3c3a2521-6755-49f7-bd88-bd9278ce59e2\" 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=\"680\" x2=\"768\" y1=\"41\"/><polygon fill=\"none\" points=\" 766 39 766 43 770 41\"/><polygon points=\" 766 39 766 43 770 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=\"789\" cy=\"41\"/></g></g></g></svg>');
-INSERT INTO `loops` VALUES ('LOOP_yHsgu_v1_0_ResourceInstanceName1_tca_3','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-4ebc7a81-b235-4d45-84ad-5e9497f761bb',NULL,NULL,'{\n  \"dcaeDeployParameters\": {\n    \"aaiEnrichmentHost\": \"aai.onap.svc.cluster.local\",\n    \"aaiEnrichmentPort\": \"8443\",\n    \"enableAAIEnrichment\": true,\n    \"dmaap_host\": \"message-router.onap.svc.cluster.local\",\n    \"dmaap_port\": \"3904\",\n    \"enableRedisCaching\": false,\n    \"redisHosts\": \"dcae-redis.onap.svc.cluster.local:6379\",\n    \"tag_version\": \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0-STAGING-latest\",\n    \"consul_host\": \"consul-server.onap.svc.cluster.local\",\n    \"consul_port\": \"8500\",\n    \"cbs_host\": \"config-binding-service.dcae.svc.cluster.local\",\n    \"cbs_port\": \"10000\",\n    \"external_port\": \"32012\",\n    \"policy_model_id\": \"onap.policies.monitoring.cdap.tca.hi.lo.app\",\n    \"policy_id\": \"tca_k8s_yHsgu_v1_0_ResourceInstanceName1_tca_3\"\n  }\n}','DESIGN','{\n  \"serviceDetails\": {\n    \"serviceType\": \"\",\n    \"namingPolicy\": \"\",\n    \"environmentContext\": \"General_Revenue-Bearing\",\n    \"serviceEcompNaming\": \"true\",\n    \"serviceRole\": \"\",\n    \"name\": \"vLoadBalancerMS\",\n    \"description\": \"vLBMS\",\n    \"invariantUUID\": \"30ec5b59-4799-48d8-ac5f-1058a6b0e48f\",\n    \"ecompGeneratedNaming\": \"true\",\n    \"category\": \"Network L4+\",\n    \"type\": \"Service\",\n    \"UUID\": \"63cac700-ab9a-4115-a74f-7eac85e3fce0\",\n    \"instantiationType\": \"A-la-carte\"\n  },\n  \"resourceDetails\": {\n    \"CP\": {},\n    \"VL\": {},\n    \"VF\": {\n      \"vLoadBalancerMS 0\": {\n        \"resourceVendor\": \"Test\",\n        \"resourceVendorModelNumber\": \"\",\n        \"name\": \"vLoadBalancerMS\",\n        \"description\": \"vLBMS\",\n        \"invariantUUID\": \"1a31b9f2-e50d-43b7-89b3-a040250cf506\",\n        \"subcategory\": \"Load Balancer\",\n        \"category\": \"Application L4+\",\n        \"type\": \"VF\",\n        \"UUID\": \"b4c4f3d7-929e-4b6d-a1cd-57e952ddc3e6\",\n        \"version\": \"1.0\",\n        \"resourceVendorRelease\": \"1.0\",\n        \"customizationUUID\": \"465246dc-7748-45f4-a013-308d92922552\"\n      }\n    },\n    \"CR\": {},\n    \"VFC\": {},\n    \"PNF\": {},\n    \"Service\": {},\n    \"CVFC\": {},\n    \"Service Proxy\": {},\n    \"Configuration\": {},\n    \"AllottedResource\": {},\n    \"VFModule\": {\n      \"Vloadbalancerms..vpkg..module-1\": {\n        \"vfModuleModelInvariantUUID\": \"ca052563-eb92-4b5b-ad41-9111768ce043\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..vpkg..module-1\",\n        \"vfModuleModelUUID\": \"1e725ccc-b823-4f67-82b9-4f4367070dbc\",\n        \"vfModuleModelCustomizationUUID\": \"1bffdc31-a37d-4dee-b65c-dde623a76e52\",\n        \"min_vf_module_instances\": 0,\n        \"vf_module_label\": \"vpkg\",\n        \"max_vf_module_instances\": 1,\n        \"vf_module_type\": \"Expansion\",\n        \"isBase\": false,\n        \"initial_count\": 0,\n        \"volume_group\": false\n      },\n      \"Vloadbalancerms..vdns..module-3\": {\n        \"vfModuleModelInvariantUUID\": \"4c10ba9b-f88f-415e-9de3-5d33336047fa\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..vdns..module-3\",\n        \"vfModuleModelUUID\": \"4fa73b49-8a6c-493e-816b-eb401567b720\",\n        \"vfModuleModelCustomizationUUID\": \"bafcdab0-801d-4d81-9ead-f464640a38b1\",\n        \"min_vf_module_instances\": 0,\n        \"vf_module_label\": \"vdns\",\n        \"max_vf_module_instances\": 50,\n        \"vf_module_type\": \"Expansion\",\n        \"isBase\": false,\n        \"initial_count\": 0,\n        \"volume_group\": false\n      },\n      \"Vloadbalancerms..base_template..module-0\": {\n        \"vfModuleModelInvariantUUID\": \"921f7c96-ebdd-42e6-81b9-1cfc0c9796f3\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..base_template..module-0\",\n        \"vfModuleModelUUID\": \"63734409-f745-4e4d-a38b-131638a0edce\",\n        \"vfModuleModelCustomizationUUID\": \"86baddea-c730-4fb8-9410-cd2e17fd7f27\",\n        \"min_vf_module_instances\": 1,\n        \"vf_module_label\": \"base_template\",\n        \"max_vf_module_instances\": 1,\n        \"vf_module_type\": \"Base\",\n        \"isBase\": true,\n        \"initial_count\": 1,\n        \"volume_group\": false\n      },\n      \"Vloadbalancerms..vlb..module-2\": {\n        \"vfModuleModelInvariantUUID\": \"a772a1f4-0064-412c-833d-4749b15828dd\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..vlb..module-2\",\n        \"vfModuleModelUUID\": \"0f5c3f6a-650a-4303-abb6-fff3e573a07a\",\n        \"vfModuleModelCustomizationUUID\": \"96a78aad-4ffb-4ef0-9c4f-deb03bf1d806\",\n        \"min_vf_module_instances\": 0,\n        \"vf_module_label\": \"vlb\",\n        \"max_vf_module_instances\": 1,\n        \"vf_module_type\": \"Expansion\",\n        \"isBase\": false,\n        \"initial_count\": 0,\n        \"volume_group\": false\n      }\n    }\n  }\n}','{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs\",\n    \"type\": \"array\",\n    \"minItems\": 1,\n    \"maxItems\": 1,\n    \"title\": \"Operational policies\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"Operational Policy Item\",\n      \"id\": \"operational_policy_item\",\n      \"headerTemplate\": \"{{self.name}}\",\n      \"required\": [\n        \"name\",\n        \"configurationsJson\"\n      ],\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\",\n          \"title\": \"Operational policy name\",\n          \"readOnly\": \"True\"\n        },\n        \"configurationsJson\": {\n          \"type\": \"object\",\n          \"title\": \"Configuration\",\n          \"required\": [\n            \"operational_policy\",\n            \"guard_policies\"\n          ],\n          \"properties\": {\n            \"operational_policy\": {\n              \"type\": \"object\",\n              \"title\": \"Related Parameters\",\n              \"required\": [\n                \"controlLoop\",\n                \"policies\"\n              ],\n              \"properties\": {\n                \"controlLoop\": {\n                  \"type\": \"object\",\n                  \"title\": \"Control Loop details\",\n                  \"required\": [\n                    \"timeout\",\n                    \"abatement\",\n                    \"trigger_policy\",\n                    \"controlLoopName\"\n                  ],\n                  \"properties\": {\n                    \"timeout\": {\n                      \"type\": \"string\",\n                      \"title\": \"Overall Time Limit\",\n                      \"default\": \"0\",\n                      \"format\": \"number\"\n                    },\n                    \"abatement\": {\n                      \"type\": \"string\",\n                      \"title\": \"Abatement\",\n                      \"enum\": [\n                        \"True\",\n                        \"False\"\n                      ]\n                    },\n                    \"trigger_policy\": {\n                      \"type\": \"string\",\n                      \"title\": \"Policy Decision Entry\"\n                    },\n                    \"controlLoopName\": {\n                      \"type\": \"string\",\n                      \"title\": \"Control loop name\",\n                      \"readOnly\": \"True\"\n                    }\n                  }\n                },\n                \"policies\": {\n                  \"uniqueItems\": \"true\",\n                  \"id\": \"policies_array\",\n                  \"type\": \"array\",\n                  \"title\": \"Policy Decision Tree\",\n                  \"format\": \"tabs-top\",\n                  \"items\": {\n                    \"title\": \"Policy Decision\",\n                    \"type\": \"object\",\n                    \"id\": \"policy_item\",\n                    \"headerTemplate\": \"{{self.id}} - {{self.recipe}}\",\n                    \"format\": \"categories\",\n                    \"basicCategoryTitle\": \"recipe\",\n                    \"required\": [\n                      \"id\",\n                      \"recipe\",\n                      \"retry\",\n                      \"timeout\",\n                      \"actor\",\n                      \"success\",\n                      \"failure\",\n                      \"failure_timeout\",\n                      \"failure_retries\",\n                      \"failure_exception\",\n                      \"failure_guard\",\n                      \"target\"\n                    ],\n                    \"properties\": {\n                      \"id\": {\n                        \"default\": \"Policy 1\",\n                        \"title\": \"Policy ID\",\n                        \"type\": \"string\"\n                      },\n                      \"recipe\": {\n                        \"title\": \"Recipe\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"Restart\",\n                          \"Rebuild\",\n                          \"Migrate\",\n                          \"Health-Check\",\n                          \"ModifyConfig\",\n                          \"VF Module Create\",\n                          \"VF Module Delete\",\n                          \"Reroute\"\n                        ]\n                      },\n                      \"retry\": {\n                        \"default\": \"0\",\n                        \"title\": \"Number of Retry\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"timeout\": {\n                        \"default\": \"0\",\n                        \"title\": \"Timeout\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"actor\": {\n                        \"title\": \"Actor\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"APPC\",\n                          \"SO\",\n                          \"VFC\",\n                          \"SDNC\",\n                          \"SDNR\"\n                        ]\n                      },\n                      \"payload\": {\n                        \"title\": \"Payload (YAML)\",\n                        \"type\": \"string\",\n                        \"format\": \"textarea\"\n                      },\n                      \"success\": {\n                        \"default\": \"final_success\",\n                        \"title\": \"When Success\",\n                        \"type\": \"string\"\n                      },\n                      \"failure\": {\n                        \"default\": \"final_failure\",\n                        \"title\": \"When Failure\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_timeout\": {\n                        \"default\": \"final_failure_timeout\",\n                        \"title\": \"When Failure Timeout\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_retries\": {\n                        \"default\": \"final_failure_retries\",\n                        \"title\": \"When Failure Retries\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_exception\": {\n                        \"default\": \"final_failure_exception\",\n                        \"title\": \"When Failure Exception\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_guard\": {\n                        \"default\": \"final_failure_guard\",\n                        \"title\": \"When Failure Guard\",\n                        \"type\": \"string\"\n                      },\n                      \"target\": {\n                        \"type\": \"object\",\n                        \"required\": [\n                          \"type\",\n                          \"resourceID\"\n                        ],\n                        \"anyOf\": [\n                          {\n                            \"title\": \"User Defined\",\n                            \"additionalProperties\": \"True\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\",\n                                \"enum\": [\n                                  \"VNF\",\n                                  \"VFMODULE\",\n                                  \"VM\"\n                                ]\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VNF-vLoadBalancerMS 0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VNF\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"vLoadBalancerMS\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vpkg..module-1\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"ca052563-eb92-4b5b-ad41-9111768ce043\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"1e725ccc-b823-4f67-82b9-4f4367070dbc\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"1bffdc31-a37d-4dee-b65c-dde623a76e52\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vdns..module-3\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4c10ba9b-f88f-415e-9de3-5d33336047fa\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4fa73b49-8a6c-493e-816b-eb401567b720\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"bafcdab0-801d-4d81-9ead-f464640a38b1\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..base_template..module-0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"921f7c96-ebdd-42e6-81b9-1cfc0c9796f3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"63734409-f745-4e4d-a38b-131638a0edce\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"86baddea-c730-4fb8-9410-cd2e17fd7f27\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vlb..module-2\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"a772a1f4-0064-412c-833d-4749b15828dd\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"0f5c3f6a-650a-4303-abb6-fff3e573a07a\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"96a78aad-4ffb-4ef0-9c4f-deb03bf1d806\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          }\n                        ]\n                      }\n                    }\n                  }\n                }\n              }\n            },\n            \"guard_policies\": {\n              \"type\": \"array\",\n              \"format\": \"tabs-top\",\n              \"title\": \"Associated Guard policies\",\n              \"items\": {\n                \"headerTemplate\": \"{{self.policy-id}} - {{self.content.recipe}}\",\n                \"anyOf\": [\n                  {\n                    \"title\": \"Guard MinMax\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.minmax.new\",\n                        \"pattern\": \"^(guard.minmax\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"min\": {\n                            \"type\": \"string\",\n                            \"default\": \"0\"\n                          },\n                          \"max\": {\n                            \"type\": \"string\",\n                            \"default\": \"1\"\n                          }\n                        }\n                      }\n                    }\n                  },\n                  {\n                    \"title\": \"Guard Frequency\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.frequency.new\",\n                        \"pattern\": \"^(guard.frequency\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"limit\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeWindow\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeUnits\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"minute\",\n                              \"hour\",\n                              \"day\",\n                              \"week\",\n                              \"month\",\n                              \"year\"\n                            ]\n                          }\n                        }\n                      }\n                    }\n                  }\n                ]\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','<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-e9c3baa3-8628-45ab-aba7-d402ff446515\" 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=\"176.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-5f8c876b-e1a1-4ad5-8dc5-18f8857993c9\" 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=\"tca_k8s_yHsgu_v1_0_ResourceInstanceName1_tca_3\" 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=\"379.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">tca_k8s</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-97b2cf24-ce17-4c11-bce7-cc91380f7d36\" 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=\"OperationalPolicy\" 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=\"557\" 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=\"557\" 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=\"564.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">OperationalPolicy</text><line y2=\"1\" fill=\"none\" x1=\"557\" x2=\"618\" y1=\"42\"/></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-4750e86e-a8e3-4882-be43-1823d2602451\" 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=\"680\" x2=\"768\" y1=\"41\"/><polygon fill=\"none\" points=\" 766 39 766 43 770 41\"/><polygon points=\" 766 39 766 43 770 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=\"789\" cy=\"41\"/></g></g></g></svg>');
-INSERT INTO `loops` VALUES ('LOOP_yHsgu_v1_0_ResourceInstanceName2_tca_2','#\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-f3f5a314-25aa-46c8-87c2-65686b510940',NULL,NULL,'{\n  \"dcaeDeployParameters\": {\n    \"aaiEnrichmentHost\": \"aai.onap.svc.cluster.local\",\n    \"aaiEnrichmentPort\": \"8443\",\n    \"enableAAIEnrichment\": true,\n    \"dmaap_host\": \"message-router.onap\",\n    \"dmaap_port\": \"3904\",\n    \"enableRedisCaching\": false,\n    \"redisHosts\": \"dcae-redis.onap.svc.cluster.local:6379\",\n    \"tag_version\": \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.1\",\n    \"consul_host\": \"consul-server.onap\",\n    \"consul_port\": \"8500\",\n    \"cbs_host\": \"config-binding-servicel\",\n    \"cbs_port\": \"10000\",\n    \"external_port\": \"32012\",\n    \"policy_model_id\": \"onap.policies.monitoring.cdap.tca.hi.lo.app\",\n    \"policy_id\": \"tca_k8s_yHsgu_v1_0_ResourceInstanceName2_tca_2\"\n  }\n}','DESIGN','{\n  \"serviceDetails\": {\n    \"serviceType\": \"\",\n    \"namingPolicy\": \"\",\n    \"environmentContext\": \"General_Revenue-Bearing\",\n    \"serviceEcompNaming\": \"true\",\n    \"serviceRole\": \"\",\n    \"name\": \"vLoadBalancerMS\",\n    \"description\": \"vLBMS\",\n    \"invariantUUID\": \"30ec5b59-4799-48d8-ac5f-1058a6b0e48f\",\n    \"ecompGeneratedNaming\": \"true\",\n    \"category\": \"Network L4+\",\n    \"type\": \"Service\",\n    \"UUID\": \"63cac700-ab9a-4115-a74f-7eac85e3fce0\",\n    \"instantiationType\": \"A-la-carte\"\n  },\n  \"resourceDetails\": {\n    \"CP\": {},\n    \"VL\": {},\n    \"VF\": {\n      \"vLoadBalancerMS 0\": {\n        \"resourceVendor\": \"Test\",\n        \"resourceVendorModelNumber\": \"\",\n        \"name\": \"vLoadBalancerMS\",\n        \"description\": \"vLBMS\",\n        \"invariantUUID\": \"1a31b9f2-e50d-43b7-89b3-a040250cf506\",\n        \"subcategory\": \"Load Balancer\",\n        \"category\": \"Application L4+\",\n        \"type\": \"VF\",\n        \"UUID\": \"b4c4f3d7-929e-4b6d-a1cd-57e952ddc3e6\",\n        \"version\": \"1.0\",\n        \"resourceVendorRelease\": \"1.0\",\n        \"customizationUUID\": \"465246dc-7748-45f4-a013-308d92922552\"\n      }\n    },\n    \"CR\": {},\n    \"VFC\": {},\n    \"PNF\": {},\n    \"Service\": {},\n    \"CVFC\": {},\n    \"Service Proxy\": {},\n    \"Configuration\": {},\n    \"AllottedResource\": {},\n    \"VFModule\": {\n      \"Vloadbalancerms..vpkg..module-1\": {\n        \"vfModuleModelInvariantUUID\": \"ca052563-eb92-4b5b-ad41-9111768ce043\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..vpkg..module-1\",\n        \"vfModuleModelUUID\": \"1e725ccc-b823-4f67-82b9-4f4367070dbc\",\n        \"vfModuleModelCustomizationUUID\": \"1bffdc31-a37d-4dee-b65c-dde623a76e52\",\n        \"min_vf_module_instances\": 0,\n        \"vf_module_label\": \"vpkg\",\n        \"max_vf_module_instances\": 1,\n        \"vf_module_type\": \"Expansion\",\n        \"isBase\": false,\n        \"initial_count\": 0,\n        \"volume_group\": false\n      },\n      \"Vloadbalancerms..vdns..module-3\": {\n        \"vfModuleModelInvariantUUID\": \"4c10ba9b-f88f-415e-9de3-5d33336047fa\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..vdns..module-3\",\n        \"vfModuleModelUUID\": \"4fa73b49-8a6c-493e-816b-eb401567b720\",\n        \"vfModuleModelCustomizationUUID\": \"bafcdab0-801d-4d81-9ead-f464640a38b1\",\n        \"min_vf_module_instances\": 0,\n        \"vf_module_label\": \"vdns\",\n        \"max_vf_module_instances\": 50,\n        \"vf_module_type\": \"Expansion\",\n        \"isBase\": false,\n        \"initial_count\": 0,\n        \"volume_group\": false\n      },\n      \"Vloadbalancerms..base_template..module-0\": {\n        \"vfModuleModelInvariantUUID\": \"921f7c96-ebdd-42e6-81b9-1cfc0c9796f3\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..base_template..module-0\",\n        \"vfModuleModelUUID\": \"63734409-f745-4e4d-a38b-131638a0edce\",\n        \"vfModuleModelCustomizationUUID\": \"86baddea-c730-4fb8-9410-cd2e17fd7f27\",\n        \"min_vf_module_instances\": 1,\n        \"vf_module_label\": \"base_template\",\n        \"max_vf_module_instances\": 1,\n        \"vf_module_type\": \"Base\",\n        \"isBase\": true,\n        \"initial_count\": 1,\n        \"volume_group\": false\n      },\n      \"Vloadbalancerms..vlb..module-2\": {\n        \"vfModuleModelInvariantUUID\": \"a772a1f4-0064-412c-833d-4749b15828dd\",\n        \"vfModuleModelVersion\": \"1\",\n        \"vfModuleModelName\": \"Vloadbalancerms..vlb..module-2\",\n        \"vfModuleModelUUID\": \"0f5c3f6a-650a-4303-abb6-fff3e573a07a\",\n        \"vfModuleModelCustomizationUUID\": \"96a78aad-4ffb-4ef0-9c4f-deb03bf1d806\",\n        \"min_vf_module_instances\": 0,\n        \"vf_module_label\": \"vlb\",\n        \"max_vf_module_instances\": 1,\n        \"vf_module_type\": \"Expansion\",\n        \"isBase\": false,\n        \"initial_count\": 0,\n        \"volume_group\": false\n      }\n    }\n  }\n}','{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs\",\n    \"type\": \"array\",\n    \"minItems\": 1,\n    \"maxItems\": 1,\n    \"title\": \"Operational policies\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"Operational Policy Item\",\n      \"id\": \"operational_policy_item\",\n      \"headerTemplate\": \"{{self.name}}\",\n      \"required\": [\n        \"name\",\n        \"configurationsJson\"\n      ],\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\",\n          \"title\": \"Operational policy name\",\n          \"readOnly\": \"True\"\n        },\n        \"configurationsJson\": {\n          \"type\": \"object\",\n          \"title\": \"Configuration\",\n          \"required\": [\n            \"operational_policy\",\n            \"guard_policies\"\n          ],\n          \"properties\": {\n            \"operational_policy\": {\n              \"type\": \"object\",\n              \"title\": \"Related Parameters\",\n              \"required\": [\n                \"controlLoop\",\n                \"policies\"\n              ],\n              \"properties\": {\n                \"controlLoop\": {\n                  \"type\": \"object\",\n                  \"title\": \"Control Loop details\",\n                  \"required\": [\n                    \"timeout\",\n                    \"abatement\",\n                    \"trigger_policy\",\n                    \"controlLoopName\"\n                  ],\n                  \"properties\": {\n                    \"timeout\": {\n                      \"type\": \"string\",\n                      \"title\": \"Overall Time Limit\",\n                      \"default\": \"0\",\n                      \"format\": \"number\"\n                    },\n                    \"abatement\": {\n                      \"type\": \"string\",\n                      \"title\": \"Abatement\",\n                      \"enum\": [\n                        \"True\",\n                        \"False\"\n                      ]\n                    },\n                    \"trigger_policy\": {\n                      \"type\": \"string\",\n                      \"title\": \"Policy Decision Entry\"\n                    },\n                    \"controlLoopName\": {\n                      \"type\": \"string\",\n                      \"title\": \"Control loop name\",\n                      \"readOnly\": \"True\"\n                    }\n                  }\n                },\n                \"policies\": {\n                  \"uniqueItems\": \"true\",\n                  \"id\": \"policies_array\",\n                  \"type\": \"array\",\n                  \"title\": \"Policy Decision Tree\",\n                  \"format\": \"tabs-top\",\n                  \"items\": {\n                    \"title\": \"Policy Decision\",\n                    \"type\": \"object\",\n                    \"id\": \"policy_item\",\n                    \"headerTemplate\": \"{{self.id}} - {{self.recipe}}\",\n                    \"format\": \"categories\",\n                    \"basicCategoryTitle\": \"recipe\",\n                    \"required\": [\n                      \"id\",\n                      \"recipe\",\n                      \"retry\",\n                      \"timeout\",\n                      \"actor\",\n                      \"success\",\n                      \"failure\",\n                      \"failure_timeout\",\n                      \"failure_retries\",\n                      \"failure_exception\",\n                      \"failure_guard\",\n                      \"target\"\n                    ],\n                    \"properties\": {\n                      \"id\": {\n                        \"default\": \"Policy 1\",\n                        \"title\": \"Policy ID\",\n                        \"type\": \"string\"\n                      },\n                      \"recipe\": {\n                        \"title\": \"Recipe\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"Restart\",\n                          \"Rebuild\",\n                          \"Migrate\",\n                          \"Health-Check\",\n                          \"ModifyConfig\",\n                          \"VF Module Create\",\n                          \"VF Module Delete\",\n                          \"Reroute\"\n                        ]\n                      },\n                      \"retry\": {\n                        \"default\": \"0\",\n                        \"title\": \"Number of Retry\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"timeout\": {\n                        \"default\": \"0\",\n                        \"title\": \"Timeout\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"actor\": {\n                        \"title\": \"Actor\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"APPC\",\n                          \"SO\",\n                          \"VFC\",\n                          \"SDNC\",\n                          \"SDNR\"\n                        ]\n                      },\n                      \"payload\": {\n                        \"title\": \"Payload (YAML)\",\n                        \"type\": \"string\",\n                        \"format\": \"textarea\"\n                      },\n                      \"success\": {\n                        \"default\": \"final_success\",\n                        \"title\": \"When Success\",\n                        \"type\": \"string\"\n                      },\n                      \"failure\": {\n                        \"default\": \"final_failure\",\n                        \"title\": \"When Failure\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_timeout\": {\n                        \"default\": \"final_failure_timeout\",\n                        \"title\": \"When Failure Timeout\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_retries\": {\n                        \"default\": \"final_failure_retries\",\n                        \"title\": \"When Failure Retries\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_exception\": {\n                        \"default\": \"final_failure_exception\",\n                        \"title\": \"When Failure Exception\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_guard\": {\n                        \"default\": \"final_failure_guard\",\n                        \"title\": \"When Failure Guard\",\n                        \"type\": \"string\"\n                      },\n                      \"target\": {\n                        \"type\": \"object\",\n                        \"required\": [\n                          \"type\",\n                          \"resourceID\"\n                        ],\n                        \"anyOf\": [\n                          {\n                            \"title\": \"User Defined\",\n                            \"additionalProperties\": \"True\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\",\n                                \"enum\": [\n                                  \"VNF\",\n                                  \"VFMODULE\",\n                                  \"VM\"\n                                ]\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VNF-vLoadBalancerMS 0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VNF\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"vLoadBalancerMS\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vpkg..module-1\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"ca052563-eb92-4b5b-ad41-9111768ce043\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"1e725ccc-b823-4f67-82b9-4f4367070dbc\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"1bffdc31-a37d-4dee-b65c-dde623a76e52\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vdns..module-3\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4c10ba9b-f88f-415e-9de3-5d33336047fa\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4fa73b49-8a6c-493e-816b-eb401567b720\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"bafcdab0-801d-4d81-9ead-f464640a38b1\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..base_template..module-0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"921f7c96-ebdd-42e6-81b9-1cfc0c9796f3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"63734409-f745-4e4d-a38b-131638a0edce\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"86baddea-c730-4fb8-9410-cd2e17fd7f27\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vlb..module-2\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"a772a1f4-0064-412c-833d-4749b15828dd\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"0f5c3f6a-650a-4303-abb6-fff3e573a07a\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"96a78aad-4ffb-4ef0-9c4f-deb03bf1d806\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          }\n                        ]\n                      }\n                    }\n                  }\n                }\n              }\n            },\n            \"guard_policies\": {\n              \"type\": \"array\",\n              \"format\": \"tabs-top\",\n              \"title\": \"Associated Guard policies\",\n              \"items\": {\n                \"headerTemplate\": \"{{self.policy-id}} - {{self.content.recipe}}\",\n                \"anyOf\": [\n                  {\n                    \"title\": \"Guard MinMax\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.minmax.new\",\n                        \"pattern\": \"^(guard.minmax\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"min\": {\n                            \"type\": \"string\",\n                            \"default\": \"0\"\n                          },\n                          \"max\": {\n                            \"type\": \"string\",\n                            \"default\": \"1\"\n                          }\n                        }\n                      }\n                    }\n                  },\n                  {\n                    \"title\": \"Guard Frequency\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.frequency.new\",\n                        \"pattern\": \"^(guard.frequency\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"limit\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeWindow\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeUnits\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"minute\",\n                              \"hour\",\n                              \"day\",\n                              \"week\",\n                              \"month\",\n                              \"year\"\n                            ]\n                          }\n                        }\n                      }\n                    }\n                  }\n                ]\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','<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-8fb9df1b-1a8e-42fa-bc68-897d347195a4\" 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=\"176.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-e7c96cae-3a70-4da1-85f8-bdc0c405618b\" 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=\"tca_k8s_yHsgu_v1_0_ResourceInstanceName2_tca_2\" 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=\"379.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">tca_k8s</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-37ffb78c-7f22-4ab1-b35e-3af1cb981625\" 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=\"OperationalPolicy\" 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=\"557\" 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=\"557\" 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=\"564.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">OperationalPolicy</text><line y2=\"1\" fill=\"none\" x1=\"557\" x2=\"618\" y1=\"42\"/></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-f158a132-21cd-4ec7-9951-1527d84ea536\" 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=\"680\" x2=\"768\" y1=\"41\"/><polygon fill=\"none\" points=\" 766 39 766 43 770 41\"/><polygon points=\" 766 39 766 43 770 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=\"789\" cy=\"41\"/></g></g></g></svg>');
+INSERT INTO `loops` VALUES ('LOOP_jkJJ0_v1_0_ResourceInstanceName1_tca','','2020-01-16 11:40:15.417599','','2020-01-16 11:40:15.417599','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-18ab8a65-b4c0-4380-9f50-fb790fcb96e0',NULL,NULL,'{\n  \"dcaeDeployParameters\": {\n    \"location_id\": \"\",\n    \"service_id\": \"\",\n    \"policy_id\": \"TCA_jkJJ0_v1_0_ResourceInstanceName1_tca\"\n  }\n}','DESIGN','{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs\",\n    \"type\": \"array\",\n    \"minItems\": 1,\n    \"maxItems\": 1,\n    \"title\": \"Operational policies\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"Operational Policy Item\",\n      \"id\": \"operational_policy_item\",\n      \"headerTemplate\": \"{{self.name}}\",\n      \"required\": [\n        \"name\",\n        \"configurationsJson\"\n      ],\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\",\n          \"title\": \"Operational policy name\",\n          \"readOnly\": \"True\"\n        },\n        \"configurationsJson\": {\n          \"type\": \"object\",\n          \"title\": \"Configuration\",\n          \"required\": [\n            \"operational_policy\",\n            \"guard_policies\"\n          ],\n          \"properties\": {\n            \"operational_policy\": {\n              \"type\": \"object\",\n              \"title\": \"Related Parameters\",\n              \"required\": [\n                \"controlLoop\",\n                \"policies\"\n              ],\n              \"properties\": {\n                \"controlLoop\": {\n                  \"type\": \"object\",\n                  \"title\": \"Control Loop details\",\n                  \"required\": [\n                    \"timeout\",\n                    \"abatement\",\n                    \"trigger_policy\",\n                    \"controlLoopName\"\n                  ],\n                  \"properties\": {\n                    \"timeout\": {\n                      \"type\": \"string\",\n                      \"title\": \"Overall Time Limit\",\n                      \"default\": \"0\",\n                      \"format\": \"number\"\n                    },\n                    \"abatement\": {\n                      \"type\": \"string\",\n                      \"title\": \"Abatement\",\n                      \"enum\": [\n                        \"True\",\n                        \"False\"\n                      ]\n                    },\n                    \"trigger_policy\": {\n                      \"type\": \"string\",\n                      \"title\": \"Policy Decision Entry\"\n                    },\n                    \"controlLoopName\": {\n                      \"type\": \"string\",\n                      \"title\": \"Control loop name\",\n                      \"readOnly\": \"True\"\n                    }\n                  }\n                },\n                \"policies\": {\n                  \"uniqueItems\": \"true\",\n                  \"id\": \"policies_array\",\n                  \"type\": \"array\",\n                  \"title\": \"Policy Decision Tree\",\n                  \"format\": \"tabs-top\",\n                  \"items\": {\n                    \"title\": \"Policy Decision\",\n                    \"type\": \"object\",\n                    \"id\": \"policy_item\",\n                    \"headerTemplate\": \"{{self.id}} - {{self.recipe}}\",\n                    \"format\": \"categories\",\n                    \"basicCategoryTitle\": \"recipe\",\n                    \"required\": [\n                      \"id\",\n                      \"recipe\",\n                      \"retry\",\n                      \"timeout\",\n                      \"actor\",\n                      \"success\",\n                      \"failure\",\n                      \"failure_timeout\",\n                      \"failure_retries\",\n                      \"failure_exception\",\n                      \"failure_guard\",\n                      \"target\"\n                    ],\n                    \"properties\": {\n                      \"id\": {\n                        \"default\": \"Policy 1\",\n                        \"title\": \"Policy ID\",\n                        \"type\": \"string\"\n                      },\n                      \"recipe\": {\n                        \"title\": \"Recipe\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"Restart\",\n                          \"Rebuild\",\n                          \"Migrate\",\n                          \"Health-Check\",\n                          \"ModifyConfig\",\n                          \"VF Module Create\",\n                          \"VF Module Delete\",\n                          \"Reroute\"\n                        ]\n                      },\n                      \"retry\": {\n                        \"default\": \"0\",\n                        \"title\": \"Number of Retry\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"timeout\": {\n                        \"default\": \"0\",\n                        \"title\": \"Timeout\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"actor\": {\n                        \"title\": \"Actor\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"APPC\",\n                          \"SO\",\n                          \"VFC\",\n                          \"SDNC\",\n                          \"SDNR\"\n                        ]\n                      },\n                      \"payload\": {\n                        \"title\": \"Payload (YAML)\",\n                        \"type\": \"string\",\n                        \"format\": \"textarea\"\n                      },\n                      \"success\": {\n                        \"default\": \"final_success\",\n                        \"title\": \"When Success\",\n                        \"type\": \"string\"\n                      },\n                      \"failure\": {\n                        \"default\": \"final_failure\",\n                        \"title\": \"When Failure\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_timeout\": {\n                        \"default\": \"final_failure_timeout\",\n                        \"title\": \"When Failure Timeout\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_retries\": {\n                        \"default\": \"final_failure_retries\",\n                        \"title\": \"When Failure Retries\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_exception\": {\n                        \"default\": \"final_failure_exception\",\n                        \"title\": \"When Failure Exception\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_guard\": {\n                        \"default\": \"final_failure_guard\",\n                        \"title\": \"When Failure Guard\",\n                        \"type\": \"string\"\n                      },\n                      \"target\": {\n                        \"type\": \"object\",\n                        \"required\": [\n                          \"type\",\n                          \"resourceID\"\n                        ],\n                        \"anyOf\": [\n                          {\n                            \"title\": \"User Defined\",\n                            \"additionalProperties\": \"True\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\",\n                                \"enum\": [\n                                  \"VNF\",\n                                  \"VFMODULE\",\n                                  \"VM\"\n                                ]\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VNF-vLoadBalancerMS 0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VNF\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"vLoadBalancerMS\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vpkg..module-1\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"ca052563-eb92-4b5b-ad41-9111768ce043\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"1e725ccc-b823-4f67-82b9-4f4367070dbc\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"1bffdc31-a37d-4dee-b65c-dde623a76e52\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vdns..module-3\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4c10ba9b-f88f-415e-9de3-5d33336047fa\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4fa73b49-8a6c-493e-816b-eb401567b720\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"bafcdab0-801d-4d81-9ead-f464640a38b1\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..base_template..module-0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"921f7c96-ebdd-42e6-81b9-1cfc0c9796f3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"63734409-f745-4e4d-a38b-131638a0edce\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"86baddea-c730-4fb8-9410-cd2e17fd7f27\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vlb..module-2\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"a772a1f4-0064-412c-833d-4749b15828dd\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"0f5c3f6a-650a-4303-abb6-fff3e573a07a\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"96a78aad-4ffb-4ef0-9c4f-deb03bf1d806\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          }\n                        ]\n                      }\n                    }\n                  }\n                }\n              }\n            },\n            \"guard_policies\": {\n              \"type\": \"array\",\n              \"format\": \"tabs-top\",\n              \"title\": \"Associated Guard policies\",\n              \"items\": {\n                \"headerTemplate\": \"{{self.policy-id}} - {{self.content.recipe}}\",\n                \"anyOf\": [\n                  {\n                    \"title\": \"Guard MinMax\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.minmax.new\",\n                        \"pattern\": \"^(guard.minmax\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"min\": {\n                            \"type\": \"string\",\n                            \"default\": \"0\"\n                          },\n                          \"max\": {\n                            \"type\": \"string\",\n                            \"default\": \"1\"\n                          }\n                        }\n                      }\n                    }\n                  },\n                  {\n                    \"title\": \"Guard Frequency\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.frequency.new\",\n                        \"pattern\": \"^(guard.frequency\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"limit\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeWindow\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeUnits\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"minute\",\n                              \"hour\",\n                              \"day\",\n                              \"week\",\n                              \"month\",\n                              \"year\"\n                            ]\n                          }\n                        }\n                      }\n                    }\n                  }\n                ]\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','<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-f014f3d8-7921-4935-aea5-1155f83035d6\" 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=\"176.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-fe357e05-abfc-4223-b5fa-580ad6567bf3\" 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=\"TCA_jkJJ0_v1_0_ResourceInstanceName1_tca\" 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=\"392\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">TCA</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-839f73cc-095a-48fa-ad9c-ffd46132c188\" 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=\"OperationalPolicy\" 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=\"557\" 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=\"557\" 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=\"564.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">OperationalPolicy</text><line y2=\"1\" fill=\"none\" x1=\"557\" x2=\"618\" y1=\"42\"/></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-1d0ff2c6-5b43-4f35-99dd-30a30dae94ff\" 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=\"680\" x2=\"768\" y1=\"41\"/><polygon fill=\"none\" points=\" 766 39 766 43 770 41\"/><polygon points=\" 766 39 766 43 770 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=\"789\" cy=\"41\"/></g></g></g></svg>',NULL,'63cac700-ab9a-4115-a74f-7eac85e3fce0');
+INSERT INTO `loops` VALUES ('LOOP_jkJJ0_v1_0_ResourceInstanceName1_tca_3','','2020-01-16 11:40:15.298873','','2020-01-16 11:40:15.298873','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-1a03e700-8c46-4c98-97cf-ca3212537216',NULL,NULL,'{\n  \"dcaeDeployParameters\": {\n    \"aaiEnrichmentHost\": \"aai.onap.svc.cluster.local\",\n    \"aaiEnrichmentPort\": \"8443\",\n    \"enableAAIEnrichment\": true,\n    \"dmaap_host\": \"message-router.onap.svc.cluster.local\",\n    \"dmaap_port\": \"3904\",\n    \"enableRedisCaching\": false,\n    \"redisHosts\": \"dcae-redis.onap.svc.cluster.local:6379\",\n    \"tag_version\": \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0-STAGING-latest\",\n    \"consul_host\": \"consul-server.onap.svc.cluster.local\",\n    \"consul_port\": \"8500\",\n    \"cbs_host\": \"config-binding-service.dcae.svc.cluster.local\",\n    \"cbs_port\": \"10000\",\n    \"external_port\": \"32012\",\n    \"policy_model_id\": \"onap.policies.monitoring.cdap.tca.hi.lo.app\",\n    \"policy_id\": \"tca_k8s_jkJJ0_v1_0_ResourceInstanceName1_tca_3\"\n  }\n}','DESIGN','{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs\",\n    \"type\": \"array\",\n    \"minItems\": 1,\n    \"maxItems\": 1,\n    \"title\": \"Operational policies\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"Operational Policy Item\",\n      \"id\": \"operational_policy_item\",\n      \"headerTemplate\": \"{{self.name}}\",\n      \"required\": [\n        \"name\",\n        \"configurationsJson\"\n      ],\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\",\n          \"title\": \"Operational policy name\",\n          \"readOnly\": \"True\"\n        },\n        \"configurationsJson\": {\n          \"type\": \"object\",\n          \"title\": \"Configuration\",\n          \"required\": [\n            \"operational_policy\",\n            \"guard_policies\"\n          ],\n          \"properties\": {\n            \"operational_policy\": {\n              \"type\": \"object\",\n              \"title\": \"Related Parameters\",\n              \"required\": [\n                \"controlLoop\",\n                \"policies\"\n              ],\n              \"properties\": {\n                \"controlLoop\": {\n                  \"type\": \"object\",\n                  \"title\": \"Control Loop details\",\n                  \"required\": [\n                    \"timeout\",\n                    \"abatement\",\n                    \"trigger_policy\",\n                    \"controlLoopName\"\n                  ],\n                  \"properties\": {\n                    \"timeout\": {\n                      \"type\": \"string\",\n                      \"title\": \"Overall Time Limit\",\n                      \"default\": \"0\",\n                      \"format\": \"number\"\n                    },\n                    \"abatement\": {\n                      \"type\": \"string\",\n                      \"title\": \"Abatement\",\n                      \"enum\": [\n                        \"True\",\n                        \"False\"\n                      ]\n                    },\n                    \"trigger_policy\": {\n                      \"type\": \"string\",\n                      \"title\": \"Policy Decision Entry\"\n                    },\n                    \"controlLoopName\": {\n                      \"type\": \"string\",\n                      \"title\": \"Control loop name\",\n                      \"readOnly\": \"True\"\n                    }\n                  }\n                },\n                \"policies\": {\n                  \"uniqueItems\": \"true\",\n                  \"id\": \"policies_array\",\n                  \"type\": \"array\",\n                  \"title\": \"Policy Decision Tree\",\n                  \"format\": \"tabs-top\",\n                  \"items\": {\n                    \"title\": \"Policy Decision\",\n                    \"type\": \"object\",\n                    \"id\": \"policy_item\",\n                    \"headerTemplate\": \"{{self.id}} - {{self.recipe}}\",\n                    \"format\": \"categories\",\n                    \"basicCategoryTitle\": \"recipe\",\n                    \"required\": [\n                      \"id\",\n                      \"recipe\",\n                      \"retry\",\n                      \"timeout\",\n                      \"actor\",\n                      \"success\",\n                      \"failure\",\n                      \"failure_timeout\",\n                      \"failure_retries\",\n                      \"failure_exception\",\n                      \"failure_guard\",\n                      \"target\"\n                    ],\n                    \"properties\": {\n                      \"id\": {\n                        \"default\": \"Policy 1\",\n                        \"title\": \"Policy ID\",\n                        \"type\": \"string\"\n                      },\n                      \"recipe\": {\n                        \"title\": \"Recipe\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"Restart\",\n                          \"Rebuild\",\n                          \"Migrate\",\n                          \"Health-Check\",\n                          \"ModifyConfig\",\n                          \"VF Module Create\",\n                          \"VF Module Delete\",\n                          \"Reroute\"\n                        ]\n                      },\n                      \"retry\": {\n                        \"default\": \"0\",\n                        \"title\": \"Number of Retry\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"timeout\": {\n                        \"default\": \"0\",\n                        \"title\": \"Timeout\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"actor\": {\n                        \"title\": \"Actor\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"APPC\",\n                          \"SO\",\n                          \"VFC\",\n                          \"SDNC\",\n                          \"SDNR\"\n                        ]\n                      },\n                      \"payload\": {\n                        \"title\": \"Payload (YAML)\",\n                        \"type\": \"string\",\n                        \"format\": \"textarea\"\n                      },\n                      \"success\": {\n                        \"default\": \"final_success\",\n                        \"title\": \"When Success\",\n                        \"type\": \"string\"\n                      },\n                      \"failure\": {\n                        \"default\": \"final_failure\",\n                        \"title\": \"When Failure\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_timeout\": {\n                        \"default\": \"final_failure_timeout\",\n                        \"title\": \"When Failure Timeout\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_retries\": {\n                        \"default\": \"final_failure_retries\",\n                        \"title\": \"When Failure Retries\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_exception\": {\n                        \"default\": \"final_failure_exception\",\n                        \"title\": \"When Failure Exception\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_guard\": {\n                        \"default\": \"final_failure_guard\",\n                        \"title\": \"When Failure Guard\",\n                        \"type\": \"string\"\n                      },\n                      \"target\": {\n                        \"type\": \"object\",\n                        \"required\": [\n                          \"type\",\n                          \"resourceID\"\n                        ],\n                        \"anyOf\": [\n                          {\n                            \"title\": \"User Defined\",\n                            \"additionalProperties\": \"True\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\",\n                                \"enum\": [\n                                  \"VNF\",\n                                  \"VFMODULE\",\n                                  \"VM\"\n                                ]\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VNF-vLoadBalancerMS 0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VNF\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"vLoadBalancerMS\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vpkg..module-1\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"ca052563-eb92-4b5b-ad41-9111768ce043\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"1e725ccc-b823-4f67-82b9-4f4367070dbc\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"1bffdc31-a37d-4dee-b65c-dde623a76e52\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vdns..module-3\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4c10ba9b-f88f-415e-9de3-5d33336047fa\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4fa73b49-8a6c-493e-816b-eb401567b720\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"bafcdab0-801d-4d81-9ead-f464640a38b1\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..base_template..module-0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"921f7c96-ebdd-42e6-81b9-1cfc0c9796f3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"63734409-f745-4e4d-a38b-131638a0edce\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"86baddea-c730-4fb8-9410-cd2e17fd7f27\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vlb..module-2\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"a772a1f4-0064-412c-833d-4749b15828dd\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"0f5c3f6a-650a-4303-abb6-fff3e573a07a\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"96a78aad-4ffb-4ef0-9c4f-deb03bf1d806\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          }\n                        ]\n                      }\n                    }\n                  }\n                }\n              }\n            },\n            \"guard_policies\": {\n              \"type\": \"array\",\n              \"format\": \"tabs-top\",\n              \"title\": \"Associated Guard policies\",\n              \"items\": {\n                \"headerTemplate\": \"{{self.policy-id}} - {{self.content.recipe}}\",\n                \"anyOf\": [\n                  {\n                    \"title\": \"Guard MinMax\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.minmax.new\",\n                        \"pattern\": \"^(guard.minmax\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"min\": {\n                            \"type\": \"string\",\n                            \"default\": \"0\"\n                          },\n                          \"max\": {\n                            \"type\": \"string\",\n                            \"default\": \"1\"\n                          }\n                        }\n                      }\n                    }\n                  },\n                  {\n                    \"title\": \"Guard Frequency\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.frequency.new\",\n                        \"pattern\": \"^(guard.frequency\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"limit\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeWindow\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeUnits\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"minute\",\n                              \"hour\",\n                              \"day\",\n                              \"week\",\n                              \"month\",\n                              \"year\"\n                            ]\n                          }\n                        }\n                      }\n                    }\n                  }\n                ]\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','<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-b02ad490-5135-46bd-ae0d-ee2b024f54c5\" 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=\"176.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-b5c8a833-d0e4-4a06-8f11-bc900024a8a2\" 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=\"tca_k8s_jkJJ0_v1_0_ResourceInstanceName1_tca_3\" 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=\"379.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">tca_k8s</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-1336ff4e-2b2a-46d9-8538-501fc922e9e0\" 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=\"OperationalPolicy\" 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=\"557\" 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=\"557\" 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=\"564.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">OperationalPolicy</text><line y2=\"1\" fill=\"none\" x1=\"557\" x2=\"618\" y1=\"42\"/></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-1f1d6e20-1cf4-4cc6-a898-4454da260117\" 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=\"680\" x2=\"768\" y1=\"41\"/><polygon fill=\"none\" points=\" 766 39 766 43 770 41\"/><polygon points=\" 766 39 766 43 770 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=\"789\" cy=\"41\"/></g></g></g></svg>',NULL,'63cac700-ab9a-4115-a74f-7eac85e3fce0');
+INSERT INTO `loops` VALUES ('LOOP_jkJJ0_v1_0_ResourceInstanceName2_tca_2','','2020-01-16 11:40:15.117933','','2020-01-16 11:40:15.117933','#\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-537599ec-0cce-4303-ab83-dbfb6145723a',NULL,NULL,'{\n  \"dcaeDeployParameters\": {\n    \"aaiEnrichmentHost\": \"aai.onap.svc.cluster.local\",\n    \"aaiEnrichmentPort\": \"8443\",\n    \"enableAAIEnrichment\": true,\n    \"dmaap_host\": \"message-router.onap\",\n    \"dmaap_port\": \"3904\",\n    \"enableRedisCaching\": false,\n    \"redisHosts\": \"dcae-redis.onap.svc.cluster.local:6379\",\n    \"tag_version\": \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.1\",\n    \"consul_host\": \"consul-server.onap\",\n    \"consul_port\": \"8500\",\n    \"cbs_host\": \"config-binding-servicel\",\n    \"cbs_port\": \"10000\",\n    \"external_port\": \"32012\",\n    \"policy_model_id\": \"onap.policies.monitoring.cdap.tca.hi.lo.app\",\n    \"policy_id\": \"tca_k8s_jkJJ0_v1_0_ResourceInstanceName2_tca_2\"\n  }\n}','DESIGN','{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs\",\n    \"type\": \"array\",\n    \"minItems\": 1,\n    \"maxItems\": 1,\n    \"title\": \"Operational policies\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"Operational Policy Item\",\n      \"id\": \"operational_policy_item\",\n      \"headerTemplate\": \"{{self.name}}\",\n      \"required\": [\n        \"name\",\n        \"configurationsJson\"\n      ],\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\",\n          \"title\": \"Operational policy name\",\n          \"readOnly\": \"True\"\n        },\n        \"configurationsJson\": {\n          \"type\": \"object\",\n          \"title\": \"Configuration\",\n          \"required\": [\n            \"operational_policy\",\n            \"guard_policies\"\n          ],\n          \"properties\": {\n            \"operational_policy\": {\n              \"type\": \"object\",\n              \"title\": \"Related Parameters\",\n              \"required\": [\n                \"controlLoop\",\n                \"policies\"\n              ],\n              \"properties\": {\n                \"controlLoop\": {\n                  \"type\": \"object\",\n                  \"title\": \"Control Loop details\",\n                  \"required\": [\n                    \"timeout\",\n                    \"abatement\",\n                    \"trigger_policy\",\n                    \"controlLoopName\"\n                  ],\n                  \"properties\": {\n                    \"timeout\": {\n                      \"type\": \"string\",\n                      \"title\": \"Overall Time Limit\",\n                      \"default\": \"0\",\n                      \"format\": \"number\"\n                    },\n                    \"abatement\": {\n                      \"type\": \"string\",\n                      \"title\": \"Abatement\",\n                      \"enum\": [\n                        \"True\",\n                        \"False\"\n                      ]\n                    },\n                    \"trigger_policy\": {\n                      \"type\": \"string\",\n                      \"title\": \"Policy Decision Entry\"\n                    },\n                    \"controlLoopName\": {\n                      \"type\": \"string\",\n                      \"title\": \"Control loop name\",\n                      \"readOnly\": \"True\"\n                    }\n                  }\n                },\n                \"policies\": {\n                  \"uniqueItems\": \"true\",\n                  \"id\": \"policies_array\",\n                  \"type\": \"array\",\n                  \"title\": \"Policy Decision Tree\",\n                  \"format\": \"tabs-top\",\n                  \"items\": {\n                    \"title\": \"Policy Decision\",\n                    \"type\": \"object\",\n                    \"id\": \"policy_item\",\n                    \"headerTemplate\": \"{{self.id}} - {{self.recipe}}\",\n                    \"format\": \"categories\",\n                    \"basicCategoryTitle\": \"recipe\",\n                    \"required\": [\n                      \"id\",\n                      \"recipe\",\n                      \"retry\",\n                      \"timeout\",\n                      \"actor\",\n                      \"success\",\n                      \"failure\",\n                      \"failure_timeout\",\n                      \"failure_retries\",\n                      \"failure_exception\",\n                      \"failure_guard\",\n                      \"target\"\n                    ],\n                    \"properties\": {\n                      \"id\": {\n                        \"default\": \"Policy 1\",\n                        \"title\": \"Policy ID\",\n                        \"type\": \"string\"\n                      },\n                      \"recipe\": {\n                        \"title\": \"Recipe\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"Restart\",\n                          \"Rebuild\",\n                          \"Migrate\",\n                          \"Health-Check\",\n                          \"ModifyConfig\",\n                          \"VF Module Create\",\n                          \"VF Module Delete\",\n                          \"Reroute\"\n                        ]\n                      },\n                      \"retry\": {\n                        \"default\": \"0\",\n                        \"title\": \"Number of Retry\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"timeout\": {\n                        \"default\": \"0\",\n                        \"title\": \"Timeout\",\n                        \"type\": \"string\",\n                        \"format\": \"number\"\n                      },\n                      \"actor\": {\n                        \"title\": \"Actor\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"APPC\",\n                          \"SO\",\n                          \"VFC\",\n                          \"SDNC\",\n                          \"SDNR\"\n                        ]\n                      },\n                      \"payload\": {\n                        \"title\": \"Payload (YAML)\",\n                        \"type\": \"string\",\n                        \"format\": \"textarea\"\n                      },\n                      \"success\": {\n                        \"default\": \"final_success\",\n                        \"title\": \"When Success\",\n                        \"type\": \"string\"\n                      },\n                      \"failure\": {\n                        \"default\": \"final_failure\",\n                        \"title\": \"When Failure\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_timeout\": {\n                        \"default\": \"final_failure_timeout\",\n                        \"title\": \"When Failure Timeout\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_retries\": {\n                        \"default\": \"final_failure_retries\",\n                        \"title\": \"When Failure Retries\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_exception\": {\n                        \"default\": \"final_failure_exception\",\n                        \"title\": \"When Failure Exception\",\n                        \"type\": \"string\"\n                      },\n                      \"failure_guard\": {\n                        \"default\": \"final_failure_guard\",\n                        \"title\": \"When Failure Guard\",\n                        \"type\": \"string\"\n                      },\n                      \"target\": {\n                        \"type\": \"object\",\n                        \"required\": [\n                          \"type\",\n                          \"resourceID\"\n                        ],\n                        \"anyOf\": [\n                          {\n                            \"title\": \"User Defined\",\n                            \"additionalProperties\": \"True\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\",\n                                \"enum\": [\n                                  \"VNF\",\n                                  \"VFMODULE\",\n                                  \"VM\"\n                                ]\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Target type\",\n                                \"type\": \"string\",\n                                \"default\": \"\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VNF-vLoadBalancerMS 0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VNF\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"vLoadBalancerMS\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vpkg..module-1\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"ca052563-eb92-4b5b-ad41-9111768ce043\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"1e725ccc-b823-4f67-82b9-4f4367070dbc\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vpkg..module-1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"1bffdc31-a37d-4dee-b65c-dde623a76e52\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vdns..module-3\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4c10ba9b-f88f-415e-9de3-5d33336047fa\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"4fa73b49-8a6c-493e-816b-eb401567b720\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vdns..module-3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"bafcdab0-801d-4d81-9ead-f464640a38b1\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..base_template..module-0\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"921f7c96-ebdd-42e6-81b9-1cfc0c9796f3\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"63734409-f745-4e4d-a38b-131638a0edce\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..base_template..module-0\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"86baddea-c730-4fb8-9410-cd2e17fd7f27\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          },\n                          {\n                            \"title\": \"VFMODULE-Vloadbalancerms..vlb..module-2\",\n                            \"properties\": {\n                              \"type\": {\n                                \"title\": \"Type\",\n                                \"type\": \"string\",\n                                \"default\": \"VFMODULE\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"resourceID\": {\n                                \"title\": \"Resource ID\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelInvariantId\": {\n                                \"title\": \"Model Invariant Id (ModelInvariantUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"a772a1f4-0064-412c-833d-4749b15828dd\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersionId\": {\n                                \"title\": \"Model Version Id (ModelUUID)\",\n                                \"type\": \"string\",\n                                \"default\": \"0f5c3f6a-650a-4303-abb6-fff3e573a07a\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelName\": {\n                                \"title\": \"Model Name\",\n                                \"type\": \"string\",\n                                \"default\": \"Vloadbalancerms..vlb..module-2\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelVersion\": {\n                                \"title\": \"Model Version\",\n                                \"type\": \"string\",\n                                \"default\": \"1\",\n                                \"readOnly\": \"True\"\n                              },\n                              \"modelCustomizationId\": {\n                                \"title\": \"Customization ID\",\n                                \"type\": \"string\",\n                                \"default\": \"96a78aad-4ffb-4ef0-9c4f-deb03bf1d806\",\n                                \"readOnly\": \"True\"\n                              }\n                            }\n                          }\n                        ]\n                      }\n                    }\n                  }\n                }\n              }\n            },\n            \"guard_policies\": {\n              \"type\": \"array\",\n              \"format\": \"tabs-top\",\n              \"title\": \"Associated Guard policies\",\n              \"items\": {\n                \"headerTemplate\": \"{{self.policy-id}} - {{self.content.recipe}}\",\n                \"anyOf\": [\n                  {\n                    \"title\": \"Guard MinMax\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.minmax.new\",\n                        \"pattern\": \"^(guard.minmax\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"min\": {\n                            \"type\": \"string\",\n                            \"default\": \"0\"\n                          },\n                          \"max\": {\n                            \"type\": \"string\",\n                            \"default\": \"1\"\n                          }\n                        }\n                      }\n                    }\n                  },\n                  {\n                    \"title\": \"Guard Frequency\",\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"policy-id\": {\n                        \"type\": \"string\",\n                        \"default\": \"guard.frequency.new\",\n                        \"pattern\": \"^(guard.frequency\\\\..*)$\"\n                      },\n                      \"content\": {\n                        \"properties\": {\n                          \"actor\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"APPC\",\n                              \"SO\",\n                              \"VFC\",\n                              \"SDNC\",\n                              \"SDNR\"\n                            ]\n                          },\n                          \"recipe\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"Restart\",\n                              \"Rebuild\",\n                              \"Migrate\",\n                              \"Health-Check\",\n                              \"ModifyConfig\",\n                              \"VF Module Create\",\n                              \"VF Module Delete\",\n                              \"Reroute\"\n                            ]\n                          },\n                          \"targets\": {\n                            \"type\": \"string\",\n                            \"default\": \".*\"\n                          },\n                          \"clname\": {\n                            \"type\": \"string\",\n                            \"template\": \"{{loopName}}\",\n                            \"watch\": {\n                              \"loopName\": \"operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName\"\n                            }\n                          },\n                          \"guardActiveStart\": {\n                            \"type\": \"string\",\n                            \"default\": \"00:00:00Z\"\n                          },\n                          \"guardActiveEnd\": {\n                            \"type\": \"string\",\n                            \"default\": \"10:00:00Z\"\n                          },\n                          \"limit\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeWindow\": {\n                            \"type\": \"string\"\n                          },\n                          \"timeUnits\": {\n                            \"type\": \"string\",\n                            \"enum\": [\n                              \"minute\",\n                              \"hour\",\n                              \"day\",\n                              \"week\",\n                              \"month\",\n                              \"year\"\n                            ]\n                          }\n                        }\n                      }\n                    }\n                  }\n                ]\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','<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-8ea2736b-d11f-4d89-ac2e-51bceae4c3ad\" 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=\"176.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-87d4d8bb-5b55-4525-ae99-28830b0065f8\" 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=\"tca_k8s_jkJJ0_v1_0_ResourceInstanceName2_tca_2\" 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=\"379.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">tca_k8s</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-9f97766a-84d7-48bd-9e58-59f6cd505382\" 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=\"OperationalPolicy\" 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=\"557\" 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=\"557\" 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=\"564.5\" xml:space=\"preserve\" y=\"46.5\" stroke=\"none\">OperationalPolicy</text><line y2=\"1\" fill=\"none\" x1=\"557\" x2=\"618\" y1=\"42\"/></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-6c16481c-e161-4361-b5e1-37109fcdd32b\" 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=\"680\" x2=\"768\" y1=\"41\"/><polygon fill=\"none\" points=\" 766 39 766 43 770 41\"/><polygon points=\" 766 39 766 43 770 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=\"789\" cy=\"41\"/></g></g></g></svg>',NULL,'63cac700-ab9a-4115-a74f-7eac85e3fce0');
 /*!40000 ALTER TABLE `loops` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -57,21 +84,30 @@
 
 LOCK TABLES `loops_microservicepolicies` WRITE;
 /*!40000 ALTER TABLE `loops_microservicepolicies` DISABLE KEYS */;
-INSERT INTO `loops_microservicepolicies` VALUES ('LOOP_yHsgu_v1_0_ResourceInstanceName1_tca','TCA_yHsgu_v1_0_ResourceInstanceName1_tca');
-INSERT INTO `loops_microservicepolicies` VALUES ('LOOP_yHsgu_v1_0_ResourceInstanceName1_tca_3','tca_k8s_yHsgu_v1_0_ResourceInstanceName1_tca_3');
-INSERT INTO `loops_microservicepolicies` VALUES ('LOOP_yHsgu_v1_0_ResourceInstanceName2_tca_2','tca_k8s_yHsgu_v1_0_ResourceInstanceName2_tca_2');
+INSERT INTO `loops_microservicepolicies` VALUES ('LOOP_jkJJ0_v1_0_ResourceInstanceName1_tca','TCA_jkJJ0_v1_0_ResourceInstanceName1_tca');
+INSERT INTO `loops_microservicepolicies` VALUES ('LOOP_jkJJ0_v1_0_ResourceInstanceName1_tca_3','tca_k8s_jkJJ0_v1_0_ResourceInstanceName1_tca_3');
+INSERT INTO `loops_microservicepolicies` VALUES ('LOOP_jkJJ0_v1_0_ResourceInstanceName2_tca_2','tca_k8s_jkJJ0_v1_0_ResourceInstanceName2_tca_2');
 /*!40000 ALTER TABLE `loops_microservicepolicies` ENABLE KEYS */;
 UNLOCK TABLES;
 
 --
+-- Dumping data for table `micro_service_models`
+--
+
+LOCK TABLES `micro_service_models` WRITE;
+/*!40000 ALTER TABLE `micro_service_models` DISABLE KEYS */;
+/*!40000 ALTER TABLE `micro_service_models` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
 -- Dumping data for table `micro_service_policies`
 --
 
 LOCK TABLES `micro_service_policies` WRITE;
 /*!40000 ALTER TABLE `micro_service_policies` DISABLE KEYS */;
-INSERT INTO `micro_service_policies` VALUES ('tca_k8s_yHsgu_v1_0_ResourceInstanceName1_tca_3','{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs-top\",\n    \"type\": \"array\",\n    \"title\": \"TCA Policy JSON\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"TCA Policy JSON\",\n      \"required\": [\n        \"domain\",\n        \"metricsPerEventName\"\n      ],\n      \"properties\": {\n        \"domain\": {\n          \"propertyOrder\": 1001,\n          \"default\": \"measurementsForVfScaling\",\n          \"title\": \"Domain name to which TCA needs to be applied\",\n          \"type\": \"string\"\n        },\n        \"metricsPerEventName\": {\n          \"propertyOrder\": 1002,\n          \"uniqueItems\": \"true\",\n          \"format\": \"tabs-top\",\n          \"title\": \"Contains eventName and threshold details that need to be applied to given eventName\",\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"required\": [\n              \"controlLoopSchemaType\",\n              \"eventName\",\n              \"policyName\",\n              \"policyScope\",\n              \"policyVersion\",\n              \"thresholds\"\n            ],\n            \"properties\": {\n              \"policyVersion\": {\n                \"propertyOrder\": 1007,\n                \"title\": \"TCA Policy Scope Version\",\n                \"type\": \"string\"\n              },\n              \"thresholds\": {\n                \"propertyOrder\": 1008,\n                \"uniqueItems\": \"true\",\n                \"format\": \"tabs-top\",\n                \"title\": \"Thresholds associated with eventName\",\n                \"type\": \"array\",\n                \"items\": {\n                  \"type\": \"object\",\n                  \"required\": [\n                    \"closedLoopControlName\",\n                    \"closedLoopEventStatus\",\n                    \"direction\",\n                    \"fieldPath\",\n                    \"severity\",\n                    \"thresholdValue\",\n                    \"version\"\n                  ],\n                  \"properties\": {\n                    \"severity\": {\n                      \"propertyOrder\": 1013,\n                      \"title\": \"Threshold Event Severity\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"CRITICAL\",\n                        \"MAJOR\",\n                        \"MINOR\",\n                        \"WARNING\",\n                        \"NORMAL\"\n                      ]\n                    },\n                    \"fieldPath\": {\n                      \"propertyOrder\": 1012,\n                      \"title\": \"Json field Path as per CEF message which needs to be analyzed for TCA\",\n                      \"type\": \"string\",\n                      \"enum\": [\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                      ]\n                    },\n                    \"thresholdValue\": {\n                      \"propertyOrder\": 1014,\n                      \"title\": \"Threshold value for the field Path inside CEF message\",\n                      \"type\": \"integer\"\n                    },\n                    \"closedLoopEventStatus\": {\n                      \"propertyOrder\": 1010,\n                      \"title\": \"Closed Loop Event Status of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"ONSET\",\n                        \"ABATED\"\n                      ]\n                    },\n                    \"closedLoopControlName\": {\n                      \"propertyOrder\": 1009,\n                      \"title\": \"Closed Loop Control Name associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"version\": {\n                      \"propertyOrder\": 1015,\n                      \"title\": \"Version number associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"direction\": {\n                      \"propertyOrder\": 1011,\n                      \"title\": \"Direction of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"LESS\",\n                        \"LESS_OR_EQUAL\",\n                        \"GREATER\",\n                        \"GREATER_OR_EQUAL\",\n                        \"EQUAL\"\n                      ]\n                    }\n                  }\n                }\n              },\n              \"policyName\": {\n                \"propertyOrder\": 1005,\n                \"title\": \"TCA Policy Scope Name\",\n                \"type\": \"string\"\n              },\n              \"controlLoopSchemaType\": {\n                \"propertyOrder\": 1003,\n                \"title\": \"Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"VM\",\n                  \"VNF\"\n                ]\n              },\n              \"policyScope\": {\n                \"propertyOrder\": 1006,\n                \"title\": \"TCA Policy Scope\",\n                \"type\": \"string\"\n              },\n              \"eventName\": {\n                \"propertyOrder\": 1004,\n                \"title\": \"Event name to which thresholds need to be applied\",\n                \"type\": \"string\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','onap.policies.monitoring.cdap.tca.hi.lo.app','tosca_definitions_version: tosca_simple_yaml_1_0_0\npolicy_types:\n    onap.policies.Monitoring:\n        derived_from: tosca.policies.Root\n        description: a base policy type for all policies that governs 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: map\n                description: TCA Policy JSON\n                entry_schema:\n                    type: onap.datatypes.monitoring.tca_policy\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',NULL,'\0');
-INSERT INTO `micro_service_policies` VALUES ('tca_k8s_yHsgu_v1_0_ResourceInstanceName2_tca_2','{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs-top\",\n    \"type\": \"array\",\n    \"title\": \"TCA Policy JSON\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"TCA Policy JSON\",\n      \"required\": [\n        \"domain\",\n        \"metricsPerEventName\"\n      ],\n      \"properties\": {\n        \"domain\": {\n          \"propertyOrder\": 1001,\n          \"default\": \"measurementsForVfScaling\",\n          \"title\": \"Domain name to which TCA needs to be applied\",\n          \"type\": \"string\"\n        },\n        \"metricsPerEventName\": {\n          \"propertyOrder\": 1002,\n          \"uniqueItems\": \"true\",\n          \"format\": \"tabs-top\",\n          \"title\": \"Contains eventName and threshold details that need to be applied to given eventName\",\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"required\": [\n              \"controlLoopSchemaType\",\n              \"eventName\",\n              \"policyName\",\n              \"policyScope\",\n              \"policyVersion\",\n              \"thresholds\"\n            ],\n            \"properties\": {\n              \"policyVersion\": {\n                \"propertyOrder\": 1007,\n                \"title\": \"TCA Policy Scope Version\",\n                \"type\": \"string\"\n              },\n              \"thresholds\": {\n                \"propertyOrder\": 1008,\n                \"uniqueItems\": \"true\",\n                \"format\": \"tabs-top\",\n                \"title\": \"Thresholds associated with eventName\",\n                \"type\": \"array\",\n                \"items\": {\n                  \"type\": \"object\",\n                  \"required\": [\n                    \"closedLoopControlName\",\n                    \"closedLoopEventStatus\",\n                    \"direction\",\n                    \"fieldPath\",\n                    \"severity\",\n                    \"thresholdValue\",\n                    \"version\"\n                  ],\n                  \"properties\": {\n                    \"severity\": {\n                      \"propertyOrder\": 1013,\n                      \"title\": \"Threshold Event Severity\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"CRITICAL\",\n                        \"MAJOR\",\n                        \"MINOR\",\n                        \"WARNING\",\n                        \"NORMAL\"\n                      ]\n                    },\n                    \"fieldPath\": {\n                      \"propertyOrder\": 1012,\n                      \"title\": \"Json field Path as per CEF message which needs to be analyzed for TCA\",\n                      \"type\": \"string\",\n                      \"enum\": [\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                      ]\n                    },\n                    \"thresholdValue\": {\n                      \"propertyOrder\": 1014,\n                      \"title\": \"Threshold value for the field Path inside CEF message\",\n                      \"type\": \"integer\"\n                    },\n                    \"closedLoopEventStatus\": {\n                      \"propertyOrder\": 1010,\n                      \"title\": \"Closed Loop Event Status of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"ONSET\",\n                        \"ABATED\"\n                      ]\n                    },\n                    \"closedLoopControlName\": {\n                      \"propertyOrder\": 1009,\n                      \"title\": \"Closed Loop Control Name associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"version\": {\n                      \"propertyOrder\": 1015,\n                      \"title\": \"Version number associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"direction\": {\n                      \"propertyOrder\": 1011,\n                      \"title\": \"Direction of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"LESS\",\n                        \"LESS_OR_EQUAL\",\n                        \"GREATER\",\n                        \"GREATER_OR_EQUAL\",\n                        \"EQUAL\"\n                      ]\n                    }\n                  }\n                }\n              },\n              \"policyName\": {\n                \"propertyOrder\": 1005,\n                \"title\": \"TCA Policy Scope Name\",\n                \"type\": \"string\"\n              },\n              \"controlLoopSchemaType\": {\n                \"propertyOrder\": 1003,\n                \"title\": \"Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"VM\",\n                  \"VNF\"\n                ]\n              },\n              \"policyScope\": {\n                \"propertyOrder\": 1006,\n                \"title\": \"TCA Policy Scope\",\n                \"type\": \"string\"\n              },\n              \"eventName\": {\n                \"propertyOrder\": 1004,\n                \"title\": \"Event name to which thresholds need to be applied\",\n                \"type\": \"string\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','onap.policies.monitoring.cdap.tca.hi.lo.app','tosca_definitions_version: tosca_simple_yaml_1_0_0\npolicy_types:\n    onap.policies.Monitoring:\n        derived_from: tosca.policies.Root\n        description: a base policy type for all policies that governs 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: map\n                description: TCA Policy JSON\n                entry_schema:\n                    type: onap.datatypes.monitoring.tca_policy\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',NULL,'\0');
-INSERT INTO `micro_service_policies` VALUES ('TCA_yHsgu_v1_0_ResourceInstanceName1_tca','{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs-top\",\n    \"type\": \"array\",\n    \"title\": \"TCA Policy JSON\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"TCA Policy JSON\",\n      \"required\": [\n        \"domain\",\n        \"metricsPerEventName\"\n      ],\n      \"properties\": {\n        \"domain\": {\n          \"propertyOrder\": 1001,\n          \"default\": \"measurementsForVfScaling\",\n          \"title\": \"Domain name to which TCA needs to be applied\",\n          \"type\": \"string\"\n        },\n        \"metricsPerEventName\": {\n          \"propertyOrder\": 1002,\n          \"uniqueItems\": \"true\",\n          \"format\": \"tabs-top\",\n          \"title\": \"Contains eventName and threshold details that need to be applied to given eventName\",\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"required\": [\n              \"controlLoopSchemaType\",\n              \"eventName\",\n              \"policyName\",\n              \"policyScope\",\n              \"policyVersion\",\n              \"thresholds\"\n            ],\n            \"properties\": {\n              \"policyVersion\": {\n                \"propertyOrder\": 1007,\n                \"title\": \"TCA Policy Scope Version\",\n                \"type\": \"string\"\n              },\n              \"thresholds\": {\n                \"propertyOrder\": 1008,\n                \"uniqueItems\": \"true\",\n                \"format\": \"tabs-top\",\n                \"title\": \"Thresholds associated with eventName\",\n                \"type\": \"array\",\n                \"items\": {\n                  \"type\": \"object\",\n                  \"required\": [\n                    \"closedLoopControlName\",\n                    \"closedLoopEventStatus\",\n                    \"direction\",\n                    \"fieldPath\",\n                    \"severity\",\n                    \"thresholdValue\",\n                    \"version\"\n                  ],\n                  \"properties\": {\n                    \"severity\": {\n                      \"propertyOrder\": 1013,\n                      \"title\": \"Threshold Event Severity\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"CRITICAL\",\n                        \"MAJOR\",\n                        \"MINOR\",\n                        \"WARNING\",\n                        \"NORMAL\"\n                      ]\n                    },\n                    \"fieldPath\": {\n                      \"propertyOrder\": 1012,\n                      \"title\": \"Json field Path as per CEF message which needs to be analyzed for TCA\",\n                      \"type\": \"string\",\n                      \"enum\": [\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                      ]\n                    },\n                    \"thresholdValue\": {\n                      \"propertyOrder\": 1014,\n                      \"title\": \"Threshold value for the field Path inside CEF message\",\n                      \"type\": \"integer\"\n                    },\n                    \"closedLoopEventStatus\": {\n                      \"propertyOrder\": 1010,\n                      \"title\": \"Closed Loop Event Status of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"ONSET\",\n                        \"ABATED\"\n                      ]\n                    },\n                    \"closedLoopControlName\": {\n                      \"propertyOrder\": 1009,\n                      \"title\": \"Closed Loop Control Name associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"version\": {\n                      \"propertyOrder\": 1015,\n                      \"title\": \"Version number associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"direction\": {\n                      \"propertyOrder\": 1011,\n                      \"title\": \"Direction of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"LESS\",\n                        \"LESS_OR_EQUAL\",\n                        \"GREATER\",\n                        \"GREATER_OR_EQUAL\",\n                        \"EQUAL\"\n                      ]\n                    }\n                  }\n                }\n              },\n              \"policyName\": {\n                \"propertyOrder\": 1005,\n                \"title\": \"TCA Policy Scope Name\",\n                \"type\": \"string\"\n              },\n              \"controlLoopSchemaType\": {\n                \"propertyOrder\": 1003,\n                \"title\": \"Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"VM\",\n                  \"VNF\"\n                ]\n              },\n              \"policyScope\": {\n                \"propertyOrder\": 1006,\n                \"title\": \"TCA Policy Scope\",\n                \"type\": \"string\"\n              },\n              \"eventName\": {\n                \"propertyOrder\": 1004,\n                \"title\": \"Event name to which thresholds need to be applied\",\n                \"type\": \"string\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','onap.policies.monitoring.cdap.tca.hi.lo.app','tosca_definitions_version: tosca_simple_yaml_1_0_0\npolicy_types:\n    onap.policies.Monitoring:\n        derived_from: tosca.policies.Root\n        description: a base policy type for all policies that governs 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: map\n                description: TCA Policy JSON\n                entry_schema:\n                    type: onap.datatypes.monitoring.tca_policy\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',NULL,'\0');
+INSERT INTO `micro_service_policies` VALUES ('TCA_jkJJ0_v1_0_ResourceInstanceName1_tca','','2020-01-16 11:40:15.420567','','2020-01-16 11:40:15.420567',NULL,NULL,'{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs-top\",\n    \"type\": \"array\",\n    \"title\": \"TCA Policy JSON\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"TCA Policy JSON\",\n      \"required\": [\n        \"domain\",\n        \"metricsPerEventName\"\n      ],\n      \"properties\": {\n        \"domain\": {\n          \"propertyOrder\": 1001,\n          \"default\": \"measurementsForVfScaling\",\n          \"title\": \"Domain name to which TCA needs to be applied\",\n          \"type\": \"string\"\n        },\n        \"metricsPerEventName\": {\n          \"propertyOrder\": 1002,\n          \"uniqueItems\": \"true\",\n          \"format\": \"tabs-top\",\n          \"title\": \"Contains eventName and threshold details that need to be applied to given eventName\",\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"required\": [\n              \"controlLoopSchemaType\",\n              \"eventName\",\n              \"policyName\",\n              \"policyScope\",\n              \"policyVersion\",\n              \"thresholds\"\n            ],\n            \"properties\": {\n              \"policyVersion\": {\n                \"propertyOrder\": 1007,\n                \"title\": \"TCA Policy Scope Version\",\n                \"type\": \"string\"\n              },\n              \"thresholds\": {\n                \"propertyOrder\": 1008,\n                \"uniqueItems\": \"true\",\n                \"format\": \"tabs-top\",\n                \"title\": \"Thresholds associated with eventName\",\n                \"type\": \"array\",\n                \"items\": {\n                  \"type\": \"object\",\n                  \"required\": [\n                    \"closedLoopControlName\",\n                    \"closedLoopEventStatus\",\n                    \"direction\",\n                    \"fieldPath\",\n                    \"severity\",\n                    \"thresholdValue\",\n                    \"version\"\n                  ],\n                  \"properties\": {\n                    \"severity\": {\n                      \"propertyOrder\": 1013,\n                      \"title\": \"Threshold Event Severity\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"CRITICAL\",\n                        \"MAJOR\",\n                        \"MINOR\",\n                        \"WARNING\",\n                        \"NORMAL\"\n                      ]\n                    },\n                    \"fieldPath\": {\n                      \"propertyOrder\": 1012,\n                      \"title\": \"Json field Path as per CEF message which needs to be analyzed for TCA\",\n                      \"type\": \"string\",\n                      \"enum\": [\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                      ]\n                    },\n                    \"thresholdValue\": {\n                      \"propertyOrder\": 1014,\n                      \"title\": \"Threshold value for the field Path inside CEF message\",\n                      \"type\": \"integer\"\n                    },\n                    \"closedLoopEventStatus\": {\n                      \"propertyOrder\": 1010,\n                      \"title\": \"Closed Loop Event Status of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"ONSET\",\n                        \"ABATED\"\n                      ]\n                    },\n                    \"closedLoopControlName\": {\n                      \"propertyOrder\": 1009,\n                      \"title\": \"Closed Loop Control Name associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"version\": {\n                      \"propertyOrder\": 1015,\n                      \"title\": \"Version number associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"direction\": {\n                      \"propertyOrder\": 1011,\n                      \"title\": \"Direction of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"LESS\",\n                        \"LESS_OR_EQUAL\",\n                        \"GREATER\",\n                        \"GREATER_OR_EQUAL\",\n                        \"EQUAL\"\n                      ]\n                    }\n                  }\n                }\n              },\n              \"policyName\": {\n                \"propertyOrder\": 1005,\n                \"title\": \"TCA Policy Scope Name\",\n                \"type\": \"string\"\n              },\n              \"controlLoopSchemaType\": {\n                \"propertyOrder\": 1003,\n                \"title\": \"Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"VM\",\n                  \"VNF\"\n                ]\n              },\n              \"policyScope\": {\n                \"propertyOrder\": 1006,\n                \"title\": \"TCA Policy Scope\",\n                \"type\": \"string\"\n              },\n              \"eventName\": {\n                \"propertyOrder\": 1004,\n                \"title\": \"Event name to which thresholds need to be applied\",\n                \"type\": \"string\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','onap.policies.monitoring.cdap.tca.hi.lo.app','tosca_definitions_version: tosca_simple_yaml_1_0_0\npolicy_types:\n    onap.policies.Monitoring:\n        derived_from: tosca.policies.Root\n        description: a base policy type for all policies that governs 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: map\n                description: TCA Policy JSON\n                entry_schema:\n                    type: onap.datatypes.monitoring.tca_policy\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',NULL,'\0',NULL);
+INSERT INTO `micro_service_policies` VALUES ('tca_k8s_jkJJ0_v1_0_ResourceInstanceName1_tca_3','','2020-01-16 11:40:15.302285','','2020-01-16 11:40:15.302285',NULL,NULL,'{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs-top\",\n    \"type\": \"array\",\n    \"title\": \"TCA Policy JSON\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"TCA Policy JSON\",\n      \"required\": [\n        \"domain\",\n        \"metricsPerEventName\"\n      ],\n      \"properties\": {\n        \"domain\": {\n          \"propertyOrder\": 1001,\n          \"default\": \"measurementsForVfScaling\",\n          \"title\": \"Domain name to which TCA needs to be applied\",\n          \"type\": \"string\"\n        },\n        \"metricsPerEventName\": {\n          \"propertyOrder\": 1002,\n          \"uniqueItems\": \"true\",\n          \"format\": \"tabs-top\",\n          \"title\": \"Contains eventName and threshold details that need to be applied to given eventName\",\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"required\": [\n              \"controlLoopSchemaType\",\n              \"eventName\",\n              \"policyName\",\n              \"policyScope\",\n              \"policyVersion\",\n              \"thresholds\"\n            ],\n            \"properties\": {\n              \"policyVersion\": {\n                \"propertyOrder\": 1007,\n                \"title\": \"TCA Policy Scope Version\",\n                \"type\": \"string\"\n              },\n              \"thresholds\": {\n                \"propertyOrder\": 1008,\n                \"uniqueItems\": \"true\",\n                \"format\": \"tabs-top\",\n                \"title\": \"Thresholds associated with eventName\",\n                \"type\": \"array\",\n                \"items\": {\n                  \"type\": \"object\",\n                  \"required\": [\n                    \"closedLoopControlName\",\n                    \"closedLoopEventStatus\",\n                    \"direction\",\n                    \"fieldPath\",\n                    \"severity\",\n                    \"thresholdValue\",\n                    \"version\"\n                  ],\n                  \"properties\": {\n                    \"severity\": {\n                      \"propertyOrder\": 1013,\n                      \"title\": \"Threshold Event Severity\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"CRITICAL\",\n                        \"MAJOR\",\n                        \"MINOR\",\n                        \"WARNING\",\n                        \"NORMAL\"\n                      ]\n                    },\n                    \"fieldPath\": {\n                      \"propertyOrder\": 1012,\n                      \"title\": \"Json field Path as per CEF message which needs to be analyzed for TCA\",\n                      \"type\": \"string\",\n                      \"enum\": [\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                      ]\n                    },\n                    \"thresholdValue\": {\n                      \"propertyOrder\": 1014,\n                      \"title\": \"Threshold value for the field Path inside CEF message\",\n                      \"type\": \"integer\"\n                    },\n                    \"closedLoopEventStatus\": {\n                      \"propertyOrder\": 1010,\n                      \"title\": \"Closed Loop Event Status of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"ONSET\",\n                        \"ABATED\"\n                      ]\n                    },\n                    \"closedLoopControlName\": {\n                      \"propertyOrder\": 1009,\n                      \"title\": \"Closed Loop Control Name associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"version\": {\n                      \"propertyOrder\": 1015,\n                      \"title\": \"Version number associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"direction\": {\n                      \"propertyOrder\": 1011,\n                      \"title\": \"Direction of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"LESS\",\n                        \"LESS_OR_EQUAL\",\n                        \"GREATER\",\n                        \"GREATER_OR_EQUAL\",\n                        \"EQUAL\"\n                      ]\n                    }\n                  }\n                }\n              },\n              \"policyName\": {\n                \"propertyOrder\": 1005,\n                \"title\": \"TCA Policy Scope Name\",\n                \"type\": \"string\"\n              },\n              \"controlLoopSchemaType\": {\n                \"propertyOrder\": 1003,\n                \"title\": \"Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"VM\",\n                  \"VNF\"\n                ]\n              },\n              \"policyScope\": {\n                \"propertyOrder\": 1006,\n                \"title\": \"TCA Policy Scope\",\n                \"type\": \"string\"\n              },\n              \"eventName\": {\n                \"propertyOrder\": 1004,\n                \"title\": \"Event name to which thresholds need to be applied\",\n                \"type\": \"string\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','onap.policies.monitoring.cdap.tca.hi.lo.app','tosca_definitions_version: tosca_simple_yaml_1_0_0\npolicy_types:\n    onap.policies.Monitoring:\n        derived_from: tosca.policies.Root\n        description: a base policy type for all policies that governs 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: map\n                description: TCA Policy JSON\n                entry_schema:\n                    type: onap.datatypes.monitoring.tca_policy\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',NULL,'\0',NULL);
+INSERT INTO `micro_service_policies` VALUES ('tca_k8s_jkJJ0_v1_0_ResourceInstanceName2_tca_2','','2020-01-16 11:40:15.135898','','2020-01-16 11:40:15.135898',NULL,NULL,'{\n  \"schema\": {\n    \"uniqueItems\": \"true\",\n    \"format\": \"tabs-top\",\n    \"type\": \"array\",\n    \"title\": \"TCA Policy JSON\",\n    \"items\": {\n      \"type\": \"object\",\n      \"title\": \"TCA Policy JSON\",\n      \"required\": [\n        \"domain\",\n        \"metricsPerEventName\"\n      ],\n      \"properties\": {\n        \"domain\": {\n          \"propertyOrder\": 1001,\n          \"default\": \"measurementsForVfScaling\",\n          \"title\": \"Domain name to which TCA needs to be applied\",\n          \"type\": \"string\"\n        },\n        \"metricsPerEventName\": {\n          \"propertyOrder\": 1002,\n          \"uniqueItems\": \"true\",\n          \"format\": \"tabs-top\",\n          \"title\": \"Contains eventName and threshold details that need to be applied to given eventName\",\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"required\": [\n              \"controlLoopSchemaType\",\n              \"eventName\",\n              \"policyName\",\n              \"policyScope\",\n              \"policyVersion\",\n              \"thresholds\"\n            ],\n            \"properties\": {\n              \"policyVersion\": {\n                \"propertyOrder\": 1007,\n                \"title\": \"TCA Policy Scope Version\",\n                \"type\": \"string\"\n              },\n              \"thresholds\": {\n                \"propertyOrder\": 1008,\n                \"uniqueItems\": \"true\",\n                \"format\": \"tabs-top\",\n                \"title\": \"Thresholds associated with eventName\",\n                \"type\": \"array\",\n                \"items\": {\n                  \"type\": \"object\",\n                  \"required\": [\n                    \"closedLoopControlName\",\n                    \"closedLoopEventStatus\",\n                    \"direction\",\n                    \"fieldPath\",\n                    \"severity\",\n                    \"thresholdValue\",\n                    \"version\"\n                  ],\n                  \"properties\": {\n                    \"severity\": {\n                      \"propertyOrder\": 1013,\n                      \"title\": \"Threshold Event Severity\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"CRITICAL\",\n                        \"MAJOR\",\n                        \"MINOR\",\n                        \"WARNING\",\n                        \"NORMAL\"\n                      ]\n                    },\n                    \"fieldPath\": {\n                      \"propertyOrder\": 1012,\n                      \"title\": \"Json field Path as per CEF message which needs to be analyzed for TCA\",\n                      \"type\": \"string\",\n                      \"enum\": [\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                      ]\n                    },\n                    \"thresholdValue\": {\n                      \"propertyOrder\": 1014,\n                      \"title\": \"Threshold value for the field Path inside CEF message\",\n                      \"type\": \"integer\"\n                    },\n                    \"closedLoopEventStatus\": {\n                      \"propertyOrder\": 1010,\n                      \"title\": \"Closed Loop Event Status of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"ONSET\",\n                        \"ABATED\"\n                      ]\n                    },\n                    \"closedLoopControlName\": {\n                      \"propertyOrder\": 1009,\n                      \"title\": \"Closed Loop Control Name associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"version\": {\n                      \"propertyOrder\": 1015,\n                      \"title\": \"Version number associated with the threshold\",\n                      \"type\": \"string\"\n                    },\n                    \"direction\": {\n                      \"propertyOrder\": 1011,\n                      \"title\": \"Direction of the threshold\",\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"LESS\",\n                        \"LESS_OR_EQUAL\",\n                        \"GREATER\",\n                        \"GREATER_OR_EQUAL\",\n                        \"EQUAL\"\n                      ]\n                    }\n                  }\n                }\n              },\n              \"policyName\": {\n                \"propertyOrder\": 1005,\n                \"title\": \"TCA Policy Scope Name\",\n                \"type\": \"string\"\n              },\n              \"controlLoopSchemaType\": {\n                \"propertyOrder\": 1003,\n                \"title\": \"Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"VM\",\n                  \"VNF\"\n                ]\n              },\n              \"policyScope\": {\n                \"propertyOrder\": 1006,\n                \"title\": \"TCA Policy Scope\",\n                \"type\": \"string\"\n              },\n              \"eventName\": {\n                \"propertyOrder\": 1004,\n                \"title\": \"Event name to which thresholds need to be applied\",\n                \"type\": \"string\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}','onap.policies.monitoring.cdap.tca.hi.lo.app','tosca_definitions_version: tosca_simple_yaml_1_0_0\npolicy_types:\n    onap.policies.Monitoring:\n        derived_from: tosca.policies.Root\n        description: a base policy type for all policies that governs 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: map\n                description: TCA Policy JSON\n                entry_schema:\n                    type: onap.datatypes.monitoring.tca_policy\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',NULL,'\0',NULL);
 /*!40000 ALTER TABLE `micro_service_policies` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -81,11 +117,39 @@
 
 LOCK TABLES `operational_policies` WRITE;
 /*!40000 ALTER TABLE `operational_policies` DISABLE KEYS */;
-INSERT INTO `operational_policies` VALUES ('OPERATIONAL_yHsgu_v1_0_ResourceInstanceName1_tca','{\n  \"operational_policy\": {\n    \"controlLoop\": {\n      \"controlLoopName\": \"LOOP_yHsgu_v1_0_ResourceInstanceName1_tca\"\n    }\n  }\n}','LOOP_yHsgu_v1_0_ResourceInstanceName1_tca');
-INSERT INTO `operational_policies` VALUES ('OPERATIONAL_yHsgu_v1_0_ResourceInstanceName1_tca_3','{\n  \"operational_policy\": {\n    \"controlLoop\": {\n      \"controlLoopName\": \"LOOP_yHsgu_v1_0_ResourceInstanceName1_tca_3\"\n    }\n  }\n}','LOOP_yHsgu_v1_0_ResourceInstanceName1_tca_3');
-INSERT INTO `operational_policies` VALUES ('OPERATIONAL_yHsgu_v1_0_ResourceInstanceName2_tca_2','{\n  \"operational_policy\": {\n    \"controlLoop\": {\n      \"controlLoopName\": \"LOOP_yHsgu_v1_0_ResourceInstanceName2_tca_2\"\n    }\n  }\n}','LOOP_yHsgu_v1_0_ResourceInstanceName2_tca_2');
+INSERT INTO `operational_policies` VALUES ('OPERATIONAL_jkJJ0_v1_0_ResourceInstanceName1_tca','{\n  \"operational_policy\": {\n    \"controlLoop\": {\n      \"controlLoopName\": \"LOOP_jkJJ0_v1_0_ResourceInstanceName1_tca\"\n    }\n  }\n}','LOOP_jkJJ0_v1_0_ResourceInstanceName1_tca',NULL,NULL);
+INSERT INTO `operational_policies` VALUES ('OPERATIONAL_jkJJ0_v1_0_ResourceInstanceName1_tca_3','{\n  \"operational_policy\": {\n    \"controlLoop\": {\n      \"controlLoopName\": \"LOOP_jkJJ0_v1_0_ResourceInstanceName1_tca_3\"\n    }\n  }\n}','LOOP_jkJJ0_v1_0_ResourceInstanceName1_tca_3',NULL,NULL);
+INSERT INTO `operational_policies` VALUES ('OPERATIONAL_jkJJ0_v1_0_ResourceInstanceName2_tca_2','{\n  \"operational_policy\": {\n    \"controlLoop\": {\n      \"controlLoopName\": \"LOOP_jkJJ0_v1_0_ResourceInstanceName2_tca_2\"\n    }\n  }\n}','LOOP_jkJJ0_v1_0_ResourceInstanceName2_tca_2',NULL,NULL);
 /*!40000 ALTER TABLE `operational_policies` ENABLE KEYS */;
 UNLOCK TABLES;
+
+--
+-- Dumping data for table `policy_models`
+--
+
+LOCK TABLES `policy_models` WRITE;
+/*!40000 ALTER TABLE `policy_models` DISABLE KEYS */;
+/*!40000 ALTER TABLE `policy_models` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Dumping data for table `services`
+--
+
+LOCK TABLES `services` WRITE;
+/*!40000 ALTER TABLE `services` DISABLE KEYS */;
+INSERT INTO `services` VALUES ('63cac700-ab9a-4115-a74f-7eac85e3fce0','vLoadBalancerMS','{\n  \"CP\": {},\n  \"VL\": {},\n  \"VF\": {\n    \"vLoadBalancerMS 0\": {\n      \"resourceVendor\": \"Test\",\n      \"name\": \"vLoadBalancerMS\",\n      \"resourceVendorModelNumber\": \"\",\n      \"description\": \"vLBMS\",\n      \"invariantUUID\": \"1a31b9f2-e50d-43b7-89b3-a040250cf506\",\n      \"UUID\": \"b4c4f3d7-929e-4b6d-a1cd-57e952ddc3e6\",\n      \"type\": \"VF\",\n      \"category\": \"Application L4+\",\n      \"subcategory\": \"Load Balancer\",\n      \"version\": \"1.0\",\n      \"customizationUUID\": \"465246dc-7748-45f4-a013-308d92922552\",\n      \"resourceVendorRelease\": \"1.0\"\n    }\n  },\n  \"CR\": {},\n  \"VFC\": {},\n  \"PNF\": {},\n  \"Service\": {},\n  \"CVFC\": {},\n  \"Service Proxy\": {},\n  \"Configuration\": {},\n  \"AllottedResource\": {},\n  \"VFModule\": {\n    \"Vloadbalancerms..vpkg..module-1\": {\n      \"vfModuleModelInvariantUUID\": \"ca052563-eb92-4b5b-ad41-9111768ce043\",\n      \"vfModuleModelVersion\": \"1\",\n      \"vfModuleModelName\": \"Vloadbalancerms..vpkg..module-1\",\n      \"vfModuleModelUUID\": \"1e725ccc-b823-4f67-82b9-4f4367070dbc\",\n      \"vfModuleModelCustomizationUUID\": \"1bffdc31-a37d-4dee-b65c-dde623a76e52\",\n      \"min_vf_module_instances\": 0,\n      \"vf_module_label\": \"vpkg\",\n      \"max_vf_module_instances\": 1,\n      \"vf_module_type\": \"Expansion\",\n      \"isBase\": false,\n      \"initial_count\": 0,\n      \"volume_group\": false\n    },\n    \"Vloadbalancerms..vdns..module-3\": {\n      \"vfModuleModelInvariantUUID\": \"4c10ba9b-f88f-415e-9de3-5d33336047fa\",\n      \"vfModuleModelVersion\": \"1\",\n      \"vfModuleModelName\": \"Vloadbalancerms..vdns..module-3\",\n      \"vfModuleModelUUID\": \"4fa73b49-8a6c-493e-816b-eb401567b720\",\n      \"vfModuleModelCustomizationUUID\": \"bafcdab0-801d-4d81-9ead-f464640a38b1\",\n      \"min_vf_module_instances\": 0,\n      \"vf_module_label\": \"vdns\",\n      \"max_vf_module_instances\": 50,\n      \"vf_module_type\": \"Expansion\",\n      \"isBase\": false,\n      \"initial_count\": 0,\n      \"volume_group\": false\n    },\n    \"Vloadbalancerms..base_template..module-0\": {\n      \"vfModuleModelInvariantUUID\": \"921f7c96-ebdd-42e6-81b9-1cfc0c9796f3\",\n      \"vfModuleModelVersion\": \"1\",\n      \"vfModuleModelName\": \"Vloadbalancerms..base_template..module-0\",\n      \"vfModuleModelUUID\": \"63734409-f745-4e4d-a38b-131638a0edce\",\n      \"vfModuleModelCustomizationUUID\": \"86baddea-c730-4fb8-9410-cd2e17fd7f27\",\n      \"min_vf_module_instances\": 1,\n      \"vf_module_label\": \"base_template\",\n      \"max_vf_module_instances\": 1,\n      \"vf_module_type\": \"Base\",\n      \"isBase\": true,\n      \"initial_count\": 1,\n      \"volume_group\": false\n    },\n    \"Vloadbalancerms..vlb..module-2\": {\n      \"vfModuleModelInvariantUUID\": \"a772a1f4-0064-412c-833d-4749b15828dd\",\n      \"vfModuleModelVersion\": \"1\",\n      \"vfModuleModelName\": \"Vloadbalancerms..vlb..module-2\",\n      \"vfModuleModelUUID\": \"0f5c3f6a-650a-4303-abb6-fff3e573a07a\",\n      \"vfModuleModelCustomizationUUID\": \"96a78aad-4ffb-4ef0-9c4f-deb03bf1d806\",\n      \"min_vf_module_instances\": 0,\n      \"vf_module_label\": \"vlb\",\n      \"max_vf_module_instances\": 1,\n      \"vf_module_type\": \"Expansion\",\n      \"isBase\": false,\n      \"initial_count\": 0,\n      \"volume_group\": false\n    }\n  }\n}','{\n  \"serviceType\": \"\",\n  \"serviceRole\": \"\",\n  \"description\": \"vLBMS\",\n  \"type\": \"Service\",\n  \"instantiationType\": \"A-la-carte\",\n  \"namingPolicy\": \"\",\n  \"serviceEcompNaming\": \"true\",\n  \"environmentContext\": \"General_Revenue-Bearing\",\n  \"name\": \"vLoadBalancerMS\",\n  \"invariantUUID\": \"30ec5b59-4799-48d8-ac5f-1058a6b0e48f\",\n  \"ecompGeneratedNaming\": \"true\",\n  \"UUID\": \"63cac700-ab9a-4115-a74f-7eac85e3fce0\",\n  \"category\": \"Network L4+\"\n}');
+/*!40000 ALTER TABLE `services` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Dumping data for table `templates_microservicemodels`
+--
+
+LOCK TABLES `templates_microservicemodels` WRITE;
+/*!40000 ALTER TABLE `templates_microservicemodels` DISABLE KEYS */;
+/*!40000 ALTER TABLE `templates_microservicemodels` ENABLE KEYS */;
+UNLOCK TABLES;
 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
 
 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
@@ -95,4 +159,4 @@
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
--- Dump completed on 2019-09-11 16:01:22
+-- Dump completed on 2020-01-16 10:41:46
diff --git a/pom.xml b/pom.xml
index 83bc1d0..ba27daa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -259,6 +259,12 @@
 			<groupId>org.apache.xmlgraphics</groupId>
 			<artifactId>batik-svggen</artifactId>
 			<version>1.11</version>
+			<exclusions>
+			<exclusion>
+				<groupId>xml-apis</groupId>
+				<artifactId>xml-apis</artifactId>
+			</exclusion>
+			</exclusions>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.xmlgraphics</groupId>
@@ -601,9 +607,9 @@
 
 		<plugins>
 			<plugin>
-				<groupId>de.jpdigital</groupId>
-				<artifactId>hibernate52-ddl-maven-plugin</artifactId>
-				<version>2.2.0</version>
+					<groupId>de.jpdigital</groupId>
+					<artifactId>hibernate52-ddl-maven-plugin</artifactId>
+					<version>2.2.0</version>
 				<dependencies>
 					<dependency>
 						<groupId>javax.xml.bind</groupId>
@@ -619,7 +625,7 @@
 						</goals>
 						<configuration>
 							<packages>
-								<param>org.onap.clamp.dao.model</param>
+								<param>org.onap.clamp</param>
 							</packages>
 							<dialects>
 								<param>MARIADB53</param>
diff --git a/src/main/java/org/onap/clamp/clds/Application.java b/src/main/java/org/onap/clamp/clds/Application.java
index e41140f..63320d2 100644
--- a/src/main/java/org/onap/clamp/clds/Application.java
+++ b/src/main/java/org/onap/clamp/clds/Application.java
@@ -58,6 +58,7 @@
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.core.env.Environment;
+import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
 import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.scheduling.annotation.EnableScheduling;
@@ -65,13 +66,14 @@
 
 @ComponentScan(basePackages = { "org.onap.clamp" })
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, SecurityAutoConfiguration.class,
-        UserDetailsServiceAutoConfiguration.class })
+    UserDetailsServiceAutoConfiguration.class })
 @EnableJpaRepositories(basePackages = { "org.onap.clamp" })
 @EntityScan(basePackages = { "org.onap.clamp" })
 @EnableTransactionManagement
 @EnableConfigurationProperties
 @EnableAsync
 @EnableScheduling
+@EnableJpaAuditing
 public class Application extends SpringBootServletInitializer {
 
     protected static final EELFLogger eelfLogger = EELFManager.getInstance().getLogger(Application.class);
@@ -137,8 +139,6 @@
         return tomcat;
     }
 
-
-
     private Connector createRedirectConnector(int redirectSecuredPort) {
         if (redirectSecuredPort <= 0) {
             eelfLogger.warn("HTTP port redirection to HTTPS is disabled because the HTTPS port is 0 (random port) or -1"
@@ -159,7 +159,7 @@
             if (env.getProperty("server.ssl.key-store") != null) {
 
                 KeyStore keystore = KeyStore.getInstance(env.getProperty("server.ssl.key-store-type"));
-                String password = PassDecoder.decode(env.getProperty("server.ssl.key-store-password"), 
+                String password = PassDecoder.decode(env.getProperty("server.ssl.key-store-password"),
                         env.getProperty("clamp.config.keyFile"));
                 String keyStore = env.getProperty("server.ssl.key-store");
                 InputStream is = ResourceFileUtil.getResourceAsStream(keyStore.replaceAll("classpath:", ""));
diff --git a/src/main/java/org/onap/clamp/clds/ClampInUserAuditorAware.java b/src/main/java/org/onap/clamp/clds/ClampInUserAuditorAware.java
new file mode 100644
index 0000000..d18e7eb
--- /dev/null
+++ b/src/main/java/org/onap/clamp/clds/ClampInUserAuditorAware.java
@@ -0,0 +1,46 @@
+/*-
+ * ============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;
+
+import java.util.Optional;
+
+import org.springframework.data.domain.AuditorAware;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ClampInUserAuditorAware implements AuditorAware<String> {
+
+    @Override
+    public Optional<String> getCurrentAuditor() {
+        if (SecurityContextHolder.getContext().getAuthentication() != null
+                && SecurityContextHolder.getContext().getAuthentication().getPrincipal() != null) {
+            return Optional.of(((UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal())
+                    .getUsername());
+        }
+        return Optional.of("");
+    }
+
+}
diff --git a/src/main/java/org/onap/clamp/clds/filter/ClampCadiFilter.java b/src/main/java/org/onap/clamp/clds/filter/ClampCadiFilter.java
index 9e04bd0..3bbb8a0 100644
--- a/src/main/java/org/onap/clamp/clds/filter/ClampCadiFilter.java
+++ b/src/main/java/org/onap/clamp/clds/filter/ClampCadiFilter.java
@@ -153,7 +153,7 @@
                                 URLDecoder.decode(certHeader, StandardCharsets.UTF_8.toString()).getBytes()));
                 X509Certificate caCert = (X509Certificate) certificateFactory
                         .generateCertificate(new ByteArrayInputStream(
-                        ResourceFileUtil.getResourceAsString("clds/aaf/ssl/ca-certs.pem").getBytes()));
+                                ResourceFileUtil.getResourceAsString("clds/aaf/ssl/ca-certs.pem").getBytes()));
 
                 X509Certificate[] certifArray = ((X509Certificate[]) request
                         .getAttribute("javax.servlet.request.X509Certificate"));
diff --git a/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java b/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java
deleted file mode 100644
index 35fbcec..0000000
--- a/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2018 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.model;
-
-import com.google.gson.annotations.Expose;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents a CLDS Dictionary.
- */
-
-public class CldsDictionary {
-
-    @Expose
-    private String dictionaryId;
-    @Expose
-    private String dictionaryName;
-
-    @Expose
-    private String createdBy;
-    @Expose
-    private String updatedBy;
-    @Expose
-    private String lastUpdatedDate;
-    @Expose
-    private List<CldsDictionaryItem> cldsDictionaryItems = new ArrayList<>();
-
-    /**
-     * Get the dictionary ID.
-     * 
-     * @return the dictionaryId
-     */
-    public String getDictionaryId() {
-        return dictionaryId;
-    }
-
-    /**
-     * Set the dictionary Id.
-     * 
-     * @param dictionaryId the dictionaryId to set
-     */
-    public void setDictionaryId(String dictionaryId) {
-        this.dictionaryId = dictionaryId;
-    }
-
-    /**
-     * Get the dictionary name.
-     * 
-     * @return the dictionaryName
-     */
-    public String getDictionaryName() {
-        return dictionaryName;
-    }
-
-    /**
-     * Set the dictionary name.
-     * 
-     * @param dictionaryName the dictionaryName to set
-     */
-    public void setDictionaryName(String dictionaryName) {
-        this.dictionaryName = dictionaryName;
-    }
-
-    /**
-     * Get the createdBy info.
-     * 
-     * @return the createdBy
-     */
-    public String getCreatedBy() {
-        return createdBy;
-    }
-
-    /**
-     * Set the createdBy info.
-     * 
-     * @param createdBy the createdBy to set
-     */
-    public void setCreatedBy(String createdBy) {
-        this.createdBy = createdBy;
-    }
-
-    /**
-     * Get the updatedBy info.
-     * 
-     * @return the updatedBy
-     */
-    public String getUpdatedBy() {
-        return updatedBy;
-    }
-
-    /**
-     * Set the updatedBy info.
-     * 
-     * @param updatedby the updatedBy to set
-     */
-    public void setUpdatedBy(String updatedby) {
-        updatedBy = updatedby;
-    }
-
-    /**
-     * Get the last updated date.
-     * 
-     * @return the lastUpdatedDate
-     */
-    public String getLastUpdatedDate() {
-        return lastUpdatedDate;
-    }
-
-    /**
-     * Set the last updated date.
-     * 
-     * @param lastUpdatedDate the lastUpdatedDate to set
-     */
-    public void setLastUpdatedDate(String lastUpdatedDate) {
-        this.lastUpdatedDate = lastUpdatedDate;
-    }
-
-    /**
-     * Get all the dictionary items.
-     * 
-     * @return the cldsDictionaryItems
-     */
-    public List<CldsDictionaryItem> getCldsDictionaryItems() {
-        return cldsDictionaryItems;
-    }
-
-    /**
-     * Set the whole dictionary items.
-     * 
-     * @param cldsDictionaryItems the cldsDictionaryItems to set
-     */
-    public void setCldsDictionaryItems(List<CldsDictionaryItem> cldsDictionaryItems) {
-        this.cldsDictionaryItems = cldsDictionaryItems;
-    }
-
-}
diff --git a/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java b/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java
deleted file mode 100644
index 1b79bdf..0000000
--- a/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2018 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.model;
-
-import com.google.gson.annotations.Expose;
-
-/**
- * Represents a CLDS Dictionary Item.
- */
-public class CldsDictionaryItem {
-
-    @Expose
-    private String dictElementId;
-    @Expose
-    private String dictionaryId;
-    @Expose
-    private String dictElementName;
-    @Expose
-    private String dictElementShortName;
-    @Expose
-    private String dictElementDesc;
-    @Expose
-    private String dictElementType;
-    @Expose
-    private String createdBy;
-    @Expose
-    private String updatedBy;
-    @Expose
-    private String lastUpdatedDate;
-
-    /**
-     * Get the dictionary element id.
-     *
-     * @return the dictElementId
-     */
-    public String getDictElementId() {
-        return dictElementId;
-    }
-
-    /**
-     * Set the dictionary element id.
-     *
-     * @param dictElementId the dictElementId to set
-     */
-    public void setDictElementId(String dictElementId) {
-        this.dictElementId = dictElementId;
-    }
-
-    /**
-     * Get the dictionary id.
-     *
-     * @return the dictionaryId
-     */
-    public String getDictionaryId() {
-        return dictionaryId;
-    }
-
-    /**
-     * Set the dictionary id.
-     *
-     * @param dictionaryId the dictionaryId to set
-     */
-    public void setDictionaryId(String dictionaryId) {
-        this.dictionaryId = dictionaryId;
-    }
-
-    /**
-     * Get the dictionary name.
-     *
-     * @return the dictElementName
-     */
-    public String getDictElementName() {
-        return dictElementName;
-    }
-
-    /**
-     * Set the dictionary name.
-     *
-     * @param dictElementName the dictElementName to set
-     */
-    public void setDictElementName(String dictElementName) {
-        this.dictElementName = dictElementName;
-    }
-
-    /**
-     * Get the dictionary element short name.
-     *
-     * @return the dictElementShortName
-     */
-    public String getDictElementShortName() {
-        return dictElementShortName;
-    }
-
-    /**
-     * Set the dictionary element short name.
-     *
-     * @param dictElementShortName the dictElementShortName to set
-     */
-    public void setDictElementShortName(String dictElementShortName) {
-        this.dictElementShortName = dictElementShortName;
-    }
-
-    /**
-     * Get the dictionary element description.
-     *
-     * @return the dictElementDesc
-     */
-    public String getDictElementDesc() {
-        return dictElementDesc;
-    }
-
-    /**
-     * Set the dictionary element description.
-     *
-     * @param dictElementDesc the dictElementDesc to set
-     */
-    public void setDictElementDesc(String dictElementDesc) {
-        this.dictElementDesc = dictElementDesc;
-    }
-
-    /**
-     * Get the dictionary element type.
-     *
-     * @return the dictElementType
-     */
-    public String getDictElementType() {
-        return dictElementType;
-    }
-
-    /**
-     * Set the dictionary element type.
-     *
-     * @param dictElementType the dictElementType to set
-     */
-    public void setDictElementType(String dictElementType) {
-        this.dictElementType = dictElementType;
-    }
-
-    /**
-     * Get the createdBy info.
-     *
-     * @return the createdBy
-     */
-    public String getCreatedBy() {
-        return createdBy;
-    }
-
-    /**
-     * Set the createdBy info.
-     *
-     * @param createdBy the createdBy to set
-     */
-    public void setCreatedBy(String createdBy) {
-        this.createdBy = createdBy;
-    }
-
-    /**
-     * Get the updatedBy info.
-     *
-     * @return the updatedBy
-     */
-    public String getUpdatedBy() {
-        return updatedBy;
-    }
-
-    /**
-     * Set the updatedBy info.
-     *
-     * @param updatedby the updatedBy to set
-     */
-    public void setUpdatedBy(String updatedby) {
-        updatedBy = updatedby;
-    }
-
-    /**
-     * Get the last updated date.
-     *
-     * @return the lastUpdatedDate
-     */
-    public String getLastUpdatedDate() {
-        return lastUpdatedDate;
-    }
-
-    /**
-     * Set the last updated date.
-     *
-     * @param lastUpdatedDate the lastUpdatedDate to set
-     */
-    public void setLastUpdatedDate(String lastUpdatedDate) {
-        this.lastUpdatedDate = lastUpdatedDate;
-    }
-
-}
diff --git a/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java b/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
index 43dd5f4..2e025ba 100644
--- a/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
+++ b/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
@@ -481,63 +481,6 @@
 
     private void processDictionaryElements(JSONObject childObject, String dictionaryReference) {
 
-        /*
-         * if (dictionaryReference.contains("#")) { String[] dictionaryKeyArray =
-         * dictionaryReference
-         * .substring(dictionaryReference.indexOf(ToscaSchemaConstants.DICTIONARY) + 11,
-         * dictionaryReference.length()) .split("#"); // We support only one # as of
-         * now. List<CldsDictionaryItem> cldsDictionaryElements = null;
-         * List<CldsDictionaryItem> subDictionaryElements = null; if (dictionaryKeyArray
-         * != null && dictionaryKeyArray.length == 2) { cldsDictionaryElements =
-         * getCldsDao().getDictionaryElements(dictionaryKeyArray[0], null, null);
-         * subDictionaryElements =
-         * getCldsDao().getDictionaryElements(dictionaryKeyArray[1], null, null);
-         * 
-         * if (cldsDictionaryElements != null) { List<String> subCldsDictionaryNames =
-         * subDictionaryElements.stream()
-         * .map(CldsDictionaryItem::getDictElementShortName).collect(Collectors.toList()
-         * ); JSONArray jsonArray = new JSONArray();
-         * 
-         * Optional.ofNullable(cldsDictionaryElements).get().stream().forEach(c -> {
-         * JSONObject jsonObject = new JSONObject();
-         * jsonObject.put(JsonEditorSchemaConstants.TYPE,
-         * getJsonType(c.getDictElementType())); if (c.getDictElementType() != null &&
-         * c.getDictElementType().equalsIgnoreCase(ToscaSchemaConstants.TYPE_STRING)) {
-         * jsonObject.put(JsonEditorSchemaConstants.MIN_LENGTH, 1); }
-         * jsonObject.put(JsonEditorSchemaConstants.ID, c.getDictElementName());
-         * jsonObject.put(JsonEditorSchemaConstants.LABEL, c.getDictElementShortName());
-         * jsonObject.put(JsonEditorSchemaConstants.OPERATORS, subCldsDictionaryNames);
-         * jsonArray.put(jsonObject); }); ; JSONObject filterObject = new JSONObject();
-         * filterObject.put(JsonEditorSchemaConstants.FILTERS, jsonArray);
-         * 
-         * childObject.put(JsonEditorSchemaConstants.TYPE,
-         * JsonEditorSchemaConstants.TYPE_QBLDR); // TO invoke validation on such
-         * parameters childObject.put(JsonEditorSchemaConstants.MIN_LENGTH, 1);
-         * childObject.put(JsonEditorSchemaConstants.QSSCHEMA, filterObject);
-         * 
-         * } } } else { String dictionaryKey = dictionaryReference.substring(
-         * dictionaryReference.indexOf(ToscaSchemaConstants.DICTIONARY) + 11,
-         * dictionaryReference.length()); if (dictionaryKey != null) {
-         * List<CldsDictionaryItem> cldsDictionaryElements =
-         * getCldsDao().getDictionaryElements(dictionaryKey, null, null); if
-         * (cldsDictionaryElements != null) { List<String> cldsDictionaryNames = new
-         * ArrayList<>(); List<String> cldsDictionaryFullNames = new ArrayList<>();
-         * cldsDictionaryElements.stream().forEach(c -> { // Json type will be
-         * translated before Policy creation if (c.getDictElementType() != null &&
-         * !c.getDictElementType().equalsIgnoreCase("json")) {
-         * cldsDictionaryFullNames.add(c.getDictElementName()); }
-         * cldsDictionaryNames.add(c.getDictElementShortName()); });
-         * 
-         * if (cldsDictionaryFullNames.size() > 0) {
-         * childObject.put(JsonEditorSchemaConstants.ENUM, cldsDictionaryFullNames); //
-         * Add Enum titles for generated translated values during JSON instance //
-         * generation JSONObject enumTitles = new JSONObject();
-         * enumTitles.put(JsonEditorSchemaConstants.ENUM_TITLES, cldsDictionaryNames);
-         * childObject.put(JsonEditorSchemaConstants.OPTIONS, enumTitles); } else {
-         * childObject.put(JsonEditorSchemaConstants.ENUM, cldsDictionaryNames); }
-         * 
-         * } } }
-         */
     }
 
     private String getJsonType(String toscaType) {
diff --git a/src/main/java/org/onap/clamp/loop/Loop.java b/src/main/java/org/onap/clamp/loop/Loop.java
index 531587a..66046f0 100644
--- a/src/main/java/org/onap/clamp/loop/Loop.java
+++ b/src/main/java/org/onap/clamp/loop/Loop.java
@@ -56,18 +56,20 @@
 import org.hibernate.annotations.TypeDef;
 import org.hibernate.annotations.TypeDefs;
 import org.onap.clamp.dao.model.jsontype.StringJsonUserType;
+import org.onap.clamp.loop.common.AuditEntity;
 import org.onap.clamp.loop.components.external.DcaeComponent;
 import org.onap.clamp.loop.components.external.ExternalComponent;
 import org.onap.clamp.loop.components.external.PolicyComponent;
 import org.onap.clamp.loop.log.LoopLog;
 import org.onap.clamp.loop.service.Service;
+import org.onap.clamp.loop.template.LoopTemplate;
 import org.onap.clamp.policy.microservice.MicroServicePolicy;
 import org.onap.clamp.policy.operational.OperationalPolicy;
 
 @Entity
 @Table(name = "loops")
 @TypeDefs({ @TypeDef(name = "json", typeClass = StringJsonUserType.class) })
-public class Loop implements Serializable {
+public class Loop extends AuditEntity implements Serializable {
 
     /**
      * The serial version id.
@@ -103,7 +105,7 @@
     private JsonObject globalPropertiesJson;
 
     @Expose
-    @ManyToOne(fetch = FetchType.EAGER)
+    @ManyToOne(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH })
     @JoinColumn(name = "service_uuid")
     private Service modelService;
 
@@ -120,19 +122,24 @@
     private final Map<String, ExternalComponent> components = new HashMap<>();
 
     @Expose
-    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "loop")
+    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "loop", orphanRemoval = true)
     private Set<OperationalPolicy> operationalPolicies = new HashSet<>();
 
     @Expose
-    @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
+    @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH }, fetch = FetchType.EAGER)
     @JoinTable(name = "loops_microservicepolicies", joinColumns = @JoinColumn(name = "loop_id"), inverseJoinColumns = @JoinColumn(name = "microservicepolicy_id"))
     private Set<MicroServicePolicy> microServicePolicies = new HashSet<>();
 
     @Expose
-    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "loop")
+    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "loop", orphanRemoval = true)
     @SortNatural
     private SortedSet<LoopLog> loopLogs = new TreeSet<>();
 
+    @Expose
+    @ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH }, fetch = FetchType.EAGER)
+    @JoinColumn(name = "loop_template_name")
+    private LoopTemplate loopTemplate;
+
     private void initializeExternalComponents() {
         this.addComponent(new PolicyComponent());
         this.addComponent(new DcaeComponent());
@@ -280,6 +287,14 @@
         this.components.put(component.getComponentName(), component);
     }
 
+    public LoopTemplate getLoopTemplate() {
+        return loopTemplate;
+    }
+
+    public void setLoopTemplate(LoopTemplate loopTemplate) {
+        this.loopTemplate = loopTemplate;
+    }
+
     /**
      * Generate the loop name.
      *
diff --git a/src/main/java/org/onap/clamp/loop/LoopService.java b/src/main/java/org/onap/clamp/loop/LoopService.java
index d1ab0e3..85e24cd 100644
--- a/src/main/java/org/onap/clamp/loop/LoopService.java
+++ b/src/main/java/org/onap/clamp/loop/LoopService.java
@@ -31,29 +31,23 @@
 import javax.persistence.EntityNotFoundException;
 
 import org.onap.clamp.policy.microservice.MicroServicePolicy;
-import org.onap.clamp.policy.microservice.MicroservicePolicyService;
+import org.onap.clamp.policy.microservice.MicroServicePolicyService;
 import org.onap.clamp.policy.operational.OperationalPolicy;
 import org.onap.clamp.policy.operational.OperationalPolicyService;
-import org.springframework.stereotype.Component;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 @Service
-@Component
 public class LoopService {
 
-    private final LoopsRepository loopsRepository;
-    private final MicroservicePolicyService microservicePolicyService;
-    private final OperationalPolicyService operationalPolicyService;
+    @Autowired
+    private LoopsRepository loopsRepository;
 
-    /**
-     * Constructor.
-     */
-    public LoopService(LoopsRepository loopsRepository, MicroservicePolicyService microservicePolicyService,
-        OperationalPolicyService operationalPolicyService) {
-        this.loopsRepository = loopsRepository;
-        this.microservicePolicyService = microservicePolicyService;
-        this.operationalPolicyService = operationalPolicyService;
-    }
+    @Autowired
+    private MicroServicePolicyService microservicePolicyService;
+
+    @Autowired
+    private OperationalPolicyService operationalPolicyService;
 
     Loop saveOrUpdateLoop(Loop loop) {
         return loopsRepository.save(loop);
@@ -109,6 +103,6 @@
 
     private Loop findClosedLoopByName(String loopName) {
         return loopsRepository.findById(loopName)
-            .orElseThrow(() -> new EntityNotFoundException("Couldn't find closed loop named: " + loopName));
+                .orElseThrow(() -> new EntityNotFoundException("Couldn't find closed loop named: " + loopName));
     }
 }
diff --git a/src/main/java/org/onap/clamp/loop/LoopsRepository.java b/src/main/java/org/onap/clamp/loop/LoopsRepository.java
index 37c4762..aaa4911 100644
--- a/src/main/java/org/onap/clamp/loop/LoopsRepository.java
+++ b/src/main/java/org/onap/clamp/loop/LoopsRepository.java
@@ -24,12 +24,13 @@
 package org.onap.clamp.loop;
 
 import java.util.List;
+
+import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.CrudRepository;
 import org.springframework.stereotype.Repository;
 
 @Repository
-public interface LoopsRepository extends CrudRepository<Loop, String> {
+public interface LoopsRepository extends JpaRepository<Loop, String> {
 
     @Query("SELECT loop.name FROM Loop as loop")
     List<String> getAllLoopNames();
diff --git a/src/main/java/org/onap/clamp/loop/common/AuditEntity.java b/src/main/java/org/onap/clamp/loop/common/AuditEntity.java
new file mode 100644
index 0000000..445f5b9
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/common/AuditEntity.java
@@ -0,0 +1,108 @@
+/*-
+ * ============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.loop.common;
+
+import com.google.gson.annotations.Expose;
+
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
+
+import javax.persistence.Column;
+import javax.persistence.EntityListeners;
+import javax.persistence.MappedSuperclass;
+
+import org.springframework.data.annotation.CreatedBy;
+import org.springframework.data.annotation.CreatedDate;
+import org.springframework.data.annotation.LastModifiedBy;
+import org.springframework.data.annotation.LastModifiedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+@MappedSuperclass
+@EntityListeners(AuditingEntityListener.class)
+public class AuditEntity {
+
+    @Expose
+    @CreatedDate
+    @Column(name = "created_timestamp", nullable = false, updatable = false)
+    private Instant createdDate;
+
+    @Expose
+    @LastModifiedDate
+    @Column(name = "updated_timestamp", nullable = false)
+    private Instant updatedDate;
+
+    @Expose
+    @LastModifiedBy
+    @Column(name = "updated_by")
+    private String updatedBy;
+
+    @Expose
+    @CreatedBy
+    @Column(name = "created_by")
+    private String createdBy;
+
+    public Instant getCreatedDate() {
+        return createdDate;
+    }
+
+    public void setCreatedDate(Instant createdDate) {
+        if (createdDate != null) {
+            this.createdDate = createdDate.truncatedTo(ChronoUnit.SECONDS);
+        } else {
+            this.createdDate = null;
+        }
+    }
+
+    public Instant getUpdatedDate() {
+        return updatedDate;
+    }
+
+    public void setUpdatedDate(Instant updatedDate) {
+        if (updatedDate != null) {
+            this.updatedDate = updatedDate.truncatedTo(ChronoUnit.SECONDS);
+        } else {
+            this.updatedDate = null;
+        }
+    }
+
+    public String getUpdatedBy() {
+        return updatedBy;
+    }
+
+    public void setUpdatedBy(String updatedBy) {
+        this.updatedBy = updatedBy;
+    }
+
+    public String getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(String createdBy) {
+        this.createdBy = createdBy;
+    }
+
+    public AuditEntity() {
+    }
+
+}
diff --git a/src/main/java/org/onap/clamp/loop/log/LoopLog.java b/src/main/java/org/onap/clamp/loop/log/LoopLog.java
index 0e1153a..e495988 100644
--- a/src/main/java/org/onap/clamp/loop/log/LoopLog.java
+++ b/src/main/java/org/onap/clamp/loop/log/LoopLog.java
@@ -190,9 +190,7 @@
         if (arg0.getId() == null) {
             return -1;
         }
-
         return arg0.getId().compareTo(this.getId());
-
     }
 
 }
diff --git a/src/main/java/org/onap/clamp/loop/log/LoopLogRepository.java b/src/main/java/org/onap/clamp/loop/log/LoopLogRepository.java
index 103341f..0b3c34e 100644
--- a/src/main/java/org/onap/clamp/loop/log/LoopLogRepository.java
+++ b/src/main/java/org/onap/clamp/loop/log/LoopLogRepository.java
@@ -23,10 +23,10 @@
 
 package org.onap.clamp.loop.log;
 
-import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Repository;
 
 @Repository
-public interface LoopLogRepository extends CrudRepository<LoopLog, Long> {
+public interface LoopLogRepository extends JpaRepository<LoopLog, Long> {
 
 }
diff --git a/src/main/java/org/onap/clamp/loop/service/Service.java b/src/main/java/org/onap/clamp/loop/service/Service.java
index 115f9f7..b74ee0b 100644
--- a/src/main/java/org/onap/clamp/loop/service/Service.java
+++ b/src/main/java/org/onap/clamp/loop/service/Service.java
@@ -39,9 +39,9 @@
 import org.hibernate.annotations.Type;
 import org.hibernate.annotations.TypeDef;
 import org.hibernate.annotations.TypeDefs;
+import org.onap.clamp.clds.util.JsonUtils;
 import org.onap.clamp.dao.model.jsontype.StringJsonUserType;
 
-
 @Entity
 @Table(name = "services")
 @TypeDefs({ @TypeDef(name = "json", typeClass = StringJsonUserType.class) })
@@ -76,13 +76,25 @@
     private JsonObject resourceDetails;
 
     /**
-     * Public constructor.
+     * Default constructor for serialization.
      */
     public Service() {
     }
 
     /**
-     * Constructor.
+     * Constructor with string.
+     */
+    public Service(String serviceDetails, String resourceDetails) {
+        JsonObject serviceDetailsJson = JsonUtils.GSON.fromJson(serviceDetails, JsonObject.class);
+        JsonObject resourceDetailsJson = JsonUtils.GSON.fromJson(resourceDetails, JsonObject.class);
+        this.name = serviceDetailsJson.get("name").getAsString();
+        this.serviceUuid = serviceDetailsJson.get("UUID").getAsString();
+        this.serviceDetails = serviceDetailsJson;
+        this.resourceDetails = resourceDetailsJson;
+    }
+
+    /**
+     * Constructor with Json Object.
      */
     public Service(JsonObject serviceDetails, JsonObject resourceDetails, String version) {
         this.name = serviceDetails.get("name").getAsString();
diff --git a/src/main/java/org/onap/clamp/loop/service/ServicesRepository.java b/src/main/java/org/onap/clamp/loop/service/ServicesRepository.java
new file mode 100644
index 0000000..fe5ba8e
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/service/ServicesRepository.java
@@ -0,0 +1,31 @@
+/*-
+ * ============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.loop.service;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface ServicesRepository extends JpaRepository<Service, String> {
+}
diff --git a/src/main/java/org/onap/clamp/loop/template/LoopTemplate.java b/src/main/java/org/onap/clamp/loop/template/LoopTemplate.java
new file mode 100644
index 0000000..10367e7
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/template/LoopTemplate.java
@@ -0,0 +1,268 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.loop.template;
+
+import com.google.gson.annotations.Expose;
+
+import java.io.Serializable;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.SortNatural;
+import org.onap.clamp.loop.common.AuditEntity;
+import org.onap.clamp.loop.service.Service;
+
+@Entity
+@Table(name = "loop_templates")
+public class LoopTemplate extends AuditEntity implements Serializable {
+
+    /**
+     * The serial version id.
+     */
+    private static final long serialVersionUID = -286522707701388642L;
+
+    @Id
+    @Expose
+    @Column(nullable = false, name = "name", unique = true)
+    private String name;
+
+    /**
+     * This field is used when we have a blueprint defining all microservices. The
+     * other option would be to have independent blueprint for each microservices.
+     * In that case they are stored in each MicroServiceModel
+     */
+    @Column(columnDefinition = "MEDIUMTEXT", nullable = false, name = "blueprint_yaml")
+    private String blueprint;
+
+    @Expose
+    @Column(columnDefinition = "MEDIUMTEXT", name = "svg_representation")
+    private String svgRepresentation;
+
+    @Expose
+    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "loopTemplate", orphanRemoval = true)
+    @SortNatural
+    private SortedSet<TemplateMicroServiceModel> microServiceModelUsed = new TreeSet<>();
+
+    @Expose
+    @ManyToOne(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH })
+    @JoinColumn(name = "service_uuid")
+    private Service modelService;
+
+    @Expose
+    @Column(name = "maximum_instances_allowed")
+    private Integer maximumInstancesAllowed;
+
+    /**
+     * name getter.
+     * 
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * name setter.
+     * 
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * blueprint getter.
+     * 
+     * @return the blueprint
+     */
+    public String getBlueprint() {
+        return blueprint;
+    }
+
+    /**
+     * blueprint setter.
+     * 
+     * @param blueprint the blueprint to set
+     */
+    public void setBlueprint(String blueprint) {
+        this.blueprint = blueprint;
+    }
+
+    /**
+     * svgRepresentation getter.
+     * 
+     * @return the svgRepresentation
+     */
+    public String getSvgRepresentation() {
+        return svgRepresentation;
+    }
+
+    /**
+     * svgRepresentation setter.
+     * 
+     * @param svgRepresentation the svgRepresentation to set
+     */
+    public void setSvgRepresentation(String svgRepresentation) {
+        this.svgRepresentation = svgRepresentation;
+    }
+
+    /**
+     * microServiceModelUsed getter.
+     * 
+     * @return the microServiceModelUsed
+     */
+    public SortedSet<TemplateMicroServiceModel> getMicroServiceModelUsed() {
+        return microServiceModelUsed;
+    }
+
+    /**
+     * maximumInstancesAllowed getter.
+     * 
+     * @return the maximumInstancesAllowed
+     */
+    public Integer getMaximumInstancesAllowed() {
+        return maximumInstancesAllowed;
+    }
+
+    /**
+     * maximumInstancesAllowed setter.
+     * 
+     * @param maximumInstancesAllowed the maximumInstancesAllowed to set
+     */
+    public void setMaximumInstancesAllowed(Integer maximumInstancesAllowed) {
+        this.maximumInstancesAllowed = maximumInstancesAllowed;
+    }
+
+    /**
+     * Add a microService model to the current template, the microservice is added
+     * at the end of the list so the flowOrder is computed automatically.
+     * 
+     * @param microServiceModel The microserviceModel to add
+     */
+    public void addMicroServiceModel(MicroServiceModel microServiceModel) {
+        TemplateMicroServiceModel jointEntry = new TemplateMicroServiceModel(this, microServiceModel,
+                this.microServiceModelUsed.size());
+        this.microServiceModelUsed.add(jointEntry);
+        microServiceModel.getUsedByLoopTemplates().add(jointEntry);
+    }
+
+    /**
+     * Add a microService model to the current template, the flow order must be
+     * specified manually.
+     * 
+     * @param microServiceModel The microserviceModel to add
+     * @param listPosition      The position in the flow
+     */
+    public void addMicroServiceModel(MicroServiceModel microServiceModel, Integer listPosition) {
+        TemplateMicroServiceModel jointEntry = new TemplateMicroServiceModel(this, microServiceModel, listPosition);
+        this.microServiceModelUsed.add(jointEntry);
+        microServiceModel.getUsedByLoopTemplates().add(jointEntry);
+    }
+
+    /**
+     * modelService getter.
+     * 
+     * @return the modelService
+     */
+    public Service getModelService() {
+        return modelService;
+    }
+
+    /**
+     * modelService setter.
+     * 
+     * @param modelService the modelService to set
+     */
+    public void setModelService(Service modelService) {
+        this.modelService = modelService;
+    }
+
+    /**
+     * Default constructor for serialization.
+     */
+    public LoopTemplate() {
+
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param name                The loop template name id
+     * @param blueprint           The blueprint containing all microservices (legacy
+     *                            case)
+     * @param svgRepresentation   The svg representation of that loop template
+     * @param maxInstancesAllowed The maximum number of instances that can be
+     *                            created from that template
+     * @param service             The service associated to that loop template
+     */
+    public LoopTemplate(String name, String blueprint, String svgRepresentation, Integer maxInstancesAllowed,
+            Service service) {
+        this.name = name;
+        this.blueprint = blueprint;
+        this.svgRepresentation = svgRepresentation;
+
+        this.maximumInstancesAllowed = maxInstancesAllowed;
+        this.modelService = service;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        LoopTemplate other = (LoopTemplate) obj;
+        if (name == null) {
+            if (other.name != null) {
+                return false;
+            }
+        } else if (!name.equals(other.name)) {
+            return false;
+        }
+        return true;
+    }
+}
diff --git a/src/main/java/org/onap/clamp/loop/template/LoopTemplatesRepository.java b/src/main/java/org/onap/clamp/loop/template/LoopTemplatesRepository.java
new file mode 100644
index 0000000..07f304d
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/template/LoopTemplatesRepository.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.loop.template;
+
+import java.util.List;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface LoopTemplatesRepository extends JpaRepository<LoopTemplate, String> {
+
+    @Query("SELECT looptemplate.name FROM LoopTemplate as looptemplate")
+    List<String> getAllLoopTemplateNames();
+}
diff --git a/src/main/java/org/onap/clamp/loop/template/MicroServiceModel.java b/src/main/java/org/onap/clamp/loop/template/MicroServiceModel.java
new file mode 100644
index 0000000..1e2b140
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/template/MicroServiceModel.java
@@ -0,0 +1,217 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2018 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.loop.template;
+
+import com.google.gson.annotations.Expose;
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinColumns;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+import org.onap.clamp.loop.common.AuditEntity;
+
+/**
+ * This class represents a micro service model for a loop template.
+ */
+
+@Entity
+@Table(name = "micro_service_models")
+public class MicroServiceModel extends AuditEntity implements Serializable {
+
+    /**
+     * The serial version id.
+     */
+    private static final long serialVersionUID = -286522707701376645L;
+
+    @Id
+    @Expose
+    @Column(nullable = false, name = "name", unique = true)
+    private String name;
+
+    /**
+     * This variable is used to store the type mentioned in the micro-service
+     * blueprint.
+     */
+    @Expose
+    @Column(nullable = false, name = "policy_type")
+    private String policyType;
+
+    @Column(nullable = false, name = "blueprint_yaml")
+    private String blueprint;
+
+    @Expose
+    @ManyToOne(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH })
+    @JoinColumns({ @JoinColumn(name = "policy_model_type", referencedColumnName = "policy_model_type"),
+        @JoinColumn(name = "policy_model_version", referencedColumnName = "version") })
+    private PolicyModel policyModel;
+
+    @OneToMany(fetch = FetchType.LAZY, mappedBy = "microServiceModel", orphanRemoval = true)
+    private Set<TemplateMicroServiceModel> usedByLoopTemplates = new HashSet<>();
+
+    /**
+     * policyModel getter.
+     * 
+     * @return the policyModel
+     */
+    public PolicyModel getPolicyModel() {
+        return policyModel;
+    }
+
+    /**
+     * policyModel setter.
+     * 
+     * @param policyModel the policyModel to set
+     */
+    public void setPolicyModel(PolicyModel policyModel) {
+        this.policyModel = policyModel;
+    }
+
+    /**
+     * name getter.
+     * 
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * name setter.
+     * 
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * policyType getter.
+     * 
+     * @return the policyType
+     */
+    public String getPolicyType() {
+        return policyType;
+    }
+
+    /**
+     * policyType setter.
+     * 
+     * @param policyType the policyType to set
+     */
+    public void setPolicyType(String policyType) {
+        this.policyType = policyType;
+    }
+
+    /**
+     * blueprint getter.
+     * 
+     * @return the blueprint
+     */
+    public String getBlueprint() {
+        return blueprint;
+    }
+
+    /**
+     * blueprint setter.
+     * 
+     * @param blueprint the blueprint to set
+     */
+    public void setBlueprint(String blueprint) {
+        this.blueprint = blueprint;
+    }
+
+    /**
+     * usedByLoopTemplates getter.
+     * 
+     * @return the usedByLoopTemplates
+     */
+    public Set<TemplateMicroServiceModel> getUsedByLoopTemplates() {
+        return usedByLoopTemplates;
+    }
+
+    /**
+     * Default constructor for serialization.
+     */
+    public MicroServiceModel() {
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param name        The name id
+     * @param policyType  The policy model type like
+     *                    onap.policies.controlloop.operational.common.Apex
+     * @param blueprint   The blueprint defined for dcae that contains the policy
+     *                    type to use
+     * @param policyModel The policy model for the policy type mentioned here
+     */
+    public MicroServiceModel(String name, String policyType, String blueprint, PolicyModel policyModel) {
+        this.name = name;
+        this.policyType = policyType;
+        this.blueprint = blueprint;
+        this.policyModel = policyModel;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        MicroServiceModel other = (MicroServiceModel) obj;
+        if (name == null) {
+            if (other.name != null) {
+                return false;
+            }
+        } else if (!name.equals(other.name)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/src/main/java/org/onap/clamp/loop/template/MicroServiceModelsRepository.java b/src/main/java/org/onap/clamp/loop/template/MicroServiceModelsRepository.java
new file mode 100644
index 0000000..2b18704
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/template/MicroServiceModelsRepository.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.loop.template;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface MicroServiceModelsRepository extends JpaRepository<MicroServiceModel, String> {
+}
diff --git a/src/main/java/org/onap/clamp/loop/template/PolicyModel.java b/src/main/java/org/onap/clamp/loop/template/PolicyModel.java
new file mode 100644
index 0000000..e6580be
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/template/PolicyModel.java
@@ -0,0 +1,239 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.loop.template;
+
+import com.google.gson.annotations.Expose;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.IdClass;
+import javax.persistence.Table;
+
+import org.onap.clamp.loop.common.AuditEntity;
+import org.onap.clamp.util.SemanticVersioning;
+
+/**
+ * This class represents the policy model tosca revision that we can have to a
+ * specific microservice.
+ */
+@Entity
+@Table(name = "policy_models")
+@IdClass(PolicyModelId.class)
+public class PolicyModel extends AuditEntity implements Serializable, Comparable<PolicyModel> {
+
+    /**
+     * The serial version id.
+     */
+    private static final long serialVersionUID = -286522705701376645L;
+
+    /**
+     * This variable is used to store the type mentioned in the micro-service
+     * blueprint.
+     */
+    @Id
+    @Expose
+    @Column(nullable = false, name = "policy_model_type")
+    private String policyModelType;
+
+    /**
+     * Semantic versioning on policy side.
+     */
+    @Id
+    @Expose
+    @Column(name = "version")
+    private String version;
+
+    @Column(columnDefinition = "MEDIUMTEXT", name = "policy_tosca")
+    private String policyModelTosca;
+
+    @Expose
+    @Column(name = "policy_acronym")
+    private String policyAcronym;
+
+    @Expose
+    @Column(name = "policy_variant")
+    private String policyVariant;
+
+    /**
+     * policyModelTosca getter.
+     * 
+     * @return the policyModelTosca
+     */
+    public String getPolicyModelTosca() {
+        return policyModelTosca;
+    }
+
+    /**
+     * policyModelTosca setter.
+     * 
+     * @param policyModelTosca the policyModelTosca to set
+     */
+    public void setPolicyModelTosca(String policyModelTosca) {
+        this.policyModelTosca = policyModelTosca;
+    }
+
+    /**
+     * policyModelType getter.
+     * 
+     * @return the modelType
+     */
+    public String getPolicyModelType() {
+        return policyModelType;
+    }
+
+    /**
+     * policyModelType setter.
+     * 
+     * @param modelType the modelType to set
+     */
+    public void setPolicyModelType(String modelType) {
+        this.policyModelType = modelType;
+    }
+
+    /**
+     * version getter.
+     * 
+     * @return the version
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * version setter.
+     * 
+     * @param version the version to set
+     */
+    public void setVersion(String version) {
+        // Try to convert it before
+        this.version = version;
+    }
+
+    /**
+     * policyAcronym getter.
+     * 
+     * @return the policyAcronym value
+     */
+    public String getPolicyAcronym() {
+        return policyAcronym;
+    }
+
+    /**
+     * policyAcronym setter.
+     * 
+     * @param policyAcronym The policyAcronym to set
+     */
+    public void setPolicyAcronym(String policyAcronym) {
+        this.policyAcronym = policyAcronym;
+    }
+
+    /**
+     * policyVariant getter.
+     * 
+     * @return the policyVariant value
+     */
+    public String getPolicyVariant() {
+        return policyVariant;
+    }
+
+    /**
+     * policyVariant setter.
+     * 
+     * @param policyVariant The policyVariant to set
+     */
+    public void setPolicyVariant(String policyVariant) {
+        this.policyVariant = policyVariant;
+    }
+
+    /**
+     * Default constructor for serialization.
+     */
+    public PolicyModel() {
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param policyType       The policyType (referenced in the blueprint)
+     * @param policyModelTosca The policy tosca model in yaml
+     * @param version          the version like 1.0.0
+     * @param policyAcronym    Short policy name if it exists
+     * @param policyVariant    Subtype for policy if it exists (could be used by UI)
+     */
+    public PolicyModel(String policyType, String policyModelTosca, String version, String policyAcronym,
+            String policyVariant) {
+        this.policyModelType = policyType;
+        this.policyModelTosca = policyModelTosca;
+        this.version = version;
+        this.policyAcronym = policyAcronym;
+        this.policyVariant = policyVariant;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((policyModelType == null) ? 0 : policyModelType.hashCode());
+        result = prime * result + ((version == null) ? 0 : version.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PolicyModel other = (PolicyModel) obj;
+        if (policyModelType == null) {
+            if (other.policyModelType != null) {
+                return false;
+            }
+        } else if (!policyModelType.equals(other.policyModelType)) {
+            return false;
+        }
+        if (version == null) {
+            if (other.version != null) {
+                return false;
+            }
+        } else if (!version.equals(other.version)) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int compareTo(PolicyModel arg0) {
+        // Reverse it, so that by default we have the latest
+        return SemanticVersioning.compare(arg0.getVersion(), this.version);
+    }
+}
diff --git a/src/main/java/org/onap/clamp/loop/template/PolicyModelId.java b/src/main/java/org/onap/clamp/loop/template/PolicyModelId.java
new file mode 100644
index 0000000..c4dd193
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/template/PolicyModelId.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.loop.template;
+
+import com.google.gson.annotations.Expose;
+
+import java.io.Serializable;
+
+public class PolicyModelId implements Serializable {
+
+    /**
+     * Serial Id.
+     */
+    private static final long serialVersionUID = -2846526482064334745L;
+
+    @Expose
+    private String policyModelType;
+
+    @Expose
+    private String version;
+
+    /**
+     * Default constructor for serialization.
+     */
+    public PolicyModelId() {
+
+    }
+
+    /**
+     * Constructor.
+     */
+    public PolicyModelId(String policyModelType, String version) {
+        this.policyModelType = policyModelType;
+        this.version = version;
+    }
+
+    /**
+     * policyModelType getter.
+     * 
+     * @return the policyModelType
+     */
+    public String getPolicyModelType() {
+        return policyModelType;
+    }
+
+    /**
+     * policyModelType setter.
+     * 
+     * @param policyModelType the policyModelType to set
+     */
+    public void setPolicyModelType(String policyModelType) {
+        this.policyModelType = policyModelType;
+    }
+
+    /**
+     * version getter.
+     * 
+     * @return the version
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * version setter.
+     * 
+     * @param version the version to set
+     */
+    public void setVersion(String version) {
+        this.version = version;
+    }
+}
diff --git a/src/main/java/org/onap/clamp/loop/template/PolicyModelsRepository.java b/src/main/java/org/onap/clamp/loop/template/PolicyModelsRepository.java
new file mode 100644
index 0000000..a76e386
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/template/PolicyModelsRepository.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.loop.template;
+
+import java.util.List;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface PolicyModelsRepository extends JpaRepository<PolicyModel, PolicyModelId> {
+    @Query("SELECT policymodel.policyModelType FROM PolicyModel as policymodel")
+    List<String> getAllPolicyModelType();
+
+    List<PolicyModel> findByPolicyModelType(String policyModelType);
+}
diff --git a/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java b/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java
new file mode 100644
index 0000000..8e22852
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.loop.template;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class PolicyModelsService {
+    private final PolicyModelsRepository policyModelsRepository;
+
+    @Autowired
+    public PolicyModelsService(PolicyModelsRepository policyModelrepo) {
+        policyModelsRepository = policyModelrepo;
+    }
+
+    public PolicyModel saveOrUpdatePolicyModel(PolicyModel policyModel) {
+        return policyModelsRepository.save(policyModel);
+    }
+
+    public List<String> getAllPolicyModelTypes() {
+        return policyModelsRepository.getAllPolicyModelType();
+    }
+
+    public Iterable<PolicyModel> getAllPolicyModels() {
+        return policyModelsRepository.findAll();
+    }
+
+    public PolicyModel getPolicyModel(String type, String version) {
+        return policyModelsRepository.findById(new PolicyModelId(type, version)).orElse(null);
+    }
+
+    public Iterable<PolicyModel> getAllPolicyModelsByType(String type) {
+        return policyModelsRepository.findByPolicyModelType(type);
+    }
+}
diff --git a/src/main/java/org/onap/clamp/loop/template/TemplateMicroServiceModel.java b/src/main/java/org/onap/clamp/loop/template/TemplateMicroServiceModel.java
new file mode 100644
index 0000000..7547c1f
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/template/TemplateMicroServiceModel.java
@@ -0,0 +1,194 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.loop.template;
+
+import com.google.gson.annotations.Expose;
+
+import java.io.Serializable;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.EmbeddedId;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.MapsId;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "templates_microservicemodels")
+public class TemplateMicroServiceModel implements Serializable, Comparable<TemplateMicroServiceModel> {
+
+    /**
+     * Serial ID.
+     */
+    private static final long serialVersionUID = 5924989899078094245L;
+
+    @EmbeddedId
+    private TemplateMicroServiceModelId templateMicroServiceModelId;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @MapsId("loopTemplateName")
+    @JoinColumn(name = "loop_template_name")
+    private LoopTemplate loopTemplate;
+
+    @Expose
+    @ManyToOne(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH })
+    @MapsId("microServiceModelName")
+    @JoinColumn(name = "micro_service_model_name")
+    private MicroServiceModel microServiceModel;
+
+    @Expose
+    @Column(nullable = false, name = "flow_order")
+    private Integer flowOrder;
+
+    /**
+     * Default constructor for serialization.
+     */
+    public TemplateMicroServiceModel() {
+
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param loopTemplate      The loop template object
+     * @param microServiceModel The microServiceModel object
+     * @param flowOrder         The position of the micro service in the flow
+     */
+    public TemplateMicroServiceModel(LoopTemplate loopTemplate, MicroServiceModel microServiceModel,
+            Integer flowOrder) {
+        this.loopTemplate = loopTemplate;
+        this.microServiceModel = microServiceModel;
+        this.flowOrder = flowOrder;
+        this.templateMicroServiceModelId = new TemplateMicroServiceModelId(loopTemplate.getName(),
+                microServiceModel.getName());
+    }
+
+    /**
+     * loopTemplate getter.
+     * 
+     * @return the loopTemplate
+     */
+    public LoopTemplate getLoopTemplate() {
+        return loopTemplate;
+    }
+
+    /**
+     * loopTemplate setter.
+     * 
+     * @param loopTemplate the loopTemplate to set
+     */
+    public void setLoopTemplate(LoopTemplate loopTemplate) {
+        this.loopTemplate = loopTemplate;
+    }
+
+    /**
+     * microServiceModel getter.
+     * 
+     * @return the microServiceModel
+     */
+    public MicroServiceModel getMicroServiceModel() {
+        return microServiceModel;
+    }
+
+    /**
+     * microServiceModel setter.
+     * 
+     * @param microServiceModel the microServiceModel to set
+     */
+    public void setMicroServiceModel(MicroServiceModel microServiceModel) {
+        this.microServiceModel = microServiceModel;
+    }
+
+    /**
+     * flowOrder getter.
+     * 
+     * @return the flowOrder
+     */
+    public Integer getFlowOrder() {
+        return flowOrder;
+    }
+
+    /**
+     * flowOrder setter.
+     * 
+     * @param flowOrder the flowOrder to set
+     */
+    public void setFlowOrder(Integer flowOrder) {
+        this.flowOrder = flowOrder;
+    }
+
+    @Override
+    public int compareTo(TemplateMicroServiceModel arg0) {
+        // Reverse it, so that by default we have the latest
+        if (getFlowOrder() == null) {
+            return 1;
+        }
+        if (arg0.getFlowOrder() == null) {
+            return -1;
+        }
+        return arg0.getFlowOrder().compareTo(this.getFlowOrder());
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((loopTemplate == null) ? 0 : loopTemplate.hashCode());
+        result = prime * result + ((microServiceModel == null) ? 0 : microServiceModel.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        TemplateMicroServiceModel other = (TemplateMicroServiceModel) obj;
+        if (loopTemplate == null) {
+            if (other.loopTemplate != null) {
+                return false;
+            }
+        } else if (!loopTemplate.equals(other.loopTemplate)) {
+            return false;
+        }
+        if (microServiceModel == null) {
+            if (other.microServiceModel != null) {
+                return false;
+            }
+        } else if (!microServiceModel.equals(other.microServiceModel)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/src/main/java/org/onap/clamp/loop/template/TemplateMicroServiceModelId.java b/src/main/java/org/onap/clamp/loop/template/TemplateMicroServiceModelId.java
new file mode 100644
index 0000000..74c7689
--- /dev/null
+++ b/src/main/java/org/onap/clamp/loop/template/TemplateMicroServiceModelId.java
@@ -0,0 +1,102 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.loop.template;
+
+import com.google.gson.annotations.Expose;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Embeddable;
+
+@Embeddable
+public class TemplateMicroServiceModelId implements Serializable {
+
+    /**
+     * Serial ID.
+     */
+    private static final long serialVersionUID = 4089888115504914773L;
+
+    @Expose
+    @Column(name = "loop_template_name")
+    private String loopTemplateName;
+
+    @Expose
+    @Column(name = "micro_service_model_name")
+    private String microServiceModelName;
+
+    /**
+     * Default constructor for serialization.
+     */
+    public TemplateMicroServiceModelId() {
+
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param loopTemplateName      The loop template name id
+     * @param microServiceModelName THe micro Service name id
+     */
+    public TemplateMicroServiceModelId(String loopTemplateName, String microServiceModelName) {
+        this.loopTemplateName = loopTemplateName;
+        this.microServiceModelName = microServiceModelName;
+    }
+
+    /**
+     * loopTemplateName getter.
+     * 
+     * @return the loopTemplateName
+     */
+    public String getLoopTemplateName() {
+        return loopTemplateName;
+    }
+
+    /**
+     * loopTemplateName setter.
+     * 
+     * @param loopTemplateName the loopTemplateName to set
+     */
+    public void setLoopTemplateName(String loopTemplateName) {
+        this.loopTemplateName = loopTemplateName;
+    }
+
+    /**
+     * microServiceModelName getter.
+     * 
+     * @return the microServiceModelName
+     */
+    public String getMicroServiceModelName() {
+        return microServiceModelName;
+    }
+
+    /**
+     * microServiceModelName setter.
+     * 
+     * @param microServiceModelName the microServiceModelName to set
+     */
+    public void setMicroServiceModelName(String microServiceModelName) {
+        this.microServiceModelName = microServiceModelName;
+    }
+}
diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
index 2943c39..98742d2 100644
--- a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
+++ b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
@@ -40,7 +40,9 @@
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
 import javax.persistence.Id;
+import javax.persistence.JoinColumn;
 import javax.persistence.ManyToMany;
+import javax.persistence.ManyToOne;
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
@@ -52,13 +54,15 @@
 import org.onap.clamp.clds.util.JsonUtils;
 import org.onap.clamp.dao.model.jsontype.StringJsonUserType;
 import org.onap.clamp.loop.Loop;
+import org.onap.clamp.loop.common.AuditEntity;
+import org.onap.clamp.loop.template.MicroServiceModel;
 import org.onap.clamp.policy.Policy;
 import org.yaml.snakeyaml.Yaml;
 
 @Entity
 @Table(name = "micro_service_policies")
 @TypeDefs({ @TypeDef(name = "json", typeClass = StringJsonUserType.class) })
-public class MicroServicePolicy implements Serializable, Policy {
+public class MicroServicePolicy extends AuditEntity implements Serializable, Policy {
     /**
      * The serial version ID.
      */
@@ -73,10 +77,18 @@
     private String name;
 
     @Expose
-    @Column(nullable = false, name = "model_type")
+    @Column(nullable = false, name = "policy_model_type")
     private String modelType;
 
     @Expose
+    @Column(name = "context")
+    private String context;
+
+    @Expose
+    @Column(name = "device_type_scope")
+    private String deviceTypeScope;
+
+    @Expose
     @Type(type = "json")
     @Column(columnDefinition = "json", name = "properties")
     private JsonObject properties;
@@ -96,6 +108,11 @@
     @ManyToMany(mappedBy = "microServicePolicies", fetch = FetchType.EAGER)
     private Set<Loop> usedByLoops = new HashSet<>();
 
+    @Expose
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "micro_service_model_id")
+    private MicroServiceModel microServiceModel;
+
     public MicroServicePolicy() {
         // serialization
     }
@@ -203,6 +220,49 @@
         this.usedByLoops = usedBy;
     }
 
+    public String getContext() {
+        return context;
+    }
+
+    public void setContext(String context) {
+        this.context = context;
+    }
+
+    public String getDeviceTypeScope() {
+        return deviceTypeScope;
+    }
+
+    public void setDeviceTypeScope(String deviceTypeScope) {
+        this.deviceTypeScope = deviceTypeScope;
+    }
+
+    /**
+     * microServiceModel getter.
+     * 
+     * @return the microServiceModel
+     */
+    public MicroServiceModel getMicroServiceModel() {
+        return microServiceModel;
+    }
+
+    /**
+     * microServiceModel setter.
+     * 
+     * @param microServiceModel the microServiceModel to set
+     */
+    public void setMicroServiceModel(MicroServiceModel microServiceModel) {
+        this.microServiceModel = microServiceModel;
+    }
+
+    /**
+     * name setter.
+     * 
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
     @Override
     public int hashCode() {
         final int prime = 31;
diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyRepository.java b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyRepository.java
index f658aac..38b310c 100644
--- a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyRepository.java
+++ b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyRepository.java
@@ -23,10 +23,10 @@
 
 package org.onap.clamp.policy.microservice;
 
-import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Repository;
 
 @Repository
-interface MicroServicePolicyRepository extends CrudRepository<MicroServicePolicy, String> {
+public interface MicroServicePolicyRepository extends JpaRepository<MicroServicePolicy, String> {
 
 }
diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyService.java
similarity index 95%
rename from src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java
rename to src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyService.java
index 59ddaa0..346cdf6 100644
--- a/src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java
+++ b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyService.java
@@ -35,12 +35,12 @@
 import org.springframework.stereotype.Service;
 
 @Service
-public class MicroservicePolicyService implements PolicyService<MicroServicePolicy> {
+public class MicroServicePolicyService implements PolicyService<MicroServicePolicy> {
 
     private final MicroServicePolicyRepository repository;
 
     @Autowired
-    public MicroservicePolicyService(MicroServicePolicyRepository repository) {
+    public MicroServicePolicyService(MicroServicePolicyRepository repository) {
         this.repository = repository;
     }
 
diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java
index 1411269..e8bf4a6 100644
--- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java
+++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java
@@ -46,6 +46,7 @@
 import javax.persistence.FetchType;
 import javax.persistence.Id;
 import javax.persistence.JoinColumn;
+import javax.persistence.JoinColumns;
 import javax.persistence.ManyToOne;
 import javax.persistence.Table;
 import javax.persistence.Transient;
@@ -55,6 +56,7 @@
 import org.hibernate.annotations.TypeDefs;
 import org.onap.clamp.dao.model.jsontype.StringJsonUserType;
 import org.onap.clamp.loop.Loop;
+import org.onap.clamp.loop.template.PolicyModel;
 import org.onap.clamp.policy.Policy;
 import org.yaml.snakeyaml.DumperOptions;
 import org.yaml.snakeyaml.Yaml;
@@ -90,6 +92,12 @@
     @JoinColumn(name = "loop_id", nullable = false)
     private Loop loop;
 
+    @Expose
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumns({ @JoinColumn(name = "policy_model_type", referencedColumnName = "policy_model_type"),
+        @JoinColumn(name = "policy_model_version", referencedColumnName = "version") })
+    private PolicyModel policyModel;
+
     public OperationalPolicy() {
         // Serialization
     }
@@ -137,6 +145,33 @@
         this.configurationsJson = configurationsJson;
     }
 
+    /**
+     * policyModel getter.
+     * 
+     * @return the policyModel
+     */
+    public PolicyModel getPolicyModel() {
+        return policyModel;
+    }
+
+    /**
+     * policyModel setter.
+     * 
+     * @param policyModel the policyModel to set
+     */
+    public void setPolicyModel(PolicyModel policyModel) {
+        this.policyModel = policyModel;
+    }
+
+    /**
+     * name setter.
+     * 
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
     @Override
     public JsonObject getJsonRepresentation() {
          return jsonRepresentation;
diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepository.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepository.java
index 97b183f..c0a6e12 100644
--- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepository.java
+++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepository.java
@@ -23,10 +23,10 @@
 
 package org.onap.clamp.policy.operational;
 
-import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Repository;
 
 @Repository
-interface OperationalPolicyRepository extends CrudRepository<OperationalPolicy, String> {
+public interface OperationalPolicyRepository extends JpaRepository<OperationalPolicy, String> {
     void deleteByName(String policyName);
 }
diff --git a/src/main/java/org/onap/clamp/tosca/Dictionary.java b/src/main/java/org/onap/clamp/tosca/Dictionary.java
new file mode 100644
index 0000000..7b4e513
--- /dev/null
+++ b/src/main/java/org/onap/clamp/tosca/Dictionary.java
@@ -0,0 +1,174 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.tosca;
+
+import com.google.gson.annotations.Expose;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+import org.onap.clamp.loop.common.AuditEntity;
+
+/**
+ * Represents Dictionary.
+ */
+
+@Entity
+@Table(name = "dictionary")
+public class Dictionary extends AuditEntity implements Serializable {
+
+    /**
+     * The serial version id.
+     */
+    private static final long serialVersionUID = -286522707701388645L;
+
+    @Id
+    @Expose
+    @Column(nullable = false, name = "name", unique = true)
+    private String name;
+
+    @Expose
+    @Column(name = "dictionary_second_level")
+    private int secondLevelDictionary;
+
+    @Expose
+    @Column(name = "dictionary_type")
+    private String subDictionaryType;
+
+    @Expose
+    @OneToMany(mappedBy = "dictionary", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
+    private List<DictionaryElement> dictionaryElements = new ArrayList<>();
+
+    /**
+     * name getter.
+     * 
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * name setter.
+     * 
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * secondLevelDictionary getter.
+     * 
+     * @return the secondLevelDictionary
+     */
+    public int getSecondLevelDictionary() {
+        return secondLevelDictionary;
+    }
+
+    /**
+     * secondLevelDictionary setter.
+     * 
+     * @param secondLevelDictionary the secondLevelDictionary to set
+     */
+    public void setSecondLevelDictionary(int secondLevelDictionary) {
+        this.secondLevelDictionary = secondLevelDictionary;
+    }
+
+    /**
+     * subDictionaryType getter.
+     * 
+     * @return the subDictionaryType
+     */
+    public String getSubDictionaryType() {
+        return subDictionaryType;
+    }
+
+    /**
+     * subDictionaryType setter.
+     * 
+     * @param subDictionaryType the subDictionaryType to set
+     */
+    public void setSubDictionaryType(String subDictionaryType) {
+        this.subDictionaryType = subDictionaryType;
+    }
+
+    /**
+     * dictionaryElements getter.
+     * 
+     * @return the dictionaryElements
+     */
+    public List<DictionaryElement> getDictionaryElements() {
+        return dictionaryElements;
+    }
+
+    /**
+     * dictionaryElements setter.
+     * 
+     * @param dictionaryElements the dictionaryElements to set
+     */
+    public void setDictionaryElements(List<DictionaryElement> dictionaryElements) {
+        this.dictionaryElements = dictionaryElements;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        Dictionary other = (Dictionary) obj;
+        if (name == null) {
+            if (other.name != null) {
+                return false;
+            }
+        } else if (!name.equals(other.name)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/src/main/java/org/onap/clamp/tosca/DictionaryElement.java b/src/main/java/org/onap/clamp/tosca/DictionaryElement.java
new file mode 100644
index 0000000..e81885f
--- /dev/null
+++ b/src/main/java/org/onap/clamp/tosca/DictionaryElement.java
@@ -0,0 +1,249 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.tosca;
+
+import com.google.gson.annotations.Expose;
+
+import java.io.Serializable;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+import org.onap.clamp.loop.common.AuditEntity;
+
+/**
+ * Represents a Dictionary Item.
+ */
+@Entity
+@Table(name = "dictionary_elements")
+public class DictionaryElement extends AuditEntity implements Serializable {
+
+    /**
+     * The serial version id.
+     */
+    private static final long serialVersionUID = -286522707701388644L;
+
+    @Id
+    @Expose
+    @Column(nullable = false, name = "name", unique = true)
+    private String name;
+
+    @Expose
+    @Column(nullable = false, name = "short_name", unique = true)
+    private String shortName;
+
+    @Expose
+    @Column(name = "description")
+    private String description;
+
+    @Expose
+    @Column(nullable = false, name = "type")
+    private String type;
+
+    @Column(name = "subdictionary_id", nullable = false)
+    @Expose
+    private String subDictionary;
+
+    @ManyToOne(cascade = CascadeType.ALL)
+    @JoinColumn(name = "dictionary_id")
+    private Dictionary dictionary;
+
+    /**
+     * name getter.
+     * 
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * name setter.
+     * 
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * shortName getter.
+     * 
+     * @return the shortName
+     */
+    public String getShortName() {
+        return shortName;
+    }
+
+    /**
+     * shortName setter.
+     * 
+     * @param shortName the shortName to set
+     */
+    public void setShortName(String shortName) {
+        this.shortName = shortName;
+    }
+
+    /**
+     * description getter.
+     * 
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * description setter.
+     * 
+     * @param description the description to set
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * type getter.
+     * 
+     * @return the type
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * type setter.
+     * 
+     * @param type the type to set
+     */
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    /**
+     * subDictionary getter.
+     * 
+     * @return the subDictionary
+     */
+    public String getSubDictionary() {
+        return subDictionary;
+    }
+
+    /**
+     * subDictionary setter.
+     * 
+     * @param subDictionary the subDictionary to set
+     */
+    public void setSubDictionary(String subDictionary) {
+        this.subDictionary = subDictionary;
+    }
+
+    /**
+     * dictionary getter.
+     * 
+     * @return the dictionary
+     */
+    public Dictionary getDictionary() {
+        return dictionary;
+    }
+
+    /**
+     * dictionary setter.
+     * 
+     * @param dictionary the dictionary to set
+     */
+    public void setDictionary(Dictionary dictionary) {
+        this.dictionary = dictionary;
+    }
+
+    /**
+     * Default Constructor.
+     */
+    public DictionaryElement() {
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param name          The Dictionary element name
+     * @param shortName     The short name
+     * @param description   The description
+     * @param type          The type of element
+     * @param subDictionary The sub type
+     * @param dictionary    The parent dictionary
+     */
+    public DictionaryElement(String name, String shortName, String description, String type, String subDictionary,
+            Dictionary dictionary) {
+        this.name = name;
+        this.shortName = shortName;
+        this.description = description;
+        this.type = type;
+        this.subDictionary = subDictionary;
+        this.dictionary = dictionary;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((dictionary == null) ? 0 : dictionary.hashCode());
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        DictionaryElement other = (DictionaryElement) obj;
+        if (dictionary == null) {
+            if (other.dictionary != null) {
+                return false;
+            }
+        } else if (!dictionary.equals(other.dictionary)) {
+            return false;
+        }
+        if (name == null) {
+            if (other.name != null) {
+                return false;
+            }
+        } else if (!name.equals(other.name)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/src/main/java/org/onap/clamp/tosca/DictionaryElementsRepository.java b/src/main/java/org/onap/clamp/tosca/DictionaryElementsRepository.java
new file mode 100644
index 0000000..96cb2e3
--- /dev/null
+++ b/src/main/java/org/onap/clamp/tosca/DictionaryElementsRepository.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.tosca;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface DictionaryElementsRepository extends JpaRepository<DictionaryElement, String> {
+
+}
diff --git a/src/main/java/org/onap/clamp/tosca/DictionaryRepository.java b/src/main/java/org/onap/clamp/tosca/DictionaryRepository.java
new file mode 100644
index 0000000..2a087b6
--- /dev/null
+++ b/src/main/java/org/onap/clamp/tosca/DictionaryRepository.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.tosca;
+
+import java.util.List;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface DictionaryRepository extends JpaRepository<Dictionary, String> {
+
+    @Query("SELECT dict.name FROM Dictionary as dict")
+    List<String> getAllDictionaryNames();
+
+}
diff --git a/src/main/java/org/onap/clamp/util/SemanticVersioning.java b/src/main/java/org/onap/clamp/util/SemanticVersioning.java
new file mode 100644
index 0000000..bf1529c
--- /dev/null
+++ b/src/main/java/org/onap/clamp/util/SemanticVersioning.java
@@ -0,0 +1,76 @@
+/*-
+ * ============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.util;
+
+/**
+ * This class is the base class for object that requires semantic versioning.
+ * ... This class supports also a.b.c.d... etc ... as a version.
+ *
+ *
+ */
+public class SemanticVersioning {
+    public static final int BEFORE = -1;
+    public static final int EQUAL = 0;
+    public static final int AFTER = 1;
+
+    /**
+     * The compare method that compare arg0 to arg1.
+     * 
+     * @param arg0 A version in string for semantice versioning (a.b.c.d...)
+     * @param arg1 A version in string for semantice versioning (a.b.c.d...)
+     * @return objects (arg0, arg1) given as parameters. It returns the value: 0: if
+     *         (arg0==arg1) -1: if (arg0 < arg1) 1: if (arg0 > arg1)
+     */
+    public static int compare(String arg0, String arg1) {
+
+        if (arg0 == null && arg1 == null) {
+            return EQUAL;
+        }
+        if (arg0 == null) {
+            return BEFORE;
+        }
+        if (arg1 == null) {
+            return AFTER;
+        }
+        String[] arg0Array = arg0.split("\\.");
+        String[] arg1Array = arg1.split("\\.");
+
+        int smalestStringLength = Math.min(arg0Array.length, arg1Array.length);
+
+        for (int currentVersionIndex = 0; currentVersionIndex < smalestStringLength; ++currentVersionIndex) {
+            if (Integer.parseInt(arg0Array[currentVersionIndex]) < Integer.parseInt(arg1Array[currentVersionIndex])) {
+                return BEFORE;
+            } else if (Integer.parseInt(arg0Array[currentVersionIndex]) > Integer
+                    .parseInt(arg1Array[currentVersionIndex])) {
+                return AFTER;
+            }
+            // equals, so do not return anything, continue
+        }
+        if (arg0Array.length == arg1Array.length) {
+            return EQUAL;
+        } else {
+            return Integer.compare(arg0Array.length, arg1Array.length);
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html
index b20d0c2..6602447 100644
--- a/src/main/resources/META-INF/resources/swagger.html
+++ b/src/main/resources/META-INF/resources/swagger.html
@@ -444,86 +444,86 @@
 </li>
 <li><a href="#_paths">2. Paths</a>
 <ul class="sectlevel2">
-<li><a href="#_route15">2.1. GET /v1/clds/cldsInfo</a>
+<li><a href="#_route32">2.1. GET /v1/clds/cldsInfo</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="#_route16">2.2. GET /v1/healthcheck</a>
+<li><a href="#_route33">2.2. GET /v1/healthcheck</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="#_route17">2.3. GET /v1/user/getUser</a>
+<li><a href="#_route34">2.3. GET /v1/user/getUser</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="#_route13">2.4. PUT /v2/loop/delete/{loopName}</a>
+<li><a href="#_route30">2.4. PUT /v2/loop/delete/{loopName}</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>
 </ul>
 </li>
-<li><a href="#_route8">2.5. PUT /v2/loop/deploy/{loopName}</a>
+<li><a href="#_route25">2.5. PUT /v2/loop/deploy/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_2">2.5.1. Parameters</a></li>
 <li><a href="#_responses_5">2.5.2. Responses</a></li>
 <li><a href="#_produces_4">2.5.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route2">2.6. GET /v2/loop/getAllNames</a>
+<li><a href="#_route19">2.6. GET /v2/loop/getAllNames</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_6">2.6.1. Responses</a></li>
 <li><a href="#_produces_5">2.6.2. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route14">2.7. GET /v2/loop/getstatus/{loopName}</a>
+<li><a href="#_route31">2.7. GET /v2/loop/getstatus/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_3">2.7.1. Parameters</a></li>
 <li><a href="#_responses_7">2.7.2. Responses</a></li>
 <li><a href="#_produces_6">2.7.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route11">2.8. PUT /v2/loop/restart/{loopName}</a>
+<li><a href="#_route28">2.8. PUT /v2/loop/restart/{loopName}</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>
 <li><a href="#_produces_7">2.8.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route10">2.9. PUT /v2/loop/stop/{loopName}</a>
+<li><a href="#_route27">2.9. PUT /v2/loop/stop/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_5">2.9.1. Parameters</a></li>
 <li><a href="#_responses_9">2.9.2. Responses</a></li>
 <li><a href="#_produces_8">2.9.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route12">2.10. PUT /v2/loop/submit/{loopName}</a>
+<li><a href="#_route29">2.10. PUT /v2/loop/submit/{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>
 <li><a href="#_produces_9">2.10.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route4">2.11. GET /v2/loop/svgRepresentation/{loopName}</a>
+<li><a href="#_route21">2.11. GET /v2/loop/svgRepresentation/{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="#_route9">2.12. PUT /v2/loop/undeploy/{loopName}</a>
+<li><a href="#_route26">2.12. PUT /v2/loop/undeploy/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_8">2.12.1. Parameters</a></li>
 <li><a href="#_responses_12">2.12.2. Responses</a></li>
 <li><a href="#_produces_11">2.12.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route5">2.13. POST /v2/loop/updateGlobalProperties/{loopName}</a>
+<li><a href="#_route22">2.13. POST /v2/loop/updateGlobalProperties/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_9">2.13.1. Parameters</a></li>
 <li><a href="#_responses_13">2.13.2. Responses</a></li>
@@ -531,7 +531,7 @@
 <li><a href="#_produces_12">2.13.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route7">2.14. POST /v2/loop/updateMicroservicePolicy/{loopName}</a>
+<li><a href="#_route24">2.14. POST /v2/loop/updateMicroservicePolicy/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_10">2.14.1. Parameters</a></li>
 <li><a href="#_responses_14">2.14.2. Responses</a></li>
@@ -539,7 +539,7 @@
 <li><a href="#_produces_13">2.14.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route6">2.15. POST /v2/loop/updateOperationalPolicies/{loopName}</a>
+<li><a href="#_route23">2.15. POST /v2/loop/updateOperationalPolicies/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_11">2.15.1. Parameters</a></li>
 <li><a href="#_responses_15">2.15.2. Responses</a></li>
@@ -547,7 +547,7 @@
 <li><a href="#_produces_14">2.15.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route3">2.16. GET /v2/loop/{loopName}</a>
+<li><a href="#_route20">2.16. GET /v2/loop/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_12">2.16.1. Parameters</a></li>
 <li><a href="#_responses_16">2.16.2. Responses</a></li>
@@ -568,9 +568,14 @@
 <li><a href="#_jsonprimitive">3.8. JsonPrimitive</a></li>
 <li><a href="#_loop">3.9. Loop</a></li>
 <li><a href="#_looplog">3.10. LoopLog</a></li>
-<li><a href="#_microservicepolicy">3.11. MicroServicePolicy</a></li>
-<li><a href="#_number">3.12. Number</a></li>
-<li><a href="#_operationalpolicy">3.13. OperationalPolicy</a></li>
+<li><a href="#_looptemplate">3.11. LoopTemplate</a></li>
+<li><a href="#_microservicemodel">3.12. MicroServiceModel</a></li>
+<li><a href="#_microservicepolicy">3.13. MicroServicePolicy</a></li>
+<li><a href="#_number">3.14. Number</a></li>
+<li><a href="#_operationalpolicy">3.15. OperationalPolicy</a></li>
+<li><a href="#_policymodel">3.16. PolicyModel</a></li>
+<li><a href="#_service">3.17. Service</a></li>
+<li><a href="#_templatemicroservicemodel">3.18. TemplateMicroServiceModel</a></li>
 </ul>
 </li>
 </ul>
@@ -583,13 +588,13 @@
 <div class="sect2">
 <h3 id="_version_information"><a class="anchor" href="#_version_information"></a><a class="link" href="#_version_information">1.1. Version information</a></h3>
 <div class="paragraph">
-<p><em>Version</em> : 4.1.2-SNAPSHOT</p>
+<p><em>Version</em> : 4.2.0-SNAPSHOT</p>
 </div>
 </div>
 <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:34219<br>
+<p><em>Host</em> : localhost:33953<br>
 <em>BasePath</em> : /restservices/clds/<br>
 <em>Schemes</em> : HTTP</p>
 </div>
@@ -600,7 +605,7 @@
 <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="_route15"><a class="anchor" href="#_route15"></a><a class="link" href="#_route15">2.1. GET /v1/clds/cldsInfo</a></h3>
+<h3 id="_route32"><a class="anchor" href="#_route32"></a><a class="link" href="#_route32">2.1. GET /v1/clds/cldsInfo</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">
@@ -637,7 +642,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route16"><a class="anchor" href="#_route16"></a><a class="link" href="#_route16">2.2. GET /v1/healthcheck</a></h3>
+<h3 id="_route33"><a class="anchor" href="#_route33"></a><a class="link" href="#_route33">2.2. GET /v1/healthcheck</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">
@@ -674,7 +679,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route17"><a class="anchor" href="#_route17"></a><a class="link" href="#_route17">2.3. GET /v1/user/getUser</a></h3>
+<h3 id="_route34"><a class="anchor" href="#_route34"></a><a class="link" href="#_route34">2.3. GET /v1/user/getUser</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">
@@ -708,7 +713,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route13"><a class="anchor" href="#_route13"></a><a class="link" href="#_route13">2.4. PUT /v2/loop/delete/{loopName}</a></h3>
+<h3 id="_route30"><a class="anchor" href="#_route30"></a><a class="link" href="#_route30">2.4. PUT /v2/loop/delete/{loopName}</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">
@@ -757,7 +762,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route8"><a class="anchor" href="#_route8"></a><a class="link" href="#_route8">2.5. PUT /v2/loop/deploy/{loopName}</a></h3>
+<h3 id="_route25"><a class="anchor" href="#_route25"></a><a class="link" href="#_route25">2.5. PUT /v2/loop/deploy/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_2"><a class="anchor" href="#_parameters_2"></a><a class="link" href="#_parameters_2">2.5.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -819,7 +824,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route2"><a class="anchor" href="#_route2"></a><a class="link" href="#_route2">2.6. GET /v2/loop/getAllNames</a></h3>
+<h3 id="_route19"><a class="anchor" href="#_route19"></a><a class="link" href="#_route19">2.6. GET /v2/loop/getAllNames</a></h3>
 <div class="sect3">
 <h4 id="_responses_6"><a class="anchor" href="#_responses_6"></a><a class="link" href="#_responses_6">2.6.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -856,7 +861,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route14"><a class="anchor" href="#_route14"></a><a class="link" href="#_route14">2.7. GET /v2/loop/getstatus/{loopName}</a></h3>
+<h3 id="_route31"><a class="anchor" href="#_route31"></a><a class="link" href="#_route31">2.7. GET /v2/loop/getstatus/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_3"><a class="anchor" href="#_parameters_3"></a><a class="link" href="#_parameters_3">2.7.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -918,7 +923,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route11"><a class="anchor" href="#_route11"></a><a class="link" href="#_route11">2.8. PUT /v2/loop/restart/{loopName}</a></h3>
+<h3 id="_route28"><a class="anchor" href="#_route28"></a><a class="link" href="#_route28">2.8. PUT /v2/loop/restart/{loopName}</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">
@@ -980,7 +985,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route10"><a class="anchor" href="#_route10"></a><a class="link" href="#_route10">2.9. PUT /v2/loop/stop/{loopName}</a></h3>
+<h3 id="_route27"><a class="anchor" href="#_route27"></a><a class="link" href="#_route27">2.9. PUT /v2/loop/stop/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_5"><a class="anchor" href="#_parameters_5"></a><a class="link" href="#_parameters_5">2.9.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1042,7 +1047,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route12"><a class="anchor" href="#_route12"></a><a class="link" href="#_route12">2.10. PUT /v2/loop/submit/{loopName}</a></h3>
+<h3 id="_route29"><a class="anchor" href="#_route29"></a><a class="link" href="#_route29">2.10. PUT /v2/loop/submit/{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">
@@ -1104,7 +1109,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route4"><a class="anchor" href="#_route4"></a><a class="link" href="#_route4">2.11. GET /v2/loop/svgRepresentation/{loopName}</a></h3>
+<h3 id="_route21"><a class="anchor" href="#_route21"></a><a class="link" href="#_route21">2.11. GET /v2/loop/svgRepresentation/{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">
@@ -1166,7 +1171,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route9"><a class="anchor" href="#_route9"></a><a class="link" href="#_route9">2.12. PUT /v2/loop/undeploy/{loopName}</a></h3>
+<h3 id="_route26"><a class="anchor" href="#_route26"></a><a class="link" href="#_route26">2.12. PUT /v2/loop/undeploy/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_8"><a class="anchor" href="#_parameters_8"></a><a class="link" href="#_parameters_8">2.12.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1228,7 +1233,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route5"><a class="anchor" href="#_route5"></a><a class="link" href="#_route5">2.13. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3>
+<h3 id="_route22"><a class="anchor" href="#_route22"></a><a class="link" href="#_route22">2.13. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_9"><a class="anchor" href="#_parameters_9"></a><a class="link" href="#_parameters_9">2.13.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1306,7 +1311,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route7"><a class="anchor" href="#_route7"></a><a class="link" href="#_route7">2.14. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3>
+<h3 id="_route24"><a class="anchor" href="#_route24"></a><a class="link" href="#_route24">2.14. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_10"><a class="anchor" href="#_parameters_10"></a><a class="link" href="#_parameters_10">2.14.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1384,7 +1389,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route6"><a class="anchor" href="#_route6"></a><a class="link" href="#_route6">2.15. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3>
+<h3 id="_route23"><a class="anchor" href="#_route23"></a><a class="link" href="#_route23">2.15. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_11"><a class="anchor" href="#_parameters_11"></a><a class="link" href="#_parameters_11">2.15.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1462,7 +1467,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route3"><a class="anchor" href="#_route3"></a><a class="link" href="#_route3">2.16. GET /v2/loop/{loopName}</a></h3>
+<h3 id="_route20"><a class="anchor" href="#_route20"></a><a class="link" href="#_route20">2.16. GET /v2/loop/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_12"><a class="anchor" href="#_parameters_12"></a><a class="link" href="#_parameters_12">2.16.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -2184,6 +2189,16 @@
 <td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; string, <a href="#_externalcomponent">ExternalComponent</a> &gt; map</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>createdBy</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>createdDate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int64)</p></td>
+</tr>
+<tr>
 <td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>dcaeBlueprintId</strong><br>
 <em>optional</em></p></td>
 <td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
@@ -2214,14 +2229,19 @@
 <td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; <a href="#_looplog">LoopLog</a> &gt; array</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>loopTemplate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_looptemplate">LoopTemplate</a></p></td>
+</tr>
+<tr>
 <td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>microServicePolicies</strong><br>
 <em>optional</em></p></td>
 <td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; <a href="#_microservicepolicy">MicroServicePolicy</a> &gt; array</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>modelPropertiesJson</strong><br>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>modelService</strong><br>
 <em>optional</em></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_jsonobject">JsonObject</a></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_service">Service</a></p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>name</strong><br>
@@ -2238,6 +2258,16 @@
 <em>optional</em></p></td>
 <td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
 </tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>updatedBy</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>updatedDate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int64)</p></td>
+</tr>
 </tbody>
 </table>
 </div>
@@ -2289,7 +2319,7 @@
 </table>
 </div>
 <div class="sect2">
-<h3 id="_microservicepolicy"><a class="anchor" href="#_microservicepolicy"></a><a class="link" href="#_microservicepolicy">3.11. MicroServicePolicy</a></h3>
+<h3 id="_looptemplate"><a class="anchor" href="#_looptemplate"></a><a class="link" href="#_looptemplate">3.11. LoopTemplate</a></h3>
 <table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 42.8571%;">
@@ -2303,11 +2333,165 @@
 </thead>
 <tbody>
 <tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>blueprint</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>createdBy</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>createdDate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int64)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>maximumInstancesAllowed</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int32)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>microServiceModelUsed</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; <a href="#_templatemicroservicemodel">TemplateMicroServiceModel</a> &gt; array</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>modelService</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_service">Service</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>name</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>svgRepresentation</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>updatedBy</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>updatedDate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int64)</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="_microservicemodel"><a class="anchor" href="#_microservicemodel"></a><a class="link" href="#_microservicemodel">3.12. MicroServiceModel</a></h3>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 42.8571%;">
+<col style="width: 57.1429%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-middle">Name</th>
+<th class="tableblock halign-left valign-middle">Schema</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>blueprint</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>createdBy</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>createdDate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int64)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>name</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyModel</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_policymodel">PolicyModel</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyType</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>updatedBy</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>updatedDate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int64)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>usedByLoopTemplates</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; <a href="#_templatemicroservicemodel">TemplateMicroServiceModel</a> &gt; array</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="_microservicepolicy"><a class="anchor" href="#_microservicepolicy"></a><a class="link" href="#_microservicepolicy">3.13. MicroServicePolicy</a></h3>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 42.8571%;">
+<col style="width: 57.1429%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-middle">Name</th>
+<th class="tableblock halign-left valign-middle">Schema</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>context</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>createdBy</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>createdDate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int64)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>deviceTypeScope</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
 <td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>jsonRepresentation</strong><br>
 <em>optional</em></p></td>
 <td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_jsonobject">JsonObject</a></p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>microServiceModel</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_microservicemodel">MicroServiceModel</a></p></td>
+</tr>
+<tr>
 <td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>modelType</strong><br>
 <em>optional</em></p></td>
 <td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
@@ -2333,6 +2517,16 @@
 <td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>updatedBy</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>updatedDate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int64)</p></td>
+</tr>
+<tr>
 <td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>usedByLoops</strong><br>
 <em>optional</em></p></td>
 <td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; <a href="#_loop">Loop</a> &gt; array</p></td>
@@ -2341,13 +2535,13 @@
 </table>
 </div>
 <div class="sect2">
-<h3 id="_number"><a class="anchor" href="#_number"></a><a class="link" href="#_number">3.12. Number</a></h3>
+<h3 id="_number"><a class="anchor" href="#_number"></a><a class="link" href="#_number">3.14. Number</a></h3>
 <div class="paragraph">
 <p><em>Type</em> : object</p>
 </div>
 </div>
 <div class="sect2">
-<h3 id="_operationalpolicy"><a class="anchor" href="#_operationalpolicy"></a><a class="link" href="#_operationalpolicy">3.13. OperationalPolicy</a></h3>
+<h3 id="_operationalpolicy"><a class="anchor" href="#_operationalpolicy"></a><a class="link" href="#_operationalpolicy">3.15. OperationalPolicy</a></h3>
 <table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 42.8571%;">
@@ -2380,6 +2574,137 @@
 <em>optional</em></p></td>
 <td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
 </tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyModel</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_policymodel">PolicyModel</a></p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="_policymodel"><a class="anchor" href="#_policymodel"></a><a class="link" href="#_policymodel">3.16. PolicyModel</a></h3>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 42.8571%;">
+<col style="width: 57.1429%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-middle">Name</th>
+<th class="tableblock halign-left valign-middle">Schema</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>createdBy</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>createdDate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int64)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyAcronym</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyModelTosca</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyModelType</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyVariant</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>updatedBy</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>updatedDate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int64)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>version</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="_service"><a class="anchor" href="#_service"></a><a class="link" href="#_service">3.17. Service</a></h3>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 42.8571%;">
+<col style="width: 57.1429%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-middle">Name</th>
+<th class="tableblock halign-left valign-middle">Schema</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>resourceDetails</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_jsonobject">JsonObject</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>serviceDetails</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_jsonobject">JsonObject</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>serviceUuid</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="_templatemicroservicemodel"><a class="anchor" href="#_templatemicroservicemodel"></a><a class="link" href="#_templatemicroservicemodel">3.18. TemplateMicroServiceModel</a></h3>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 42.8571%;">
+<col style="width: 57.1429%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-middle">Name</th>
+<th class="tableblock halign-left valign-middle">Schema</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>flowOrder</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">integer (int32)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>loopTemplate</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_looptemplate">LoopTemplate</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>microServiceModel</strong><br>
+<em>optional</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_microservicemodel">MicroServiceModel</a></p></td>
+</tr>
 </tbody>
 </table>
 </div>
@@ -2388,7 +2713,7 @@
 </div>
 <div id="footer">
 <div id="footer-text">
-Last updated 2019-05-27 14:30:20 CEST
+Last updated 2019-10-29 10:41:43 CET
 </div>
 </div>
 </body>
diff --git a/src/test/java/org/onap/clamp/loop/CsarInstallerItCase.java b/src/test/java/org/onap/clamp/loop/CsarInstallerItCase.java
index df952aa..2ebea7b 100644
--- a/src/test/java/org/onap/clamp/loop/CsarInstallerItCase.java
+++ b/src/test/java/org/onap/clamp/loop/CsarInstallerItCase.java
@@ -63,7 +63,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.annotation.Rollback;
+import org.springframework.test.annotation.Commit;
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.junit4.SpringRunner;
 
@@ -183,7 +183,7 @@
 
     @Test
     @Transactional
-    @Rollback(value = false)
+    @Commit
     public void testInstallTheCsarTca() throws SdcArtifactInstallerException, SdcToscaParserException,
             CsarHandlerException, IOException, JSONException, InterruptedException {
         String generatedName = RandomStringUtils.randomAlphanumeric(5);
@@ -209,7 +209,7 @@
         assertThat(loop.getOperationalPolicies()).hasSize(1);
         assertThat(loop.getModelService().getServiceUuid()).isEqualTo("63cac700-ab9a-4115-a74f-7eac85e3fce0");
         JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/model-properties.json"),
-            JsonUtils.GSON_JPA_MODEL.toJson(loop.getModelService()), true);
+                JsonUtils.GSON_JPA_MODEL.toJson(loop.getModelService()), true);
         JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/service-details.json"),
                 JsonUtils.GSON_JPA_MODEL.toJson(loop.getModelService().getServiceDetails()), true);
         JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/resource-details.json"),
diff --git a/src/test/java/org/onap/clamp/loop/LoopControllerTestItCase.java b/src/test/java/org/onap/clamp/loop/LoopControllerTestItCase.java
index 67ae985..a41b5c2 100644
--- a/src/test/java/org/onap/clamp/loop/LoopControllerTestItCase.java
+++ b/src/test/java/org/onap/clamp/loop/LoopControllerTestItCase.java
@@ -32,18 +32,15 @@
 import com.google.gson.JsonParser;
 
 import java.util.Set;
+
 import javax.transaction.Transactional;
 
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-
 import org.onap.clamp.clds.Application;
 import org.onap.clamp.clds.util.JsonUtils;
-
 import org.onap.clamp.policy.microservice.MicroServicePolicy;
-import org.onap.clamp.policy.microservice.MicroservicePolicyService;
+import org.onap.clamp.policy.microservice.MicroServicePolicyService;
 import org.onap.clamp.policy.operational.OperationalPolicy;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
@@ -63,7 +60,7 @@
     LoopsRepository loopsRepository;
 
     @Autowired
-    MicroservicePolicyService microServicePolicyService;
+    MicroServicePolicyService microServicePolicyService;
 
     @Autowired
     LoopController loopController;
@@ -78,18 +75,10 @@
         return new Loop(loopName, loopBlueprint, loopSvg);
     }
 
-    @Before
-    public void setUp() {
-        saveTestLoopToDb();
-    }
-
-    @After
-    public void tearDown() {
-        loopsRepository.deleteAll();
-    }
-
     @Test
+    @Transactional
     public void testUpdateOperationalPolicies() {
+        saveTestLoopToDb();
         String policy = "[{\"name\":\"OPERATIONAL_CLholmes31_v1_0_vFW_PG_T10_k8s-holmes-rules\","
                 + "\"configurationsJson\":{\"guard_policies\":{},"
                 + "\"operational_policy\":{\"controlLoop\":{\"trigger_policy\":\"unique-policy-id-1-modifyConfig\","
@@ -113,6 +102,7 @@
     @Test
     @Transactional
     public void testUpdateGlobalProperties() {
+        saveTestLoopToDb();
         String policy = "{\"dcaeDeployParameters\":{\"aaiEnrichmentHost\":\"aai.onap.svc.cluster.local\","
                 + "\"aaiEnrichmentPort\":\"8443\",\"enableAAIEnrichment\":\"false\",\"dmaap_host\":\"message-router"
                 + ".onap\",\"dmaap_port\":\"3904\",\"enableRedisCaching\":\"false\",\"redisHosts\":\"dcae-redis.onap"
@@ -134,9 +124,10 @@
     @Test
     @Transactional
     public void testUpdateMicroservicePolicy() {
+        saveTestLoopToDb();
         MicroServicePolicy policy = new MicroServicePolicy("policyName", "",
-                                                      "tosca_definitions_version: tosca_simple_yaml_1_0_0", false,
-                                                      JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
+                "tosca_definitions_version: tosca_simple_yaml_1_0_0", false,
+                JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
         loopController.updateMicroservicePolicy(EXAMPLE_LOOP_NAME, policy);
         assertThat(microServicePolicyService.isExisting("policyName")).isTrue();
     }
@@ -144,7 +135,8 @@
     @Test
     @Transactional
     public void testGetSvgRepresentation() {
-        String svgRepresentation =  loopController.getSvgRepresentation(EXAMPLE_LOOP_NAME);
+        saveTestLoopToDb();
+        String svgRepresentation = loopController.getSvgRepresentation(EXAMPLE_LOOP_NAME);
         assertThat(svgRepresentation).isEqualTo("representation");
     }
 }
\ No newline at end of file
diff --git a/src/test/java/org/onap/clamp/loop/LoopLogServiceTestItCase.java b/src/test/java/org/onap/clamp/loop/LoopLogServiceTestItCase.java
index 57b2cef..c172a9a 100644
--- a/src/test/java/org/onap/clamp/loop/LoopLogServiceTestItCase.java
+++ b/src/test/java/org/onap/clamp/loop/LoopLogServiceTestItCase.java
@@ -27,11 +27,11 @@
 import com.google.gson.JsonObject;
 
 import java.util.Set;
+
 import javax.transaction.Transactional;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-
 import org.onap.clamp.clds.Application;
 import org.onap.clamp.clds.util.JsonUtils;
 import org.onap.clamp.loop.log.LogType;
@@ -77,10 +77,10 @@
         assertThat(loopLogs).hasSize(1);
         LoopLog loopLog = loopLogs.iterator().next();
         assertThat(loopLog.getMessage()).isEqualTo(SAMPLE_LOG_MESSAGE);
-        loopsRepository.deleteAll();
     }
 
     @Test
+    @Transactional
     public void testLoopLog() {
         LoopLog log = new LoopLog();
         Long id = Long.valueOf(100);
diff --git a/src/test/java/org/onap/clamp/loop/LoopRepositoriesItCase.java b/src/test/java/org/onap/clamp/loop/LoopRepositoriesItCase.java
index 78e0d2e..44feaeb 100644
--- a/src/test/java/org/onap/clamp/loop/LoopRepositoriesItCase.java
+++ b/src/test/java/org/onap/clamp/loop/LoopRepositoriesItCase.java
@@ -40,8 +40,17 @@
 import org.onap.clamp.loop.log.LogType;
 import org.onap.clamp.loop.log.LoopLog;
 import org.onap.clamp.loop.log.LoopLogRepository;
+import org.onap.clamp.loop.service.Service;
+import org.onap.clamp.loop.service.ServicesRepository;
+import org.onap.clamp.loop.template.LoopTemplate;
+import org.onap.clamp.loop.template.LoopTemplatesRepository;
+import org.onap.clamp.loop.template.MicroServiceModel;
+import org.onap.clamp.loop.template.MicroServiceModelsRepository;
+import org.onap.clamp.loop.template.PolicyModel;
+import org.onap.clamp.loop.template.PolicyModelId;
+import org.onap.clamp.loop.template.PolicyModelsRepository;
 import org.onap.clamp.policy.microservice.MicroServicePolicy;
-import org.onap.clamp.policy.microservice.MicroservicePolicyService;
+import org.onap.clamp.policy.microservice.MicroServicePolicyService;
 import org.onap.clamp.policy.operational.OperationalPolicy;
 import org.onap.clamp.policy.operational.OperationalPolicyService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -59,7 +68,7 @@
     private LoopsRepository loopRepository;
 
     @Autowired
-    private MicroservicePolicyService microServicePolicyService;
+    private MicroServicePolicyService microServicePolicyService;
 
     @Autowired
     private OperationalPolicyService operationalPolicyService;
@@ -67,12 +76,47 @@
     @Autowired
     private LoopLogRepository loopLogRepository;
 
+    @Autowired
+    private LoopTemplatesRepository loopTemplateRepository;
+
+    @Autowired
+    private MicroServiceModelsRepository microServiceModelsRepository;
+
+    @Autowired
+    private PolicyModelsRepository policyModelsRepository;
+
+    @Autowired
+    private ServicesRepository servicesRepository;
+
+    private Service getService(String serviceDetails, String resourceDetails) {
+        return new Service(serviceDetails, resourceDetails);
+    }
+
     private OperationalPolicy getOperationalPolicy(String configJson, String name) {
         return new OperationalPolicy(name, null, new Gson().fromJson(configJson, JsonObject.class));
     }
 
+    private MicroServiceModel getMicroServiceModel(String yaml, String name, String policyType, String createdBy,
+            PolicyModel policyModel) {
+        MicroServiceModel model = new MicroServiceModel(name, policyType, yaml, policyModel);
+        return model;
+    }
+
+    private PolicyModel getPolicyModel(String policyType, String policyModelTosca, String version, String policyAcronym,
+            String policyVariant, String createdBy) {
+        return new PolicyModel(policyType, policyModelTosca, version, policyAcronym, policyVariant);
+    }
+
+    private LoopTemplate getLoopTemplate(String name, String blueprint, String svgRepresentation, String createdBy,
+            Integer maxInstancesAllowed) {
+        LoopTemplate template = new LoopTemplate(name, blueprint, svgRepresentation, maxInstancesAllowed, null);
+        template.addMicroServiceModel(getMicroServiceModel("yaml", "microService1", "org.onap.policy.drools", createdBy,
+                getPolicyModel("org.onap.policy.drools", "yaml", "1.0.0", "Drools", "type1", createdBy)));
+        return template;
+    }
+
     private Loop getLoop(String name, String svgRepresentation, String blueprint, String globalPropertiesJson,
-        String dcaeId, String dcaeUrl, String dcaeBlueprintId) {
+            String dcaeId, String dcaeUrl, String dcaeBlueprintId) {
         Loop loop = new Loop();
         loop.setName(name);
         loop.setSvgRepresentation(svgRepresentation);
@@ -82,13 +126,14 @@
         loop.setDcaeDeploymentId(dcaeId);
         loop.setDcaeDeploymentStatusUrl(dcaeUrl);
         loop.setDcaeBlueprintId(dcaeBlueprintId);
+        loop.setLoopTemplate(getLoopTemplate("templateName", "yaml", "svg", "toto", 1));
         return loop;
     }
 
     private MicroServicePolicy getMicroServicePolicy(String name, String modelType, String jsonRepresentation,
-        String policyTosca, String jsonProperties, boolean shared) {
+            String policyTosca, String jsonProperties, boolean shared) {
         MicroServicePolicy microService = new MicroServicePolicy(name, modelType, policyTosca, shared,
-            gson.fromJson(jsonRepresentation, JsonObject.class), new HashSet<>());
+                gson.fromJson(jsonRepresentation, JsonObject.class), new HashSet<>());
         microService.setProperties(new Gson().fromJson(jsonProperties, JsonObject.class));
         return microService;
     }
@@ -100,52 +145,108 @@
     @Test
     @Transactional
     public void crudTest() {
+        // Setup
         Loop loopTest = getLoop("ControlLoopTest", "<xml></xml>", "yamlcontent", "{\"testname\":\"testvalue\"}",
-            "123456789", "https://dcaetest.org", "UUID-blueprint");
+                "123456789", "https://dcaetest.org", "UUID-blueprint");
         OperationalPolicy opPolicy = this.getOperationalPolicy("{\"type\":\"GUARD\"}", "GuardOpPolicyTest");
         loopTest.addOperationalPolicy(opPolicy);
         MicroServicePolicy microServicePolicy = getMicroServicePolicy("configPolicyTest", "",
-            "{\"configtype\":\"json\"}", "tosca_definitions_version: tosca_simple_yaml_1_0_0",
-            "{\"param1\":\"value1\"}", true);
+                "{\"configtype\":\"json\"}", "tosca_definitions_version: tosca_simple_yaml_1_0_0",
+                "{\"param1\":\"value1\"}", true);
         loopTest.addMicroServicePolicy(microServicePolicy);
         LoopLog loopLog = getLoopLog(LogType.INFO, "test message", loopTest);
         loopTest.addLog(loopLog);
+        Service service = getService(
+                "{\"name\": \"vLoadBalancerMS\", \"UUID\": \"63cac700-ab9a-4115-a74f-7eac85e3fce0\"}", "{\"CP\": {}}");
+        loopTest.setModelService(service);
 
-        // Attemp to save into the database the entire loop
+        // Attempt to save into the database the entire loop
         Loop loopInDb = loopRepository.save(loopTest);
         assertThat(loopInDb).isNotNull();
+        assertThat(loopRepository.findById(loopInDb.getName()).get()).isNotNull();
+        assertThat(loopInDb.getCreatedDate()).isNotNull();
+        assertThat(loopInDb.getUpdatedDate()).isNotNull();
+        assertThat(loopInDb.getUpdatedDate()).isEqualTo(loopInDb.getCreatedDate());
         assertThat(loopInDb.getName()).isEqualTo("ControlLoopTest");
-        // Now set the ID in the previous model so that we can compare the objects
+        // Autogen id so now set the ID in the previous model so that we can compare the
+        // objects
         loopLog.setId(((LoopLog) loopInDb.getLoopLogs().toArray()[0]).getId());
 
-        assertThat(loopInDb).isEqualToIgnoringGivenFields(loopTest, "components");
+        assertThat(loopInDb).isEqualToIgnoringGivenFields(loopTest, "components", "createdDate", "updatedDate",
+                "createdBy", "updatedBy");
         assertThat(loopRepository.existsById(loopTest.getName())).isEqualTo(true);
         assertThat(operationalPolicyService.isExisting(opPolicy.getName())).isEqualTo(true);
         assertThat(microServicePolicyService.isExisting(microServicePolicy.getName())).isEqualTo(true);
         assertThat(loopLogRepository.existsById(loopLog.getId())).isEqualTo(true);
+        assertThat(loopTemplateRepository.existsById(loopInDb.getLoopTemplate().getName())).isEqualTo(true);
+        assertThat(loopTemplateRepository.existsById(loopInDb.getLoopTemplate().getName())).isEqualTo(true);
+        assertThat(servicesRepository.existsById(loopInDb.getModelService().getServiceUuid())).isEqualTo(true);
+        assertThat(microServiceModelsRepository.existsById(
+                loopInDb.getLoopTemplate().getMicroServiceModelUsed().first().getMicroServiceModel().getName()))
+                        .isEqualTo(true);
+        assertThat(policyModelsRepository.existsById(new PolicyModelId(
+                loopInDb.getLoopTemplate().getMicroServiceModelUsed().first().getMicroServiceModel().getPolicyModel()
+                        .getPolicyModelType(),
+                loopInDb.getLoopTemplate().getMicroServiceModelUsed().first().getMicroServiceModel().getPolicyModel()
+                        .getVersion()))).isEqualTo(true);
 
         // Now attempt to read from database
         Loop loopInDbRetrieved = loopRepository.findById(loopTest.getName()).get();
-        assertThat(loopInDbRetrieved).isEqualToIgnoringGivenFields(loopTest, "components");
+        assertThat(loopInDbRetrieved).isEqualToIgnoringGivenFields(loopTest, "components", "createdDate", "updatedDate",
+                "createdBy", "updatedBy");
+        assertThat(loopInDbRetrieved).isEqualToComparingOnlyGivenFields(loopInDb, "createdDate", "updatedDate",
+                "createdBy", "updatedBy");
         assertThat((LoopLog) loopInDbRetrieved.getLoopLogs().toArray()[0]).isEqualToComparingFieldByField(loopLog);
         assertThat((OperationalPolicy) loopInDbRetrieved.getOperationalPolicies().toArray()[0])
-            .isEqualToComparingFieldByField(opPolicy);
+                .isEqualToComparingFieldByField(opPolicy);
         assertThat((MicroServicePolicy) loopInDbRetrieved.getMicroServicePolicies().toArray()[0])
-            .isEqualToComparingFieldByField(microServicePolicy);
+                .isEqualToIgnoringGivenFields(microServicePolicy, "createdDate", "updatedDate", "createdBy",
+                        "updatedBy");
 
         // Attempt an update
         ((LoopLog) loopInDbRetrieved.getLoopLogs().toArray()[0]).setLogInstant(Instant.now());
-        loopRepository.save(loopInDbRetrieved);
-        Loop loopInDbRetrievedUpdated = loopRepository.findById(loopTest.getName()).get();
+        loopInDbRetrieved.setBlueprint("yaml2");
+        Loop loopInDbRetrievedUpdated = loopRepository.saveAndFlush(loopInDbRetrieved);
+        // Loop loopInDbRetrievedUpdated =
+        // loopRepository.findById(loopTest.getName()).get();
+        assertThat(loopInDbRetrievedUpdated.getBlueprint()).isEqualTo("yaml2");
         assertThat((LoopLog) loopInDbRetrievedUpdated.getLoopLogs().toArray()[0])
-            .isEqualToComparingFieldByField(loopInDbRetrieved.getLoopLogs().toArray()[0]);
+                .isEqualToComparingFieldByField(loopInDbRetrieved.getLoopLogs().toArray()[0]);
+        // UpdatedDate should have been changed
+        assertThat(loopInDbRetrievedUpdated.getUpdatedDate()).isNotEqualTo(loopInDbRetrievedUpdated.getCreatedDate());
+        // createdDate should have NOT been changed
+        assertThat(loopInDbRetrievedUpdated.getCreatedDate()).isEqualTo(loopInDb.getCreatedDate());
+        // other audit are the same
+        assertThat(loopInDbRetrievedUpdated.getCreatedBy()).isEqualTo("");
+        assertThat(loopInDbRetrievedUpdated.getUpdatedBy()).isEqualTo("");
 
         // Attempt to delete the object and check it has well been cascaded
+
         loopRepository.delete(loopInDbRetrieved);
         assertThat(loopRepository.existsById(loopTest.getName())).isEqualTo(false);
         assertThat(operationalPolicyService.isExisting(opPolicy.getName())).isEqualTo(false);
-        assertThat(microServicePolicyService.isExisting(microServicePolicy.getName())).isEqualTo(false);
+        assertThat(microServicePolicyService.isExisting(microServicePolicy.getName())).isEqualTo(true);
         assertThat(loopLogRepository.existsById(loopLog.getId())).isEqualTo(false);
+        assertThat(loopTemplateRepository.existsById(loopInDb.getLoopTemplate().getName())).isEqualTo(true);
+        assertThat(servicesRepository.existsById(loopInDb.getModelService().getServiceUuid())).isEqualTo(true);
+        assertThat(microServiceModelsRepository.existsById(
+                loopInDb.getLoopTemplate().getMicroServiceModelUsed().first().getMicroServiceModel().getName()))
+                        .isEqualTo(true);
+
+        assertThat(policyModelsRepository.existsById(new PolicyModelId(
+                loopInDb.getLoopTemplate().getMicroServiceModelUsed().first().getMicroServiceModel().getPolicyModel()
+                        .getPolicyModelType(),
+                loopInDb.getLoopTemplate().getMicroServiceModelUsed().first().getMicroServiceModel().getPolicyModel()
+                        .getVersion()))).isEqualTo(true);
+
+        // Cleanup
+        // microServiceModelsRepository
+        // .delete(loopInDb.getLoopTemplate().getMicroServiceModelUsed().first().getMicroServiceModel());
+        //
+        // policyModelsRepository.delete(
+        // loopInDb.getLoopTemplate().getMicroServiceModelUsed().first().getMicroServiceModel().getPolicyModel());
+        // loopTemplateRepository.delete(loopInDb.getLoopTemplate());
+        // servicesRepository.delete(service);
 
     }
 }
diff --git a/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java b/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java
index 28a92e3..d19c8a8 100644
--- a/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java
+++ b/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java
@@ -33,7 +33,6 @@
 import javax.transaction.Transactional;
 
 import org.assertj.core.util.Lists;
-import org.junit.After;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.onap.clamp.clds.Application;
@@ -42,7 +41,7 @@
 import org.onap.clamp.loop.log.LoopLog;
 import org.onap.clamp.loop.log.LoopLogService;
 import org.onap.clamp.policy.microservice.MicroServicePolicy;
-import org.onap.clamp.policy.microservice.MicroservicePolicyService;
+import org.onap.clamp.policy.microservice.MicroServicePolicyService;
 import org.onap.clamp.policy.operational.OperationalPolicy;
 import org.onap.clamp.policy.operational.OperationalPolicyService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -63,7 +62,7 @@
     LoopsRepository loopsRepository;
 
     @Autowired
-    MicroservicePolicyService microServicePolicyService;
+    MicroServicePolicyService microServicePolicyService;
 
     @Autowired
     OperationalPolicyService operationalPolicyService;
@@ -71,11 +70,6 @@
     @Autowired
     LoopLogService loopLogService;
 
-    @After
-    public void tearDown() {
-        loopsRepository.deleteAll();
-    }
-
     @Test
     @Transactional
     public void shouldCreateEmptyLoop() {
@@ -96,7 +90,7 @@
         assertThat(actualLoop.getBlueprint()).isEqualTo(loopBlueprint);
         assertThat(actualLoop.getSvgRepresentation()).isEqualTo(loopSvg);
         assertThat(actualLoop.getGlobalPropertiesJson().getAsJsonPrimitive("testName").getAsString())
-            .isEqualTo("testValue");
+                .isEqualTo("testValue");
     }
 
     @Test
@@ -105,11 +99,11 @@
         // given
         saveTestLoopToDb();
         OperationalPolicy operationalPolicy = new OperationalPolicy("policyName", null,
-            JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
+                JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
 
         // when
         Loop actualLoop = loopService.updateAndSaveOperationalPolicies(EXAMPLE_LOOP_NAME,
-            Lists.newArrayList(operationalPolicy));
+                Lists.newArrayList(operationalPolicy));
 
         // then
         assertThat(actualLoop).isNotNull();
@@ -128,20 +122,20 @@
         // given
         saveTestLoopToDb();
         MicroServicePolicy microServicePolicy = new MicroServicePolicy("policyName", "",
-            "tosca_definitions_version: tosca_simple_yaml_1_0_0", false,
-            JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
+                "tosca_definitions_version: tosca_simple_yaml_1_0_0", false,
+                JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
 
         // when
         Loop actualLoop = loopService.updateAndSaveMicroservicePolicies(EXAMPLE_LOOP_NAME,
-            Lists.newArrayList(microServicePolicy));
+                Lists.newArrayList(microServicePolicy));
 
         // then
         assertThat(actualLoop).isNotNull();
         assertThat(actualLoop.getName()).isEqualTo(EXAMPLE_LOOP_NAME);
         Set<MicroServicePolicy> savedPolicies = actualLoop.getMicroServicePolicies();
         assertThat(savedPolicies).hasSize(1);
-        assertThat(savedPolicies).usingElementComparatorIgnoringFields("usedByLoops")
-            .containsExactly(microServicePolicy);
+        assertThat(savedPolicies).usingElementComparatorIgnoringFields("usedByLoops", "createdDate", "updatedDate",
+                "createdBy", "updatedBy").containsExactly(microServicePolicy);
         assertThat(savedPolicies).extracting("usedByLoops").hasSize(1);
 
     }
@@ -153,16 +147,16 @@
         saveTestLoopToDb();
 
         MicroServicePolicy firstMicroServicePolicy = new MicroServicePolicy("firstPolicyName", "", "", false,
-            JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
+                JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
         loopService.updateAndSaveMicroservicePolicies(EXAMPLE_LOOP_NAME, Lists.newArrayList(firstMicroServicePolicy));
         MicroServicePolicy secondMicroServicePolicy = new MicroServicePolicy("secondPolicyName", "",
-            "tosca_definitions_version: tosca_simple_yaml_1_0_0", true, JsonUtils.GSON.fromJson("{}", JsonObject.class),
-            null);
+                "tosca_definitions_version: tosca_simple_yaml_1_0_0", true,
+                JsonUtils.GSON.fromJson("{}", JsonObject.class), null);
 
         // when
         firstMicroServicePolicy.setProperties(JsonUtils.GSON.fromJson("{\"name1\":\"value1\"}", JsonObject.class));
         Loop actualLoop = loopService.updateAndSaveMicroservicePolicies(EXAMPLE_LOOP_NAME,
-            Lists.newArrayList(firstMicroServicePolicy, secondMicroServicePolicy));
+                Lists.newArrayList(firstMicroServicePolicy, secondMicroServicePolicy));
 
         // then
         assertThat(actualLoop).isNotNull();
@@ -171,8 +165,8 @@
         assertThat(savedPolicies).hasSize(2);
         assertThat(savedPolicies).contains(firstMicroServicePolicy);
         assertThat(savedPolicies).contains(secondMicroServicePolicy);
-        assertThat(savedPolicies).usingElementComparatorIgnoringFields("usedByLoops")
-            .containsExactlyInAnyOrder(firstMicroServicePolicy, secondMicroServicePolicy);
+        assertThat(savedPolicies).usingElementComparatorIgnoringFields("usedByLoops", "createdDate", "updatedDate",
+                "createdBy", "updatedBy").containsExactlyInAnyOrder(firstMicroServicePolicy, secondMicroServicePolicy);
 
     }
 
@@ -189,24 +183,24 @@
         saveTestLoopToDb();
 
         MicroServicePolicy firstMicroServicePolicy = new MicroServicePolicy("firstPolicyName", "",
-            "\"tosca_definitions_version: tosca_simple_yaml_1_0_0\"", false,
-            JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
+                "\"tosca_definitions_version: tosca_simple_yaml_1_0_0\"", false,
+                JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
         loopService.updateAndSaveMicroservicePolicies(EXAMPLE_LOOP_NAME, Lists.newArrayList(firstMicroServicePolicy));
 
         MicroServicePolicy secondMicroServicePolicy = new MicroServicePolicy("policyName", "", "secondPolicyTosca",
-            true, JsonUtils.GSON.fromJson("{}", JsonObject.class), null);
+                true, JsonUtils.GSON.fromJson("{}", JsonObject.class), null);
 
         // when
         Loop actualLoop = loopService.updateAndSaveMicroservicePolicies(EXAMPLE_LOOP_NAME,
-            Lists.newArrayList(secondMicroServicePolicy));
+                Lists.newArrayList(secondMicroServicePolicy));
 
         // then
         assertThat(actualLoop).isNotNull();
         assertThat(actualLoop.getName()).isEqualTo(EXAMPLE_LOOP_NAME);
         Set<MicroServicePolicy> savedPolicies = actualLoop.getMicroServicePolicies();
         assertThat(savedPolicies).hasSize(1);
-        assertThat(savedPolicies).usingElementComparatorIgnoringFields("usedByLoops")
-            .containsExactly(secondMicroServicePolicy);
+        assertThat(savedPolicies).usingElementComparatorIgnoringFields("usedByLoops", "createdDate", "updatedDate",
+                "createdBy", "updatedBy").containsExactly(secondMicroServicePolicy);
 
     }
 
@@ -219,16 +213,16 @@
         JsonObject newJsonConfiguration = JsonUtils.GSON.fromJson("{}", JsonObject.class);
 
         OperationalPolicy firstOperationalPolicy = new OperationalPolicy("firstPolicyName", null,
-            JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
+                JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
         loopService.updateAndSaveOperationalPolicies(EXAMPLE_LOOP_NAME, Lists.newArrayList(firstOperationalPolicy));
 
         OperationalPolicy secondOperationalPolicy = new OperationalPolicy("secondPolicyName", null,
-            newJsonConfiguration);
+                newJsonConfiguration);
 
         // when
         firstOperationalPolicy.setConfigurationsJson(newJsonConfiguration);
         Loop actualLoop = loopService.updateAndSaveOperationalPolicies(EXAMPLE_LOOP_NAME,
-            Lists.newArrayList(firstOperationalPolicy, secondOperationalPolicy));
+                Lists.newArrayList(firstOperationalPolicy, secondOperationalPolicy));
 
         // then
         assertThat(actualLoop).isNotNull();
@@ -236,9 +230,9 @@
         Set<OperationalPolicy> savedPolicies = actualLoop.getOperationalPolicies();
         assertThat(savedPolicies).hasSize(2);
         assertThat(savedPolicies).usingElementComparatorIgnoringFields("loop")
-            .containsExactlyInAnyOrder(firstOperationalPolicy, secondOperationalPolicy);
+                .containsExactlyInAnyOrder(firstOperationalPolicy, secondOperationalPolicy);
         Set<String> policiesLoops = Lists.newArrayList(savedPolicies).stream().map(OperationalPolicy::getLoop)
-            .map(Loop::getName).collect(Collectors.toSet());
+                .map(Loop::getName).collect(Collectors.toSet());
         assertThat(policiesLoops).containsExactly(EXAMPLE_LOOP_NAME);
     }
 
@@ -249,15 +243,15 @@
         saveTestLoopToDb();
 
         OperationalPolicy firstOperationalPolicy = new OperationalPolicy("firstPolicyName", null,
-            JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
+                JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
         loopService.updateAndSaveOperationalPolicies(EXAMPLE_LOOP_NAME, Lists.newArrayList(firstOperationalPolicy));
 
         OperationalPolicy secondOperationalPolicy = new OperationalPolicy("policyName", null,
-            JsonUtils.GSON.fromJson("{}", JsonObject.class));
+                JsonUtils.GSON.fromJson("{}", JsonObject.class));
 
         // when
         Loop actualLoop = loopService.updateAndSaveOperationalPolicies(EXAMPLE_LOOP_NAME,
-            Lists.newArrayList(secondOperationalPolicy));
+                Lists.newArrayList(secondOperationalPolicy));
 
         // then
         assertThat(actualLoop).isNotNull();
@@ -300,21 +294,21 @@
         loop = loopService.saveOrUpdateLoop(loop);
         // Add op policy
         OperationalPolicy operationalPolicy = new OperationalPolicy("opPolicy", null,
-            JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
+                JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
         loopService.updateAndSaveOperationalPolicies(EXAMPLE_LOOP_NAME, Lists.newArrayList(operationalPolicy));
 
         // Add Micro service policy
         MicroServicePolicy microServicePolicy = new MicroServicePolicy("microPolicy", "",
-            "tosca_definitions_version: tosca_simple_yaml_1_0_0", false,
-            JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
+                "tosca_definitions_version: tosca_simple_yaml_1_0_0", false,
+                JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
         loopService.updateAndSaveMicroservicePolicies(EXAMPLE_LOOP_NAME, Lists.newArrayList(microServicePolicy));
 
         // Verify it's there
         assertThat(loopsRepository.findById(EXAMPLE_LOOP_NAME).orElse(null)).isNotNull();
         loopService.deleteLoop(EXAMPLE_LOOP_NAME);
-        // Verify it's well deleted and has been cascaded
+        // Verify it's well deleted and has been cascaded, except for Microservice
         assertThat(loopsRepository.findById(EXAMPLE_LOOP_NAME).orElse(null)).isNull();
-        assertThat(microServicePolicyService.isExisting("microPolicy")).isFalse();
+        assertThat(microServicePolicyService.isExisting("microPolicy")).isTrue();
         assertThat(operationalPolicyService.isExisting("opPolicy")).isFalse();
         assertThat(loopLogService.isExisting(((LoopLog) loop.getLoopLogs().toArray()[0]).getId())).isFalse();
     }
@@ -334,8 +328,8 @@
     public void testUpdateDcaeDeploymentFields() {
         saveTestLoopToDb();
         Loop loop = loopService.getLoop(EXAMPLE_LOOP_NAME);
-        loopService.updateDcaeDeploymentFields(loop,"CLAMP_c5ce429a-f570-48c5-a7ea-53bed8f86f85",
-                                               "https4://deployment-handler.onap:8443");
+        loopService.updateDcaeDeploymentFields(loop, "CLAMP_c5ce429a-f570-48c5-a7ea-53bed8f86f85",
+                "https4://deployment-handler.onap:8443");
         loop = loopService.getLoop(EXAMPLE_LOOP_NAME);
         assertThat(loop.getDcaeDeploymentId()).isEqualTo("CLAMP_c5ce429a-f570-48c5-a7ea-53bed8f86f85");
         assertThat(loop.getDcaeDeploymentStatusUrl()).isEqualTo("https4://deployment-handler.onap:8443");
@@ -347,8 +341,8 @@
         saveTestLoopToDb();
         assertThat(microServicePolicyService.isExisting("policyName")).isFalse();
         MicroServicePolicy microServicePolicy = new MicroServicePolicy("policyName", "",
-            "tosca_definitions_version: tosca_simple_yaml_1_0_0", false,
-            JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
+                "tosca_definitions_version: tosca_simple_yaml_1_0_0", false,
+                JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class), null);
         loopService.updateMicroservicePolicy(EXAMPLE_LOOP_NAME, microServicePolicy);
         assertThat(microServicePolicyService.isExisting("policyName")).isTrue();
     }
diff --git a/src/test/java/org/onap/clamp/loop/LoopToJsonTest.java b/src/test/java/org/onap/clamp/loop/LoopToJsonTest.java
index 68fe487..914c64e 100644
--- a/src/test/java/org/onap/clamp/loop/LoopToJsonTest.java
+++ b/src/test/java/org/onap/clamp/loop/LoopToJsonTest.java
@@ -44,6 +44,9 @@
 import org.onap.clamp.loop.log.LogType;
 import org.onap.clamp.loop.log.LoopLog;
 import org.onap.clamp.loop.service.Service;
+import org.onap.clamp.loop.template.LoopTemplate;
+import org.onap.clamp.loop.template.MicroServiceModel;
+import org.onap.clamp.loop.template.PolicyModel;
 import org.onap.clamp.policy.microservice.MicroServicePolicy;
 import org.onap.clamp.policy.operational.OperationalPolicy;
 import org.skyscreamer.jsonassert.JSONAssert;
@@ -72,10 +75,30 @@
         MicroServicePolicy microService = new MicroServicePolicy(name, modelType, policyTosca, shared,
                 gson.fromJson(jsonRepresentation, JsonObject.class), new HashSet<>());
         microService.setProperties(new Gson().fromJson(jsonProperties, JsonObject.class));
-
         return microService;
     }
 
+    private MicroServiceModel getMicroServiceModel(String yaml, String name, PolicyModel policyModel) {
+        MicroServiceModel model = new MicroServiceModel();
+        model.setBlueprint(yaml);
+        model.setName(name);
+        model.setPolicyModel(policyModel);
+        return model;
+    }
+
+    private PolicyModel getPolicyModel(String policyType, String policyModelTosca, String version, String policyAcronym,
+            String policyVariant) {
+        return new PolicyModel(policyType, policyModelTosca, version, policyAcronym, policyVariant);
+    }
+
+    private LoopTemplate getLoopTemplate(String name, String blueprint, String svgRepresentation,
+            Integer maxInstancesAllowed) {
+        LoopTemplate template = new LoopTemplate(name, blueprint, svgRepresentation, maxInstancesAllowed, null);
+        template.addMicroServiceModel(getMicroServiceModel("yaml", "microService1",
+                getPolicyModel("org.onap.policy.drools", "yaml", "1.0.0", "Drools", "type1")));
+        return template;
+    }
+
     private LoopLog getLoopLog(LogType type, String message, Loop loop) {
         LoopLog log = new LoopLog(message, type, "CLAMP", loop);
         log.setId(Long.valueOf(new Random().nextInt()));
@@ -95,6 +118,8 @@
         loopTest.addMicroServicePolicy(microServicePolicy);
         LoopLog loopLog = getLoopLog(LogType.INFO, "test message", loopTest);
         loopTest.addLog(loopLog);
+        LoopTemplate loopTemplate = getLoopTemplate("templateName", "yaml", "svg", 1);
+        loopTest.setLoopTemplate(loopTemplate);
 
         String jsonSerialized = JsonUtils.GSON_JPA_MODEL.toJson(loopTest);
         assertThat(jsonSerialized).isNotNull().isNotEmpty();
@@ -116,6 +141,9 @@
         assertThat(loopTestDeserialized.getLoopLogs()).containsExactly(loopLog);
         assertThat((LoopLog) loopTestDeserialized.getLoopLogs().toArray()[0]).isEqualToIgnoringGivenFields(loopLog,
                 "loop");
+
+        // Verify the loop template
+        assertThat(loopTestDeserialized.getLoopTemplate()).isEqualTo(loopTemplate);
     }
 
     @Test
@@ -128,17 +156,14 @@
         Service service = new Service(jsonModel.get("serviceDetails").getAsJsonObject(),
                 jsonModel.get("resourceDetails").getAsJsonObject(), "1.0");
         loopTest2.setModelService(service);
-
         String jsonSerialized = JsonUtils.GSON_JPA_MODEL.toJson(loopTest2);
         assertThat(jsonSerialized).isNotNull().isNotEmpty();
         System.out.println(jsonSerialized);
-        JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/loop.json"),
-                jsonSerialized, true);
 
         Loop loopTestDeserialized = JsonUtils.GSON_JPA_MODEL.fromJson(jsonSerialized, Loop.class);
         assertNotNull(loopTestDeserialized);
-        assertThat(loopTestDeserialized).isEqualToIgnoringGivenFields(loopTest2, "modelService", 
-            "svgRepresentation", "blueprint", "components");
+        assertThat(loopTestDeserialized).isEqualToIgnoringGivenFields(loopTest2, "modelService", "svgRepresentation",
+                "blueprint", "components");
     }
 
     @Test
diff --git a/src/test/java/org/onap/clamp/loop/PolicyModelServiceItCase.java b/src/test/java/org/onap/clamp/loop/PolicyModelServiceItCase.java
new file mode 100644
index 0000000..b284dd7
--- /dev/null
+++ b/src/test/java/org/onap/clamp/loop/PolicyModelServiceItCase.java
@@ -0,0 +1,161 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 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.loop;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.transaction.Transactional;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.clamp.clds.Application;
+import org.onap.clamp.loop.template.PolicyModel;
+import org.onap.clamp.loop.template.PolicyModelId;
+import org.onap.clamp.loop.template.PolicyModelsRepository;
+import org.onap.clamp.loop.template.PolicyModelsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = Application.class)
+public class PolicyModelServiceItCase {
+
+    @Autowired
+    PolicyModelsService policyModelsService;
+
+    @Autowired
+    PolicyModelsRepository policyModelsRepository;
+
+    private static final String POLICY_MODEL_TYPE_1 = "org.onap.test";
+    private static final String POLICY_MODEL_TYPE_1_VERSION_1 = "1.0.0";
+
+    private static final String POLICY_MODEL_TYPE_2 = "org.onap.test2";
+    private static final String POLICY_MODEL_TYPE_2_VERSION_1 = "1.0.0";
+    private static final String POLICY_MODEL_TYPE_2_VERSION_2 = "2.0.0";
+
+    private PolicyModel getPolicyModel(String policyType, String policyModelTosca, String version, String policyAcronym,
+            String policyVariant, String createdBy) {
+        PolicyModel policyModel = new PolicyModel();
+        policyModel.setCreatedBy(createdBy);
+        policyModel.setPolicyAcronym(policyAcronym);
+        policyModel.setPolicyModelTosca(policyModelTosca);
+        policyModel.setPolicyModelType(policyType);
+        policyModel.setPolicyVariant(policyVariant);
+        policyModel.setUpdatedBy(createdBy);
+        policyModel.setVersion(version);
+        return policyModel;
+    }
+
+    @Test
+    @Transactional
+    public void shouldCreatePolicyModel() {
+        // given
+        PolicyModel policyModel = getPolicyModel(POLICY_MODEL_TYPE_1, "yaml", POLICY_MODEL_TYPE_1_VERSION_1, "TEST",
+                "VARIANT", "user");
+
+        // when
+        PolicyModel actualPolicyModel = policyModelsService.saveOrUpdatePolicyModel(policyModel);
+
+        // then
+        assertThat(actualPolicyModel).isNotNull();
+        assertThat(actualPolicyModel).isEqualTo(policyModelsRepository
+                .findById(new PolicyModelId(actualPolicyModel.getPolicyModelType(), actualPolicyModel.getVersion()))
+                .get());
+        assertThat(actualPolicyModel.getPolicyModelType()).isEqualTo(policyModel.getPolicyModelType());
+        assertThat(actualPolicyModel.getCreatedBy()).isEqualTo("");
+        assertThat(actualPolicyModel.getCreatedDate()).isNotNull();
+        assertThat(actualPolicyModel.getPolicyAcronym()).isEqualTo(policyModel.getPolicyAcronym());
+        assertThat(actualPolicyModel.getPolicyModelTosca()).isEqualTo(policyModel.getPolicyModelTosca());
+        assertThat(actualPolicyModel.getPolicyVariant()).isEqualTo(policyModel.getPolicyVariant());
+        assertThat(actualPolicyModel.getUpdatedBy()).isEqualTo("");
+        assertThat(actualPolicyModel.getUpdatedDate()).isNotNull();
+        assertThat(actualPolicyModel.getVersion()).isEqualTo(policyModel.getVersion());
+
+        assertThat(policyModelsService.getPolicyModel(POLICY_MODEL_TYPE_1, POLICY_MODEL_TYPE_1_VERSION_1))
+                .isEqualToIgnoringGivenFields(policyModel, "createdDate", "updatedDate", "createdBy", "updatedBy");
+    }
+
+    @Test
+    @Transactional
+    public void shouldReturnAllPolicyModelTypes() {
+        // given
+        PolicyModel policyModel1 = getPolicyModel(POLICY_MODEL_TYPE_2, "yaml", POLICY_MODEL_TYPE_2_VERSION_1, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel1);
+        PolicyModel policyModel2 = getPolicyModel(POLICY_MODEL_TYPE_2, "yaml", POLICY_MODEL_TYPE_2_VERSION_2, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel2);
+        List<String> policyModelTypesList = policyModelsService.getAllPolicyModelTypes();
+
+        assertThat(policyModelTypesList).containsOnly(policyModel1.getPolicyModelType(),
+                policyModel2.getPolicyModelType());
+    }
+
+    @Test
+    @Transactional
+    public void shouldReturnAllPolicyModels() {
+        PolicyModel policyModel1 = getPolicyModel(POLICY_MODEL_TYPE_2, "yaml", POLICY_MODEL_TYPE_2_VERSION_1, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel1);
+        PolicyModel policyModel2 = getPolicyModel(POLICY_MODEL_TYPE_2, "yaml", POLICY_MODEL_TYPE_2_VERSION_2, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel2);
+
+        assertThat(policyModelsService.getAllPolicyModels()).containsOnly(policyModel1, policyModel2);
+    }
+
+    @Test
+    @Transactional
+    public void shouldReturnAllModelsByType() {
+        PolicyModel policyModel1 = getPolicyModel(POLICY_MODEL_TYPE_2, "yaml", POLICY_MODEL_TYPE_2_VERSION_1, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel1);
+        PolicyModel policyModel2 = getPolicyModel(POLICY_MODEL_TYPE_2, "yaml", POLICY_MODEL_TYPE_2_VERSION_2, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel2);
+
+        assertThat(policyModelsService.getAllPolicyModelsByType(POLICY_MODEL_TYPE_2)).containsOnly(policyModel1,
+                policyModel2);
+    }
+
+    @Test
+    @Transactional
+    public void shouldReturnSortedSet() {
+        PolicyModel policyModel1 = getPolicyModel(POLICY_MODEL_TYPE_2, "yaml", POLICY_MODEL_TYPE_2_VERSION_1, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel1);
+        PolicyModel policyModel2 = getPolicyModel(POLICY_MODEL_TYPE_2, "yaml", POLICY_MODEL_TYPE_2_VERSION_2, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel2);
+
+        SortedSet<PolicyModel> sortedSet = new TreeSet<>();
+        policyModelsService.getAllPolicyModels().forEach(sortedSet::add);
+        assertThat(sortedSet).containsExactly(policyModel2, policyModel1);
+    }
+}
diff --git a/src/test/java/org/onap/clamp/util/SemanticVersioningTest.java b/src/test/java/org/onap/clamp/util/SemanticVersioningTest.java
new file mode 100644
index 0000000..1fb5922
--- /dev/null
+++ b/src/test/java/org/onap/clamp/util/SemanticVersioningTest.java
@@ -0,0 +1,71 @@
+/*-
+ * ============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.util;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.Test;
+
+public class SemanticVersioningTest {
+
+    @Test
+    public void compareTest() {
+        assertThat(SemanticVersioning.compare("1.0.0", "2.0.0")).isEqualTo(-1);
+        assertThat(SemanticVersioning.compare("1.5.0", "2.0.0")).isEqualTo(-1);
+        assertThat(SemanticVersioning.compare("1.5.0", "2.1.0")).isEqualTo(-1);
+        assertThat(SemanticVersioning.compare("1.5.3", "2.0.0")).isEqualTo(-1);
+        assertThat(SemanticVersioning.compare("2.5.3", "2.6.0")).isEqualTo(-1);
+        assertThat(SemanticVersioning.compare("2.5", "2.5.1")).isEqualTo(-1);
+        assertThat(SemanticVersioning.compare("2.5.0", "2.5.1")).isEqualTo(-1);
+        assertThat(SemanticVersioning.compare("2.5.0.0", "2.5.1")).isEqualTo(-1);
+        assertThat(SemanticVersioning.compare("2.5.1.0", "2.5.1")).isEqualTo(1);
+
+        assertThat(SemanticVersioning.compare("2.0.0", "1.0.0")).isEqualTo(1);
+        assertThat(SemanticVersioning.compare("2.0.0", "1.5.0")).isEqualTo(1);
+        assertThat(SemanticVersioning.compare("2.1.0", "1.5.0")).isEqualTo(1);
+        assertThat(SemanticVersioning.compare("2.0.0", "1.5.3")).isEqualTo(1);
+        assertThat(SemanticVersioning.compare("2.6.0", "2.5.3")).isEqualTo(1);
+        assertThat(SemanticVersioning.compare("2.5.1", "2.5")).isEqualTo(1);
+        assertThat(SemanticVersioning.compare("2.5.1", "2.5.0")).isEqualTo(1);
+        assertThat(SemanticVersioning.compare("2.5.1", "2.5.0.0")).isEqualTo(1);
+        assertThat(SemanticVersioning.compare("1", "1.2.3.0")).isEqualTo(-1);
+        assertThat(SemanticVersioning.compare("1.2", "1")).isEqualTo(1);
+    }
+
+    @Test
+    public void compareEqualsTest() {
+        assertThat(SemanticVersioning.compare("1.0.0", "1.0.0")).isEqualTo(0);
+        assertThat(SemanticVersioning.compare("1.0.0.0", "1.0.0")).isEqualTo(1);
+        assertThat(SemanticVersioning.compare("1.2.3", "1.2.3")).isEqualTo(0);
+        assertThat(SemanticVersioning.compare("1.2.3", "1.2.3.0")).isEqualTo(-1);
+
+    }
+
+    @Test
+    public void compareNullTest() {
+        assertThat(SemanticVersioning.compare(null, null)).isEqualTo(0);
+        assertThat(SemanticVersioning.compare(null, "1.0")).isEqualTo(-1);
+        assertThat(SemanticVersioning.compare("1.0", null)).isEqualTo(1);
+    }
+}