diff options
author | sebdet <sebastien.determe@intl.att.com> | 2021-01-24 16:40:18 +0100 |
---|---|---|
committer | S�bastien Determe <sebastien.determe@intl.att.com> | 2021-02-08 14:41:24 +0000 |
commit | 9d04a9cc8c6f4b12ae60cc0d4d42f71085f72328 (patch) | |
tree | a6767d8304537ea649b75e4bf90987369ae2de6d | |
parent | d2178bc9f7d6c06f60a3a8afecd83e428d84cd78 (diff) |
Add new Camel route
Add the new rest endpoint in camel + add new permission type + add robot test for that route + small refactoring of trst files
Issue-ID: POLICY-2924
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: I623cc8ec1724513cdb92eeea000adca5c2433bae
-rwxr-xr-x | extra/bin-for-dev/start-backend.sh | 4 | ||||
-rw-r--r-- | extra/sql/dump/test-data.sql | 68 | ||||
-rw-r--r-- | src/main/java/org/onap/policy/clamp/clds/ClampServlet.java | 13 | ||||
-rw-r--r-- | src/main/resources/META-INF/resources/swagger.html | 269 | ||||
-rw-r--r-- | src/main/resources/application-noaaf.properties | 3 | ||||
-rw-r--r-- | src/main/resources/application.properties | 3 | ||||
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 2592 | ||||
-rw-r--r-- | src/main/resources/clds/clds-users.json | 63 | ||||
-rw-r--r-- | src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java | 11 | ||||
-rw-r--r-- | src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java | 4 | ||||
-rw-r--r-- | src/test/resources/application.properties | 16 | ||||
-rw-r--r-- | src/test/resources/example/policy/policy-merger.json | 215 | ||||
-rw-r--r-- | src/test/resources/https/https-test.properties | 3 | ||||
-rw-r--r-- | src/test/resources/robotframework/robotframework-test.properties | 15 | ||||
-rw-r--r-- | src/test/resources/robotframework/tests/02_policy_queries.robot | 21 |
15 files changed, 1824 insertions, 1476 deletions
diff --git a/extra/bin-for-dev/start-backend.sh b/extra/bin-for-dev/start-backend.sh index dc02ce42f..df513d263 100755 --- a/extra/bin-for-dev/start-backend.sh +++ b/extra/bin-for-dev/start-backend.sh @@ -4,7 +4,7 @@ # ============LICENSE_START======================================================= # ONAP CLAMP # ================================================================================ -# Copyright (C) 2019 AT&T Intellectual Property. All rights +# Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights # reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,4 +25,4 @@ # Start Clamp backend in DEBUG mode mkdir -p /var/log/onap -java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999 -jar ../../target/clamp.jar --spring.config.name=application-noaaf +java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999 -jar ../../target/policy-clamp-backend.jar --spring.config.name=application-noaaf diff --git a/extra/sql/dump/test-data.sql b/extra/sql/dump/test-data.sql index a48495c10..af28a77dd 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','2021-01-15 10:56:48.365792','Not found','2021-01-15 10:56:48.365792',0,''); -INSERT INTO `dictionary` VALUES ('DefaultOperations','Not found','2021-01-15 10:56:48.386324','Not found','2021-01-15 10:56:48.386324',0,''); +INSERT INTO `dictionary` VALUES ('DefaultActors','Not found','2021-01-23 23:57:03.183160','Not found','2021-01-23 23:57:03.183160',0,''); +INSERT INTO `dictionary` VALUES ('DefaultOperations','Not found','2021-01-23 23:57:03.205505','Not found','2021-01-23 23:57:03.205505',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','2021-01-15 10:56:48.376454','Not found','2021-01-15 10:56:48.376454','APPC component','APPC',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('BandwidthOnDemand (SDNC operation)','Not found','2021-01-15 10:56:48.387708','Not found','2021-01-15 10:56:48.387708','SDNC operation','BandwidthOnDemand',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('Health-Check (APPC operation)','Not found','2021-01-15 10:56:48.408522','Not found','2021-01-15 10:56:48.408522','APPC operation','Health-Check',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('Migrate (APPC operation)','Not found','2021-01-15 10:56:48.402067','Not found','2021-01-15 10:56:48.402067','APPC operation','Migrate',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('ModifyConfig (APPC/VFC operation)','Not found','2021-01-15 10:56:48.399080','Not found','2021-01-15 10:56:48.399080','APPC/VFC operation','ModifyConfig',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('Rebuild (APPC operation)','Not found','2021-01-15 10:56:48.397596','Not found','2021-01-15 10:56:48.397596','APPC operation','Rebuild',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('Reroute (SDNC operation)','Not found','2021-01-15 10:56:48.390314','Not found','2021-01-15 10:56:48.390314','SDNC operation','Reroute',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('Restart (APPC operation)','Not found','2021-01-15 10:56:48.400149','Not found','2021-01-15 10:56:48.400149','APPC operation','Restart',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('SDNC','Not found','2021-01-15 10:56:48.372550','Not found','2021-01-15 10:56:48.372550','SDNC component','SDNC',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('SDNR','Not found','2021-01-15 10:56:48.370966','Not found','2021-01-15 10:56:48.370966','SDNR component','SDNR',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('SO','Not found','2021-01-15 10:56:48.375127','Not found','2021-01-15 10:56:48.375127','SO component','SO',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('VF Module Create (SO operation)','Not found','2021-01-15 10:56:48.393003','Not found','2021-01-15 10:56:48.393003','SO operation','VF Module Create',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('VF Module Delete (SO operation)','Not found','2021-01-15 10:56:48.389170','Not found','2021-01-15 10:56:48.389170','SO operation','VF Module Delete',NULL,'string'); -INSERT INTO `dictionary_elements` VALUES ('VFC','Not found','2021-01-15 10:56:48.373841','Not found','2021-01-15 10:56:48.373841','VFC component','VFC',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('APPC','Not found','2021-01-23 23:57:03.192548','Not found','2021-01-23 23:57:03.192548','APPC component','APPC',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('BandwidthOnDemand (SDNC operation)','Not found','2021-01-23 23:57:03.206727','Not found','2021-01-23 23:57:03.206727','SDNC operation','BandwidthOnDemand',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('Health-Check (APPC operation)','Not found','2021-01-23 23:57:03.215614','Not found','2021-01-23 23:57:03.215614','APPC operation','Health-Check',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('Migrate (APPC operation)','Not found','2021-01-23 23:57:03.214508','Not found','2021-01-23 23:57:03.214508','APPC operation','Migrate',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('ModifyConfig (APPC/VFC operation)','Not found','2021-01-23 23:57:03.212162','Not found','2021-01-23 23:57:03.212162','APPC/VFC operation','ModifyConfig',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('Rebuild (APPC operation)','Not found','2021-01-23 23:57:03.211114','Not found','2021-01-23 23:57:03.211114','APPC operation','Rebuild',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('Reroute (SDNC operation)','Not found','2021-01-23 23:57:03.209061','Not found','2021-01-23 23:57:03.209061','SDNC operation','Reroute',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('Restart (APPC operation)','Not found','2021-01-23 23:57:03.213338','Not found','2021-01-23 23:57:03.213338','APPC operation','Restart',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('SDNC','Not found','2021-01-23 23:57:03.189717','Not found','2021-01-23 23:57:03.189717','SDNC component','SDNC',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('SDNR','Not found','2021-01-23 23:57:03.188323','Not found','2021-01-23 23:57:03.188323','SDNR component','SDNR',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('SO','Not found','2021-01-23 23:57:03.191576','Not found','2021-01-23 23:57:03.191576','SO component','SO',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('VF Module Create (SO operation)','Not found','2021-01-23 23:57:03.210095','Not found','2021-01-23 23:57:03.210095','SO operation','VF Module Create',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('VF Module Delete (SO operation)','Not found','2021-01-23 23:57:03.207974','Not found','2021-01-23 23:57:03.207974','SO operation','VF Module Delete',NULL,'string'); +INSERT INTO `dictionary_elements` VALUES ('VFC','Not found','2021-01-23 23:57:03.190663','Not found','2021-01-23 23:57:03.190663','VFC component','VFC',NULL,'string'); /*!40000 ALTER TABLE `dictionary_elements` ENABLE KEYS */; UNLOCK TABLES; @@ -93,8 +93,8 @@ 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,'2021-01-15 10:56:14.702408','Not found','2021-01-15 10:56:14.838843',NULL,NULL,'MICRO_SERVICE_TYPE',NULL); -INSERT INTO `loop_element_models` VALUES ('onap.policies.monitoring.tcagen2','Not found','2021-01-15 10:56:14.826028','Not found','2021-01-15 10:56:14.826028',NULL,NULL,'MICRO_SERVICE_TYPE',NULL); +INSERT INTO `loop_element_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app',NULL,'2021-01-23 23:56:25.418026','Not found','2021-01-23 23:56:25.588305',NULL,NULL,'MICRO_SERVICE_TYPE',NULL); +INSERT INTO `loop_element_models` VALUES ('onap.policies.monitoring.tcagen2','Not found','2021-01-23 23:56:25.574847','Not found','2021-01-23 23:56:25.574847',NULL,NULL,'MICRO_SERVICE_TYPE',NULL); /*!40000 ALTER TABLE `loop_element_models` ENABLE KEYS */; UNLOCK TABLES; @@ -113,10 +113,10 @@ UNLOCK TABLES; LOCK TABLES `loop_templates` WRITE; /*!40000 ALTER TABLE `loop_templates` DISABLE KEYS */; -INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_e0Ohb_v1_0_ResourceInstanceName1_tca','Not found','2021-01-15 10:56:14.762740','Not found','2021-01-15 10:56:14.762740','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-44c78676-0f36-4f59-b425-7c127f4d63b4',0,1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); -INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_e0Ohb_v1_0_ResourceInstanceName1_tca-guilin','Not found','2021-01-15 10:56:14.822924','Not found','2021-01-15 10:56:14.822924','CLOSED','# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 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#k8s-tca-gen2-v3.yaml\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n - plugin:k8splugin?version=3.4.2\n - plugin:clamppolicyplugin?version=1.1.0\ninputs:\n service_name:\n type: string\n default: \'dcae-tcagen2\'\n log_directory:\n type: string\n default: \"/opt/logs/dcae-analytics-tca\"\n replicas:\n type: integer\n description: number of instances\n default: 1\n spring.data.mongodb.uri:\n type: string\n default: \"mongodb://dcae-mongohost/dcae-tcagen2\"\n tag_version:\n type: string\n default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1\"\n tca.aai.password:\n type: string\n default: \"DCAE\"\n tca.aai.url:\n type: string\n default: \"http://aai.onap.svc.cluster.local\"\n tca.aai.username:\n type: string\n default: \"DCAE\"\n tca_handle_in_subscribe_url:\n type: string\n default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n tca_handle_out_publish_url:\n type: string\n default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n tca_consumer_group:\n type: string\n default: \"cg1\"\n policy_model_id:\n type: string\n default: \"onap.policies.monitoring.tcagen2\"\n policy_id:\n type: string\n default: \"onap.restart.tca\"\nnode_templates:\n docker.tca:\n type: dcae.nodes.ContainerizedServiceComponent\n relationships:\n - target: tcagen2_policy\n type: cloudify.relationships.depends_on\n interfaces:\n cloudify.interfaces.lifecycle:\n start:\n inputs:\n ports:\n - concat: [\"9091:\", \"0\"]\n properties:\n application_config:\n service_calls: []\n streams_publishes:\n tca_handle_out:\n dmaap_info:\n topic_url:\n get_input: tca_handle_out_publish_url\n type: message_router\n streams_subscribes:\n tca_handle_in:\n dmaap_info:\n topic_url:\n get_input: tca_handle_in_subscribe_url\n type: message_router\n spring.data.mongodb.uri:\n get_input: spring.data.mongodb.uri\n streams_subscribes.tca_handle_in.consumer_group:\n get_input: tca_consumer_group\n streams_subscribes.tca_handle_in.consumer_ids[0]: c0\n streams_subscribes.tca_handle_in.consumer_ids[1]: c1\n streams_subscribes.tca_handle_in.message_limit: 50000\n streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000\n streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000\n streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000\n streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000\n streams_subscribes.tca_handle_in.polling.fixed_rate: 0\n streams_subscribes.tca_handle_in.timeout: -1\n tca.aai.enable_enrichment: true\n tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf\n tca.aai.node_query_path: aai/v11/search/nodes-query\n tca.aai.password:\n get_input: tca.aai.password\n tca.aai.url:\n get_input: tca.aai.url\n tca.aai.username:\n get_input: tca.aai.username\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.processing_batch_size: 10000\n tca.enable_abatement: true\n tca.enable_ecomp_logging: true\n docker_config:\n healthcheck:\n endpoint: /actuator/health\n interval: 30s\n timeout: 10s\n type: http\n image:\n get_input: tag_version\n log_info:\n log_directory:\n get_input: log_directory\n tls_info:\n use_tls: true\n cert_directory: \'/etc/tca-gen2/ssl\'\n replicas:\n get_input: replicas\n service_component_type: { get_input: service_name }\n tcagen2_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-78708675-a6b3-4c24-98b6-9c2dcc014985',0,1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); -INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_e0Ohb_v1_0_ResourceInstanceName1_tca_3','Not found','2021-01-15 10:56:14.735402','Not found','2021-01-15 10:56:14.735402','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-704ddef0-11a6-4420-8aaa-8debf7e07b99',0,1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); -INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_e0Ohb_v1_0_ResourceInstanceName2_tca_2','Not found','2021-01-15 10:56:14.694319','Not found','2021-01-15 10:56:14.694319','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-2423630b-5264-4352-af63-02e1a4b98e59',0,1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); +INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_rwh4R_v1_0_ResourceInstanceName1_tca','Not found','2021-01-23 23:56:25.493848','Not found','2021-01-23 23:56:25.493848','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-e0183c43-7c8a-4e7f-bb07-835d7481681c',0,1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); +INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_rwh4R_v1_0_ResourceInstanceName1_tca-guilin','Not found','2021-01-23 23:56:25.568947','Not found','2021-01-23 23:56:25.568947','CLOSED','# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 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#k8s-tca-gen2-v3.yaml\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n - plugin:k8splugin?version=3.4.2\n - plugin:clamppolicyplugin?version=1.1.0\ninputs:\n service_name:\n type: string\n default: \'dcae-tcagen2\'\n log_directory:\n type: string\n default: \"/opt/logs/dcae-analytics-tca\"\n replicas:\n type: integer\n description: number of instances\n default: 1\n spring.data.mongodb.uri:\n type: string\n default: \"mongodb://dcae-mongohost/dcae-tcagen2\"\n tag_version:\n type: string\n default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1\"\n tca.aai.password:\n type: string\n default: \"DCAE\"\n tca.aai.url:\n type: string\n default: \"http://aai.onap.svc.cluster.local\"\n tca.aai.username:\n type: string\n default: \"DCAE\"\n tca_handle_in_subscribe_url:\n type: string\n default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n tca_handle_out_publish_url:\n type: string\n default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n tca_consumer_group:\n type: string\n default: \"cg1\"\n policy_model_id:\n type: string\n default: \"onap.policies.monitoring.tcagen2\"\n policy_id:\n type: string\n default: \"onap.restart.tca\"\nnode_templates:\n docker.tca:\n type: dcae.nodes.ContainerizedServiceComponent\n relationships:\n - target: tcagen2_policy\n type: cloudify.relationships.depends_on\n interfaces:\n cloudify.interfaces.lifecycle:\n start:\n inputs:\n ports:\n - concat: [\"9091:\", \"0\"]\n properties:\n application_config:\n service_calls: []\n streams_publishes:\n tca_handle_out:\n dmaap_info:\n topic_url:\n get_input: tca_handle_out_publish_url\n type: message_router\n streams_subscribes:\n tca_handle_in:\n dmaap_info:\n topic_url:\n get_input: tca_handle_in_subscribe_url\n type: message_router\n spring.data.mongodb.uri:\n get_input: spring.data.mongodb.uri\n streams_subscribes.tca_handle_in.consumer_group:\n get_input: tca_consumer_group\n streams_subscribes.tca_handle_in.consumer_ids[0]: c0\n streams_subscribes.tca_handle_in.consumer_ids[1]: c1\n streams_subscribes.tca_handle_in.message_limit: 50000\n streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000\n streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000\n streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000\n streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000\n streams_subscribes.tca_handle_in.polling.fixed_rate: 0\n streams_subscribes.tca_handle_in.timeout: -1\n tca.aai.enable_enrichment: true\n tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf\n tca.aai.node_query_path: aai/v11/search/nodes-query\n tca.aai.password:\n get_input: tca.aai.password\n tca.aai.url:\n get_input: tca.aai.url\n tca.aai.username:\n get_input: tca.aai.username\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.processing_batch_size: 10000\n tca.enable_abatement: true\n tca.enable_ecomp_logging: true\n docker_config:\n healthcheck:\n endpoint: /actuator/health\n interval: 30s\n timeout: 10s\n type: http\n image:\n get_input: tag_version\n log_info:\n log_directory:\n get_input: log_directory\n tls_info:\n use_tls: true\n cert_directory: \'/etc/tca-gen2/ssl\'\n replicas:\n get_input: replicas\n service_component_type: { get_input: service_name }\n tcagen2_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-1fd4d548-8d7b-4c24-8479-2b0d8d06866e',0,1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); +INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_rwh4R_v1_0_ResourceInstanceName1_tca_3','Not found','2021-01-23 23:56:25.456987','Not found','2021-01-23 23:56:25.456987','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-d9ffc490-9691-4937-86a8-f7062b6e505e',0,1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); +INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_rwh4R_v1_0_ResourceInstanceName2_tca_2','Not found','2021-01-23 23:56:25.410229','Not found','2021-01-23 23:56:25.410229','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-e845ddcd-074e-414f-9ed3-3f62b19956a8',0,1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); /*!40000 ALTER TABLE `loop_templates` ENABLE KEYS */; UNLOCK TABLES; @@ -155,10 +155,10 @@ 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_e0Ohb_v1_0_ResourceInstanceName1_tca',0); -INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_e0Ohb_v1_0_ResourceInstanceName1_tca_3',0); -INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_e0Ohb_v1_0_ResourceInstanceName2_tca_2',0); -INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.tcagen2','LOOP_TEMPLATE_e0Ohb_v1_0_ResourceInstanceName1_tca-guilin',0); +INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_rwh4R_v1_0_ResourceInstanceName1_tca',0); +INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_rwh4R_v1_0_ResourceInstanceName1_tca_3',0); +INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_rwh4R_v1_0_ResourceInstanceName2_tca_2',0); +INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.tcagen2','LOOP_TEMPLATE_rwh4R_v1_0_ResourceInstanceName1_tca-guilin',0); /*!40000 ALTER TABLE `looptemplates_to_loopelementmodels` ENABLE KEYS */; UNLOCK TABLES; @@ -186,13 +186,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','2021-01-15 10:56:22.176982','Not found','2021-01-15 10:56:22.273864','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','2021-01-15 10:56:22.155040','Not found','2021-01-15 10:56:22.281817','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','2021-01-15 10:56:22.197386','Not found','2021-01-15 10:56:22.197386','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','2021-01-15 10:56:22.130988','Not found','2021-01-15 10:56:22.287977','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','2021-01-15 10:56:22.095202','Not found','2021-01-15 10:56:22.296150','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','2021-01-15 10:56:14.641705','Not found','2021-01-15 10:56:22.306247','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.monitoring.tcagen2','1.0.0','Not found','2021-01-15 10:56:14.795221','Not found','2021-01-15 10:56:22.317396','tcagen2','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 name: onap.policies.Monitoring\n description: a base policy type for all policies that govern monitoring provisioning\n onap.policies.monitoring.tcagen2:\n derived_from: onap.policies.Monitoring\n version: 1.0.0\n name: onap.policies.monitoring.tcagen2\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.controlloop.guard.common.Blacklist','1.0.0','Not found','2021-01-23 23:56:32.963597','Not found','2021-01-23 23:56:33.101248','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','2021-01-23 23:56:32.937919','Not found','2021-01-23 23:56:33.101810','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','2021-01-23 23:56:32.986131','Not found','2021-01-23 23:56:32.986131','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','2021-01-23 23:56:32.914471','Not found','2021-01-23 23:56:33.102152','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','2021-01-23 23:56:32.877171','Not found','2021-01-23 23:56:33.102699','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','2021-01-23 23:56:25.365554','Not found','2021-01-23 23:56:33.103172','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.monitoring.tcagen2','1.0.0','Not found','2021-01-23 23:56:25.531567','Not found','2021-01-23 23:56:33.104041','tcagen2','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 name: onap.policies.Monitoring\n description: a base policy type for all policies that govern monitoring provisioning\n onap.policies.monitoring.tcagen2:\n derived_from: onap.policies.Monitoring\n version: 1.0.0\n name: onap.policies.monitoring.tcagen2\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}'); /*!40000 ALTER TABLE `policy_models` ENABLE KEYS */; UNLOCK TABLES; @@ -214,4 +214,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2021-01-15 9:57:18 +-- Dump completed on 2021-01-23 22:57:34 diff --git a/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java b/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java index 801f59c31..5149dd3b7 100644 --- a/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java +++ b/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2018 AT&T Intellectual Property. All rights + * Copyright (C) 2018, 2021 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Modifications Copyright (c) 2019 Samsung @@ -62,6 +62,7 @@ public class ClampServlet extends CamelHttpTransportServlet { private static final String PERM_VF = "clamp.config.security.permission.type.filter.vf"; private static final String PERM_MANAGE = "clamp.config.security.permission.type.cl.manage"; private static final String PERM_TOSCA = "clamp.config.security.permission.type.tosca"; + private static final String PERM_POLICIES = "clamp.config.security.permission.type.policies"; private static final String AUTHENTICATION_CLASS = "clamp.config.security.authentication.class"; private static final String READ = "read"; private static final String UPDATE = "update"; @@ -95,8 +96,14 @@ public class ClampServlet extends CamelHttpTransportServlet { permissionList.add(SecureServicePermission .create(applicationContext.getEnvironment().getProperty(PERM_TOSCA), cldsPermissionInstance, READ)); permissionList.add(SecureServicePermission - .create(applicationContext.getEnvironment().getProperty(PERM_TOSCA), - cldsPermissionInstance, UPDATE)); + .create(applicationContext.getEnvironment().getProperty(PERM_TOSCA), cldsPermissionInstance, + UPDATE)); + permissionList.add(SecureServicePermission + .create(applicationContext.getEnvironment().getProperty(PERM_POLICIES), cldsPermissionInstance, + READ)); + permissionList.add(SecureServicePermission + .create(applicationContext.getEnvironment().getProperty(PERM_POLICIES), cldsPermissionInstance, + UPDATE)); } return permissionList; } diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html index ab1d4fa1a..6712ab096 100644 --- a/src/main/resources/META-INF/resources/swagger.html +++ b/src/main/resources/META-INF/resources/swagger.html @@ -444,31 +444,31 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </li> <li><a href="#_paths">2. Paths</a> <ul class="sectlevel2"> -<li><a href="#_route107">2.1. GET /v1/healthcheck</a> +<li><a href="#_route184">2.1. GET /v1/healthcheck</a> <ul class="sectlevel3"> <li><a href="#_responses">2.1.1. Responses</a></li> <li><a href="#_produces">2.1.2. Produces</a></li> </ul> </li> -<li><a href="#_route108">2.2. GET /v1/user/getUser</a> +<li><a href="#_route185">2.2. GET /v1/user/getUser</a> <ul class="sectlevel3"> <li><a href="#_responses_2">2.2.1. Responses</a></li> <li><a href="#_produces_2">2.2.2. Produces</a></li> </ul> </li> -<li><a href="#_route106">2.3. GET /v2/clampInformation</a> +<li><a href="#_route183">2.3. GET /v2/clampInformation</a> <ul class="sectlevel3"> <li><a href="#_responses_3">2.3.1. Responses</a></li> <li><a href="#_produces_3">2.3.2. Produces</a></li> </ul> </li> -<li><a href="#_route91">2.4. GET /v2/dictionary</a> +<li><a href="#_route167">2.4. GET /v2/dictionary</a> <ul class="sectlevel3"> <li><a href="#_responses_4">2.4.1. Responses</a></li> <li><a href="#_produces_4">2.4.2. Produces</a></li> </ul> </li> -<li><a href="#_route94">2.5. PUT /v2/dictionary</a> +<li><a href="#_route170">2.5. PUT /v2/dictionary</a> <ul class="sectlevel3"> <li><a href="#_parameters">2.5.1. Parameters</a></li> <li><a href="#_responses_5">2.5.2. Responses</a></li> @@ -476,20 +476,20 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_5">2.5.4. Produces</a></li> </ul> </li> -<li><a href="#_route92">2.6. GET /v2/dictionary/secondary/names</a> +<li><a href="#_route168">2.6. GET /v2/dictionary/secondary/names</a> <ul class="sectlevel3"> <li><a href="#_responses_6">2.6.1. Responses</a></li> <li><a href="#_produces_6">2.6.2. Produces</a></li> </ul> </li> -<li><a href="#_route93">2.7. GET /v2/dictionary/{dictionaryName}</a> +<li><a href="#_route169">2.7. GET /v2/dictionary/{dictionaryName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_2">2.7.1. Parameters</a></li> <li><a href="#_responses_7">2.7.2. Responses</a></li> <li><a href="#_produces_7">2.7.3. Produces</a></li> </ul> </li> -<li><a href="#_route95">2.8. PUT /v2/dictionary/{name}</a> +<li><a href="#_route171">2.8. PUT /v2/dictionary/{name}</a> <ul class="sectlevel3"> <li><a href="#_parameters_3">2.8.1. Parameters</a></li> <li><a href="#_responses_8">2.8.2. Responses</a></li> @@ -497,28 +497,28 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_8">2.8.4. Produces</a></li> </ul> </li> -<li><a href="#_route96">2.9. DELETE /v2/dictionary/{name}</a> +<li><a href="#_route172">2.9. DELETE /v2/dictionary/{name}</a> <ul class="sectlevel3"> <li><a href="#_parameters_4">2.9.1. Parameters</a></li> <li><a href="#_responses_9">2.9.2. Responses</a></li> <li><a href="#_produces_9">2.9.3. Produces</a></li> </ul> </li> -<li><a href="#_route97">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a> +<li><a href="#_route173">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_5">2.10.1. Parameters</a></li> <li><a href="#_responses_10">2.10.2. Responses</a></li> <li><a href="#_produces_10">2.10.3. Produces</a></li> </ul> </li> -<li><a href="#_route88">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a> +<li><a href="#_route164">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a> <ul class="sectlevel3"> <li><a href="#_parameters_6">2.11.1. Parameters</a></li> <li><a href="#_responses_11">2.11.2. Responses</a></li> <li><a href="#_produces_11">2.11.3. Produces</a></li> </ul> </li> -<li><a href="#_route90">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a> +<li><a href="#_route166">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_7">2.12.1. Parameters</a></li> <li><a href="#_responses_12">2.12.2. Responses</a></li> @@ -526,82 +526,82 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_12">2.12.4. Produces</a></li> </ul> </li> -<li><a href="#_route86">2.13. PUT /v2/loop/delete/{loopName}</a> +<li><a href="#_route162">2.13. PUT /v2/loop/delete/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_8">2.13.1. Parameters</a></li> <li><a href="#_responses_13">2.13.2. Responses</a></li> </ul> </li> -<li><a href="#_route79">2.14. PUT /v2/loop/deploy/{loopName}</a> +<li><a href="#_route155">2.14. PUT /v2/loop/deploy/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_9">2.14.1. Parameters</a></li> <li><a href="#_responses_14">2.14.2. Responses</a></li> <li><a href="#_produces_13">2.14.3. Produces</a></li> </ul> </li> -<li><a href="#_route74">2.15. GET /v2/loop/getAllNames</a> +<li><a href="#_route150">2.15. GET /v2/loop/getAllNames</a> <ul class="sectlevel3"> <li><a href="#_responses_15">2.15.1. Responses</a></li> <li><a href="#_produces_14">2.15.2. Produces</a></li> </ul> </li> -<li><a href="#_route87">2.16. GET /v2/loop/getstatus/{loopName}</a> +<li><a href="#_route163">2.16. GET /v2/loop/getstatus/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_10">2.16.1. Parameters</a></li> <li><a href="#_responses_16">2.16.2. Responses</a></li> <li><a href="#_produces_15">2.16.3. Produces</a></li> </ul> </li> -<li><a href="#_route80">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a> +<li><a href="#_route156">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_11">2.17.1. Parameters</a></li> <li><a href="#_responses_17">2.17.2. Responses</a></li> <li><a href="#_produces_16">2.17.3. Produces</a></li> </ul> </li> -<li><a href="#_route81">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a> +<li><a href="#_route157">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_12">2.18.1. Parameters</a></li> <li><a href="#_responses_18">2.18.2. Responses</a></li> <li><a href="#_produces_17">2.18.3. Produces</a></li> </ul> </li> -<li><a href="#_route89">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a> +<li><a href="#_route165">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_13">2.19.1. Parameters</a></li> <li><a href="#_responses_19">2.19.2. Responses</a></li> <li><a href="#_produces_18">2.19.3. Produces</a></li> </ul> </li> -<li><a href="#_route84">2.20. PUT /v2/loop/restart/{loopName}</a> +<li><a href="#_route160">2.20. PUT /v2/loop/restart/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_14">2.20.1. Parameters</a></li> <li><a href="#_responses_20">2.20.2. Responses</a></li> <li><a href="#_produces_19">2.20.3. Produces</a></li> </ul> </li> -<li><a href="#_route83">2.21. PUT /v2/loop/stop/{loopName}</a> +<li><a href="#_route159">2.21. PUT /v2/loop/stop/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_15">2.21.1. Parameters</a></li> <li><a href="#_responses_21">2.21.2. Responses</a></li> <li><a href="#_produces_20">2.21.3. Produces</a></li> </ul> </li> -<li><a href="#_route85">2.22. PUT /v2/loop/submit/{loopName}</a> +<li><a href="#_route161">2.22. PUT /v2/loop/submit/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_16">2.22.1. Parameters</a></li> <li><a href="#_responses_22">2.22.2. Responses</a></li> <li><a href="#_produces_21">2.22.3. Produces</a></li> </ul> </li> -<li><a href="#_route82">2.23. PUT /v2/loop/undeploy/{loopName}</a> +<li><a href="#_route158">2.23. PUT /v2/loop/undeploy/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_17">2.23.1. Parameters</a></li> <li><a href="#_responses_23">2.23.2. Responses</a></li> <li><a href="#_produces_22">2.23.3. Produces</a></li> </ul> </li> -<li><a href="#_route76">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a> +<li><a href="#_route152">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_18">2.24.1. Parameters</a></li> <li><a href="#_responses_24">2.24.2. Responses</a></li> @@ -609,7 +609,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_23">2.24.4. Produces</a></li> </ul> </li> -<li><a href="#_route78">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a> +<li><a href="#_route154">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_19">2.25.1. Parameters</a></li> <li><a href="#_responses_25">2.25.2. Responses</a></li> @@ -617,7 +617,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_24">2.25.4. Produces</a></li> </ul> </li> -<li><a href="#_route77">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a> +<li><a href="#_route153">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_20">2.26.1. Parameters</a></li> <li><a href="#_responses_26">2.26.2. Responses</a></li> @@ -625,66 +625,72 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_25">2.26.4. Produces</a></li> </ul> </li> -<li><a href="#_route75">2.27. GET /v2/loop/{loopName}</a> +<li><a href="#_route151">2.27. GET /v2/loop/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_21">2.27.1. Parameters</a></li> <li><a href="#_responses_27">2.27.2. Responses</a></li> <li><a href="#_produces_26">2.27.3. Produces</a></li> </ul> </li> -<li><a href="#_route101">2.28. POST /v2/policyToscaModels</a> +<li><a href="#_route182">2.28. GET /v2/policies/list</a> <ul class="sectlevel3"> -<li><a href="#_parameters_22">2.28.1. Parameters</a></li> -<li><a href="#_responses_28">2.28.2. Responses</a></li> -<li><a href="#_consumes_7">2.28.3. Consumes</a></li> -<li><a href="#_produces_27">2.28.4. Produces</a></li> +<li><a href="#_responses_28">2.28.1. Responses</a></li> +<li><a href="#_produces_27">2.28.2. Produces</a></li> </ul> </li> -<li><a href="#_route98">2.29. GET /v2/policyToscaModels</a> +<li><a href="#_route177">2.29. POST /v2/policyToscaModels</a> <ul class="sectlevel3"> -<li><a href="#_responses_29">2.29.1. Responses</a></li> -<li><a href="#_produces_28">2.29.2. Produces</a></li> +<li><a href="#_parameters_22">2.29.1. Parameters</a></li> +<li><a href="#_responses_29">2.29.2. Responses</a></li> +<li><a href="#_consumes_7">2.29.3. Consumes</a></li> +<li><a href="#_produces_28">2.29.4. Produces</a></li> </ul> </li> -<li><a href="#_route100">2.30. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a> +<li><a href="#_route174">2.30. GET /v2/policyToscaModels</a> <ul class="sectlevel3"> -<li><a href="#_parameters_23">2.30.1. Parameters</a></li> -<li><a href="#_responses_30">2.30.2. Responses</a></li> -<li><a href="#_produces_29">2.30.3. Produces</a></li> +<li><a href="#_responses_30">2.30.1. Responses</a></li> +<li><a href="#_produces_29">2.30.2. Produces</a></li> </ul> </li> -<li><a href="#_route99">2.31. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a> +<li><a href="#_route176">2.31. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a> <ul class="sectlevel3"> -<li><a href="#_parameters_24">2.31.1. Parameters</a></li> +<li><a href="#_parameters_23">2.31.1. Parameters</a></li> <li><a href="#_responses_31">2.31.2. Responses</a></li> <li><a href="#_produces_30">2.31.3. Produces</a></li> </ul> </li> -<li><a href="#_route102">2.32. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a> +<li><a href="#_route175">2.32. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a> <ul class="sectlevel3"> -<li><a href="#_parameters_25">2.32.1. Parameters</a></li> +<li><a href="#_parameters_24">2.32.1. Parameters</a></li> <li><a href="#_responses_32">2.32.2. Responses</a></li> -<li><a href="#_consumes_8">2.32.3. Consumes</a></li> -<li><a href="#_produces_31">2.32.4. Produces</a></li> +<li><a href="#_produces_31">2.32.3. Produces</a></li> </ul> </li> -<li><a href="#_route103">2.33. GET /v2/templates</a> +<li><a href="#_route178">2.33. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a> <ul class="sectlevel3"> -<li><a href="#_responses_33">2.33.1. Responses</a></li> -<li><a href="#_produces_32">2.33.2. Produces</a></li> +<li><a href="#_parameters_25">2.33.1. Parameters</a></li> +<li><a href="#_responses_33">2.33.2. Responses</a></li> +<li><a href="#_consumes_8">2.33.3. Consumes</a></li> +<li><a href="#_produces_32">2.33.4. Produces</a></li> </ul> </li> -<li><a href="#_route105">2.34. GET /v2/templates/names</a> +<li><a href="#_route179">2.34. GET /v2/templates</a> <ul class="sectlevel3"> <li><a href="#_responses_34">2.34.1. Responses</a></li> <li><a href="#_produces_33">2.34.2. Produces</a></li> </ul> </li> -<li><a href="#_route104">2.35. GET /v2/templates/{templateName}</a> +<li><a href="#_route181">2.35. GET /v2/templates/names</a> <ul class="sectlevel3"> -<li><a href="#_parameters_26">2.35.1. Parameters</a></li> -<li><a href="#_responses_35">2.35.2. Responses</a></li> -<li><a href="#_produces_34">2.35.3. Produces</a></li> +<li><a href="#_responses_35">2.35.1. Responses</a></li> +<li><a href="#_produces_34">2.35.2. Produces</a></li> +</ul> +</li> +<li><a href="#_route180">2.36. GET /v2/templates/{templateName}</a> +<ul class="sectlevel3"> +<li><a href="#_parameters_26">2.36.1. Parameters</a></li> +<li><a href="#_responses_36">2.36.2. Responses</a></li> +<li><a href="#_produces_35">2.36.3. Produces</a></li> </ul> </li> </ul> @@ -723,13 +729,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <div class="sect2"> <h3 id="_version_information"><a class="anchor" href="#_version_information"></a><a class="link" href="#_version_information">1.1. Version information</a></h3> <div class="paragraph"> -<p><em>Version</em> : 5.1.5-SNAPSHOT</p> +<p><em>Version</em> : 6.0.0-SNAPSHOT</p> </div> </div> <div class="sect2"> <h3 id="_uri_scheme"><a class="anchor" href="#_uri_scheme"></a><a class="link" href="#_uri_scheme">1.2. URI scheme</a></h3> <div class="paragraph"> -<p><em>Host</em> : localhost:38837<br> +<p><em>Host</em> : localhost:40283<br> <em>BasePath</em> : /restservices/clds/<br> <em>Schemes</em> : HTTP</p> </div> @@ -740,7 +746,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <h2 id="_paths"><a class="anchor" href="#_paths"></a><a class="link" href="#_paths">2. Paths</a></h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_route107"><a class="anchor" href="#_route107"></a><a class="link" href="#_route107">2.1. GET /v1/healthcheck</a></h3> +<h3 id="_route184"><a class="anchor" href="#_route184"></a><a class="link" href="#_route184">2.1. GET /v1/healthcheck</a></h3> <div class="sect3"> <h4 id="_responses"><a class="anchor" href="#_responses"></a><a class="link" href="#_responses">2.1.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -777,7 +783,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route108"><a class="anchor" href="#_route108"></a><a class="link" href="#_route108">2.2. GET /v1/user/getUser</a></h3> +<h3 id="_route185"><a class="anchor" href="#_route185"></a><a class="link" href="#_route185">2.2. GET /v1/user/getUser</a></h3> <div class="sect3"> <h4 id="_responses_2"><a class="anchor" href="#_responses_2"></a><a class="link" href="#_responses_2">2.2.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -811,7 +817,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route106"><a class="anchor" href="#_route106"></a><a class="link" href="#_route106">2.3. GET /v2/clampInformation</a></h3> +<h3 id="_route183"><a class="anchor" href="#_route183"></a><a class="link" href="#_route183">2.3. GET /v2/clampInformation</a></h3> <div class="sect3"> <h4 id="_responses_3"><a class="anchor" href="#_responses_3"></a><a class="link" href="#_responses_3">2.3.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -848,7 +854,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route91"><a class="anchor" href="#_route91"></a><a class="link" href="#_route91">2.4. GET /v2/dictionary</a></h3> +<h3 id="_route167"><a class="anchor" href="#_route167"></a><a class="link" href="#_route167">2.4. GET /v2/dictionary</a></h3> <div class="sect3"> <h4 id="_responses_4"><a class="anchor" href="#_responses_4"></a><a class="link" href="#_responses_4">2.4.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -885,7 +891,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route94"><a class="anchor" href="#_route94"></a><a class="link" href="#_route94">2.5. PUT /v2/dictionary</a></h3> +<h3 id="_route170"><a class="anchor" href="#_route170"></a><a class="link" href="#_route170">2.5. PUT /v2/dictionary</a></h3> <div class="sect3"> <h4 id="_parameters"><a class="anchor" href="#_parameters"></a><a class="link" href="#_parameters">2.5.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -957,7 +963,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route92"><a class="anchor" href="#_route92"></a><a class="link" href="#_route92">2.6. GET /v2/dictionary/secondary/names</a></h3> +<h3 id="_route168"><a class="anchor" href="#_route168"></a><a class="link" href="#_route168">2.6. GET /v2/dictionary/secondary/names</a></h3> <div class="sect3"> <h4 id="_responses_6"><a class="anchor" href="#_responses_6"></a><a class="link" href="#_responses_6">2.6.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -994,7 +1000,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route93"><a class="anchor" href="#_route93"></a><a class="link" href="#_route93">2.7. GET /v2/dictionary/{dictionaryName}</a></h3> +<h3 id="_route169"><a class="anchor" href="#_route169"></a><a class="link" href="#_route169">2.7. GET /v2/dictionary/{dictionaryName}</a></h3> <div class="sect3"> <h4 id="_parameters_2"><a class="anchor" href="#_parameters_2"></a><a class="link" href="#_parameters_2">2.7.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1056,7 +1062,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route95"><a class="anchor" href="#_route95"></a><a class="link" href="#_route95">2.8. PUT /v2/dictionary/{name}</a></h3> +<h3 id="_route171"><a class="anchor" href="#_route171"></a><a class="link" href="#_route171">2.8. PUT /v2/dictionary/{name}</a></h3> <div class="sect3"> <h4 id="_parameters_3"><a class="anchor" href="#_parameters_3"></a><a class="link" href="#_parameters_3">2.8.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1134,7 +1140,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route96"><a class="anchor" href="#_route96"></a><a class="link" href="#_route96">2.9. DELETE /v2/dictionary/{name}</a></h3> +<h3 id="_route172"><a class="anchor" href="#_route172"></a><a class="link" href="#_route172">2.9. DELETE /v2/dictionary/{name}</a></h3> <div class="sect3"> <h4 id="_parameters_4"><a class="anchor" href="#_parameters_4"></a><a class="link" href="#_parameters_4">2.9.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1193,7 +1199,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route97"><a class="anchor" href="#_route97"></a><a class="link" href="#_route97">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a></h3> +<h3 id="_route173"><a class="anchor" href="#_route173"></a><a class="link" href="#_route173">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a></h3> <div class="sect3"> <h4 id="_parameters_5"><a class="anchor" href="#_parameters_5"></a><a class="link" href="#_parameters_5">2.10.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1258,7 +1264,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route88"><a class="anchor" href="#_route88"></a><a class="link" href="#_route88">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a></h3> +<h3 id="_route164"><a class="anchor" href="#_route164"></a><a class="link" href="#_route164">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a></h3> <div class="sect3"> <h4 id="_parameters_6"><a class="anchor" href="#_parameters_6"></a><a class="link" href="#_parameters_6">2.11.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1332,7 +1338,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route90"><a class="anchor" href="#_route90"></a><a class="link" href="#_route90">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a></h3> +<h3 id="_route166"><a class="anchor" href="#_route166"></a><a class="link" href="#_route166">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a></h3> <div class="sect3"> <h4 id="_parameters_7"><a class="anchor" href="#_parameters_7"></a><a class="link" href="#_parameters_7">2.12.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1404,7 +1410,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route86"><a class="anchor" href="#_route86"></a><a class="link" href="#_route86">2.13. PUT /v2/loop/delete/{loopName}</a></h3> +<h3 id="_route162"><a class="anchor" href="#_route162"></a><a class="link" href="#_route162">2.13. PUT /v2/loop/delete/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_8"><a class="anchor" href="#_parameters_8"></a><a class="link" href="#_parameters_8">2.13.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1453,7 +1459,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route79"><a class="anchor" href="#_route79"></a><a class="link" href="#_route79">2.14. PUT /v2/loop/deploy/{loopName}</a></h3> +<h3 id="_route155"><a class="anchor" href="#_route155"></a><a class="link" href="#_route155">2.14. PUT /v2/loop/deploy/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_9"><a class="anchor" href="#_parameters_9"></a><a class="link" href="#_parameters_9">2.14.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1515,7 +1521,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route74"><a class="anchor" href="#_route74"></a><a class="link" href="#_route74">2.15. GET /v2/loop/getAllNames</a></h3> +<h3 id="_route150"><a class="anchor" href="#_route150"></a><a class="link" href="#_route150">2.15. GET /v2/loop/getAllNames</a></h3> <div class="sect3"> <h4 id="_responses_15"><a class="anchor" href="#_responses_15"></a><a class="link" href="#_responses_15">2.15.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1552,7 +1558,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route87"><a class="anchor" href="#_route87"></a><a class="link" href="#_route87">2.16. GET /v2/loop/getstatus/{loopName}</a></h3> +<h3 id="_route163"><a class="anchor" href="#_route163"></a><a class="link" href="#_route163">2.16. GET /v2/loop/getstatus/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_10"><a class="anchor" href="#_parameters_10"></a><a class="link" href="#_parameters_10">2.16.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1614,7 +1620,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route80"><a class="anchor" href="#_route80"></a><a class="link" href="#_route80">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a></h3> +<h3 id="_route156"><a class="anchor" href="#_route156"></a><a class="link" href="#_route156">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a></h3> <div class="sect3"> <h4 id="_parameters_11"><a class="anchor" href="#_parameters_11"></a><a class="link" href="#_parameters_11">2.17.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1682,7 +1688,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route81"><a class="anchor" href="#_route81"></a><a class="link" href="#_route81">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a></h3> +<h3 id="_route157"><a class="anchor" href="#_route157"></a><a class="link" href="#_route157">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a></h3> <div class="sect3"> <h4 id="_parameters_12"><a class="anchor" href="#_parameters_12"></a><a class="link" href="#_parameters_12">2.18.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1750,7 +1756,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route89"><a class="anchor" href="#_route89"></a><a class="link" href="#_route89">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a></h3> +<h3 id="_route165"><a class="anchor" href="#_route165"></a><a class="link" href="#_route165">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a></h3> <div class="sect3"> <h4 id="_parameters_13"><a class="anchor" href="#_parameters_13"></a><a class="link" href="#_parameters_13">2.19.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1830,7 +1836,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route84"><a class="anchor" href="#_route84"></a><a class="link" href="#_route84">2.20. PUT /v2/loop/restart/{loopName}</a></h3> +<h3 id="_route160"><a class="anchor" href="#_route160"></a><a class="link" href="#_route160">2.20. PUT /v2/loop/restart/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_14"><a class="anchor" href="#_parameters_14"></a><a class="link" href="#_parameters_14">2.20.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1892,7 +1898,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route83"><a class="anchor" href="#_route83"></a><a class="link" href="#_route83">2.21. PUT /v2/loop/stop/{loopName}</a></h3> +<h3 id="_route159"><a class="anchor" href="#_route159"></a><a class="link" href="#_route159">2.21. PUT /v2/loop/stop/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_15"><a class="anchor" href="#_parameters_15"></a><a class="link" href="#_parameters_15">2.21.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1954,7 +1960,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route85"><a class="anchor" href="#_route85"></a><a class="link" href="#_route85">2.22. PUT /v2/loop/submit/{loopName}</a></h3> +<h3 id="_route161"><a class="anchor" href="#_route161"></a><a class="link" href="#_route161">2.22. PUT /v2/loop/submit/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_16"><a class="anchor" href="#_parameters_16"></a><a class="link" href="#_parameters_16">2.22.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2016,7 +2022,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route82"><a class="anchor" href="#_route82"></a><a class="link" href="#_route82">2.23. PUT /v2/loop/undeploy/{loopName}</a></h3> +<h3 id="_route158"><a class="anchor" href="#_route158"></a><a class="link" href="#_route158">2.23. PUT /v2/loop/undeploy/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_17"><a class="anchor" href="#_parameters_17"></a><a class="link" href="#_parameters_17">2.23.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2078,7 +2084,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route76"><a class="anchor" href="#_route76"></a><a class="link" href="#_route76">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3> +<h3 id="_route152"><a class="anchor" href="#_route152"></a><a class="link" href="#_route152">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_18"><a class="anchor" href="#_parameters_18"></a><a class="link" href="#_parameters_18">2.24.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2156,7 +2162,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route78"><a class="anchor" href="#_route78"></a><a class="link" href="#_route78">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3> +<h3 id="_route154"><a class="anchor" href="#_route154"></a><a class="link" href="#_route154">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_19"><a class="anchor" href="#_parameters_19"></a><a class="link" href="#_parameters_19">2.25.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2234,7 +2240,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route77"><a class="anchor" href="#_route77"></a><a class="link" href="#_route77">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3> +<h3 id="_route153"><a class="anchor" href="#_route153"></a><a class="link" href="#_route153">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_20"><a class="anchor" href="#_parameters_20"></a><a class="link" href="#_parameters_20">2.26.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2312,7 +2318,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route75"><a class="anchor" href="#_route75"></a><a class="link" href="#_route75">2.27. GET /v2/loop/{loopName}</a></h3> +<h3 id="_route151"><a class="anchor" href="#_route151"></a><a class="link" href="#_route151">2.27. GET /v2/loop/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_21"><a class="anchor" href="#_parameters_21"></a><a class="link" href="#_parameters_21">2.27.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2374,9 +2380,46 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route101"><a class="anchor" href="#_route101"></a><a class="link" href="#_route101">2.28. POST /v2/policyToscaModels</a></h3> +<h3 id="_route182"><a class="anchor" href="#_route182"></a><a class="link" href="#_route182">2.28. GET /v2/policies/list</a></h3> <div class="sect3"> -<h4 id="_parameters_22"><a class="anchor" href="#_parameters_22"></a><a class="link" href="#_parameters_22">2.28.1. Parameters</a></h4> +<h4 id="_responses_28"><a class="anchor" href="#_responses_28"></a><a class="link" href="#_responses_28">2.28.1. Responses</a></h4> +<table class="tableblock frame-all grid-all stretch"> +<colgroup> +<col style="width: 10%;"> +<col style="width: 70%;"> +<col style="width: 20%;"> +</colgroup> +<thead> +<tr> +<th class="tableblock halign-left valign-middle">HTTP Code</th> +<th class="tableblock halign-left valign-middle">Description</th> +<th class="tableblock halign-left valign-middle">Schema</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td> +<td class="tableblock halign-left valign-middle"><p class="tableblock">Output type</p></td> +<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td> +</tr> +</tbody> +</table> +</div> +<div class="sect3"> +<h4 id="_produces_27"><a class="anchor" href="#_produces_27"></a><a class="link" href="#_produces_27">2.28.2. Produces</a></h4> +<div class="ulist"> +<ul> +<li> +<p><code>application/json</code></p> +</li> +</ul> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_route177"><a class="anchor" href="#_route177"></a><a class="link" href="#_route177">2.29. POST /v2/policyToscaModels</a></h3> +<div class="sect3"> +<h4 id="_parameters_22"><a class="anchor" href="#_parameters_22"></a><a class="link" href="#_parameters_22">2.29.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 22.2222%;"> @@ -2401,7 +2444,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_responses_28"><a class="anchor" href="#_responses_28"></a><a class="link" href="#_responses_28">2.28.2. Responses</a></h4> +<h4 id="_responses_29"><a class="anchor" href="#_responses_29"></a><a class="link" href="#_responses_29">2.29.2. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 10%;"> @@ -2425,7 +2468,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_consumes_7"><a class="anchor" href="#_consumes_7"></a><a class="link" href="#_consumes_7">2.28.3. Consumes</a></h4> +<h4 id="_consumes_7"><a class="anchor" href="#_consumes_7"></a><a class="link" href="#_consumes_7">2.29.3. Consumes</a></h4> <div class="ulist"> <ul> <li> @@ -2435,7 +2478,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect3"> -<h4 id="_produces_27"><a class="anchor" href="#_produces_27"></a><a class="link" href="#_produces_27">2.28.4. Produces</a></h4> +<h4 id="_produces_28"><a class="anchor" href="#_produces_28"></a><a class="link" href="#_produces_28">2.29.4. Produces</a></h4> <div class="ulist"> <ul> <li> @@ -2446,9 +2489,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route98"><a class="anchor" href="#_route98"></a><a class="link" href="#_route98">2.29. GET /v2/policyToscaModels</a></h3> +<h3 id="_route174"><a class="anchor" href="#_route174"></a><a class="link" href="#_route174">2.30. GET /v2/policyToscaModels</a></h3> <div class="sect3"> -<h4 id="_responses_29"><a class="anchor" href="#_responses_29"></a><a class="link" href="#_responses_29">2.29.1. Responses</a></h4> +<h4 id="_responses_30"><a class="anchor" href="#_responses_30"></a><a class="link" href="#_responses_30">2.30.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 10%;"> @@ -2472,7 +2515,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_produces_28"><a class="anchor" href="#_produces_28"></a><a class="link" href="#_produces_28">2.29.2. Produces</a></h4> +<h4 id="_produces_29"><a class="anchor" href="#_produces_29"></a><a class="link" href="#_produces_29">2.30.2. Produces</a></h4> <div class="ulist"> <ul> <li> @@ -2483,9 +2526,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route100"><a class="anchor" href="#_route100"></a><a class="link" href="#_route100">2.30. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a></h3> +<h3 id="_route176"><a class="anchor" href="#_route176"></a><a class="link" href="#_route176">2.31. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a></h3> <div class="sect3"> -<h4 id="_parameters_23"><a class="anchor" href="#_parameters_23"></a><a class="link" href="#_parameters_23">2.30.1. Parameters</a></h4> +<h4 id="_parameters_23"><a class="anchor" href="#_parameters_23"></a><a class="link" href="#_parameters_23">2.31.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 22.2222%;"> @@ -2516,7 +2559,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_responses_30"><a class="anchor" href="#_responses_30"></a><a class="link" href="#_responses_30">2.30.2. Responses</a></h4> +<h4 id="_responses_31"><a class="anchor" href="#_responses_31"></a><a class="link" href="#_responses_31">2.31.2. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 10%;"> @@ -2540,7 +2583,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_produces_29"><a class="anchor" href="#_produces_29"></a><a class="link" href="#_produces_29">2.30.3. Produces</a></h4> +<h4 id="_produces_30"><a class="anchor" href="#_produces_30"></a><a class="link" href="#_produces_30">2.31.3. Produces</a></h4> <div class="ulist"> <ul> <li> @@ -2551,9 +2594,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route99"><a class="anchor" href="#_route99"></a><a class="link" href="#_route99">2.31. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3> +<h3 id="_route175"><a class="anchor" href="#_route175"></a><a class="link" href="#_route175">2.32. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3> <div class="sect3"> -<h4 id="_parameters_24"><a class="anchor" href="#_parameters_24"></a><a class="link" href="#_parameters_24">2.31.1. Parameters</a></h4> +<h4 id="_parameters_24"><a class="anchor" href="#_parameters_24"></a><a class="link" href="#_parameters_24">2.32.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 22.2222%;"> @@ -2584,7 +2627,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_responses_31"><a class="anchor" href="#_responses_31"></a><a class="link" href="#_responses_31">2.31.2. Responses</a></h4> +<h4 id="_responses_32"><a class="anchor" href="#_responses_32"></a><a class="link" href="#_responses_32">2.32.2. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 10%;"> @@ -2608,7 +2651,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_produces_30"><a class="anchor" href="#_produces_30"></a><a class="link" href="#_produces_30">2.31.3. Produces</a></h4> +<h4 id="_produces_31"><a class="anchor" href="#_produces_31"></a><a class="link" href="#_produces_31">2.32.3. Produces</a></h4> <div class="ulist"> <ul> <li> @@ -2619,9 +2662,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route102"><a class="anchor" href="#_route102"></a><a class="link" href="#_route102">2.32. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3> +<h3 id="_route178"><a class="anchor" href="#_route178"></a><a class="link" href="#_route178">2.33. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3> <div class="sect3"> -<h4 id="_parameters_25"><a class="anchor" href="#_parameters_25"></a><a class="link" href="#_parameters_25">2.32.1. Parameters</a></h4> +<h4 id="_parameters_25"><a class="anchor" href="#_parameters_25"></a><a class="link" href="#_parameters_25">2.33.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 22.2222%;"> @@ -2658,7 +2701,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_responses_32"><a class="anchor" href="#_responses_32"></a><a class="link" href="#_responses_32">2.32.2. Responses</a></h4> +<h4 id="_responses_33"><a class="anchor" href="#_responses_33"></a><a class="link" href="#_responses_33">2.33.2. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 10%;"> @@ -2682,7 +2725,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_consumes_8"><a class="anchor" href="#_consumes_8"></a><a class="link" href="#_consumes_8">2.32.3. Consumes</a></h4> +<h4 id="_consumes_8"><a class="anchor" href="#_consumes_8"></a><a class="link" href="#_consumes_8">2.33.3. Consumes</a></h4> <div class="ulist"> <ul> <li> @@ -2692,7 +2735,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect3"> -<h4 id="_produces_31"><a class="anchor" href="#_produces_31"></a><a class="link" href="#_produces_31">2.32.4. Produces</a></h4> +<h4 id="_produces_32"><a class="anchor" href="#_produces_32"></a><a class="link" href="#_produces_32">2.33.4. Produces</a></h4> <div class="ulist"> <ul> <li> @@ -2703,9 +2746,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route103"><a class="anchor" href="#_route103"></a><a class="link" href="#_route103">2.33. GET /v2/templates</a></h3> +<h3 id="_route179"><a class="anchor" href="#_route179"></a><a class="link" href="#_route179">2.34. GET /v2/templates</a></h3> <div class="sect3"> -<h4 id="_responses_33"><a class="anchor" href="#_responses_33"></a><a class="link" href="#_responses_33">2.33.1. Responses</a></h4> +<h4 id="_responses_34"><a class="anchor" href="#_responses_34"></a><a class="link" href="#_responses_34">2.34.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 10%;"> @@ -2729,7 +2772,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_produces_32"><a class="anchor" href="#_produces_32"></a><a class="link" href="#_produces_32">2.33.2. Produces</a></h4> +<h4 id="_produces_33"><a class="anchor" href="#_produces_33"></a><a class="link" href="#_produces_33">2.34.2. Produces</a></h4> <div class="ulist"> <ul> <li> @@ -2740,9 +2783,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route105"><a class="anchor" href="#_route105"></a><a class="link" href="#_route105">2.34. GET /v2/templates/names</a></h3> +<h3 id="_route181"><a class="anchor" href="#_route181"></a><a class="link" href="#_route181">2.35. GET /v2/templates/names</a></h3> <div class="sect3"> -<h4 id="_responses_34"><a class="anchor" href="#_responses_34"></a><a class="link" href="#_responses_34">2.34.1. Responses</a></h4> +<h4 id="_responses_35"><a class="anchor" href="#_responses_35"></a><a class="link" href="#_responses_35">2.35.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 10%;"> @@ -2766,7 +2809,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_produces_33"><a class="anchor" href="#_produces_33"></a><a class="link" href="#_produces_33">2.34.2. Produces</a></h4> +<h4 id="_produces_34"><a class="anchor" href="#_produces_34"></a><a class="link" href="#_produces_34">2.35.2. Produces</a></h4> <div class="ulist"> <ul> <li> @@ -2777,9 +2820,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route104"><a class="anchor" href="#_route104"></a><a class="link" href="#_route104">2.35. GET /v2/templates/{templateName}</a></h3> +<h3 id="_route180"><a class="anchor" href="#_route180"></a><a class="link" href="#_route180">2.36. GET /v2/templates/{templateName}</a></h3> <div class="sect3"> -<h4 id="_parameters_26"><a class="anchor" href="#_parameters_26"></a><a class="link" href="#_parameters_26">2.35.1. Parameters</a></h4> +<h4 id="_parameters_26"><a class="anchor" href="#_parameters_26"></a><a class="link" href="#_parameters_26">2.36.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 22.2222%;"> @@ -2804,7 +2847,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_responses_35"><a class="anchor" href="#_responses_35"></a><a class="link" href="#_responses_35">2.35.2. Responses</a></h4> +<h4 id="_responses_36"><a class="anchor" href="#_responses_36"></a><a class="link" href="#_responses_36">2.36.2. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> <colgroup> <col style="width: 10%;"> @@ -2828,7 +2871,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </table> </div> <div class="sect3"> -<h4 id="_produces_34"><a class="anchor" href="#_produces_34"></a><a class="link" href="#_produces_34">2.35.3. Produces</a></h4> +<h4 id="_produces_35"><a class="anchor" href="#_produces_35"></a><a class="link" href="#_produces_35">2.36.3. Produces</a></h4> <div class="ulist"> <ul> <li> diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties index ba838adb8..f398f8d98 100644 --- a/src/main/resources/application-noaaf.properties +++ b/src/main/resources/application-noaaf.properties @@ -2,7 +2,7 @@ # ============LICENSE_START======================================================= # ONAP CLAMP # ================================================================================ -# Copyright (C) 2017-2019 AT&T Intellectual Property. All rights +# Copyright (C) 2017-2019,2021 AT&T Intellectual Property. All rights # reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -171,6 +171,7 @@ clamp.config.security.permission.type.cl.event=org.onap.clamp.clds.cl.event clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf clamp.config.security.permission.type.template=org.onap.clamp.clds.template clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca +clamp.config.security.permission.type.policies=org.onap.clamp.clds.policies #This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties clamp.config.security.permission.instance=dev clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal, org.onap.aaf.cadi.principal.CachedBasicPrincipal diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 7d2d4ef1b..97870d2b6 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,7 +2,7 @@ # ============LICENSE_START======================================================= # ONAP CLAMP # ================================================================================ -# Copyright (C) 2017-2019 AT&T Intellectual Property. All rights +# Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights # reserved. # ================================================================================ # Modifications copyright (c) 2019 Nokia @@ -174,6 +174,7 @@ clamp.config.security.permission.type.cl.event=org.onap.clamp.clds.cl.event clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf clamp.config.security.permission.type.template=org.onap.clamp.clds.template clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca +clamp.config.security.permission.type.policies=org.onap.clamp.clds.policies #This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties clamp.config.security.permission.instance=dev clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal, org.onap.aaf.cadi.principal.CachedBasicPrincipal 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 c43f3297d..011c24a9d 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -1,1322 +1,1368 @@ <rests xmlns="http://camel.apache.org/schema/spring"> - <rest> - <get uri="/v2/loop/getAllNames" outType="java.lang.String[]" - produces="application/json"> - <route> - <removeHeaders pattern="*" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=getLoopNames()" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET All Loop names FAILED: ${exception.stacktrace}" /> + <rest> + <get uri="/v2/loop/getAllNames" outType="java.lang.String[]" + produces="application/json"> + <route> + <removeHeaders pattern="*"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')"/> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=getLoopNames()"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET All Loop names FAILED: ${exception.stacktrace}"/> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET All Loop names FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> - <get uri="/v2/loop/{loopName}" outType="org.onap.policy.clamp.loop.Loop" - produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Loop')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET Loop request failed for loop: ${header.loopName}, ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET All Loop names FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + <get uri="/v2/loop/{loopName}" outType="org.onap.policy.clamp.loop.Loop" + produces="application/json"> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Loop')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')"/> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=getLoop(${header.loopName})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET Loop request failed for loop: ${header.loopName}, ${exception.stacktrace}"/> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET Loop FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Loop FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> - <post uri="/v2/loop/updateGlobalProperties/{loopName}" + <post uri="/v2/loop/updateGlobalProperties/{loopName}" type="com.google.gson.JsonObject" consumes="application/json" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <setHeader headerName="GlobalPropertiesJson"> - <simple>${body}</simple> - </setHeader> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="UPDATE Global properties FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <setHeader headerName="GlobalPropertiesJson"> + <simple>${body}</simple> + </setHeader> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="UPDATE Global properties FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>UPDATE Global properties FAILED </simple> - </setBody> - </doCatch> - </doTry> - </route> - </post> - <post uri="/v2/loop/updateOperationalPolicies/{loopName}" + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>UPDATE Global properties FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </post> + <post uri="/v2/loop/updateOperationalPolicies/{loopName}" type="com.google.gson.JsonArray" consumes="application/json" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <setHeader headerName="OperationalPoliciesArray"> - <simple>${body}</simple> - </setHeader> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Operational policies UPDATED','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="UPDATE Operational policies FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UPDATE Operational policies request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" /> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <setHeader headerName="OperationalPoliciesArray"> + <simple>${body}</simple> + </setHeader> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Operational policies UPDATED','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="UPDATE Operational policies FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UPDATE Operational policies request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})"/> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>UPDATE Operational policies FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </post> - <post uri="/v2/loop/updateMicroservicePolicy/{loopName}" - type="org.onap.policy.clamp.policy.microservice.MicroServicePolicy" - consumes="application/json" - outType="org.onap.policy.clamp.policy.microservice.MicroServicePolicy" - produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <setProperty propertyName="MicroServicePolicyObject"> - <simple>${body}</simple> - </setProperty> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>UPDATE Operational policies FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </post> + <post uri="/v2/loop/updateMicroservicePolicy/{loopName}" + type="org.onap.policy.clamp.policy.microservice.MicroServicePolicy" + consumes="application/json" + outType="org.onap.policy.clamp.policy.microservice.MicroServicePolicy" + produces="application/json"> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <setProperty propertyName="MicroServicePolicyObject"> + <simple>${body}</simple> + </setProperty> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${exchangeProperty[MicroServicePolicyObject]})" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="UPDATE MicroService policy FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UPDATE MicroService policy request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>UPDATE MicroService policy FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </post> - <put uri="/v2/loop/deploy/{loopName}" + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${exchangeProperty[MicroServicePolicyObject]})"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="UPDATE MicroService policy FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UPDATE MicroService policy request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>UPDATE MicroService policy FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </post> + <put uri="/v2/loop/deploy/{loopName}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <log loggingLevel="INFO" - message="DCAE DEPLOY request for loop: ${header.loopName}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">true</simple> - </setProperty> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE DEPLOY request')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DCAE DEPLOY request','INFO',${exchangeProperty[loopObject]})" /> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <log loggingLevel="INFO" + message="DCAE DEPLOY request for loop: ${header.loopName}"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">true</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE DEPLOY request')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DCAE DEPLOY request','INFO',${exchangeProperty[loopObject]})"/> - <to uri="direct:deploy-loop" /> + <to uri="direct:deploy-loop"/> - <log loggingLevel="INFO" - message="DEPLOY request successfully executed for loop: ${header.loopName}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="DEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>DEPLOY request FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> - <put uri="/v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}" + <log loggingLevel="INFO" + message="DEPLOY request successfully executed for loop: ${header.loopName}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="DEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>DEPLOY request FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> + <put uri="/v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName|microServicePolicyName" /> - <doTry> - <log loggingLevel="INFO" - message="Refresh Micro Service Policy UI for loop: ${header.loopName} and ${header.microServicePolicyName}" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Micro Service Policy UI request')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.cds.CdsDataInstaller?method=updateCdsServiceProperties(${exchangeProperty[loopObject].getModelService()})" /> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=refreshMicroServicePolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.microServicePolicyName})" /> - <log loggingLevel="INFO" - message="REFRESH Micro Service policy request successfully executed for loop: ${header.loopName}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Micro Service policy request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>REFRESH json schema request FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> - <put uri="/v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}" + <route> + <removeHeaders pattern="*" excludePattern="loopName|microServicePolicyName"/> + <doTry> + <log loggingLevel="INFO" + message="Refresh Micro Service Policy UI for loop: ${header.loopName} and ${header.microServicePolicyName}"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Micro Service Policy UI request')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.cds.CdsDataInstaller?method=updateCdsServiceProperties(${exchangeProperty[loopObject].getModelService()})"/> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=refreshMicroServicePolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.microServicePolicyName})"/> + <log loggingLevel="INFO" + message="REFRESH Micro Service policy request successfully executed for loop: ${header.loopName}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Micro Service policy request successfully executed','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>REFRESH json schema request FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> + <put uri="/v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName|operationalPolicyName" /> - <doTry> - <log loggingLevel="INFO" - message="Refresh Operational Policy UI for loop: ${header.loopName} and ${header.operationalPolicyName}" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Operational Policy UI request')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.cds.CdsDataInstaller?method=updateCdsServiceProperties(${exchangeProperty[loopObject].getModelService()})" /> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=refreshOperationalPolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.operationalPolicyName})" /> - <log loggingLevel="INFO" - message="REFRESH operational policy request successfully executed for loop: ${header.loopName}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH operational policy request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>REFRESH json schema request FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> - <put uri="/v2/loop/undeploy/{loopName}" + <route> + <removeHeaders pattern="*" excludePattern="loopName|operationalPolicyName"/> + <doTry> + <log loggingLevel="INFO" + message="Refresh Operational Policy UI for loop: ${header.loopName} and ${header.operationalPolicyName}"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Operational Policy UI request')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.cds.CdsDataInstaller?method=updateCdsServiceProperties(${exchangeProperty[loopObject].getModelService()})"/> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=refreshOperationalPolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.operationalPolicyName})"/> + <log loggingLevel="INFO" + message="REFRESH operational policy request successfully executed for loop: ${header.loopName}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH operational policy request successfully executed','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>REFRESH json schema request FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> + <put uri="/v2/loop/undeploy/{loopName}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <log loggingLevel="INFO" - message="DCAE UNDEPLOY request for loop: ${header.loopName}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">true</simple> - </setProperty> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE UNDEPLOY request')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DCAE UNDEPLOY request','INFO',${exchangeProperty[loopObject]})" /> - <to uri="direct:undeploy-loop" /> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <log loggingLevel="INFO" + message="DCAE UNDEPLOY request for loop: ${header.loopName}"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">true</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE UNDEPLOY request')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DCAE UNDEPLOY request','INFO',${exchangeProperty[loopObject]})"/> + <to uri="direct:undeploy-loop"/> - <log loggingLevel="INFO" - message="UNDEPLOY request successfully executed for loop: ${header.loopName}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="UNDEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>UNDEPLOY request FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> - <put uri="/v2/loop/stop/{loopName}" + <log loggingLevel="INFO" + message="UNDEPLOY request successfully executed for loop: ${header.loopName}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="UNDEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>UNDEPLOY request FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> + <put uri="/v2/loop/stop/{loopName}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <log loggingLevel="INFO" - message="STOP request for loop: ${header.loopName}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">true</simple> - </setProperty> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'STOP request')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request','INFO',${exchangeProperty[loopObject]})" /> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <log loggingLevel="INFO" + message="STOP request for loop: ${header.loopName}"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">true</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'STOP request')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request','INFO',${exchangeProperty[loopObject]})"/> - <to uri="direct:remove-all-policy-from-active-pdp-group" /> - <log loggingLevel="INFO" - message="STOP request successfully executed for loop: ${header.loopName}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="STOP request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>STOP request FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> - <put uri="/v2/loop/restart/{loopName}" + <to uri="direct:remove-all-policy-from-active-pdp-group"/> + <log loggingLevel="INFO" + message="STOP request successfully executed for loop: ${header.loopName}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="STOP request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>STOP request FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> + <put uri="/v2/loop/restart/{loopName}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <log loggingLevel="INFO" - message="RESTART request for loop: ${header.loopName}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">true</simple> - </setProperty> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'RESTART request')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to uri="direct:load-loop" /> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <log loggingLevel="INFO" + message="RESTART request for loop: ${header.loopName}"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">true</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'RESTART request')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:load-loop"/> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request','INFO',${exchangeProperty[loopObject]})" /> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request','INFO',${exchangeProperty[loopObject]})"/> - <to uri="direct:add-all-to-active-pdp-group" /> - <log loggingLevel="INFO" - message="RESTART request successfully executed for loop: ${header.loopName}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="RESTART request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>RESTART request FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> - <put uri="/v2/loop/submit/{loopName}" + <to uri="direct:add-all-to-active-pdp-group"/> + <log loggingLevel="INFO" + message="RESTART request successfully executed for loop: ${header.loopName}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request successfully executed','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="RESTART request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>RESTART request FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> + <put uri="/v2/loop/submit/{loopName}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <log loggingLevel="INFO" - message="POLICY SUBMIT request for loop: ${header.loopName}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">true</simple> - </setProperty> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'POLICY SUBMIT request')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('POLICY SUBMIT request','INFO',${exchangeProperty[loopObject]})" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">false</simple> - </setProperty> - <to uri="direct:remove-all-policy-from-active-pdp-group" /> - <log loggingLevel="INFO" - message="Processing all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" /> - <split> - <simple>${exchangeProperty[loopObject].getMicroServicePolicies()} - </simple> - <setProperty propertyName="policy"> - <simple>${body}</simple> - </setProperty> - <log loggingLevel="INFO" - message="Processing Micro Service Policy: ${exchangeProperty[policy].getName()}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">false</simple> - </setProperty> - <to uri="direct:delete-policy" /> - <to uri="direct:create-policy" /> - </split> - <log loggingLevel="INFO" - message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" /> - <split> - <simple>${exchangeProperty[loopObject].getOperationalPolicies()} - </simple> - <setProperty propertyName="policy"> - <simple>${body}</simple> - </setProperty> - <log loggingLevel="INFO" - message="Processing Operational Policy: ${exchangeProperty[policy].getName()}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">false</simple> - </setProperty> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <log loggingLevel="INFO" + message="POLICY SUBMIT request for loop: ${header.loopName}"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">true</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'POLICY SUBMIT request')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('POLICY SUBMIT request','INFO',${exchangeProperty[loopObject]})"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:remove-all-policy-from-active-pdp-group"/> + <log loggingLevel="INFO" + message="Processing all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}"/> + <split> + <simple>${exchangeProperty[loopObject].getMicroServicePolicies()} + </simple> + <setProperty propertyName="policy"> + <simple>${body}</simple> + </setProperty> + <log loggingLevel="INFO" + message="Processing Micro Service Policy: ${exchangeProperty[policy].getName()}"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:delete-policy"/> + <to uri="direct:create-policy"/> + </split> + <log loggingLevel="INFO" + message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}"/> + <split> + <simple>${exchangeProperty[loopObject].getOperationalPolicies()} + </simple> + <setProperty propertyName="policy"> + <simple>${body}</simple> + </setProperty> + <log loggingLevel="INFO" + message="Processing Operational Policy: ${exchangeProperty[policy].getName()}"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> - <to uri="direct:delete-policy" /> - <to uri="direct:create-policy" /> - </split> + <to uri="direct:delete-policy"/> + <to uri="direct:create-policy"/> + </split> - <delay> - <constant>3000</constant> - </delay> + <delay> + <constant>3000</constant> + </delay> - <to uri="direct:add-all-to-active-pdp-group" /> + <to uri="direct:add-all-to-active-pdp-group"/> - <log loggingLevel="INFO" - message="SUBMIT request successfully executed for loop: ${header.loopName}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="SUBMIT request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>SUBMIT request FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> - <put uri="/v2/loop/delete/{loopName}"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <log loggingLevel="INFO" - message="DELETE request for loop: ${header.loopName}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">true</simple> - </setProperty> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'DELETE request')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DELETE request','INFO',${exchangeProperty[loopObject]})" /> - <to uri="direct:undeploy-loop" /> - <to uri="direct:remove-all-policy-from-active-pdp-group" /> - <log loggingLevel="INFO" - message="Deleting all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" /> - <split> - <simple>${exchangeProperty[loopObject].getMicroServicePolicies()} - </simple> - <setProperty propertyName="policy"> - <simple>${body}</simple> - </setProperty> - <log loggingLevel="INFO" - message="Deleting Micro Service Policy: ${exchangeProperty[policy].getName()}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">false</simple> - </setProperty> - <to uri="direct:delete-policy" /> - </split> - <log loggingLevel="INFO" - message="Deleting all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" /> - <split> - <simple>${exchangeProperty[loopObject].getOperationalPolicies()} - </simple> - <setProperty propertyName="policy"> - <simple>${body}</simple> - </setProperty> - <log loggingLevel="INFO" - message="Deleting Operational Policy: ${exchangeProperty[policy].getName()}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">false</simple> - </setProperty> - <to uri="direct:delete-policy" /> - </split> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=deleteLoop(${header.loopName})" /> - <log loggingLevel="INFO" - message="DELETE request successfully executed for loop: ${header.loopName}" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="DELETE request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>DELETE request FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> - <get uri="/v2/loop/getstatus/{loopName}" + <log loggingLevel="INFO" + message="SUBMIT request successfully executed for loop: ${header.loopName}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="SUBMIT request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>SUBMIT request FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> + <put uri="/v2/loop/delete/{loopName}"> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <log loggingLevel="INFO" + message="DELETE request for loop: ${header.loopName}"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">true</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'DELETE request')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DELETE request','INFO',${exchangeProperty[loopObject]})"/> + <to uri="direct:undeploy-loop"/> + <to uri="direct:remove-all-policy-from-active-pdp-group"/> + <log loggingLevel="INFO" + message="Deleting all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}"/> + <split> + <simple>${exchangeProperty[loopObject].getMicroServicePolicies()} + </simple> + <setProperty propertyName="policy"> + <simple>${body}</simple> + </setProperty> + <log loggingLevel="INFO" + message="Deleting Micro Service Policy: ${exchangeProperty[policy].getName()}"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:delete-policy"/> + </split> + <log loggingLevel="INFO" + message="Deleting all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}"/> + <split> + <simple>${exchangeProperty[loopObject].getOperationalPolicies()} + </simple> + <setProperty propertyName="policy"> + <simple>${body}</simple> + </setProperty> + <log loggingLevel="INFO" + message="Deleting Operational Policy: ${exchangeProperty[policy].getName()}"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:delete-policy"/> + </split> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=deleteLoop(${header.loopName})"/> + <log loggingLevel="INFO" + message="DELETE request successfully executed for loop: ${header.loopName}"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="DELETE request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>DELETE request FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> + <get uri="/v2/loop/getstatus/{loopName}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName" /> - <doTry> - <log loggingLevel="INFO" - message="GET STATUS request for loop: ${header.loopName}" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET STATUS request')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request','INFO',${exchangeProperty[loopObject]})" /> - <to uri="direct:update-policy-status-for-loop" /> - <to uri="direct:update-dcae-status-for-loop" /> - <to uri="direct:update-loop-state" /> + <route> + <removeHeaders pattern="*" excludePattern="loopName"/> + <doTry> + <log loggingLevel="INFO" + message="GET STATUS request for loop: ${header.loopName}"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET STATUS request')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')"/> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request','INFO',${exchangeProperty[loopObject]})"/> + <to uri="direct:update-policy-status-for-loop"/> + <to uri="direct:update-dcae-status-for-loop"/> + <to uri="direct:update-loop-state"/> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET STATUS request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> - </doCatch> - <doFinally> - <setBody> - <simple>${exchangeProperty[loopObject]}</simple> - </setBody> - <setHeader headerName="CamelHttpResponseCode"> - <constant>200</constant> - </setHeader> - </doFinally> - </doTry> - </route> - </get> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request successfully executed','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET STATUS request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/> + </doCatch> + <doFinally> + <setBody> + <simple>${exchangeProperty[loopObject]}</simple> + </setBody> + <setHeader headerName="CamelHttpResponseCode"> + <constant>200</constant> + </setHeader> + </doFinally> + </doTry> + </route> + </get> + + <put uri="/v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}" + outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> + <route> + <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add operational Policy')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:load-loop"/> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=addOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="ADD operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>ADD Operational policy request FAILED for loop: ${header.loopName}, + ${exception.message}" + </simple> + </setBody> - <put uri="/v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add operational Policy')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to uri="direct:load-loop" /> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=addOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="ADD operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>ADD Operational policy request FAILED for loop: ${header.loopName}, ${exception.message}"</simple> - </setBody> - - </doCatch> - </doTry> - </route> - </put> - <put uri="/v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion|policyName" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REMOVE operational Policy')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to uri="direct:load-loop" /> - <setProperty propertyName="policyName"> - <simple>${header.policyName}</simple> - </setProperty> - <setProperty propertyName="policy"> - <simple>${exchangeProperty[loopObject].getOperationalPolicy(header.policyName)}</simple> - </setProperty> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">false</simple> - </setProperty> - <to uri="direct:remove-one-policy-from-active-pdp-group" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">false</simple> - </setProperty> - <to uri="direct:delete-policy" /> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=removeOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="REMOVE operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>REMOVE Operational policy request FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> - <post + </doCatch> + </doTry> + </route> + </put> + <put uri="/v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}" + outType="org.onap.policy.clamp.loop.Loop" produces="application/json"> + <route> + <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion|policyName"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REMOVE operational Policy')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:load-loop"/> + <setProperty propertyName="policyName"> + <simple>${header.policyName}</simple> + </setProperty> + <setProperty propertyName="policy"> + <simple>${exchangeProperty[loopObject].getOperationalPolicy(header.policyName)}</simple> + </setProperty> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:remove-one-policy-from-active-pdp-group"/> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:delete-policy"/> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=removeOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="REMOVE operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>REMOVE Operational policy request FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> + <post uri="/v2/loop/create/{loopName}?templateName={templateName}" outType="org.onap.policy.clamp.loop.Loop" consumes="application/json" produces="application/json"> - <route> - <removeHeaders - pattern="*" - excludePattern="loopName|templateName" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Create Loop')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> - <to - uri="bean:org.onap.policy.clamp.loop.LoopController?method=createLoop(${header.loopName}, ${header.templateName})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="CREATE Loop from Template request failed for loop: ${header.loopName}, ${exception.stacktrace}" /> - <to - uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('CREATE Loop from template request failed','ERROR',${exchangeProperty[loopObject]})" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>CREATE Loop from template FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </post> - <get uri="/v2/dictionary" + <route> + <removeHeaders + pattern="*" + excludePattern="loopName|templateName"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Create Loop')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to + uri="bean:org.onap.policy.clamp.loop.LoopController?method=createLoop(${header.loopName}, ${header.templateName})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="CREATE Loop from Template request failed for loop: ${header.loopName}, ${exception.stacktrace}"/> + <to + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('CREATE Loop from template request failed','ERROR',${exchangeProperty[loopObject]})"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>CREATE Loop from template FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </post> + <get uri="/v2/dictionary" outType="org.onap.policy.clamp.tosca.Dictionary" produces="application/json"> - <route> - <removeHeaders pattern="*" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionaries')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" /> - <to - uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getAllDictionaries()" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET Dictionary request failed: ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET Dictionary FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> + <route> + <removeHeaders pattern="*"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionaries')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/> + <to + uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getAllDictionaries()"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET Dictionary request failed: ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Dictionary FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> - <get uri="/v2/dictionary/secondary/names" - outType="java.lang.String[]" produces="application/json"> - <route> - <removeHeaders pattern="*" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Secondary Dictionary Level Names')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" /> - <to - uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getAllSecondaryLevelDictionaryNames()" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET Dictionary request failed: ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET Dictionary FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> - <get uri="/v2/dictionary/{dictionaryName}" + <get uri="/v2/dictionary/secondary/names" + outType="java.lang.String[]" produces="application/json"> + <route> + <removeHeaders pattern="*"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Secondary Dictionary Level Names')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/> + <to + uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getAllSecondaryLevelDictionaryNames()"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET Dictionary request failed: ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Dictionary FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + <get uri="/v2/dictionary/{dictionaryName}" outType="org.onap.policy.clamp.tosca.Dictionary" produces="application/json"> - <route> - <removeHeaders pattern="*" - excludePattern="dictionaryName" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionary Elements for a Dictionary Name')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" /> - <to - uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getDictionary(${header.dictionaryName})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET Dictionary request failed for: ${header.dictionaryName}, ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET Dictionary FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> - <put uri="/v2/dictionary" type="org.onap.policy.clamp.tosca.Dictionary" + <route> + <removeHeaders pattern="*" + excludePattern="dictionaryName"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionary Elements for a Dictionary Name')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/> + <to + uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getDictionary(${header.dictionaryName})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET Dictionary request failed for: ${header.dictionaryName}, ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Dictionary FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + <put uri="/v2/dictionary" type="org.onap.policy.clamp.tosca.Dictionary" outType="org.onap.policy.clamp.tosca.Dictionary" consumes="application/json" produces="application/json"> - <route> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" /> - <setProperty propertyName="DictionaryObject"> - <simple>${body}</simple> - </setProperty> - <to - uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=saveOrUpdateDictionary(${exchangeProperty[DictionaryObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="PUT Dictionary request failed for: ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>PUT Dictionary FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> + <route> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/> + <setProperty propertyName="DictionaryObject"> + <simple>${body}</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=saveOrUpdateDictionary(${exchangeProperty[DictionaryObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="PUT Dictionary request failed for: ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>PUT Dictionary FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> - <put uri="/v2/dictionary/{name}" + <put uri="/v2/dictionary/{name}" type="org.onap.policy.clamp.tosca.Dictionary" outType="org.onap.policy.clamp.tosca.Dictionary" consumes="application/json" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="name" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary Element')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" /> - <setProperty propertyName="DictionaryObject"> - <simple>${body}</simple> - </setProperty> - <to - uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=saveOrUpdateDictionaryElement(${header.name}, ${exchangeProperty[DictionaryObject]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="PUT Dictionary request failed for: ${header.name}, ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>PUT Dictionary FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> + <route> + <removeHeaders pattern="*" excludePattern="name"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary Element')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/> + <setProperty propertyName="DictionaryObject"> + <simple>${body}</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=saveOrUpdateDictionaryElement(${header.name}, ${exchangeProperty[DictionaryObject]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="PUT Dictionary request failed for: ${header.name}, ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>PUT Dictionary FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> - <delete uri="/v2/dictionary/{name}" produces="application/json"> - <route> - <removeHeaders pattern="*" excludePattern="name" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" /> - <to - uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=deleteDictionary(${header.name})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="DELETE Dictionary request failed for: ${header.name}, ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>DELETE Dictionary FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </delete> + <delete uri="/v2/dictionary/{name}" produces="application/json"> + <route> + <removeHeaders pattern="*" excludePattern="name"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/> + <to + uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=deleteDictionary(${header.name})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="DELETE Dictionary request failed for: ${header.name}, ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>DELETE Dictionary FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </delete> - <delete uri="/v2/dictionary/{name}/elements/{shortName}" - produces="application/json"> - <route> - <removeHeaders pattern="*" - excludePattern="name|shortName" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary Element')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" /> - <to - uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=deleteDictionaryElement(${header.name}, ${header.shortName})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="DELETE Dictionary element request failed for: ${header.name}, ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>DELETE Dictionary element FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </delete> + <delete uri="/v2/dictionary/{name}/elements/{shortName}" + produces="application/json"> + <route> + <removeHeaders pattern="*" + excludePattern="name|shortName"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary Element')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/> + <to + uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=deleteDictionaryElement(${header.name}, ${header.shortName})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="DELETE Dictionary element request failed for: ${header.name}, ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>DELETE Dictionary element FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </delete> - <get uri="/v2/policyToscaModels" - outType="org.onap.policy.clamp.loop.template.PolicyModel" - produces="application/json"> - <route> - <removeHeaders pattern="*" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Tosca Policy Models')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" /> - <to - uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getAllPolicyModels()" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET Policy Models request failed for: ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET Policy models FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> - <get uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}" - outType="org.onap.policy.clamp.loop.template.PolicyModel" - produces="application/json"> - <route> - <removeHeaders pattern="*" - excludePattern="policyModelType|policyModelVersion" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model by Name/Version')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" /> - <to - uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getPolicyModelByType(${header.policyModelType},${header.policyModelVersion})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET Policy Model request failed for type: ${header.policyModelType}, ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET Policy model FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> - <get uri="/v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}" - outType="java.lang.String" produces="application/json"> - <route> - <removeHeaders pattern="*" - excludePattern="policyModelType|policyModelVersion" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model Yaml String by Name/Version')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" /> - <to - uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getPolicyModelTosca(${header.policyModelType},${header.policyModelVersion})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET Policy Model YAML request failed for type: ${header.policyModelType}, ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET Policy model YAML FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> + <get uri="/v2/policyToscaModels" + outType="org.onap.policy.clamp.loop.template.PolicyModel" + produces="application/json"> + <route> + <removeHeaders pattern="*"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Tosca Policy Models')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/> + <to + uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getAllPolicyModels()"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET Policy Models request failed for: ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Policy models FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + <get uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}" + outType="org.onap.policy.clamp.loop.template.PolicyModel" + produces="application/json"> + <route> + <removeHeaders pattern="*" + excludePattern="policyModelType|policyModelVersion"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model by Name/Version')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/> + <to + uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getPolicyModelByType(${header.policyModelType},${header.policyModelVersion})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET Policy Model request failed for type: ${header.policyModelType}, ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Policy model FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + <get uri="/v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}" + outType="java.lang.String" produces="application/json"> + <route> + <removeHeaders pattern="*" + excludePattern="policyModelType|policyModelVersion"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model Yaml String by Name/Version')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/> + <to + uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getPolicyModelTosca(${header.policyModelType},${header.policyModelVersion})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET Policy Model YAML request failed for type: ${header.policyModelType}, ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Policy model YAML FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + + <post uri="/v2/policyToscaModels" + type="java.lang.String" + outType="org.onap.policy.clamp.loop.template.PolicyModel" + consumes="plain/text" produces="application/json"> + <route> + <removeHeaders pattern="*"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/> + <setProperty propertyName="PolicyModelTosca"> + <simple>${body}</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=createNewPolicyModelFromTosca(${exchangeProperty[PolicyModelTosca]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="POST Policy Model YAML request failed: ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>POST Policy model YAML FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </post> + <put uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}" + type="java.lang.String" + outType="org.onap.policy.clamp.loop.template.PolicyModel" + consumes="plain/text" produces="application/json"> + <route> + <removeHeaders pattern="*" + excludePattern="policyModelType|policyModelVersion"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/> + <setProperty propertyName="PolicyModelTosca"> + <simple>${body}</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=updatePolicyModelTosca(${header.policyModelType},${policyModelVersion},${exchangeProperty[PolicyModelTosca]})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="MODIFY Policy Model YAML request failed: ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>MODIFY Policy model YAML FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> - <post uri="/v2/policyToscaModels" - type="java.lang.String" - outType="org.onap.policy.clamp.loop.template.PolicyModel" - consumes="plain/text" produces="application/json"> - <route> - <removeHeaders pattern="*"/> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" /> - <setProperty propertyName="PolicyModelTosca"> - <simple>${body}</simple> - </setProperty> - <to - uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=createNewPolicyModelFromTosca(${exchangeProperty[PolicyModelTosca]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="POST Policy Model YAML request failed: ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>POST Policy model YAML FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </post> - <put uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}" - type="java.lang.String" - outType="org.onap.policy.clamp.loop.template.PolicyModel" - consumes="plain/text" produces="application/json"> - <route> - <removeHeaders pattern="*" - excludePattern="policyModelType|policyModelVersion" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" /> - <setProperty propertyName="PolicyModelTosca"> - <simple>${body}</simple> - </setProperty> - <to - uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=updatePolicyModelTosca(${header.policyModelType},${policyModelVersion},${exchangeProperty[PolicyModelTosca]})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="MODIFY Policy Model YAML request failed: ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>MODIFY Policy model YAML FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </put> + <get uri="/v2/templates" + outType="org.onap.policy.clamp.loop.template.LoopTemplate" + produces="application/json"> + <route> + <removeHeaders pattern="*"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Templates')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')"/> + <to + uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getAllLoopTemplates()"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET ALL templates request failed: ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET ALL templates FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + <get uri="/v2/templates/{templateName}" + outType="org.onap.policy.clamp.loop.template.LoopTemplate" + produces="application/json"> + <route> + <removeHeaders pattern="*" + excludePattern="templateName"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET a Template by NAME')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')"/> + <to + uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getLoopTemplate(${header.templateName})"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET Template request failed for template: ${header.templateName}, ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Template FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + <get uri="/v2/templates/names" outType="java.lang.String[]" + produces="application/json"> + <route> + <removeHeaders pattern="*"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop Template Names')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')"/> + <to + uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getLoopTemplateNames()"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET All Template names request failed for template: ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET All Template names FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + <get uri="/v2/policies/list" outType="java.lang.String" produces="application/json"> + <route> + <removeHeaders pattern="*"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Policies List ')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'policies','','read')"/> - <get uri="/v2/templates" - outType="org.onap.policy.clamp.loop.template.LoopTemplate" - produces="application/json"> - <route> - <removeHeaders pattern="*" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Templates')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" /> - <to - uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getAllLoopTemplates()" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET ALL templates request failed: ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET ALL templates FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> - <get uri="/v2/templates/{templateName}" - outType="org.onap.policy.clamp.loop.template.LoopTemplate" - produces="application/json"> - <route> - <removeHeaders pattern="*" - excludePattern="templateName" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET a Template by NAME')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" /> - <to - uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getLoopTemplate(${header.templateName})" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET Template request failed for template: ${header.templateName}, ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET Template FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> - <get uri="/v2/templates/names" outType="java.lang.String[]" - produces="application/json"> - <route> - <removeHeaders pattern="*" /> - <doTry> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop Template Names')" /> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" /> - <to - uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getLoopTemplateNames()" /> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" /> - <doCatch> - <exception>java.lang.Exception</exception> - <handled> - <constant>true</constant> - </handled> - <to - uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" /> - <log loggingLevel="ERROR" - message="GET All Template names request failed for template: ${exception.stacktrace}" /> - <setHeader headerName="CamelHttpResponseCode"> - <constant>500</constant> - </setHeader> - <setBody> - <simple>GET All Template names FAILED</simple> - </setBody> - </doCatch> - </doTry> - </route> - </get> - <get uri="/v2/clampInformation" outType="org.onap.policy.clamp.clds.model.ClampInformation" - produces="application/json"> - <to - uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=getClampInformation()" /> - </get> - </rest> + <to uri="direct:get-all-policies"/> + <setProperty propertyName="policiesListResponse"> + <simple>${body}</simple> + </setProperty> + <to uri="direct:get-all-pdp-groups"/> + <setProperty propertyName="pdpGroupInfoResponse"> + <simple>${body}</simple> + </setProperty> + <setBody> + <method ref="org.onap.policy.clamp.policy.pdpgroup.PoliciesPdpMerger" + method="mergePoliciesAndPdpGroupStates(${exchangeProperty[policiesListResponse]},${exchangeProperty[pdpGroupInfoResponse]})"/> + </setBody> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="GET Policy Model YAML request failed for type: ${header.policyModelType}, ${exception.stacktrace}"/> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Policy model YAML FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + <get uri="/v2/clampInformation" outType="org.onap.policy.clamp.clds.model.ClampInformation" + produces="application/json"> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=getClampInformation()"/> + </get> + </rest> </rests> diff --git a/src/main/resources/clds/clds-users.json b/src/main/resources/clds/clds-users.json index fe305980b..5a7f43841 100644 --- a/src/main/resources/clds/clds-users.json +++ b/src/main/resources/clds/clds-users.json @@ -1,32 +1,33 @@ - [{ - "user":"admin", - "password":"$2a$10$H/e21kl04Dw9C978CHuM7OewyMGUN5WGzAAx7SgIaR4ix8.wTcssi", - "permissions": - [ - "org.onap.clamp.clds.cl|dev|read", - "org.onap.clamp.clds.cl|dev|update", - "org.onap.clamp.clds.cl.manage|dev|*", - "org.onap.clamp.clds.cl.event|dev|*", - "org.onap.clamp.clds.filter.vf|dev|*", - "org.onap.clamp.clds.template|dev|read", - "org.onap.clamp.clds.template|dev|update", - "org.onap.clamp.clds.tosca|dev|read", - "org.onap.clamp.clds.tosca|dev|update" - ] - }, - { - "user":"cs0008", - "password":"$2a$10$H/e21kl04Dw9C978CHuM7OewyMGUN5WGzAAx7SgIaR4ix8.wTcssi", - "permissions": - [ - "org.onap.clamp.clds.cl|dev|read", - "org.onap.clamp.clds.cl|dev|update", - "org.onap.clamp.clds.cl.manage|dev|*", - "org.onap.clamp.clds.filter.vf|dev|*", - "org.onap.clamp.clds.template|dev|read", - "org.onap.clamp.clds.template|dev|update", - "org.onap.clamp.clds.tosca|dev|read", - "org.onap.clamp.clds.tosca|dev|update" - ] - } +[ + { + "user": "admin", + "password": "$2a$10$H/e21kl04Dw9C978CHuM7OewyMGUN5WGzAAx7SgIaR4ix8.wTcssi", + "permissions": [ + "org.onap.clamp.clds.cl|dev|read", + "org.onap.clamp.clds.cl|dev|update", + "org.onap.clamp.clds.cl.manage|dev|*", + "org.onap.clamp.clds.cl.event|dev|*", + "org.onap.clamp.clds.filter.vf|dev|*", + "org.onap.clamp.clds.template|dev|read", + "org.onap.clamp.clds.template|dev|update", + "org.onap.clamp.clds.tosca|dev|read", + "org.onap.clamp.clds.tosca|dev|update", + "org.onap.clamp.clds.policies|dev|read", + "org.onap.clamp.clds.policies|dev|update" + ] + }, + { + "user": "cs0008", + "password": "$2a$10$H/e21kl04Dw9C978CHuM7OewyMGUN5WGzAAx7SgIaR4ix8.wTcssi", + "permissions": [ + "org.onap.clamp.clds.cl|dev|read", + "org.onap.clamp.clds.cl|dev|update", + "org.onap.clamp.clds.cl.manage|dev|*", + "org.onap.clamp.clds.filter.vf|dev|*", + "org.onap.clamp.clds.template|dev|read", + "org.onap.clamp.clds.template|dev|update", + "org.onap.clamp.clds.tosca|dev|read", + "org.onap.clamp.clds.tosca|dev|update" + ] + } ] diff --git a/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java b/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java index 8c06929e1..2f17c61bf 100644 --- a/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java +++ b/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2020 AT&T Intellectual Property. All rights + * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,6 +23,8 @@ package org.onap.policy.clamp.clds.it; +import static org.apache.commons.io.FileUtils.copyInputStreamToFile; + import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; import com.github.dockerjava.api.DockerClient; @@ -111,6 +113,13 @@ public class RobotItCase { } catch (InterruptedException e) { throw new Exception("Failed to retrieve logs of container " + id, e); } + + copyInputStreamToFile(client.copyArchiveFromContainerCmd(id, "/opt/robotframework/reports/output.xml").exec(), + new File("target/robotframework/output.xml")); + copyInputStreamToFile(client.copyArchiveFromContainerCmd(id, "/opt/robotframework/reports/log.html").exec(), + new File("target/robotframework/log.html")); + copyInputStreamToFile(client.copyArchiveFromContainerCmd(id, "/opt/robotframework/reports/report.html").exec(), + new File("target/robotframework/report.html")); client.stopContainerCmd(id); } } diff --git a/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java b/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java index b3fd3f19a..5da68f47f 100644 --- a/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java +++ b/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java @@ -94,8 +94,8 @@ public class PoliciesPdpMergerTest { @Test public void testUpdatePdpGroupOfPolicyModels() throws IOException { - JSONAssert.assertEquals(ResourceFileUtils.getResourceAsString("clds/policy-merger.json"), PoliciesPdpMerger - .mergePoliciesAndPdpGroupStates( + JSONAssert.assertEquals(ResourceFileUtils.getResourceAsString("example/policy/policy-merger.json"), + PoliciesPdpMerger.mergePoliciesAndPdpGroupStates( ResourceFileUtils.getResourceAsString("http-cache/example/policy/api/v1/policies/.file"), pdpGroupsJson), true); } diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index 5a668dcf4..2a4caee98 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -2,7 +2,7 @@ # ============LICENSE_START======================================================= # ONAP CLAMP # ================================================================================ -# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights +# Copyright (C) 2017-2018, 2021 AT&T Intellectual Property. All rights # reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -152,15 +152,17 @@ clamp.config.dcae.deployment.userName=test clamp.config.dcae.deployment.password=test #Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case ! -clamp.config.security.permission.type.cl=permission-type-cl -clamp.config.security.permission.type.cl.manage=permission-type-cl-manage -clamp.config.security.permission.type.cl.event=permission-type-cl-event -clamp.config.security.permission.type.filter.vf=permission-type-filter-vf -clamp.config.security.permission.type.template=permission-type-template -clamp.config.security.permission.type.tosca=permission-type-tosca +clamp.config.security.permission.type.cl=org.onap.clamp.clds.cl +clamp.config.security.permission.type.cl.manage=org.onap.clamp.clds.cl.manage +clamp.config.security.permission.type.cl.event=org.onap.clamp.clds.cl.event +clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf +clamp.config.security.permission.type.template=org.onap.clamp.clds.template +clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca +clamp.config.security.permission.type.policies=org.onap.clamp.clds.policies #This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties clamp.config.security.permission.instance=dev clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal, org.onap.aaf.cadi.principal.CachedBasicPrincipal + # Configuration settings for CDS clamp.config.cds.url=http4://localhost:${docker.http-cache.port.host} clamp.config.cds.userName=ccsdkapps diff --git a/src/test/resources/example/policy/policy-merger.json b/src/test/resources/example/policy/policy-merger.json new file mode 100644 index 000000000..5c6bd5b6b --- /dev/null +++ b/src/test/resources/example/policy/policy-merger.json @@ -0,0 +1,215 @@ +{ + "policies": [ + { + "MICROSERVICE_vLoadBalancerMS_v1_0_tcagen2_1_0_0_AV0": { + "type": "onap.policies.monitoring.tcagen2", + "type_version": "1.0.0", + "properties": { + "tca.policy": { + "domain": "measurementsForVfScaling", + "metricsPerEventName": [ + { + "policyScope": "DCAE", + "thresholds": [ + { + "version": "1.0.2", + "severity": "MAJOR", + "thresholdValue": 200, + "closedLoopEventStatus": "ONSET", + "closedLoopControlName": "LOOP_test", + "direction": "LESS_OR_EQUAL", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta" + } + ], + "eventName": "vLoadBalancer", + "policyVersion": "v0.0.1", + "controlLoopSchemaType": "VM", + "policyName": "DCAE.Config_tca-hi-lo" + } + ] + } + }, + "name": "MICROSERVICE_vLoadBalancerMS_v1_0_tcagen2_1_0_0_AV0", + "version": "1.0.0", + "metadata": { + "policy-id": "MICROSERVICE_vLoadBalancerMS_v1_0_tcagen2_1_0_0_AV0", + "policy-version": "1.0.0" + }, + "pdpGroupInfo": { + "pdpGroup": "pdpGroup2", + "pdpSubGroup": "subGroup2" + }, + "supportedPdpGroups": [ + { + "pdpGroup2": [ + "subGroup2", + "subGroup3" + ] + } + ] + } + }, + { + "OPERATIONAL_vLoadBalancerMS_v1_0_Drools_1_0_0_7xd": { + "type": "onap.policies.controlloop.operational.common.Drools", + "type_version": "1.0.0", + "properties": { + "abatement": false, + "operations": [ + { + "failure_retries": "final_failure_retries", + "id": "test1", + "failure_timeout": "final_failure_timeout", + "failure": "final_failure", + "operation": { + "payload": { + "artifact_name": "baseconfiguration", + "artifact_version": "1.0.0", + "mode": "async", + "data": "{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"hostname\":\"\",\"request-info\":{\"prop1\":\"\",\"prop2\":\"\"}}}" + }, + "target": { + "entityIds": { + "resourceID": "Vloadbalancerms..vdns..module-3", + "modelInvariantId": "4c10ba9b-f88f-415e-9de3-5d33336047fa", + "modelVersionId": "4fa73b49-8a6c-493e-816b-eb401567b720", + "modelName": "Vloadbalancerms..vdns..module-3", + "modelVersion": "1", + "modelCustomizationId": "bafcdab0-801d-4d81-9ead-f464640a38b1" + }, + "targetType": "VNF" + }, + "actor": "SDNR", + "operation": "BandwidthOnDemand" + }, + "failure_guard": "final_failure_guard", + "retries": 0, + "timeout": 0, + "failure_exception": "final_failure_exception", + "description": "test", + "success": "final_success" + } + ], + "trigger": "test1", + "timeout": 0, + "id": "LOOP_test" + }, + "name": "OPERATIONAL_vLoadBalancerMS_v1_0_Drools_1_0_0_7xd", + "version": "1.0.0", + "metadata": { + "policy-id": "OPERATIONAL_vLoadBalancerMS_v1_0_Drools_1_0_0_7xd", + "policy-version": "1.0.0" + }, + "pdpGroupInfo": { + "pdpGroup": "pdpGroup2", + "pdpSubGroup": "subGroup3" + }, + "supportedPdpGroups": [ + { + "pdpGroup2": [ + "subGroup2", + "subGroup3" + ] + } + ] + } + }, + { + "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP": { + "type": "onap.policies.Naming", + "type_version": "1.0.0", + "properties": { + "naming-models": [ + { + "naming-type": "VNF", + "naming-recipe": "AIC_CLOUD_REGION|DELIMITER|CONSTANT|DELIMITER|TIMESTAMP", + "name-operation": "to_lower_case()", + "naming-properties": [ + { + "property-name": "AIC_CLOUD_REGION" + }, + { + "property-name": "CONSTANT", + "property-value": "onap-nf" + }, + { + "property-name": "TIMESTAMP" + }, + { + "property-value": "-", + "property-name": "DELIMITER" + } + ] + }, + { + "naming-type": "VNFC", + "naming-recipe": "VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE", + "name-operation": "to_lower_case()", + "naming-properties": [ + { + "property-name": "VNF_NAME" + }, + { + "property-name": "SEQUENCE", + "increment-sequence": { + "max": "zzz", + "scope": "ENTIRETY", + "start-value": "1", + "length": "3", + "increment": "1", + "sequence-type": "alpha-numeric" + } + }, + { + "property-name": "NFC_NAMING_CODE" + }, + { + "property-value": "-", + "property-name": "DELIMITER" + } + ] + }, + { + "naming-type": "VF-MODULE", + "naming-recipe": "VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE", + "name-operation": "to_lower_case()", + "naming-properties": [ + { + "property-name": "VNF_NAME" + }, + { + "property-value": "-", + "property-name": "DELIMITER" + }, + { + "property-name": "VF_MODULE_LABEL" + }, + { + "property-name": "VF_MODULE_TYPE" + }, + { + "property-name": "SEQUENCE", + "increment-sequence": { + "max": "zzz", + "scope": "PRECEEDING", + "start-value": "1", + "length": "3", + "increment": "1", + "sequence-type": "alpha-numeric" + } + } + ] + } + ], + "policy-instance-name": "ONAP_NF_NAMING_TIMESTAMP" + }, + "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", + "version": "1.0.0", + "metadata": { + "policy-id": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", + "policy-version": "1.0.0" + } + } + } + ] +}
\ No newline at end of file diff --git a/src/test/resources/https/https-test.properties b/src/test/resources/https/https-test.properties index aeae64036..b52b16db4 100644 --- a/src/test/resources/https/https-test.properties +++ b/src/test/resources/https/https-test.properties @@ -2,7 +2,7 @@ # ============LICENSE_START======================================================= # ONAP CLAMP # ================================================================================ -# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights +# Copyright (C) 2017-2018, 2021 AT&T Intellectual Property. All rights # reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -114,6 +114,7 @@ clamp.config.security.permission.type.cl.event=org.onap.clamp.clds.cl.event clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf clamp.config.security.permission.type.template=org.onap.clamp.clds.template clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca +clamp.config.security.permission.type.policies=org.onap.clamp.clds.policies #This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties clamp.config.security.permission.instance=dev clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal, org.onap.aaf.cadi.principal.CachedBasicPrincipal diff --git a/src/test/resources/robotframework/robotframework-test.properties b/src/test/resources/robotframework/robotframework-test.properties index 665842b84..1e173f961 100644 --- a/src/test/resources/robotframework/robotframework-test.properties +++ b/src/test/resources/robotframework/robotframework-test.properties @@ -2,7 +2,7 @@ # ============LICENSE_START======================================================= # ONAP CLAMP # ================================================================================ -# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights +# Copyright (C) 2017-2018, 2021 AT&T Intellectual Property. All rights # reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -152,12 +152,13 @@ clamp.config.dcae.deployment.userName=test clamp.config.dcae.deployment.password=test #Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case ! -clamp.config.security.permission.type.cl=permission-type-cl -clamp.config.security.permission.type.cl.manage=permission-type-cl-manage -clamp.config.security.permission.type.cl.event=permission-type-cl-event -clamp.config.security.permission.type.filter.vf=permission-type-filter-vf -clamp.config.security.permission.type.template=permission-type-template -clamp.config.security.permission.type.tosca=permission-type-tosca +clamp.config.security.permission.type.cl=org.onap.clamp.clds.cl +clamp.config.security.permission.type.cl.manage=org.onap.clamp.clds.cl.manage +clamp.config.security.permission.type.cl.event=org.onap.clamp.clds.cl.event +clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf +clamp.config.security.permission.type.template=org.onap.clamp.clds.template +clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca +clamp.config.security.permission.type.policies=org.onap.clamp.clds.policies #This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties clamp.config.security.permission.instance=dev clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal, org.onap.aaf.cadi.principal.CachedBasicPrincipal diff --git a/src/test/resources/robotframework/tests/02_policy_queries.robot b/src/test/resources/robotframework/tests/02_policy_queries.robot new file mode 100644 index 000000000..e62e03476 --- /dev/null +++ b/src/test/resources/robotframework/tests/02_policy_queries.robot @@ -0,0 +1,21 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library OperatingSystem +*** Variables *** +${login} admin +${passw} password +${reponse_pdp_group} pdpGroupInfo +*** Keywords *** +Create the sessions +*** Test Cases *** +Get Requests policies list ok + ${port} = Get Environment Variable CLAMP_PORT + ${auth} = Create List ${login} ${passw} + Create Session clamp http://localhost:${port} auth=${auth} disable_warnings=1 + Set Global Variable ${clamp_session} clamp + ${response_query}= Get Request ${clamp_session} /restservices/clds/v2/policies/list + Should Be Equal As Strings ${response_query.status_code} 200 + Should Contain ${response_query.text} ${reponse_pdp_group}
\ No newline at end of file |