From: Sébastien Determe Date: Wed, 1 Apr 2020 10:01:12 +0000 (+0000) Subject: Merge "Update template menu UI" X-Git-Tag: 5.0.2~7 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=99f15c6328f77649ccfc7b1b790c98385754fd6a;hp=3173d554371bae1eefafc69b2bc9da5543510dd5;p=clamp.git Merge "Update template menu UI" --- diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json index cdd346a1..30155353 100644 --- a/docs/swagger/swagger.json +++ b/docs/swagger/swagger.json @@ -1,10 +1,10 @@ { "swagger" : "2.0", "info" : { - "version" : "5.0.0-SNAPSHOT", + "version" : "5.0.2-SNAPSHOT", "title" : "Clamp Rest API" }, - "host" : "localhost:46561", + "host" : "localhost:34889", "basePath" : "/restservices/clds/", "schemes" : [ "http" ], "paths" : { @@ -1027,17 +1027,17 @@ "JsonPrimitive" : { "type" : "object", "properties" : { - "asBoolean" : { + "boolean" : { "type" : "boolean" }, - "number" : { + "asBoolean" : { "type" : "boolean" }, - "string" : { + "number" : { "type" : "boolean" }, - "boolean" : { - "type" : "boolean" + "asNumber" : { + "$ref" : "#/definitions/Number" }, "asString" : { "type" : "string" @@ -1046,6 +1046,10 @@ "type" : "number", "format" : "double" }, + "asFloat" : { + "type" : "number", + "format" : "float" + }, "asLong" : { "type" : "integer", "format" : "int64" @@ -1054,13 +1058,6 @@ "type" : "integer", "format" : "int32" }, - "asNumber" : { - "$ref" : "#/definitions/Number" - }, - "asFloat" : { - "type" : "number", - "format" : "float" - }, "asByte" : { "type" : "string", "format" : "byte" @@ -1078,11 +1075,11 @@ "type" : "integer", "format" : "int32" }, - "jsonArray" : { + "string" : { "type" : "boolean" }, - "asJsonNull" : { - "$ref" : "#/definitions/JsonNull" + "jsonArray" : { + "type" : "boolean" }, "jsonObject" : { "type" : "boolean" @@ -1101,6 +1098,9 @@ }, "asJsonPrimitive" : { "$ref" : "#/definitions/JsonPrimitive" + }, + "asJsonNull" : { + "$ref" : "#/definitions/JsonNull" } } }, @@ -1179,34 +1179,52 @@ "asBoolean" : { "type" : "boolean" }, - "asString" : { - "type" : "string" - }, - "asDouble" : { - "type" : "number", - "format" : "double" + "jsonArray" : { + "type" : "boolean" }, - "asLong" : { - "type" : "integer", - "format" : "int64" + "jsonObject" : { + "type" : "boolean" }, - "asInt" : { - "type" : "integer", - "format" : "int32" + "jsonPrimitive" : { + "type" : "boolean" }, - "jsonArray" : { + "jsonNull" : { "type" : "boolean" }, + "asJsonObject" : { + "$ref" : "#/definitions/JsonObject" + }, + "asJsonArray" : { + "$ref" : "#/definitions/JsonArray" + }, + "asJsonPrimitive" : { + "$ref" : "#/definitions/JsonPrimitive" + }, "asJsonNull" : { "$ref" : "#/definitions/JsonNull" }, "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" @@ -1223,24 +1241,6 @@ "asShort" : { "type" : "integer", "format" : "int32" - }, - "jsonObject" : { - "type" : "boolean" - }, - "jsonPrimitive" : { - "type" : "boolean" - }, - "jsonNull" : { - "type" : "boolean" - }, - "asJsonObject" : { - "$ref" : "#/definitions/JsonObject" - }, - "asJsonArray" : { - "$ref" : "#/definitions/JsonArray" - }, - "asJsonPrimitive" : { - "$ref" : "#/definitions/JsonPrimitive" } }, "x-className" : { @@ -1380,34 +1380,52 @@ "asBoolean" : { "type" : "boolean" }, - "asString" : { - "type" : "string" - }, - "asDouble" : { - "type" : "number", - "format" : "double" + "jsonArray" : { + "type" : "boolean" }, - "asLong" : { - "type" : "integer", - "format" : "int64" + "jsonObject" : { + "type" : "boolean" }, - "asInt" : { - "type" : "integer", - "format" : "int32" + "jsonPrimitive" : { + "type" : "boolean" }, - "jsonArray" : { + "jsonNull" : { "type" : "boolean" }, + "asJsonObject" : { + "$ref" : "#/definitions/JsonObject" + }, + "asJsonArray" : { + "$ref" : "#/definitions/JsonArray" + }, + "asJsonPrimitive" : { + "$ref" : "#/definitions/JsonPrimitive" + }, "asJsonNull" : { "$ref" : "#/definitions/JsonNull" }, "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" @@ -1424,24 +1442,6 @@ "asShort" : { "type" : "integer", "format" : "int32" - }, - "jsonObject" : { - "type" : "boolean" - }, - "jsonPrimitive" : { - "type" : "boolean" - }, - "jsonNull" : { - "type" : "boolean" - }, - "asJsonObject" : { - "$ref" : "#/definitions/JsonObject" - }, - "asJsonArray" : { - "$ref" : "#/definitions/JsonArray" - }, - "asJsonPrimitive" : { - "$ref" : "#/definitions/JsonPrimitive" } } }, @@ -1451,6 +1451,9 @@ "asBoolean" : { "type" : "boolean" }, + "asNumber" : { + "$ref" : "#/definitions/Number" + }, "asString" : { "type" : "string" }, @@ -1458,6 +1461,10 @@ "type" : "number", "format" : "double" }, + "asFloat" : { + "type" : "number", + "format" : "float" + }, "asLong" : { "type" : "integer", "format" : "int64" @@ -1466,13 +1473,6 @@ "type" : "integer", "format" : "int32" }, - "asNumber" : { - "$ref" : "#/definitions/Number" - }, - "asFloat" : { - "type" : "number", - "format" : "float" - }, "asByte" : { "type" : "string", "format" : "byte" @@ -1493,9 +1493,6 @@ "jsonArray" : { "type" : "boolean" }, - "asJsonNull" : { - "$ref" : "#/definitions/JsonNull" - }, "jsonObject" : { "type" : "boolean" }, @@ -1513,6 +1510,9 @@ }, "asJsonPrimitive" : { "$ref" : "#/definitions/JsonPrimitive" + }, + "asJsonNull" : { + "$ref" : "#/definitions/JsonNull" } }, "x-className" : { diff --git a/docs/swagger/swagger.pdf b/docs/swagger/swagger.pdf index 3b6fab4d..cae3e1b8 100644 --- a/docs/swagger/swagger.pdf +++ b/docs/swagger/swagger.pdf @@ -4,8 +4,8 @@ << /Title (Clamp Rest API) /Creator (Asciidoctor PDF 1.5.0.alpha.10, based on Prawn 1.3.0) /Producer (Asciidoctor PDF 1.5.0.alpha.10, based on Prawn 1.3.0) -/CreationDate (D:20200324082927-07'00') -/ModDate (D:20200324082927-07'00') +/CreationDate (D:20200331225527+02'00') +/ModDate (D:20200331225527+02'00') >> endobj 2 0 obj @@ -7089,7 +7089,7 @@ ET BT 85.136384765625 660.036 Td /F1.0 10.5 Tf -[<203a20352e302e302d534e415053484f> 20.01953125 <54>] TJ +[<203a20352e302e322d534e415053484f> 20.01953125 <54>] TJ ET 0.000 0.000 0.000 SCN @@ -7122,7 +7122,7 @@ ET BT 71.30850000000001 592.176 Td /F1.0 10.5 Tf -<203a206c6f63616c686f73743a3436353631> Tj +<203a206c6f63616c686f73743a3334383839> Tj ET 0.000 0.000 0.000 SCN diff --git a/extra/sql/dump/test-data.sql b/extra/sql/dump/test-data.sql index e4a22b09..cf317a33 100644 --- a/extra/sql/dump/test-data.sql +++ b/extra/sql/dump/test-data.sql @@ -26,8 +26,8 @@ USE `cldsdb4`; LOCK TABLES `dictionary` WRITE; /*!40000 ALTER TABLE `dictionary` DISABLE KEYS */; -INSERT INTO `dictionary` VALUES ('DefaultActors','Not found','2020-03-25 02:48:11.327131','Not found','2020-03-25 02:48:11.327131',0,''); -INSERT INTO `dictionary` VALUES ('DefaultOperations','Not found','2020-03-25 02:48:11.482402','Not found','2020-03-25 02:48:11.482402',0,''); +INSERT INTO `dictionary` VALUES ('DefaultActors','Not found','2020-03-31 18:45:41.182035','Not found','2020-03-31 18:45:41.182035',0,''); +INSERT INTO `dictionary` VALUES ('DefaultOperations','Not found','2020-03-31 18:45:41.346446','Not found','2020-03-31 18:45:41.346446',0,''); /*!40000 ALTER TABLE `dictionary` ENABLE KEYS */; UNLOCK TABLES; @@ -37,20 +37,20 @@ UNLOCK TABLES; LOCK TABLES `dictionary_elements` WRITE; /*!40000 ALTER TABLE `dictionary_elements` DISABLE KEYS */; -INSERT INTO `dictionary_elements` VALUES ('APPC','Not found','2020-03-25 02:48:11.414152','Not found','2020-03-25 02:48:11.414152','APPC component','APPC',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('BandwidthOnDemand (SDNC operation)','Not found','2020-03-25 02:48:11.498903','Not found','2020-03-25 02:48:11.498903','SDNC operation','BandwidthOnDemand',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('Health-Check (APPC operation)','Not found','2020-03-25 02:48:11.560162','Not found','2020-03-25 02:48:11.560162','APPC operation','Health-Check',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('Migrate (APPC operation)','Not found','2020-03-25 02:48:11.551017','Not found','2020-03-25 02:48:11.551017','APPC operation','Migrate',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('ModifyConfig (APPC/VFC operation)','Not found','2020-03-25 02:48:11.539294','Not found','2020-03-25 02:48:11.539294','APPC/VFC operation','ModifyConfig',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('Rebuild (APPC operation)','Not found','2020-03-25 02:48:11.533212','Not found','2020-03-25 02:48:11.533212','APPC operation','Rebuild',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('Reroute (SDNC operation)','Not found','2020-03-25 02:48:11.512467','Not found','2020-03-25 02:48:11.512467','SDNC operation','Reroute',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('Restart (APPC operation)','Not found','2020-03-25 02:48:11.545161','Not found','2020-03-25 02:48:11.545161','APPC operation','Restart',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('SDNC','Not found','2020-03-25 02:48:11.387499','Not found','2020-03-25 02:48:11.387499','SDNC component','SDNC',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('SDNR','Not found','2020-03-25 02:48:11.361965','Not found','2020-03-25 02:48:11.361965','SDNR component','SDNR',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('SO','Not found','2020-03-25 02:48:11.408311','Not found','2020-03-25 02:48:11.408311','SO component','SO',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('VF Module Create (SO operation)','Not found','2020-03-25 02:48:11.528397','Not found','2020-03-25 02:48:11.528397','SO operation','VF Module Create',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('VF Module Delete (SO operation)','Not found','2020-03-25 02:48:11.507535','Not found','2020-03-25 02:48:11.507535','SO operation','VF Module Delete',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('VFC','Not found','2020-03-25 02:48:11.396667','Not found','2020-03-25 02:48:11.396667','VFC component','VFC',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('APPC','Not found','2020-03-31 18:45:41.218960','Not found','2020-03-31 18:45:41.218960','APPC component','APPC',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('BandwidthOnDemand (SDNC operation)','Not found','2020-03-31 18:45:41.350266','Not found','2020-03-31 18:45:41.350266','SDNC operation','BandwidthOnDemand',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('Health-Check (APPC operation)','Not found','2020-03-31 18:45:41.400689','Not found','2020-03-31 18:45:41.400689','APPC operation','Health-Check',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('Migrate (APPC operation)','Not found','2020-03-31 18:45:41.396577','Not found','2020-03-31 18:45:41.396577','APPC operation','Migrate',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('ModifyConfig (APPC/VFC operation)','Not found','2020-03-31 18:45:41.383607','Not found','2020-03-31 18:45:41.383607','APPC/VFC operation','ModifyConfig',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('Rebuild (APPC operation)','Not found','2020-03-31 18:45:41.373405','Not found','2020-03-31 18:45:41.373405','APPC operation','Rebuild',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('Reroute (SDNC operation)','Not found','2020-03-31 18:45:41.358712','Not found','2020-03-31 18:45:41.358712','SDNC operation','Reroute',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('Restart (APPC operation)','Not found','2020-03-31 18:45:41.387456','Not found','2020-03-31 18:45:41.387456','APPC operation','Restart',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('SDNC','Not found','2020-03-31 18:45:41.205996','Not found','2020-03-31 18:45:41.205996','SDNC component','SDNC',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('SDNR','Not found','2020-03-31 18:45:41.201452','Not found','2020-03-31 18:45:41.201452','SDNR component','SDNR',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('SO','Not found','2020-03-31 18:45:41.215233','Not found','2020-03-31 18:45:41.215233','SO component','SO',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('VF Module Create (SO operation)','Not found','2020-03-31 18:45:41.363646','Not found','2020-03-31 18:45:41.363646','SO operation','VF Module Create',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('VF Module Delete (SO operation)','Not found','2020-03-31 18:45:41.353974','Not found','2020-03-31 18:45:41.353974','SO operation','VF Module Delete',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('VFC','Not found','2020-03-31 18:45:41.210943','Not found','2020-03-31 18:45:41.210943','VFC component','VFC',NULL,'string'); /*!40000 ALTER TABLE `dictionary_elements` ENABLE KEYS */; UNLOCK TABLES; @@ -93,7 +93,7 @@ UNLOCK TABLES; LOCK TABLES `loop_element_models` WRITE; /*!40000 ALTER TABLE `loop_element_models` DISABLE KEYS */; -INSERT INTO `loop_element_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app',NULL,'2020-03-25 02:48:39.690327','Not found','2020-03-25 02:48:39.947289',NULL,NULL,'MICRO_SERVICE_TYPE',NULL); +INSERT INTO `loop_element_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app',NULL,'2020-03-31 18:45:40.246437','Not found','2020-03-31 18:45:40.890608',NULL,NULL,'MICRO_SERVICE_TYPE',NULL); /*!40000 ALTER TABLE `loop_element_models` ENABLE KEYS */; UNLOCK TABLES; @@ -112,9 +112,9 @@ UNLOCK TABLES; LOCK TABLES `loop_templates` WRITE; /*!40000 ALTER TABLE `loop_templates` DISABLE KEYS */; -INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_cx2f0_v1_0_ResourceInstanceName1_tca','Not found','2020-03-25 02:48:39.898988','Not found','2020-03-25 02:48:39.898988','CLOSED','tosca_definitions_version: cloudify_dsl_1_3\nimports:\n- http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/docker/2.2.0/node-type.yaml\n- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/relationship/1.0.0/node-type.yaml\n- http://onap.org:8081/repository/solutioning01-mte2-raw/type_files/dmaap/dmaap_mr.yaml\ninputs:\n location_id:\n type: string\n service_id:\n type: string\n policy_id:\n type: string\nnode_templates:\n policy_0:\n type: dcae.nodes.policy\n properties:\n policy_id: \n get_input: policy_id\n policy_model_id: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n cdap_host_host:\n type: dcae.nodes.StreamingAnalytics.SelectedCDAPInfrastructure\n properties:\n location_id:\n get_input: location_id\n scn_override: cdap_broker.solutioning-central.dcae.onap.org\n interfaces:\n cloudify.interfaces.lifecycle: {\n }\n tca_tca:\n type: dcae.nodes.MicroService.cdap\n properties:\n app_config:\n appDescription: DCAE Analytics Threshold Crossing Alert Application\n appName: dcae-tca\n tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n tcaVESAlertsTableName: TCAVESAlertsTable\n tcaVESAlertsTableTTLSeconds: \'1728000\'\n tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n tcaVESMessageStatusTableTTLSeconds: \'86400\'\n thresholdCalculatorFlowletInstances: \'2\'\n app_preferences:\n publisherContentType: application/json\n publisherHostName: mrlocal-mtnjftle01.onap.org\n publisherHostPort: \'3905\'\n publisherMaxBatchSize: \'10\'\n publisherMaxRecoveryQueueSize: \'100000\'\n publisherPollingInterval: \'20000\'\n publisherProtocol: https\n publisherTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESPub\n publisherUserName: test@tca.af.dcae.onap.org\n publisherUserPassword: password\n subscriberConsumerGroup: OpenDCAE-c12\n subscriberConsumerId: c12\n subscriberContentType: application/json\n subscriberHostName: mrlocal-mtnjftle01.onap.org\n subscriberHostPort: \'3905\'\n subscriberMessageLimit: \'-1\'\n subscriberPollingInterval: \'20000\'\n subscriberProtocol: https\n subscriberTimeoutMS: \'-1\'\n subscriberTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESSub\n subscriberUserName: test@tca.af.dcae.onap.org\n subscriberUserPassword: password\n tca_policy: null\n artifact_name: dcae-analytics-tca\n artifact_version: 1.0.0\n connections:\n streams_publishes: [\n ]\n streams_subscribes: [\n ]\n jar_url: http://somejar\n location_id:\n get_input: location_id\n namespace: cdap_tca_hi_lo\n programs:\n - program_id: TCAVESCollectorFlow\n program_type: flows\n - program_id: TCADMaaPMRSubscriberWorker\n program_type: workers\n - program_id: TCADMaaPMRPublisherWorker\n program_type: workers\n service_component_type: cdap_app_tca\n service_id:\n get_input: service_id\n streamname: TCASubscriberOutputStream\n relationships:\n - target: topic0\n type: dcae.relationships.subscribe_to_events\n - target: topic1\n type: dcae.relationships.publish_events\n - target: cdap_host_host\n type: dcae.relationships.component_contained_in\n - target: policy_0\n type: dcae.relationships.depends_on\n topic0:\n type: dcae.nodes.Topic\n properties:\n topic_name: \'\'\n topic1:\n type: dcae.nodes.Topic\n properties:\n topic_name: \'\'\n \n','typeId-c0d53f56-b0d7-47e4-8cd7-a4c2aa673532',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); -INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_cx2f0_v1_0_ResourceInstanceName1_tca_3','Not found','2020-03-25 02:48:39.808371','Not found','2020-03-25 02:48:39.808371','CLOSED','#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n This blueprint deploys/manages the TCA module as a Docker container\n\nimports:\n - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n - \"https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml\"\n - \"https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/clamppolicyplugin/1.1.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.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.2.2\"\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-service\"\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\":\"VM\",\"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 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: \"3904\"\n DMAAPPUBTOPIC: \"unauthenticated.DCAE_CL_OUTPUT\"\n DMAAPSUBTOPIC: \"unauthenticated.VES_MEASUREMENT_OUTPUT\"\n AAIHOST:\n { get_input: aaiEnrichmentHost }\n AAIPORT: \"8443\"\n CONSUL_HOST:\n { get_input: consul_host }\n CONSUL_PORT: \"8500\"\n CBS_HOST:\n { get_input: cbs_host }\n CBS_PORT: \"10000\"\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:\n get_input: policy_model_id\n','typeId-cd5553fd-86a5-4ada-960d-d82d27fb740c',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); -INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_cx2f0_v1_0_ResourceInstanceName2_tca_2','Not found','2020-03-25 02:48:39.641441','Not found','2020-03-25 02:48:39.641441','CLOSED','#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n This blueprint deploys/manages the TCA module as a Docker container\n\nimports:\n - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml\n# - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml\n - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/clamppolicyplugin/1.0.0/clamppolicyplugin_types.yaml\ninputs:\n aaiEnrichmentHost:\n type: string\n default: \"aai.onap.svc.cluster.local\"\n aaiEnrichmentPort:\n type: string\n default: \"8443\"\n enableAAIEnrichment:\n type: string\n default: true\n dmaap_host:\n type: string\n default: message-router.onap\n dmaap_port:\n type: string\n default: \"3904\"\n enableRedisCaching:\n type: string\n default: false\n redisHosts:\n type: string\n default: dcae-redis.onap.svc.cluster.local:6379\n tag_version:\n type: string\n default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.1\"\n consul_host:\n type: string\n default: consul-server.onap\n consul_port:\n type: string\n default: \"8500\"\n cbs_host:\n type: string\n default: \"config-binding-servicel\"\n cbs_port:\n type: string\n default: \"10000\"\n policy_id:\n type: string\n default: \"onap.restart.tca\"\n external_port:\n type: string\n description: Kubernetes node port on which CDAPgui is exposed\n default: \"32012\"\n policy_model_id:\n type: string\n default: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\nnode_templates:\n tca_k8s:\n type: dcae.nodes.ContainerizedServiceComponent\n relationships:\n - target: tca_policy\n type: cloudify.relationships.depends_on\n properties:\n service_component_type: \'dcaegen2-analytics-tca\'\n application_config: {}\n docker_config: {}\n image:\n get_input: tag_version\n log_info:\n log_directory: \"/opt/app/TCAnalytics/logs\"\n application_config:\n app_config:\n appDescription: DCAE Analytics Threshold Crossing Alert Application\n appName: dcae-tca\n tcaAlertsAbatementTableName: TCAAlertsAbatementTable\n tcaAlertsAbatementTableTTLSeconds: \'1728000\'\n tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n tcaVESAlertsTableName: TCAVESAlertsTable\n tcaVESAlertsTableTTLSeconds: \'1728000\'\n tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n tcaVESMessageStatusTableTTLSeconds: \'86400\'\n thresholdCalculatorFlowletInstances: \'2\'\n app_preferences:\n aaiEnrichmentHost:\n get_input: aaiEnrichmentHost\n aaiEnrichmentIgnoreSSLCertificateErrors: \'true\'\n aaiEnrichmentPortNumber: \'8443\'\n aaiEnrichmentProtocol: https\n aaiEnrichmentUserName: dcae@dcae.onap.org\n aaiEnrichmentUserPassword: demo123456!\n aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query\n aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf\n enableAAIEnrichment:\n get_input: enableAAIEnrichment\n enableRedisCaching:\n get_input: enableRedisCaching\n redisHosts:\n get_input: redisHosts\n enableAlertCEFFormat: \'false\'\n publisherContentType: application/json\n publisherHostName:\n get_input: dmaap_host\n publisherHostPort:\n get_input: dmaap_port\n publisherMaxBatchSize: \'1\'\n publisherMaxRecoveryQueueSize: \'100000\'\n publisherPollingInterval: \'20000\'\n publisherProtocol: http\n publisherTopicName: unauthenticated.DCAE_CL_OUTPUT\n subscriberConsumerGroup: OpenDCAE-clamp\n subscriberConsumerId: c12\n subscriberContentType: application/json\n subscriberHostName:\n get_input: dmaap_host\n subscriberHostPort:\n get_input: dmaap_port\n subscriberMessageLimit: \'-1\'\n subscriberPollingInterval: \'30000\'\n subscriberProtocol: http\n subscriberTimeoutMS: \'-1\'\n subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT\n# tca_policy: \'{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"},{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":700,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}\'\n service_component_type: dcaegen2-analytics_tca\n interfaces:\n cloudify.interfaces.lifecycle:\n start:\n inputs:\n envs:\n DMAAPHOST:\n { get_input: dmaap_host }\n DMAAPPORT:\n { get_input: dmaap_port }\n DMAAPPUBTOPIC: \"unauthenticated.DCAE_CL_OUTPUT\"\n DMAAPSUBTOPIC: \"unauthenticated.VES_MEASUREMENT_OUTPUT\"\n AAIHOST:\n { get_input: aaiEnrichmentHost }\n AAIPORT:\n { get_input: aaiEnrichmentPort }\n CONSUL_HOST:\n { get_input: consul_host }\n CONSUL_PORT:\n { get_input: consul_port }\n CBS_HOST:\n { get_input: cbs_host }\n CBS_PORT:\n { get_input: cbs_port }\n CONFIG_BINDING_SERVICE: \"config_binding_service\"\n ports:\n - concat: [\"11011:\", { get_input: external_port }]\n tca_policy:\n type: clamp.nodes.policy\n properties:\n policy_id:\n get_input: policy_id\n policy_model_id: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n','typeId-6b68ee9d-e2e8-4c03-97f2-2a5437c77af3',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); +INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_rop5t_v1_0_ResourceInstanceName1_tca','Not found','2020-03-31 18:45:40.817136','Not found','2020-03-31 18:45:40.817136','CLOSED','tosca_definitions_version: cloudify_dsl_1_3\nimports:\n- http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/docker/2.2.0/node-type.yaml\n- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/relationship/1.0.0/node-type.yaml\n- http://onap.org:8081/repository/solutioning01-mte2-raw/type_files/dmaap/dmaap_mr.yaml\ninputs:\n location_id:\n type: string\n service_id:\n type: string\n policy_id:\n type: string\nnode_templates:\n policy_0:\n type: dcae.nodes.policy\n properties:\n policy_id: \n get_input: policy_id\n policy_model_id: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n cdap_host_host:\n type: dcae.nodes.StreamingAnalytics.SelectedCDAPInfrastructure\n properties:\n location_id:\n get_input: location_id\n scn_override: cdap_broker.solutioning-central.dcae.onap.org\n interfaces:\n cloudify.interfaces.lifecycle: {\n }\n tca_tca:\n type: dcae.nodes.MicroService.cdap\n properties:\n app_config:\n appDescription: DCAE Analytics Threshold Crossing Alert Application\n appName: dcae-tca\n tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n tcaVESAlertsTableName: TCAVESAlertsTable\n tcaVESAlertsTableTTLSeconds: \'1728000\'\n tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n tcaVESMessageStatusTableTTLSeconds: \'86400\'\n thresholdCalculatorFlowletInstances: \'2\'\n app_preferences:\n publisherContentType: application/json\n publisherHostName: mrlocal-mtnjftle01.onap.org\n publisherHostPort: \'3905\'\n publisherMaxBatchSize: \'10\'\n publisherMaxRecoveryQueueSize: \'100000\'\n publisherPollingInterval: \'20000\'\n publisherProtocol: https\n publisherTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESPub\n publisherUserName: test@tca.af.dcae.onap.org\n publisherUserPassword: password\n subscriberConsumerGroup: OpenDCAE-c12\n subscriberConsumerId: c12\n subscriberContentType: application/json\n subscriberHostName: mrlocal-mtnjftle01.onap.org\n subscriberHostPort: \'3905\'\n subscriberMessageLimit: \'-1\'\n subscriberPollingInterval: \'20000\'\n subscriberProtocol: https\n subscriberTimeoutMS: \'-1\'\n subscriberTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESSub\n subscriberUserName: test@tca.af.dcae.onap.org\n subscriberUserPassword: password\n tca_policy: null\n artifact_name: dcae-analytics-tca\n artifact_version: 1.0.0\n connections:\n streams_publishes: [\n ]\n streams_subscribes: [\n ]\n jar_url: http://somejar\n location_id:\n get_input: location_id\n namespace: cdap_tca_hi_lo\n programs:\n - program_id: TCAVESCollectorFlow\n program_type: flows\n - program_id: TCADMaaPMRSubscriberWorker\n program_type: workers\n - program_id: TCADMaaPMRPublisherWorker\n program_type: workers\n service_component_type: cdap_app_tca\n service_id:\n get_input: service_id\n streamname: TCASubscriberOutputStream\n relationships:\n - target: topic0\n type: dcae.relationships.subscribe_to_events\n - target: topic1\n type: dcae.relationships.publish_events\n - target: cdap_host_host\n type: dcae.relationships.component_contained_in\n - target: policy_0\n type: dcae.relationships.depends_on\n topic0:\n type: dcae.nodes.Topic\n properties:\n topic_name: \'\'\n topic1:\n type: dcae.nodes.Topic\n properties:\n topic_name: \'\'\n \n','typeId-bf909375-1731-4ef0-a772-9b6632b0912c',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); +INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_rop5t_v1_0_ResourceInstanceName1_tca_3','Not found','2020-03-31 18:45:40.591244','Not found','2020-03-31 18:45:40.591244','CLOSED','#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n This blueprint deploys/manages the TCA module as a Docker container\n\nimports:\n - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n - \"https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml\"\n - \"https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/clamppolicyplugin/1.1.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.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.2.2\"\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-service\"\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\":\"VM\",\"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 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: \"3904\"\n DMAAPPUBTOPIC: \"unauthenticated.DCAE_CL_OUTPUT\"\n DMAAPSUBTOPIC: \"unauthenticated.VES_MEASUREMENT_OUTPUT\"\n AAIHOST:\n { get_input: aaiEnrichmentHost }\n AAIPORT: \"8443\"\n CONSUL_HOST:\n { get_input: consul_host }\n CONSUL_PORT: \"8500\"\n CBS_HOST:\n { get_input: cbs_host }\n CBS_PORT: \"10000\"\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:\n get_input: policy_model_id\n','typeId-b2ea0127-9305-4704-b571-672855a71b6f',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); +INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_rop5t_v1_0_ResourceInstanceName2_tca_2','Not found','2020-03-31 18:45:40.207546','Not found','2020-03-31 18:45:40.207546','CLOSED','#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n This blueprint deploys/manages the TCA module as a Docker container\n\nimports:\n - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml\n# - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml\n - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/clamppolicyplugin/1.0.0/clamppolicyplugin_types.yaml\ninputs:\n aaiEnrichmentHost:\n type: string\n default: \"aai.onap.svc.cluster.local\"\n aaiEnrichmentPort:\n type: string\n default: \"8443\"\n enableAAIEnrichment:\n type: string\n default: true\n dmaap_host:\n type: string\n default: message-router.onap\n dmaap_port:\n type: string\n default: \"3904\"\n enableRedisCaching:\n type: string\n default: false\n redisHosts:\n type: string\n default: dcae-redis.onap.svc.cluster.local:6379\n tag_version:\n type: string\n default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.1\"\n consul_host:\n type: string\n default: consul-server.onap\n consul_port:\n type: string\n default: \"8500\"\n cbs_host:\n type: string\n default: \"config-binding-servicel\"\n cbs_port:\n type: string\n default: \"10000\"\n policy_id:\n type: string\n default: \"onap.restart.tca\"\n external_port:\n type: string\n description: Kubernetes node port on which CDAPgui is exposed\n default: \"32012\"\n policy_model_id:\n type: string\n default: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\nnode_templates:\n tca_k8s:\n type: dcae.nodes.ContainerizedServiceComponent\n relationships:\n - target: tca_policy\n type: cloudify.relationships.depends_on\n properties:\n service_component_type: \'dcaegen2-analytics-tca\'\n application_config: {}\n docker_config: {}\n image:\n get_input: tag_version\n log_info:\n log_directory: \"/opt/app/TCAnalytics/logs\"\n application_config:\n app_config:\n appDescription: DCAE Analytics Threshold Crossing Alert Application\n appName: dcae-tca\n tcaAlertsAbatementTableName: TCAAlertsAbatementTable\n tcaAlertsAbatementTableTTLSeconds: \'1728000\'\n tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n tcaVESAlertsTableName: TCAVESAlertsTable\n tcaVESAlertsTableTTLSeconds: \'1728000\'\n tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n tcaVESMessageStatusTableTTLSeconds: \'86400\'\n thresholdCalculatorFlowletInstances: \'2\'\n app_preferences:\n aaiEnrichmentHost:\n get_input: aaiEnrichmentHost\n aaiEnrichmentIgnoreSSLCertificateErrors: \'true\'\n aaiEnrichmentPortNumber: \'8443\'\n aaiEnrichmentProtocol: https\n aaiEnrichmentUserName: dcae@dcae.onap.org\n aaiEnrichmentUserPassword: demo123456!\n aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query\n aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf\n enableAAIEnrichment:\n get_input: enableAAIEnrichment\n enableRedisCaching:\n get_input: enableRedisCaching\n redisHosts:\n get_input: redisHosts\n enableAlertCEFFormat: \'false\'\n publisherContentType: application/json\n publisherHostName:\n get_input: dmaap_host\n publisherHostPort:\n get_input: dmaap_port\n publisherMaxBatchSize: \'1\'\n publisherMaxRecoveryQueueSize: \'100000\'\n publisherPollingInterval: \'20000\'\n publisherProtocol: http\n publisherTopicName: unauthenticated.DCAE_CL_OUTPUT\n subscriberConsumerGroup: OpenDCAE-clamp\n subscriberConsumerId: c12\n subscriberContentType: application/json\n subscriberHostName:\n get_input: dmaap_host\n subscriberHostPort:\n get_input: dmaap_port\n subscriberMessageLimit: \'-1\'\n subscriberPollingInterval: \'30000\'\n subscriberProtocol: http\n subscriberTimeoutMS: \'-1\'\n subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT\n# tca_policy: \'{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"},{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":700,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}\'\n service_component_type: dcaegen2-analytics_tca\n interfaces:\n cloudify.interfaces.lifecycle:\n start:\n inputs:\n envs:\n DMAAPHOST:\n { get_input: dmaap_host }\n DMAAPPORT:\n { get_input: dmaap_port }\n DMAAPPUBTOPIC: \"unauthenticated.DCAE_CL_OUTPUT\"\n DMAAPSUBTOPIC: \"unauthenticated.VES_MEASUREMENT_OUTPUT\"\n AAIHOST:\n { get_input: aaiEnrichmentHost }\n AAIPORT:\n { get_input: aaiEnrichmentPort }\n CONSUL_HOST:\n { get_input: consul_host }\n CONSUL_PORT:\n { get_input: consul_port }\n CBS_HOST:\n { get_input: cbs_host }\n CBS_PORT:\n { get_input: cbs_port }\n CONFIG_BINDING_SERVICE: \"config_binding_service\"\n ports:\n - concat: [\"11011:\", { get_input: external_port }]\n tca_policy:\n type: clamp.nodes.policy\n properties:\n policy_id:\n get_input: policy_id\n policy_model_id: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n','typeId-fa9ea4b2-d73f-4162-a883-40887d3a4a33',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); /*!40000 ALTER TABLE `loop_templates` ENABLE KEYS */; UNLOCK TABLES; @@ -152,9 +152,9 @@ UNLOCK TABLES; LOCK TABLES `looptemplates_to_loopelementmodels` WRITE; /*!40000 ALTER TABLE `looptemplates_to_loopelementmodels` DISABLE KEYS */; -INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_cx2f0_v1_0_ResourceInstanceName1_tca',0); -INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_cx2f0_v1_0_ResourceInstanceName1_tca_3',0); -INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_cx2f0_v1_0_ResourceInstanceName2_tca_2',0); +INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_rop5t_v1_0_ResourceInstanceName1_tca',0); +INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_rop5t_v1_0_ResourceInstanceName1_tca_3',0); +INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_rop5t_v1_0_ResourceInstanceName2_tca_2',0); /*!40000 ALTER TABLE `looptemplates_to_loopelementmodels` ENABLE KEYS */; UNLOCK TABLES; @@ -182,13 +182,13 @@ UNLOCK TABLES; LOCK TABLES `policy_models` WRITE; /*!40000 ALTER TABLE `policy_models` DISABLE KEYS */; -INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.Blacklist','1.0.0','Not found','2020-03-25 02:48:54.948366','Not found','2020-03-25 02:48:55.206874','Blacklist','|-\n tosca_definitions_version: tosca_simple_yaml_1_1_0\n policy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.Blacklist:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports blacklist of entity id\'s from performing control loop actions on.\n properties:\n blacklist:\n type: list\n description: List of entity id\'s\n required: true\n entry_schema:\n type: string\n','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"xacml\"\n ]\n }\n ]\n}'); -INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.FrequencyLimiter','1.0.0','Not found','2020-03-25 02:48:54.823390','Not found','2020-03-25 02:48:55.235719','FrequencyLimiter','|-\n tosca_definitions_version: tosca_simple_yaml_1_1_0\n policy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.FrequencyLimiter:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports limiting the frequency of actions being taken by a Actor.\n properties:\n timeWindow:\n type: integer\n description: The time window to count the actions against.\n required: true\n timeUnits:\n type: string\n description: The units of time the window is counting.\n constraints:\n - valid_values: [\"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"year\"]\n limit:\n type: integer\n description: The limit\n required: true\n constraints:\n - greater_than: 0\n','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"xacml\"\n ]\n }\n ]\n}'); -INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.MinMax','2.0.0','Not found','2020-03-25 02:48:55.034315','Not found','2020-03-25 02:48:55.034315','MinMax','|-\n tosca_definitions_version: tosca_simple_yaml_1_1_0\n policy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.MinMax:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports Min/Max number of entity for scaling operations\n properties:\n min:\n type: integer\n required: true\n description: The minimum instances of this entity\n max:\n type: integer\n required: false\n description: The maximum instances of this entity\n',NULL); -INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Apex','1.0.0','Not found','2020-03-25 02:48:54.724338','Not found','2020-03-25 02:48:55.255453','Apex','|-\n tosca_definitions_version: tosca_simple_yaml_1_1_0\n policy_types:\n onap.policies.controlloop.operational.common.Apex:\n derived_from: onap.policies.controlloop.operational.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Operational policies for Apex PDP\n properties:\n engineServiceParameters:\n type: string\n description: The engine parameters like name, instanceCount, policy implementation, parameters etc.\n required: true\n eventInputParameters:\n type: string\n description: The event input parameters.\n required: true\n eventOutputParameters:\n type: string\n description: The event output parameters.\n required: true\n javaProperties:\n type: string\n description: Name/value pairs of properties to be set for APEX if needed.\n required: false\n onap.policies.controlloop.operational.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n Policy Types. This does NOT support the legacy Policy YAML policy type.\n properties:\n id:\n type: string\n description: The unique control loop id.\n required: true\n timeout:\n type: integer\n description: |\n Overall timeout for executing all the operations. This timeout should equal or exceed the total\n timeout for each operation listed.\n required: true\n abatement:\n type: boolean\n description: Whether an abatement event message will be expected for the control loop from DCAE.\n required: true\n default: false\n trigger:\n type: string\n description: Initial operation to execute upon receiving an Onset event message for the Control Loop.\n required: true\n operations:\n type: list\n description: List of operations to be performed when Control Loop is triggered.\n required: true\n entry_schema:\n type: onap.datatype.controlloop.Operation\n data_types:\n onap.datatype.controlloop.Target:\n derived_from: tosca.datatypes.Root\n description: Definition for a entity in A&AI to perform a control loop operation on\n properties:\n targetType:\n type: string\n description: Category for the target type\n required: true\n constraints:\n - valid_values: [VNF, VM, VFMODULE, PNF]\n entityIds:\n type: map\n description: |\n Map of values that identify the resource. If none are provided, it is assumed that the\n entity that generated the ONSET event will be the target.\n required: false\n metadata:\n clamp_possible_values: ClampExecution:CSAR_RESOURCES\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Actor:\n derived_from: tosca.datatypes.Root\n description: An actor/operation/target definition\n properties:\n actor:\n type: string\n description: The actor performing the operation.\n required: true\n metadata:\n clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor\n operation:\n type: string\n description: The operation the actor is performing.\n required: true\n metadata:\n clamp_possible_values: Dictionary:DefaultOperations,ClampExecution:CDS/operation\n target:\n type: onap.datatype.controlloop.Target\n description: The resource the operation should be performed on.\n required: true\n payload:\n type: map\n description: Name/value pairs of payload information passed by Policy to the actor\n required: false\n metadata:\n clamp_possible_values: ClampExecution:CDS/payload\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Operation:\n derived_from: tosca.datatypes.Root\n description: An operation supported by an actor\n properties:\n id:\n type: string\n description: Unique identifier for the operation\n required: true\n description:\n type: string\n description: A user-friendly description of the intent for the operation\n required: false\n operation:\n type: onap.datatype.controlloop.Actor\n description: The definition of the operation to be performed.\n required: true\n timeout:\n type: integer\n description: The amount of time for the actor to perform the operation.\n required: true\n retries:\n type: integer\n description: The number of retries the actor should attempt to perform the operation.\n required: true\n default: 0\n success:\n type: string\n description: Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.\n required: false\n default: final_success\n failure:\n type: string\n description: Points to the operation to invoke on Actor operation failure.\n required: false\n default: final_failure\n failure_timeout:\n type: string\n description: Points to the operation to invoke when the time out for the operation occurs.\n required: false\n default: final_failure_timeout\n failure_retries:\n type: string\n description: Points to the operation to invoke when the current operation has exceeded its max retries.\n required: false\n default: final_failure_retries\n failure_exception:\n type: string\n description: Points to the operation to invoke when the current operation causes an exception.\n required: false\n default: final_failure_exception\n failure_guard:\n type: string\n description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.\n required: false\n default: final_failure_guard\n','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"drools\"\n ]\n }\n ]\n}'); -INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Drools','1.0.0','Not found','2020-03-25 02:48:54.513364','Not found','2020-03-25 02:48:55.285439','Drools','|-\n tosca_definitions_version: tosca_simple_yaml_1_1_0\n policy_types:\n onap.policies.controlloop.operational.common.Drools:\n derived_from: onap.policies.controlloop.operational.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Operational policies for Drools PDP\n properties:\n controllerName:\n type: string\n description: Drools controller properties\n required: false\n onap.policies.controlloop.operational.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n Policy Types. This does NOT support the legacy Policy YAML policy type.\n properties:\n id:\n type: string\n description: The unique control loop id.\n required: true\n timeout:\n type: integer\n description: |\n Overall timeout for executing all the operations. This timeout should equal or exceed the total\n timeout for each operation listed.\n required: true\n abatement:\n type: boolean\n description: Whether an abatement event message will be expected for the control loop from DCAE.\n required: true\n default: false\n trigger:\n type: string\n description: Initial operation to execute upon receiving an Onset event message for the Control Loop.\n required: true\n operations:\n type: list\n description: List of operations to be performed when Control Loop is triggered.\n required: true\n entry_schema:\n type: onap.datatype.controlloop.Operation\n data_types:\n onap.datatype.controlloop.Target:\n derived_from: tosca.datatypes.Root\n description: Definition for a entity in A&AI to perform a control loop operation on\n properties:\n targetType:\n type: string\n description: Category for the target type\n required: true\n constraints:\n - valid_values: [VNF, VM, VFMODULE, PNF]\n entityIds:\n type: map\n description: |\n Map of values that identify the resource. If none are provided, it is assumed that the\n entity that generated the ONSET event will be the target.\n required: false\n metadata:\n clamp_possible_values: ClampExecution:CSAR_RESOURCES\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Actor:\n derived_from: tosca.datatypes.Root\n description: An actor/operation/target definition\n properties:\n actor:\n type: string\n description: The actor performing the operation.\n required: true\n metadata:\n clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor\n operation:\n type: string\n description: The operation the actor is performing.\n required: true\n metadata:\n clamp_possible_values: Dictionary:DefaultOperations, ClampExecution:CDS/operations\n target:\n type: onap.datatype.controlloop.Target\n description: The resource the operation should be performed on.\n required: true\n payload:\n type: map\n description: Name/value pairs of payload information passed by Policy to the actor\n required: false\n metadata:\n clamp_possible_values: ClampExecution:CDS/payload\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Operation:\n derived_from: tosca.datatypes.Root\n description: An operation supported by an actor\n properties:\n id:\n type: string\n description: Unique identifier for the operation\n required: true\n description:\n type: string\n description: A user-friendly description of the intent for the operation\n required: false\n operation:\n type: onap.datatype.controlloop.Actor\n description: The definition of the operation to be performed.\n required: true\n timeout:\n type: integer\n description: The amount of time for the actor to perform the operation.\n required: true\n retries:\n type: integer\n description: The number of retries the actor should attempt to perform the operation.\n required: true\n default: 0\n success:\n type: string\n description: Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.\n required: false\n default: final_success\n failure:\n type: string\n description: Points to the operation to invoke on Actor operation failure.\n required: false\n default: final_failure\n failure_timeout:\n type: string\n description: Points to the operation to invoke when the time out for the operation occurs.\n required: false\n default: final_failure_timeout\n failure_retries:\n type: string\n description: Points to the operation to invoke when the current operation has exceeded its max retries.\n required: false\n default: final_failure_retries\n failure_exception:\n type: string\n description: Points to the operation to invoke when the current operation causes an exception.\n required: false\n default: final_failure_exception\n failure_guard:\n type: string\n description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.\n required: false\n default: final_failure_guard\n','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"drools\"\n ]\n }\n ]\n}'); -INSERT INTO `policy_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','1.0.0','Not found','2020-03-25 02:48:39.340812','Not found','2020-03-25 02:48:55.311577','app','|-\n tosca_definitions_version: tosca_simple_yaml_1_1_0\n policy_types:\n onap.policies.Monitoring:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: a base policy type for all policies that govern monitoring provisioning\n onap.policies.monitoring.cdap.tca.hi.lo.app:\n derived_from: onap.policies.Monitoring\n version: 1.0.0\n properties:\n tca_policy:\n type: onap.datatypes.monitoring.tca_policy\n description: TCA Policy JSON\n required: true\n data_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','{\n \"supportedPdpGroups\": [\n {\n \"monitoring\": [\n \"xacml\"\n ]\n }\n ]\n}'); -INSERT INTO `policy_models` VALUES ('onap.policies.operational.legacy','1.0.0','Not found','2020-03-25 02:48:01.772331','Not found','2020-03-25 02:48:01.772331','OperationalPolicyLegacy','',NULL); +INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.Blacklist','1.0.0','Not found','2020-03-31 18:46:04.209335','Not found','2020-03-31 18:46:04.483511','Blacklist','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing\n the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.Blacklist:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports blacklist of entity id\'s from performing control loop\n actions on.\n properties:\n blacklist:\n type: list\n description: List of entity id\'s\n required: true\n entry_schema:\n type: string\n','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"xacml\"\n ]\n }\n ]\n}'); +INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.FrequencyLimiter','1.0.0','Not found','2020-03-31 18:46:04.161051','Not found','2020-03-31 18:46:04.517780','FrequencyLimiter','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing\n the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.FrequencyLimiter:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports limiting the frequency of actions being taken by a Actor.\n properties:\n timeWindow:\n type: integer\n description: The time window to count the actions against.\n required: true\n timeUnits:\n type: string\n description: The units of time the window is counting.\n constraints:\n - valid_values:\n - second\n - minute\n - hour\n - day\n - week\n - month\n - year\n limit:\n type: integer\n description: The limit\n required: true\n constraints:\n - greater_than: 0\n','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"xacml\"\n ]\n }\n ]\n}'); +INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.MinMax','2.0.0','Not found','2020-03-31 18:46:04.260736','Not found','2020-03-31 18:46:04.260736','MinMax','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing\n the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.MinMax:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports Min/Max number of entity for scaling operations\n properties:\n min:\n type: integer\n required: true\n description: The minimum instances of this entity\n max:\n type: integer\n required: false\n description: The maximum instances of this entity\n',NULL); +INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Apex','1.0.0','Not found','2020-03-31 18:46:04.103983','Not found','2020-03-31 18:46:04.536333','Apex','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.operational.Common:\n properties:\n abatement:\n name: abatement\n type: boolean\n typeVersion: 0.0.0\n description: Whether an abatement event message will be expected for\n the control loop from DCAE.\n default: \'false\'\n required: true\n constraints: [\n ]\n metadata: {\n }\n operations:\n name: operations\n type: list\n typeVersion: 0.0.0\n description: List of operations to be performed when Control Loop\n is triggered.\n required: true\n constraints: [\n ]\n entry_schema:\n type: onap.datatype.controlloop.Operation\n typeVersion: 0.0.0\n constraints: [\n ]\n metadata: {\n }\n trigger:\n name: trigger\n type: string\n typeVersion: 0.0.0\n description: Initial operation to execute upon receiving an Onset\n event message for the Control Loop.\n required: true\n constraints: [\n ]\n metadata: {\n }\n timeout:\n name: timeout\n type: integer\n typeVersion: 0.0.0\n description: |\n Overall timeout for executing all the operations. This timeout should equal or exceed the total\n timeout for each operation listed.\n required: true\n constraints: [\n ]\n metadata: {\n }\n id:\n name: id\n type: string\n typeVersion: 0.0.0\n description: The unique control loop id.\n required: true\n constraints: [\n ]\n metadata: {\n }\n name: onap.policies.controlloop.operational.Common\n version: 1.0.0\n derived_from: tosca.policies.Root\n metadata: {\n }\n description: |\n Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n Policy Types. This does NOT support the legacy Policy YAML policy type.\n onap.policies.controlloop.operational.common.Apex:\n properties:\n engineServiceParameters:\n name: engineServiceParameters\n type: string\n typeVersion: 0.0.0\n description: The engine parameters like name, instanceCount, policy\n implementation, parameters etc.\n required: true\n constraints: [\n ]\n metadata: {\n }\n eventOutputParameters:\n name: eventOutputParameters\n type: string\n typeVersion: 0.0.0\n description: The event output parameters.\n required: true\n constraints: [\n ]\n metadata: {\n }\n javaProperties:\n name: javaProperties\n type: string\n typeVersion: 0.0.0\n description: Name/value pairs of properties to be set for APEX if\n needed.\n required: false\n constraints: [\n ]\n metadata: {\n }\n eventInputParameters:\n name: eventInputParameters\n type: string\n typeVersion: 0.0.0\n description: The event input parameters.\n required: true\n constraints: [\n ]\n metadata: {\n }\n name: onap.policies.controlloop.operational.common.Apex\n version: 1.0.0\n derived_from: onap.policies.controlloop.operational.Common\n metadata: {\n }\n description: Operational policies for Apex PDP\ndata_types:\n onap.datatype.controlloop.Actor:\n constraints: [\n ]\n properties:\n payload:\n name: payload\n type: map\n typeVersion: 0.0.0\n description: Name/value pairs of payload information passed by Policy\n to the actor\n required: false\n constraints: [\n ]\n entry_schema:\n type: string\n typeVersion: 0.0.0\n constraints: [\n ]\n metadata:\n clamp_possible_values: ClampExecution:CDS/payload\n target:\n name: target\n type: onap.datatype.controlloop.Target\n typeVersion: 0.0.0\n description: The resource the operation should be performed on.\n required: true\n constraints: [\n ]\n metadata: {\n }\n actor:\n name: actor\n type: string\n typeVersion: 0.0.0\n description: The actor performing the operation.\n required: true\n constraints: [\n ]\n metadata:\n clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor\n operation:\n name: operation\n type: string\n typeVersion: 0.0.0\n description: The operation the actor is performing.\n required: true\n constraints: [\n ]\n metadata:\n clamp_possible_values: Dictionary:DefaultOperations, ClampExecution:CDS/operation\n name: onap.datatype.controlloop.Actor\n version: 0.0.0\n derived_from: tosca.datatypes.Root\n metadata: {\n }\n description: An actor/operation/target definition\n onap.datatype.controlloop.Operation:\n constraints: [\n ]\n properties:\n failure_retries:\n name: failure_retries\n type: string\n typeVersion: 0.0.0\n description: Points to the operation to invoke when the current operation\n has exceeded its max retries.\n default: final_failure_retries\n required: false\n constraints: [\n ]\n metadata: {\n }\n id:\n name: id\n type: string\n typeVersion: 0.0.0\n description: Unique identifier for the operation\n required: true\n constraints: [\n ]\n metadata: {\n }\n failure_timeout:\n name: failure_timeout\n type: string\n typeVersion: 0.0.0\n description: Points to the operation to invoke when the time out for\n the operation occurs.\n default: final_failure_timeout\n required: false\n constraints: [\n ]\n metadata: {\n }\n failure:\n name: failure\n type: string\n typeVersion: 0.0.0\n description: Points to the operation to invoke on Actor operation\n failure.\n default: final_failure\n required: false\n constraints: [\n ]\n metadata: {\n }\n operation:\n name: operation\n type: onap.datatype.controlloop.Actor\n typeVersion: 0.0.0\n description: The definition of the operation to be performed.\n required: true\n constraints: [\n ]\n metadata: {\n }\n failure_guard:\n name: failure_guard\n type: string\n typeVersion: 0.0.0\n description: Points to the operation to invoke when the current operation\n is blocked due to guard policy enforcement.\n default: final_failure_guard\n required: false\n constraints: [\n ]\n metadata: {\n }\n retries:\n name: retries\n type: integer\n typeVersion: 0.0.0\n description: The number of retries the actor should attempt to perform\n the operation.\n default: \'0\'\n required: true\n constraints: [\n ]\n metadata: {\n }\n timeout:\n name: timeout\n type: integer\n typeVersion: 0.0.0\n description: The amount of time for the actor to perform the operation.\n required: true\n constraints: [\n ]\n metadata: {\n }\n failure_exception:\n name: failure_exception\n type: string\n typeVersion: 0.0.0\n description: Points to the operation to invoke when the current operation\n causes an exception.\n default: final_failure_exception\n required: false\n constraints: [\n ]\n metadata: {\n }\n description:\n name: description\n type: string\n typeVersion: 0.0.0\n description: A user-friendly description of the intent for the operation\n required: false\n constraints: [\n ]\n metadata: {\n }\n success:\n name: success\n type: string\n typeVersion: 0.0.0\n description: Points to the operation to invoke on success. A value\n of \"final_success\" indicates and end to the operation.\n default: final_success\n required: false\n constraints: [\n ]\n metadata: {\n }\n name: onap.datatype.controlloop.Operation\n version: 0.0.0\n derived_from: tosca.datatypes.Root\n metadata: {\n }\n description: An operation supported by an actor\n onap.datatype.controlloop.Target:\n constraints: [\n ]\n properties:\n entityIds:\n name: entityIds\n type: map\n typeVersion: 0.0.0\n description: |\n Map of values that identify the resource. If none are provided, it is assumed that the\n entity that generated the ONSET event will be the target.\n required: false\n constraints: [\n ]\n entry_schema:\n type: string\n typeVersion: 0.0.0\n constraints: [\n ]\n metadata:\n clamp_possible_values: ClampExecution:CSAR_RESOURCES\n targetType:\n name: targetType\n type: string\n typeVersion: 0.0.0\n description: Category for the target type\n required: true\n constraints:\n - valid_values:\n - VNF\n - VM\n - VFMODULE\n - PNF\n metadata: {\n }\n name: onap.datatype.controlloop.Target\n version: 0.0.0\n derived_from: tosca.datatypes.Root\n metadata: {\n }\n description: Definition for a entity in A&AI to perform a control loop operation\n on\nname: ToscaServiceTemplateSimple\nversion: 1.0.0\nmetadata: {\n }\n','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"drools\"\n ]\n }\n ]\n}'); +INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Drools','1.0.0','Not found','2020-03-31 18:46:03.979430','Not found','2020-03-31 18:46:04.553237','Drools','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.operational.common.Drools:\n derived_from: onap.policies.controlloop.operational.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Operational policies for Drools PDP\n properties:\n controllerName:\n type: string\n description: Drools controller properties\n required: false\n onap.policies.controlloop.operational.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n Policy Types. This does NOT support the legacy Policy YAML policy type.\n properties:\n id:\n type: string\n description: The unique control loop id.\n required: true\n timeout:\n type: integer\n description: |\n Overall timeout for executing all the operations. This timeout should equal or exceed the total\n timeout for each operation listed.\n required: true\n abatement:\n type: boolean\n description: Whether an abatement event message will be expected for\n the control loop from DCAE.\n required: true\n default: false\n trigger:\n type: string\n description: Initial operation to execute upon receiving an Onset\n event message for the Control Loop.\n required: true\n operations:\n type: list\n description: List of operations to be performed when Control Loop\n is triggered.\n required: true\n entry_schema:\n type: onap.datatype.controlloop.Operation\ndata_types:\n onap.datatype.controlloop.Target:\n derived_from: tosca.datatypes.Root\n description: Definition for a entity in A&AI to perform a control loop operation\n on\n properties:\n targetType:\n type: string\n description: Category for the target type\n required: true\n constraints:\n - valid_values:\n - VNF\n - VM\n - VFMODULE\n - PNF\n entityIds:\n type: map\n description: |\n Map of values that identify the resource. If none are provided, it is assumed that the\n entity that generated the ONSET event will be the target.\n required: false\n metadata:\n clamp_possible_values: ClampExecution:CSAR_RESOURCES\n entry_schema:\n type: string\n onap.datatype.controlloop.Actor:\n derived_from: tosca.datatypes.Root\n description: An actor/operation/target definition\n properties:\n actor:\n type: string\n description: The actor performing the operation.\n required: true\n metadata:\n clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor\n operation:\n type: string\n description: The operation the actor is performing.\n required: true\n metadata:\n clamp_possible_values: Dictionary:DefaultOperations, ClampExecution:CDS/operations\n target:\n type: onap.datatype.controlloop.Target\n description: The resource the operation should be performed on.\n required: true\n payload:\n type: map\n description: Name/value pairs of payload information passed by Policy\n to the actor\n required: false\n metadata:\n clamp_possible_values: ClampExecution:CDS/payload\n entry_schema:\n type: string\n onap.datatype.controlloop.Operation:\n derived_from: tosca.datatypes.Root\n description: An operation supported by an actor\n properties:\n id:\n type: string\n description: Unique identifier for the operation\n required: true\n description:\n type: string\n description: A user-friendly description of the intent for the operation\n required: false\n operation:\n type: onap.datatype.controlloop.Actor\n description: The definition of the operation to be performed.\n required: true\n timeout:\n type: integer\n description: The amount of time for the actor to perform the operation.\n required: true\n retries:\n type: integer\n description: The number of retries the actor should attempt to perform\n the operation.\n required: true\n default: 0\n success:\n type: string\n description: Points to the operation to invoke on success. A value\n of \"final_success\" indicates and end to the operation.\n required: false\n default: final_success\n failure:\n type: string\n description: Points to the operation to invoke on Actor operation\n failure.\n required: false\n default: final_failure\n failure_timeout:\n type: string\n description: Points to the operation to invoke when the time out for\n the operation occurs.\n required: false\n default: final_failure_timeout\n failure_retries:\n type: string\n description: Points to the operation to invoke when the current operation\n has exceeded its max retries.\n required: false\n default: final_failure_retries\n failure_exception:\n type: string\n description: Points to the operation to invoke when the current operation\n causes an exception.\n required: false\n default: final_failure_exception\n failure_guard:\n type: string\n description: Points to the operation to invoke when the current operation\n is blocked due to guard policy enforcement.\n required: false\n default: final_failure_guard\n','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"drools\"\n ]\n }\n ]\n}'); +INSERT INTO `policy_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','1.0.0','Not found','2020-03-31 18:45:40.017340','Not found','2020-03-31 18:46:04.575867','app','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.Monitoring:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: a base policy type for all policies that govern monitoring provisioning\n onap.policies.monitoring.cdap.tca.hi.lo.app:\n derived_from: onap.policies.Monitoring\n version: 1.0.0\n properties:\n tca_policy:\n type: onap.datatypes.monitoring.tca_policy\n description: TCA Policy JSON\n required: true\ndata_types:\n onap.datatypes.monitoring.metricsPerEventName:\n derived_from: tosca.datatypes.Root\n properties:\n controlLoopSchemaType:\n type: string\n required: true\n description: Specifies Control Loop Schema Type for the event Name\n 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\n 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\n 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','{\n \"supportedPdpGroups\": [\n {\n \"monitoring\": [\n \"xacml\"\n ]\n }\n ]\n}'); +INSERT INTO `policy_models` VALUES ('onap.policies.operational.legacy','1.0.0','Not found','2020-03-31 18:45:16.860588','Not found','2020-03-31 18:45:16.860588','OperationalPolicyLegacy','',NULL); /*!40000 ALTER TABLE `policy_models` ENABLE KEYS */; UNLOCK TABLES; @@ -210,4 +210,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2020-03-25 9:50:03 +-- Dump completed on 2020-03-31 16:47:31 diff --git a/pom.xml b/pom.xml index 3768649a..3344f807 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ 4.0.0 org.onap.clamp clds - 5.0.1-SNAPSHOT + 5.0.2-SNAPSHOT clamp diff --git a/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java b/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java index 1261a5e9..d20a7370 100644 --- a/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java +++ b/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java @@ -53,7 +53,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; public class DefaultUserConfiguration extends WebSecurityConfigurerAdapter { protected static final EELFLogger logger = EELFManager.getInstance().getLogger(DefaultUserConfiguration.class); - protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger(); + private static final String SETUP_WEB_USERS_EXCEPTION_MSG = "Exception occurred during the " + " setup of the Web users in memory"; @Autowired diff --git a/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java b/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java index 92401190..885e755b 100644 --- a/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java +++ b/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java @@ -51,7 +51,7 @@ public class ToscaMetadataExecutor { private Map mapOfProcesses = new HashMap<>(); /** - * This method executes the required process specified in processInfo + * This method executes the required process specified in processInfo. * * @param processInfo A String containing the process to execute, like "cds/param1:value1/param2:value2" * @param childObject The jsonObject @@ -61,7 +61,8 @@ public class ToscaMetadataExecutor { String[] processParameters = (processInfo + "/ ").split("/"); logger.info("Executing the Tosca clamp process " + processParameters[0] + " with parameters " + processParameters[1].trim()); - mapOfProcesses.get(processParameters[0]).executeProcess(processParameters[1].trim(), childObject, serviceModel); + mapOfProcesses.get(processParameters[0].trim()) + .executeProcess(processParameters[1].trim(), childObject, serviceModel); } /** diff --git a/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java b/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java index 8fce5caf..8b854719 100644 --- a/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java +++ b/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java @@ -23,6 +23,8 @@ package org.onap.clamp.loop.components.external; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; import com.google.gson.JsonObject; import java.util.Iterator; @@ -30,6 +32,7 @@ import java.util.LinkedList; import java.util.List; import java.util.UUID; +import javax.persistence.Transient; import org.apache.camel.Exchange; import org.json.simple.JSONArray; import org.json.simple.JSONObject; @@ -43,11 +46,14 @@ import org.onap.clamp.policy.microservice.MicroServicePolicy; public class DcaeComponent extends ExternalComponent { + @Transient + private static final EELFLogger logger = EELFManager.getInstance().getLogger(DcaeComponent.class); + private static final String DCAE_DEPLOYMENT_PREFIX = "CLAMP_"; private static final String DEPLOYMENT_PARAMETER = "dcaeDeployParameters"; private static final String DCAE_SERVICETYPE_ID = "serviceTypeId"; private static final String DCAE_INPUTS = "inputs"; - private static final String SINGLE_BLUEPRINT_POLICYID = "loop template blueprint"; + public static final String UNIQUE_BLUEPRINT_PARAMETERS = "uniqueBlueprintParameters"; private String name; @@ -132,7 +138,8 @@ public class DcaeComponent extends ExternalComponent { */ public static String getDeployPayload(Loop loop) { JsonObject globalProp = loop.getGlobalPropertiesJson(); - JsonObject deploymentProp = globalProp.getAsJsonObject(DEPLOYMENT_PARAMETER).getAsJsonObject(SINGLE_BLUEPRINT_POLICYID); + JsonObject deploymentProp = globalProp.getAsJsonObject(DEPLOYMENT_PARAMETER).getAsJsonObject( + UNIQUE_BLUEPRINT_PARAMETERS); String serviceTypeId = loop.getLoopTemplate().getDcaeBlueprintId(); @@ -141,6 +148,7 @@ public class DcaeComponent extends ExternalComponent { if (deploymentProp != null) { rootObject.add(DCAE_INPUTS, deploymentProp); } + logger.info("DCAE Deploy payload for unique blueprint: " + rootObject.toString()); return rootObject.toString(); } @@ -163,6 +171,7 @@ public class DcaeComponent extends ExternalComponent { if (deploymentProp != null) { rootObject.add(DCAE_INPUTS, deploymentProp); } + logger.info("DCAE Deploy payload for multiple blueprints: " + rootObject.toString()); return rootObject.toString(); } @@ -175,6 +184,7 @@ public class DcaeComponent extends ExternalComponent { public static String getUndeployPayload(Loop loop) { JsonObject rootObject = new JsonObject(); rootObject.addProperty(DCAE_SERVICETYPE_ID, loop.getLoopTemplate().getDcaeBlueprintId()); + logger.info("DCAE Undeploy payload for unique blueprint: " + rootObject.toString()); return rootObject.toString(); } @@ -187,6 +197,7 @@ public class DcaeComponent extends ExternalComponent { public static String getUndeployPayload(MicroServicePolicy policy) { JsonObject rootObject = new JsonObject(); rootObject.addProperty(DCAE_SERVICETYPE_ID, policy.getDcaeBlueprintId()); + logger.info("DCAE Undeploy payload for multiple blueprints: " + rootObject.toString()); return rootObject.toString(); } diff --git a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java index 2d7b807c..f963e351 100644 --- a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java +++ b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java @@ -81,13 +81,13 @@ public class PolicyComponent extends ExternalComponent { public static String createPoliciesPayloadPdpGroup(Loop loop) { HashMap>> pdpGroupMap = new HashMap<>(); for (OperationalPolicy opPolicy : loop.getOperationalPolicies()) { - pdpGroupMap = updatePdpGroupMap(opPolicy.getPdpGroup(), opPolicy.getPdpSubgroup(), + updatePdpGroupMap(opPolicy.getPdpGroup(), opPolicy.getPdpSubgroup(), opPolicy.getName(), opPolicy.getPolicyModel().getVersion(), pdpGroupMap); } for (MicroServicePolicy msPolicy : loop.getMicroServicePolicies()) { - pdpGroupMap = updatePdpGroupMap(msPolicy.getPdpGroup(), msPolicy.getPdpSubgroup(), + updatePdpGroupMap(msPolicy.getPdpGroup(), msPolicy.getPdpSubgroup(), msPolicy.getName(), msPolicy.getPolicyModel().getVersion(), pdpGroupMap); } @@ -98,13 +98,12 @@ public class PolicyComponent extends ExternalComponent { return payload; } - private static HashMap>> updatePdpGroupMap(String pdpGroup, - String pdpSubGroup, - String policyName, - String policyModelVersion, - HashMap>> pdpGroupMap) { - + private static void updatePdpGroupMap(String pdpGroup, + String pdpSubGroup, + String policyName, + String policyModelVersion, + HashMap>> pdpGroupMap) { JsonObject policyJson = new JsonObject(); policyJson.addProperty("name", policyName); policyJson.addProperty("version", policyModelVersion); @@ -126,8 +125,6 @@ public class PolicyComponent extends ExternalComponent { policyList.add(policyJson); pdpSubGroupMap.put(pdpSubGroup, policyList); pdpGroupMap.put(pdpGroup, pdpSubGroupMap); - - return pdpGroupMap; } private static JsonObject generateActivatePdpGroupPayload( @@ -170,9 +167,7 @@ public class PolicyComponent extends ExternalComponent { List policyNamesList = new ArrayList<>(); for (OperationalPolicy opPolicy : loop.getOperationalPolicies()) { policyNamesList.add(opPolicy.getName()); - for (String guardName : opPolicy.createGuardPolicyPayloads().keySet()) { - policyNamesList.add(guardName); - } + policyNamesList.addAll(opPolicy.createGuardPolicyPayloads().keySet()); } for (MicroServicePolicy microServicePolicy : loop.getMicroServicePolicies()) { policyNamesList.add(microServicePolicy.getName()); diff --git a/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java b/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java index e2b16e62..65506a47 100644 --- a/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java +++ b/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java @@ -24,13 +24,12 @@ package org.onap.clamp.loop.deploy; import com.google.gson.JsonObject; - import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; - import org.onap.clamp.clds.util.JsonUtils; import org.onap.clamp.loop.Loop; +import org.onap.clamp.loop.components.external.DcaeComponent; import org.onap.clamp.policy.microservice.MicroServicePolicy; import org.yaml.snakeyaml.Yaml; @@ -44,8 +43,8 @@ public class DcaeDeployParameters { Set microServiceList = loop.getMicroServicePolicies(); for (MicroServicePolicy microService : microServiceList) { - deploymentParamMap.put(microService.getName(), - generateDcaeDeployParameter(microService)); + deploymentParamMap.put(microService.getName(), + generateDcaeDeployParameter(microService)); } return deploymentParamMap; } @@ -55,7 +54,7 @@ public class DcaeDeployParameters { microService.getName()); } - private static JsonObject generateDcaeDeployParameter(String blueprint, String tabName) { + private static JsonObject generateDcaeDeployParameter(String blueprint, String policyId) { JsonObject deployJsonBody = new JsonObject(); Yaml yaml = new Yaml(); Map inputsNodes = ((Map) ((Map) yaml @@ -64,25 +63,29 @@ public class DcaeDeployParameters { Object defaultValue = ((Map) elem.getValue()).get("default"); if (defaultValue != null) { addPropertyToNode(deployJsonBody, elem.getKey(), defaultValue); - } else { + } + else { deployJsonBody.addProperty(elem.getKey(), ""); } }); - // For Dublin only one micro service is expected - deployJsonBody.addProperty("policy_id", tabName); + deployJsonBody.addProperty("policy_id", policyId); return deployJsonBody; } private static void addPropertyToNode(JsonObject node, String key, Object value) { if (value instanceof String) { node.addProperty(key, (String) value); - } else if (value instanceof Number) { + } + else if (value instanceof Number) { node.addProperty(key, (Number) value); - } else if (value instanceof Boolean) { + } + else if (value instanceof Boolean) { node.addProperty(key, (Boolean) value); - } else if (value instanceof Character) { + } + else if (value instanceof Character) { node.addProperty(key, (Character) value); - } else { + } + else { node.addProperty(key, JsonUtils.GSON.toJson(value)); } } @@ -96,9 +99,14 @@ public class DcaeDeployParameters { JsonObject globalProperties = new JsonObject(); JsonObject deployParamJson = new JsonObject(); if (loop.getLoopTemplate().getUniqueBlueprint()) { - String tabName = "loop template blueprint"; - deployParamJson.add(tabName, generateDcaeDeployParameter(loop.getLoopTemplate().getBlueprint(), tabName)); - } else { + // Normally the unique blueprint could contain multiple microservices but then we can't guess + // the policy id params that will be used, so here we expect only one by default. + deployParamJson.add(DcaeComponent.UNIQUE_BLUEPRINT_PARAMETERS, + generateDcaeDeployParameter(loop.getLoopTemplate().getBlueprint(), + ((MicroServicePolicy) loop.getMicroServicePolicies().toArray()[0]).getName())); + + } + else { LinkedHashMap deploymentParamMap = init(loop); for (Map.Entry mapElement : deploymentParamMap.entrySet()) { deployParamJson.add(mapElement.getKey(), mapElement.getValue()); diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html index 3f3ec6eb..1f8cc9eb 100644 --- a/src/main/resources/META-INF/resources/swagger.html +++ b/src/main/resources/META-INF/resources/swagger.html @@ -737,13 +737,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

1.1. Version information

-

Version : 5.0.0-SNAPSHOT

+

Version : 5.0.2-SNAPSHOT

1.2. URI scheme

-

Host : localhost:46561
+

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

@@ -4344,7 +4344,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties index 4701b36d..d61b7ed5 100644 --- a/src/main/resources/application-noaaf.properties +++ b/src/main/resources/application-noaaf.properties @@ -81,6 +81,7 @@ server.tomcat.max-idle-time=60000 #Servlet context parameters server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +camel.springboot.tracing=true camel.springboot.consumer-template-cache-size=1000 camel.springboot.producer-template-cache-size=1000 camel.springboot.jmx-enabled=true diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 5bf7910a..3937d8fc 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -85,7 +85,7 @@ server.tomcat.max-idle-time=60000 #Servlet context parameters server.context_parameters.p-name=value #context parameter with p-name as key and value as value. - +camel.springboot.tracing=true camel.springboot.consumer-template-cache-size=1000 camel.springboot.producer-template-cache-size=1000 camel.springboot.jmx-enabled=true diff --git a/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/src/main/resources/clds/camel/rest/clamp-api-v2.xml index d81c164a..e6741d6f 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -16,10 +16,19 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + + 500 + + + GET All Loop names FAILED + @@ -40,10 +49,19 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + + 500 + + + GET Loop FAILED + @@ -64,10 +82,19 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + + 500 + + + GET SVG For loop FAILED + @@ -96,10 +123,19 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + + 500 + + + UPDATE Global properties FAILED + @@ -127,10 +163,21 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + + + 500 + + + UPDATE Operational policies FAILED + @@ -161,10 +208,20 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + + 500 + + + UPDATE MicroService policy FAILED + @@ -195,14 +252,20 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + message="DEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + + 500 + + + DEPLOY request FAILED + @@ -230,14 +293,20 @@ java.lang.Exception - false + true + message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + + 500 + + + REFRESH json schema request FAILED + @@ -265,14 +334,20 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + + 500 + + + REFRESH json schema request FAILED + @@ -302,14 +377,20 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + message="UNDEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + + 500 + + + UNDEPLOY request FAILED + @@ -339,14 +420,20 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + message="STOP request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + + 500 + + + STOP request FAILED + @@ -377,14 +464,20 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + message="RESTART request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + + 500 + + + RESTART request FAILED + @@ -479,14 +572,20 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + message="SUBMIT request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + + 500 + + + SUBMIT request FAILED + @@ -552,14 +651,20 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + message="DELETE request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + + 500 + + + DELETE request FAILED + @@ -584,21 +689,27 @@ + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request successfully executed','INFO',${exchangeProperty[loopObject]})" /> java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + message="GET STATUS request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + + 500 + + + GET STATUS request FAILED + @@ -627,14 +738,20 @@ java.lang.Exception - false + true + message="ADD operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + + 500 + + + ADD Operational policy request FAILED + @@ -657,14 +774,20 @@ java.lang.Exception - false + true + message="REMOVE operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + + 500 + + + REMOVE Operational policy request FAILED + @@ -691,14 +814,18 @@ true + + + 500 - - ERROR: ${exception.message} - - + + CREATE Loop from template FAILED + @@ -719,10 +846,18 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + 500 + + + GET Dictionary FAILED + @@ -744,10 +879,18 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + 500 + + + GET Dictionary FAILED + @@ -769,10 +912,18 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + 500 + + + GET Dictionary FAILED + @@ -796,10 +947,18 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + 500 + + + PUT Dictionary FAILED + @@ -826,10 +985,18 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + 500 + + + PUT Dictionary FAILED + @@ -850,10 +1017,18 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + 500 + + + DELETE Dictionary FAILED + @@ -876,10 +1051,18 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + 500 + + + DELETE Dictionary element FAILED + @@ -904,14 +1087,16 @@ true + + 500 - - ERROR: ${exception.message} - - + + GET Policy models FAILED + @@ -936,14 +1121,16 @@ true + + 500 - - ERROR: ${exception.message} - - + + GET Policy model FAILED + @@ -967,14 +1154,16 @@ true + + 500 - - ERROR: ${exception.message} - - + + GET Policy model YAML FAILED + @@ -1003,14 +1192,16 @@ true + + - 404 + 500 - - ERROR: ${exception.message} - - + + POST Policy model YAML FAILED + @@ -1039,14 +1230,16 @@ true - - 404 - - - ERROR: ${exception.message} - + + + 500 + + + MODIFY Policy model YAML FAILED + @@ -1071,14 +1264,16 @@ true + + 500 - - ERROR: ${exception.message} - - + + GET ALL templates FAILED + @@ -1103,14 +1298,16 @@ true + + 500 - - ERROR: ${exception.message} - - + + GET Template FAILED + @@ -1131,10 +1328,18 @@ java.lang.Exception - false + true + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + + + 500 + + + GET All Template names FAILED + @@ -1155,10 +1360,18 @@ java.lang.Exception - false + true + + + 500 + + + GET SVG for Template FAILED + diff --git a/src/main/resources/logback-default.xml b/src/main/resources/logback-default.xml index 4c496716..a91f9576 100644 --- a/src/main/resources/logback-default.xml +++ b/src/main/resources/logback-default.xml @@ -58,16 +58,12 @@ - ${outputDirectory}/clamp/error.%d{yyyy-MM-dd}.%i.log.zip + ${logDirectory}/error.%d{yyyy-MM-dd}.%i.log.zip 50MB - 30 - 10GB + 20 + 1GB - - 10MB - - ${outputDirectory}/clamp/debug.%d{yyyy-MM-dd}.%i.log.zip + ${logDirectory}/debug.%d{yyyy-MM-dd}.%i.log.zip 50MB - 30 - 10GB + 20 + 1GB @@ -100,15 +96,13 @@ - 10 - ${logDirectory}/audit.%i.log.zip + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + ${logDirectory}/audit.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 20 + 1GB - - 10MB - - 10 - ${logDirectory}/metric.%i.log.zip + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + ${logDirectory}/metric.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 20 + 1GB - - 10MB - + @@ -155,16 +148,15 @@ - 10 - ${logDirectory}/security.%i.log.zip + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + ${logDirectory}/security.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 20 + 1GB - - 10MB - + @@ -177,39 +169,34 @@ class="ch.qos.logback.core.rolling.RollingFileAppender"> - ${logDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + ${logDirectory}/Audits.log - ${logDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + ${logDirectory}/Audits-%d{yyyy-MM-dd}.%i.log.zip - 1 - 9 + 50MB + 20 + 1GB - - 5MB - "%d [%thread] %-5level %logger{1024} - %msg%n" + - ${logDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + ${logDirectory}/Perform.log - ${logDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + ${logDirectory}/Perform--%d{yyyy-MM-dd}.%i.log.zip - 1 - 9 + 50MB + 20 + 1GB - - 5MB - "%d [%thread] %-5level %logger{1024} - %msg%n" @@ -220,19 +207,30 @@ level="DEBUG"> + + + + + + + + level="INFO"> + level="INFO"> - + @@ -240,7 +238,6 @@ - diff --git a/src/main/resources/logback.xml b/src/main/resources/logback-spring.xml similarity index 100% rename from src/main/resources/logback.xml rename to src/main/resources/logback-spring.xml diff --git a/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java b/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java index b42ba987..7f3b5709 100644 --- a/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java +++ b/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java @@ -47,13 +47,15 @@ public class DcaeComponentTest { private Loop createTestLoop() { Loop loopTest = new Loop("ControlLoopTest", ""); loopTest.setGlobalPropertiesJson( - new Gson().fromJson("{\"dcaeDeployParameters\":{\"loop template blueprint\": {\"policy_id\": \"name\"}}}", JsonObject.class)); + new Gson().fromJson( + "{\"dcaeDeployParameters\":{\"uniqueBlueprintParameters\": {\"policy_id\": \"name\"}}}", + JsonObject.class)); loopTest.setLastComputedState(LoopState.DESIGN); loopTest.setDcaeDeploymentId("123456789"); loopTest.setDcaeDeploymentStatusUrl("http4://localhost:8085"); MicroServicePolicy microServicePolicy = new MicroServicePolicy("configPolicyTest", new PolicyModel("policy1", - "tosca_definitions_version: tosca_simple_yaml_1_0_0","1.0.0"), true, + "tosca_definitions_version: tosca_simple_yaml_1_0_0", "1.0.0"), true, new Gson().fromJson("{\"configtype\":\"json\"}", JsonObject.class), null, null, null); microServicePolicy.setConfigurationsJson(new Gson().fromJson("{\"param1\":\"value1\"}", JsonObject.class)); @@ -67,6 +69,7 @@ public class DcaeComponentTest { /** * Test the DcaeReponse roughly. + * * @throws IOException In case of issues */ @Test @@ -166,7 +169,8 @@ public class DcaeComponentTest { /** * Test the Converter to DcaeInventoryResponse method. - * @throws IOException In case of failure + * + * @throws IOException In case of failure * @throws ParseException In case of failure */ @Test diff --git a/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java b/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java index 98134e82..97fe337d 100644 --- a/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java +++ b/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java @@ -72,7 +72,7 @@ public class DeployFlowTestItCase { @Transactional public void deployWithSingleBlueprintTest() throws JsonSyntaxException, IOException { Loop loopTest = createLoop("ControlLoopTest", "", "yamlcontent", - "{\"dcaeDeployParameters\":{\"loop template blueprint\": {\"policy_id\": \"name\"}}}", + "{\"dcaeDeployParameters\":{\"uniqueBlueprintParameters\": {\"policy_id\": \"name\"}}}", "UUID-blueprint"); LoopTemplate template = new LoopTemplate(); template.setName("templateName"); diff --git a/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json b/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json index 494c2e4f..7140a474 100644 --- a/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json +++ b/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json @@ -1,9 +1,9 @@ { "dcaeDeployParameters": { - "loop template blueprint": { + "uniqueBlueprintParameters": { "location_id": "", "service_id": "", - "policy_id": "loop template blueprint" + "policy_id": "testName1" } } } \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file index 49f409ae..14ae7acd 100644 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file @@ -1,162 +1,360 @@ tosca_definitions_version: tosca_simple_yaml_1_1_0 policy_types: - onap.policies.controlloop.operational.common.Apex: - derived_from: onap.policies.controlloop.operational.Common - type_version: 1.0.0 - version: 1.0.0 - description: Operational policies for Apex PDP + onap.policies.controlloop.operational.Common: properties: - engineServiceParameters: - type: string - description: The engine parameters like name, instanceCount, policy implementation, parameters etc. + abatement: + name: abatement + type: boolean + typeVersion: 0.0.0 + description: Whether an abatement event message will be expected for + the control loop from DCAE. + default: 'false' required: true - eventInputParameters: - type: string - description: The event input parameters. + constraints: [ + ] + metadata: { + } + operations: + name: operations + type: list + typeVersion: 0.0.0 + description: List of operations to be performed when Control Loop + is triggered. required: true - eventOutputParameters: + constraints: [ + ] + entry_schema: + type: onap.datatype.controlloop.Operation + typeVersion: 0.0.0 + constraints: [ + ] + metadata: { + } + trigger: + name: trigger type: string - description: The event output parameters. + typeVersion: 0.0.0 + description: Initial operation to execute upon receiving an Onset + event message for the Control Loop. required: true - javaProperties: + constraints: [ + ] + metadata: { + } + timeout: + name: timeout + type: integer + typeVersion: 0.0.0 + description: | + Overall timeout for executing all the operations. This timeout should equal or exceed the total + timeout for each operation listed. + required: true + constraints: [ + ] + metadata: { + } + id: + name: id type: string - description: Name/value pairs of properties to be set for APEX if needed. - required: false - onap.policies.controlloop.operational.Common: - derived_from: tosca.policies.Root + typeVersion: 0.0.0 + description: The unique control loop id. + required: true + constraints: [ + ] + metadata: { + } + name: onap.policies.controlloop.operational.Common version: 1.0.0 + derived_from: tosca.policies.Root + metadata: { + } description: | Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant Policy Types. This does NOT support the legacy Policy YAML policy type. + onap.policies.controlloop.operational.common.Apex: properties: - id: + engineServiceParameters: + name: engineServiceParameters type: string - description: The unique control loop id. + typeVersion: 0.0.0 + description: The engine parameters like name, instanceCount, policy + implementation, parameters etc. required: true - timeout: - type: integer - description: | - Overall timeout for executing all the operations. This timeout should equal or exceed the total - timeout for each operation listed. - required: true - abatement: - type: boolean - description: Whether an abatement event message will be expected for the control loop from DCAE. - required: true - default: false - trigger: + constraints: [ + ] + metadata: { + } + eventOutputParameters: + name: eventOutputParameters type: string - description: Initial operation to execute upon receiving an Onset event message for the Control Loop. + typeVersion: 0.0.0 + description: The event output parameters. required: true - operations: - type: list - description: List of operations to be performed when Control Loop is triggered. + constraints: [ + ] + metadata: { + } + javaProperties: + name: javaProperties + type: string + typeVersion: 0.0.0 + description: Name/value pairs of properties to be set for APEX if + needed. + required: false + constraints: [ + ] + metadata: { + } + eventInputParameters: + name: eventInputParameters + type: string + typeVersion: 0.0.0 + description: The event input parameters. required: true - entry_schema: - type: onap.datatype.controlloop.Operation + constraints: [ + ] + metadata: { + } + name: onap.policies.controlloop.operational.common.Apex + version: 1.0.0 + derived_from: onap.policies.controlloop.operational.Common + metadata: { + } + description: Operational policies for Apex PDP data_types: - onap.datatype.controlloop.Target: - derived_from: tosca.datatypes.Root - description: Definition for a entity in A&AI to perform a control loop operation on + onap.datatype.controlloop.Actor: + constraints: [ + ] properties: - targetType: - type: string - description: Category for the target type - required: true - constraints: - - valid_values: [VNF, VM, VFMODULE, PNF] - entityIds: + payload: + name: payload type: map - description: | - Map of values that identify the resource. If none are provided, it is assumed that the - entity that generated the ONSET event will be the target. + typeVersion: 0.0.0 + description: Name/value pairs of payload information passed by Policy + to the actor required: false - metadata: - clamp_possible_values: ClampExecution:CSAR_RESOURCES + constraints: [ + ] entry_schema: type: string - - onap.datatype.controlloop.Actor: - derived_from: tosca.datatypes.Root - description: An actor/operation/target definition - properties: + typeVersion: 0.0.0 + constraints: [ + ] + metadata: + clamp_possible_values: ClampExecution:CDS/payload + target: + name: target + type: onap.datatype.controlloop.Target + typeVersion: 0.0.0 + description: The resource the operation should be performed on. + required: true + constraints: [ + ] + metadata: { + } actor: + name: actor type: string + typeVersion: 0.0.0 description: The actor performing the operation. required: true + constraints: [ + ] metadata: clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor operation: + name: operation type: string + typeVersion: 0.0.0 description: The operation the actor is performing. required: true + constraints: [ + ] metadata: - clamp_possible_values: Dictionary:DefaultOperations,ClampExecution:CDS/operation - target: - type: onap.datatype.controlloop.Target - description: The resource the operation should be performed on. - required: true - payload: - type: map - description: Name/value pairs of payload information passed by Policy to the actor - required: false - metadata: - clamp_possible_values: ClampExecution:CDS/payload - entry_schema: - type: string - - onap.datatype.controlloop.Operation: + clamp_possible_values: Dictionary:DefaultOperations, ClampExecution:CDS/operation + name: onap.datatype.controlloop.Actor + version: 0.0.0 derived_from: tosca.datatypes.Root - description: An operation supported by an actor + metadata: { + } + description: An actor/operation/target definition + onap.datatype.controlloop.Operation: + constraints: [ + ] properties: + failure_retries: + name: failure_retries + type: string + typeVersion: 0.0.0 + description: Points to the operation to invoke when the current operation + has exceeded its max retries. + default: final_failure_retries + required: false + constraints: [ + ] + metadata: { + } id: + name: id type: string + typeVersion: 0.0.0 description: Unique identifier for the operation required: true - description: + constraints: [ + ] + metadata: { + } + failure_timeout: + name: failure_timeout type: string - description: A user-friendly description of the intent for the operation + typeVersion: 0.0.0 + description: Points to the operation to invoke when the time out for + the operation occurs. + default: final_failure_timeout + required: false + constraints: [ + ] + metadata: { + } + failure: + name: failure + type: string + typeVersion: 0.0.0 + description: Points to the operation to invoke on Actor operation + failure. + default: final_failure required: false + constraints: [ + ] + metadata: { + } operation: + name: operation type: onap.datatype.controlloop.Actor + typeVersion: 0.0.0 description: The definition of the operation to be performed. required: true - timeout: + constraints: [ + ] + metadata: { + } + failure_guard: + name: failure_guard + type: string + typeVersion: 0.0.0 + description: Points to the operation to invoke when the current operation + is blocked due to guard policy enforcement. + default: final_failure_guard + required: false + constraints: [ + ] + metadata: { + } + retries: + name: retries type: integer - description: The amount of time for the actor to perform the operation. + typeVersion: 0.0.0 + description: The number of retries the actor should attempt to perform + the operation. + default: '0' required: true - retries: + constraints: [ + ] + metadata: { + } + timeout: + name: timeout type: integer - description: The number of retries the actor should attempt to perform the operation. + typeVersion: 0.0.0 + description: The amount of time for the actor to perform the operation. required: true - default: 0 - success: - type: string - description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation. - required: false - default: final_success - failure: + constraints: [ + ] + metadata: { + } + failure_exception: + name: failure_exception type: string - description: Points to the operation to invoke on Actor operation failure. + typeVersion: 0.0.0 + description: Points to the operation to invoke when the current operation + causes an exception. + default: final_failure_exception required: false - default: final_failure - failure_timeout: + constraints: [ + ] + metadata: { + } + description: + name: description type: string - description: Points to the operation to invoke when the time out for the operation occurs. + typeVersion: 0.0.0 + description: A user-friendly description of the intent for the operation required: false - default: final_failure_timeout - failure_retries: + constraints: [ + ] + metadata: { + } + success: + name: success type: string - description: Points to the operation to invoke when the current operation has exceeded its max retries. + typeVersion: 0.0.0 + description: Points to the operation to invoke on success. A value + of "final_success" indicates and end to the operation. + default: final_success required: false - default: final_failure_retries - failure_exception: - type: string - description: Points to the operation to invoke when the current operation causes an exception. + constraints: [ + ] + metadata: { + } + name: onap.datatype.controlloop.Operation + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: { + } + description: An operation supported by an actor + onap.datatype.controlloop.Target: + constraints: [ + ] + properties: + entityIds: + name: entityIds + type: map + typeVersion: 0.0.0 + description: | + Map of values that identify the resource. If none are provided, it is assumed that the + entity that generated the ONSET event will be the target. required: false - default: final_failure_exception - failure_guard: + constraints: [ + ] + entry_schema: + type: string + typeVersion: 0.0.0 + constraints: [ + ] + metadata: + clamp_possible_values: ClampExecution:CSAR_RESOURCES + targetType: + name: targetType type: string - description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement. - required: false - default: final_failure_guard \ No newline at end of file + typeVersion: 0.0.0 + description: Category for the target type + required: true + constraints: + - valid_values: + - VNF + - VM + - VFMODULE + - PNF + metadata: { + } + name: onap.datatype.controlloop.Target + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: { + } + description: Definition for a entity in A&AI to perform a control loop operation + on +name: ToscaServiceTemplateSimple +version: 1.0.0 +metadata: { + } diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml index c71bcba8..c47cab31 100644 --- a/src/test/resources/logback.xml +++ b/src/test/resources/logback.xml @@ -78,10 +78,14 @@ + level="INFO" > + + + level="INFO" > + + diff --git a/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json b/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json index 3fda1111..687e9b23 100644 --- a/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json +++ b/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json @@ -3,32 +3,20 @@ "type": "object", "description": "Operational policies for Apex PDP", "required": [ - "id", - "timeout", "abatement", - "trigger", "operations", + "trigger", + "timeout", + "id", "engineServiceParameters", - "eventInputParameters", - "eventOutputParameters" + "eventOutputParameters", + "eventInputParameters" ], "properties": { - "id": { - "type": "string", - "description": "The unique control loop id." - }, - "timeout": { - "type": "integer", - "description": "Overall timeout for executing all the operations. This timeout should equal or exceed the total\ntimeout for each operation listed.\n" - }, "abatement": { "type": "boolean", "description": "Whether an abatement event message will be expected for the control loop from DCAE.", - "default": false - }, - "trigger": { - "type": "string", - "description": "Initial operation to execute upon receiving an Onset event message for the Control Loop." + "default": "false" }, "operations": { "type": "array", @@ -40,88 +28,158 @@ "required": [ "id", "operation", - "timeout", - "retries" + "retries", + "timeout" ], "properties": { + "failure_retries": { + "type": "string", + "description": "Points to the operation to invoke when the current operation has exceeded its max retries.", + "default": "final_failure_retries" + }, "id": { "type": "string", "description": "Unique identifier for the operation" }, - "description": { + "failure_timeout": { "type": "string", - "description": "A user-friendly description of the intent for the operation" + "description": "Points to the operation to invoke when the time out for the operation occurs.", + "default": "final_failure_timeout" + }, + "failure": { + "type": "string", + "description": "Points to the operation to invoke on Actor operation failure.", + "default": "final_failure" }, "operation": { "title": "onap.datatype.controlloop.Actor", "type": "object", "description": "An actor/operation/target definition", "required": [ + "target", "actor", - "operation", - "target" + "operation" ], "properties": { - "actor": { - "type": "string", - "description": "The actor performing the operation.", - "enum": [ - "SDNR", - "SDNC", - "VFC", - "SO", - "APPC", - "CDS" - ], - "options": { - "enum_titles": [ - "SDNR", - "SDNC", - "VFC", - "SO", - "APPC" - ] - } - }, - "operation": { - "type": "string", - "description": "The operation the actor is performing.", + "payload": { + "type": "object", + "description": "Name/value pairs of payload information passed by Policy to the actor", "enum": [ - "BandwidthOnDemand", - "VF Module Delete", - "Reroute", - "VF Module Create", - "ModifyConfig", - "Rebuild", - "Restart", - "Migrate", - "Health-Check", - "resource-assignment", - "activate", - "activate-restconf", - "activate-cli", - "assign-activate", - "imperative-test-wf" - ], - "options": { - "enum_titles": [ - "BandwidthOnDemand (SDNC operation)", - "VF Module Delete (SO operation)", - "Reroute (SDNC operation)", - "VF Module Create (SO operation)", - "ModifyConfig (APPC/VFC operation)", - "Rebuild (APPC operation)", - "Restart (APPC operation)", - "Migrate (APPC operation)", - "Health-Check (APPC operation)", - "resource-assignment (CDS operation)", - "activate (CDS operation)", - "activate-restconf (CDS operation)", - "activate-cli (CDS operation)", - "assign-activate (CDS operation)", - "imperative-test-wf (CDS operation)" - ] - } + { + "title": "resource-assignment", + "properties": { + "artifact_name": "baseconfiguration", + "artifact_version": "1.0.0", + "mode": "async", + "data": { + "resource-assignment-properties": { + "request-id": "", + "service-instance-id": "", + "vnf-id": "", + "action-name": "", + "scope-type": "", + "hostname": "", + "vnf_name": "" + } + } + } + }, + { + "title": "activate", + "properties": { + "artifact_name": "baseconfiguration", + "artifact_version": "1.0.0", + "mode": "async", + "data": { + "resource-assignment-properties": { + "request-id": "", + "service-instance-id": "", + "vnf-id": "", + "action-name": "", + "scope-type": "", + "hostname": "", + "vnf_name": "" + } + } + } + }, + { + "title": "activate-restconf", + "properties": { + "artifact_name": "baseconfiguration", + "artifact_version": "1.0.0", + "mode": "async", + "data": { + "resource-assignment-properties": { + "request-id": "", + "service-instance-id": "", + "vnf-id": "", + "action-name": "", + "scope-type": "", + "hostname": "", + "vnf_name": "" + } + } + } + }, + { + "title": "activate-cli", + "properties": { + "artifact_name": "baseconfiguration", + "artifact_version": "1.0.0", + "mode": "async", + "data": { + "resource-assignment-properties": { + "request-id": "", + "service-instance-id": "", + "vnf-id": "", + "action-name": "", + "scope-type": "", + "hostname": "", + "vnf_name": "" + } + } + } + }, + { + "title": "assign-activate", + "properties": { + "artifact_name": "baseconfiguration", + "artifact_version": "1.0.0", + "mode": "async", + "data": { + "resource-assignment-properties": { + "request-id": "", + "service-instance-id": "", + "vnf-id": "", + "action-name": "", + "scope-type": "", + "hostname": "", + "vnf_name": "" + } + } + } + }, + { + "title": "imperative-test-wf", + "properties": { + "artifact_name": "baseconfiguration", + "artifact_version": "1.0.0", + "mode": "async", + "data": { + "resource-assignment-properties": { + "request-id": "", + "service-instance-id": "", + "vnf-id": "", + "action-name": "", + "scope-type": "", + "hostname": "", + "vnf_name": "" + } + } + } + } + ] }, "target": { "title": "onap.datatype.controlloop.Target", @@ -131,16 +189,6 @@ "targetType" ], "properties": { - "targetType": { - "type": "string", - "description": "Category for the target type", - "enum": [ - "VNF", - "VM", - "VFMODULE", - "PNF" - ] - }, "entityIds": { "type": "object", "description": "Map of values that identify the resource. If none are provided, it is assumed that the\nentity that generated the ONSET event will be the target.\n", @@ -321,180 +369,128 @@ } } ] + }, + "targetType": { + "type": "string", + "description": "Category for the target type", + "enum": [ + "VNF", + "VM", + "VFMODULE", + "PNF" + ] } } }, - "payload": { - "type": "object", - "description": "Name/value pairs of payload information passed by Policy to the actor", + "actor": { + "type": "string", + "description": "The actor performing the operation.", "enum": [ - { - "title": "resource-assignment", - "properties": { - "artifact_name": "baseconfiguration", - "artifact_version": "1.0.0", - "mode": "async", - "data": { - "resource-assignment-properties": { - "request-id": "", - "service-instance-id": "", - "vnf-id": "", - "action-name": "", - "scope-type": "", - "hostname": "", - "vnf_name": "" - } - } - } - }, - { - "title": "activate", - "properties": { - "artifact_name": "baseconfiguration", - "artifact_version": "1.0.0", - "mode": "async", - "data": { - "resource-assignment-properties": { - "request-id": "", - "service-instance-id": "", - "vnf-id": "", - "action-name": "", - "scope-type": "", - "hostname": "", - "vnf_name": "" - } - } - } - }, - { - "title": "activate-restconf", - "properties": { - "artifact_name": "baseconfiguration", - "artifact_version": "1.0.0", - "mode": "async", - "data": { - "resource-assignment-properties": { - "request-id": "", - "service-instance-id": "", - "vnf-id": "", - "action-name": "", - "scope-type": "", - "hostname": "", - "vnf_name": "" - } - } - } - }, - { - "title": "activate-cli", - "properties": { - "artifact_name": "baseconfiguration", - "artifact_version": "1.0.0", - "mode": "async", - "data": { - "resource-assignment-properties": { - "request-id": "", - "service-instance-id": "", - "vnf-id": "", - "action-name": "", - "scope-type": "", - "hostname": "", - "vnf_name": "" - } - } - } - }, - { - "title": "assign-activate", - "properties": { - "artifact_name": "baseconfiguration", - "artifact_version": "1.0.0", - "mode": "async", - "data": { - "resource-assignment-properties": { - "request-id": "", - "service-instance-id": "", - "vnf-id": "", - "action-name": "", - "scope-type": "", - "hostname": "", - "vnf_name": "" - } - } - } - }, - { - "title": "imperative-test-wf", - "properties": { - "artifact_name": "baseconfiguration", - "artifact_version": "1.0.0", - "mode": "async", - "data": { - "resource-assignment-properties": { - "request-id": "", - "service-instance-id": "", - "vnf-id": "", - "action-name": "", - "scope-type": "", - "hostname": "", - "vnf_name": "" - } - } - } - } - ] + "SDNR", + "SDNC", + "VFC", + "SO", + "APPC", + "CDS" + ], + "options": { + "enum_titles": [ + "SDNR", + "SDNC", + "VFC", + "SO", + "APPC" + ] + } + }, + "operation": { + "type": "string", + "description": "The operation the actor is performing.", + "enum": [ + "BandwidthOnDemand", + "VF Module Delete", + "Reroute", + "VF Module Create", + "ModifyConfig", + "Rebuild", + "Restart", + "Migrate", + "Health-Check", + "resource-assignment", + "activate", + "activate-restconf", + "activate-cli", + "assign-activate", + "imperative-test-wf" + ], + "options": { + "enum_titles": [ + "BandwidthOnDemand (SDNC operation)", + "VF Module Delete (SO operation)", + "Reroute (SDNC operation)", + "VF Module Create (SO operation)", + "ModifyConfig (APPC/VFC operation)", + "Rebuild (APPC operation)", + "Restart (APPC operation)", + "Migrate (APPC operation)", + "Health-Check (APPC operation)", + "resource-assignment (CDS operation)", + "activate (CDS operation)", + "activate-restconf (CDS operation)", + "activate-cli (CDS operation)", + "assign-activate (CDS operation)", + "imperative-test-wf (CDS operation)" + ] + } } } }, - "timeout": { - "type": "integer", - "description": "The amount of time for the actor to perform the operation." + "failure_guard": { + "type": "string", + "description": "Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.", + "default": "final_failure_guard" }, "retries": { "type": "integer", "description": "The number of retries the actor should attempt to perform the operation.", - "default": 0 + "default": "0" }, - "success": { - "type": "string", - "description": "Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.", - "default": "final_success" - }, - "failure": { - "type": "string", - "description": "Points to the operation to invoke on Actor operation failure.", - "default": "final_failure" - }, - "failure_timeout": { - "type": "string", - "description": "Points to the operation to invoke when the time out for the operation occurs.", - "default": "final_failure_timeout" - }, - "failure_retries": { - "type": "string", - "description": "Points to the operation to invoke when the current operation has exceeded its max retries.", - "default": "final_failure_retries" + "timeout": { + "type": "integer", + "description": "The amount of time for the actor to perform the operation." }, "failure_exception": { "type": "string", "description": "Points to the operation to invoke when the current operation causes an exception.", "default": "final_failure_exception" }, - "failure_guard": { + "description": { "type": "string", - "description": "Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.", - "default": "final_failure_guard" + "description": "A user-friendly description of the intent for the operation" + }, + "success": { + "type": "string", + "description": "Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.", + "default": "final_success" } } } }, - "engineServiceParameters": { + "trigger": { "type": "string", - "description": "The engine parameters like name, instanceCount, policy implementation, parameters etc." + "description": "Initial operation to execute upon receiving an Onset event message for the Control Loop." }, - "eventInputParameters": { + "timeout": { + "type": "integer", + "description": "Overall timeout for executing all the operations. This timeout should equal or exceed the total\ntimeout for each operation listed.\n" + }, + "id": { "type": "string", - "description": "The event input parameters." + "description": "The unique control loop id." + }, + "engineServiceParameters": { + "type": "string", + "description": "The engine parameters like name, instanceCount, policy implementation, parameters etc." }, "eventOutputParameters": { "type": "string", @@ -503,6 +499,10 @@ "javaProperties": { "type": "string", "description": "Name/value pairs of properties to be set for APEX if needed." + }, + "eventInputParameters": { + "type": "string", + "description": "The event input parameters." } } } \ No newline at end of file diff --git a/version.properties b/version.properties index f0688a75..be33a5eb 100644 --- a/version.properties +++ b/version.properties @@ -27,7 +27,7 @@ major=5 minor=0 -patch=1 +patch=2 base_version=${major}.${minor}.${patch}