From: sebdet Date: Fri, 13 Mar 2020 22:27:41 +0000 (-0700) Subject: Fix the legacy policies X-Git-Tag: 5.0.0~20 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=clamp.git;a=commitdiff_plain;h=49ab84a916e96fde4fc39258fa10f8b5ce775f48 Fix the legacy policies Fix the legacy policies not displayed in the UI properly due to the new PolicyModal dialog. Issue-ID: CLAMP-779 Signed-off-by: sebdet Change-Id: I8070d8c57e43c9a386e09475f0d377f91104aef1 --- diff --git a/extra/sql/dump/test-data.sql b/extra/sql/dump/test-data.sql index 72d95194..31e2bd67 100644 --- a/extra/sql/dump/test-data.sql +++ b/extra/sql/dump/test-data.sql @@ -63,7 +63,7 @@ UNLOCK TABLES; LOCK TABLES `loop_element_models` WRITE; /*!40000 ALTER TABLE `loop_element_models` DISABLE KEYS */; -INSERT INTO `loop_element_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app',NULL,'2020-03-13 10:59:53.499891','Not found','2020-03-13 10:59:53.993136',NULL,NULL,'MICRO_SERVICE_TYPE',NULL); +INSERT INTO `loop_element_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app',NULL,'2020-03-13 13:23:59.669635','Not found','2020-03-13 13:24:00.322860',NULL,NULL,'MICRO_SERVICE_TYPE',NULL); /*!40000 ALTER TABLE `loop_element_models` ENABLE KEYS */; UNLOCK TABLES; @@ -82,9 +82,9 @@ UNLOCK TABLES; LOCK TABLES `loop_templates` WRITE; /*!40000 ALTER TABLE `loop_templates` DISABLE KEYS */; -INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_mnekp_v1_0_ResourceInstanceName1_tca','Not found','2020-03-13 10:59:53.904486','Not found','2020-03-13 10:59:53.904486','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-fcbedab3-67dd-4ab0-8b2e-1a03e30b2546',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); -INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_mnekp_v1_0_ResourceInstanceName1_tca_3','Not found','2020-03-13 10:59:53.709176','Not found','2020-03-13 10:59:53.709176','CLOSED','tosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n This blueprint deploys/manages the TCA module as a Docker container\n\nimports:\n - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml\n - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml\ninputs:\n aaiEnrichmentHost:\n type: string\n default: \"aai.onap.svc.cluster.local\"\n aaiEnrichmentPort:\n type: string\n default: \"8443\"\n enableAAIEnrichment:\n type: string\n default: true\n dmaap_host:\n type: string\n default: message-router.onap.svc.cluster.local\n dmaap_port:\n type: string\n default: \"3904\"\n enableRedisCaching:\n type: string\n default: false\n redisHosts:\n type: string\n default: dcae-redis.onap.svc.cluster.local:6379\n tag_version:\n type: string\n default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0-STAGING-latest\"\n consul_host:\n type: string\n default: consul-server.onap.svc.cluster.local\n consul_port:\n type: string\n default: \"8500\"\n cbs_host:\n type: string\n default: \"config-binding-service.dcae.svc.cluster.local\"\n cbs_port:\n type: string\n default: \"10000\"\n policy_id:\n type: string\n default: \"none\"\n external_port:\n type: string\n description: Kubernetes node port on which CDAPgui is exposed\n default: \"32012\"\n policy_model_id:\n type: string\n default: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n\nnode_templates:\n tca_k8s:\n type: dcae.nodes.ContainerizedServiceComponent\n relationships:\n - target: tca_policy\n type: cloudify.relationships.depends_on\n properties:\n service_component_type: \'dcaegen2-analytics-tca\'\n application_config: {}\n docker_config: {}\n image:\n get_input: tag_version\n log_info:\n log_directory: \"/opt/app/TCAnalytics/logs\"\n application_config:\n app_config:\n appDescription: DCAE Analytics Threshold Crossing Alert Application\n appName: dcae-tca\n tcaAlertsAbatementTableName: TCAAlertsAbatementTable\n tcaAlertsAbatementTableTTLSeconds: \'1728000\'\n tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n tcaVESAlertsTableName: TCAVESAlertsTable\n tcaVESAlertsTableTTLSeconds: \'1728000\'\n tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n tcaVESMessageStatusTableTTLSeconds: \'86400\'\n thresholdCalculatorFlowletInstances: \'2\'\n app_preferences:\n aaiEnrichmentHost:\n get_input: aaiEnrichmentHost\n aaiEnrichmentIgnoreSSLCertificateErrors: \'true\'\n aaiEnrichmentPortNumber: \'8443\'\n aaiEnrichmentProtocol: https\n aaiEnrichmentUserName: dcae@dcae.onap.org\n aaiEnrichmentUserPassword: demo123456!\n aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query\n aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf\n enableAAIEnrichment:\n get_input: enableAAIEnrichment\n enableRedisCaching:\n get_input: enableRedisCaching\n redisHosts:\n get_input: redisHosts\n enableAlertCEFFormat: \'false\'\n publisherContentType: application/json\n publisherHostName:\n get_input: dmaap_host\n publisherHostPort:\n get_input: dmaap_port\n publisherMaxBatchSize: \'1\'\n publisherMaxRecoveryQueueSize: \'100000\'\n publisherPollingInterval: \'20000\'\n publisherProtocol: http\n publisherTopicName: unauthenticated.DCAE_CL_OUTPUT\n subscriberConsumerGroup: OpenDCAE-c12\n subscriberConsumerId: c12\n subscriberContentType: application/json\n subscriberHostName:\n get_input: dmaap_host\n subscriberHostPort:\n get_input: dmaap_port\n subscriberMessageLimit: \'-1\'\n subscriberPollingInterval: \'30000\'\n subscriberProtocol: http\n subscriberTimeoutMS: \'-1\'\n subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT\n tca_policy: \'\'\n service_component_type: dcaegen2-analytics_tca\n interfaces:\n cloudify.interfaces.lifecycle:\n start:\n inputs:\n envs:\n DMAAPHOST:\n { get_input: dmaap_host }\n DMAAPPORT:\n { get_input: dmaap_port }\n DMAAPPUBTOPIC: \"unauthenticated.DCAE_CL_OUTPUT\"\n DMAAPSUBTOPIC: \"unauthenticated.VES_MEASUREMENT_OUTPUT\"\n AAIHOST:\n { get_input: aaiEnrichmentHost }\n AAIPORT:\n { get_input: aaiEnrichmentPort }\n CONSUL_HOST:\n { get_input: consul_host }\n CONSUL_PORT:\n { get_input: consul_port }\n CBS_HOST:\n { get_input: cbs_host }\n CBS_PORT:\n { get_input: cbs_port }\n CONFIG_BINDING_SERVICE: \"config_binding_service\"\n ports:\n - concat: [\"11011:\", { get_input: external_port }]\n tca_policy:\n type: dcae.nodes.policy\n properties:\n policy_id:\n get_input: policy_id\n policy_model_id: \n get_input: policy_model_id\n','typeId-cfed3dd8-522e-4919-bf6b-071c388837eb',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); -INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_mnekp_v1_0_ResourceInstanceName2_tca_2','Not found','2020-03-13 10:59:53.447108','Not found','2020-03-13 10:59:53.447108','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-b20eee50-b363-459d-9c40-972f6b0d8322',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); +INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_ykXZp_v1_0_ResourceInstanceName1_tca','Not found','2020-03-13 13:24:00.244179','Not found','2020-03-13 13:24:00.244179','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-8c5913fd-5534-422e-ad9d-14ae3c50e88e',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); +INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_ykXZp_v1_0_ResourceInstanceName1_tca_3','Not found','2020-03-13 13:23:59.916444','Not found','2020-03-13 13:23:59.916444','CLOSED','tosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n This blueprint deploys/manages the TCA module as a Docker container\n\nimports:\n - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml\n - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml\n - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml\ninputs:\n aaiEnrichmentHost:\n type: string\n default: \"aai.onap.svc.cluster.local\"\n aaiEnrichmentPort:\n type: string\n default: \"8443\"\n enableAAIEnrichment:\n type: string\n default: true\n dmaap_host:\n type: string\n default: message-router.onap.svc.cluster.local\n dmaap_port:\n type: string\n default: \"3904\"\n enableRedisCaching:\n type: string\n default: false\n redisHosts:\n type: string\n default: dcae-redis.onap.svc.cluster.local:6379\n tag_version:\n type: string\n default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0-STAGING-latest\"\n consul_host:\n type: string\n default: consul-server.onap.svc.cluster.local\n consul_port:\n type: string\n default: \"8500\"\n cbs_host:\n type: string\n default: \"config-binding-service.dcae.svc.cluster.local\"\n cbs_port:\n type: string\n default: \"10000\"\n policy_id:\n type: string\n default: \"none\"\n external_port:\n type: string\n description: Kubernetes node port on which CDAPgui is exposed\n default: \"32012\"\n policy_model_id:\n type: string\n default: \"onap.policies.monitoring.cdap.tca.hi.lo.app\"\n\nnode_templates:\n tca_k8s:\n type: dcae.nodes.ContainerizedServiceComponent\n relationships:\n - target: tca_policy\n type: cloudify.relationships.depends_on\n properties:\n service_component_type: \'dcaegen2-analytics-tca\'\n application_config: {}\n docker_config: {}\n image:\n get_input: tag_version\n log_info:\n log_directory: \"/opt/app/TCAnalytics/logs\"\n application_config:\n app_config:\n appDescription: DCAE Analytics Threshold Crossing Alert Application\n appName: dcae-tca\n tcaAlertsAbatementTableName: TCAAlertsAbatementTable\n tcaAlertsAbatementTableTTLSeconds: \'1728000\'\n tcaSubscriberOutputStreamName: TCASubscriberOutputStream\n tcaVESAlertsTableName: TCAVESAlertsTable\n tcaVESAlertsTableTTLSeconds: \'1728000\'\n tcaVESMessageStatusTableName: TCAVESMessageStatusTable\n tcaVESMessageStatusTableTTLSeconds: \'86400\'\n thresholdCalculatorFlowletInstances: \'2\'\n app_preferences:\n aaiEnrichmentHost:\n get_input: aaiEnrichmentHost\n aaiEnrichmentIgnoreSSLCertificateErrors: \'true\'\n aaiEnrichmentPortNumber: \'8443\'\n aaiEnrichmentProtocol: https\n aaiEnrichmentUserName: dcae@dcae.onap.org\n aaiEnrichmentUserPassword: demo123456!\n aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query\n aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf\n enableAAIEnrichment:\n get_input: enableAAIEnrichment\n enableRedisCaching:\n get_input: enableRedisCaching\n redisHosts:\n get_input: redisHosts\n enableAlertCEFFormat: \'false\'\n publisherContentType: application/json\n publisherHostName:\n get_input: dmaap_host\n publisherHostPort:\n get_input: dmaap_port\n publisherMaxBatchSize: \'1\'\n publisherMaxRecoveryQueueSize: \'100000\'\n publisherPollingInterval: \'20000\'\n publisherProtocol: http\n publisherTopicName: unauthenticated.DCAE_CL_OUTPUT\n subscriberConsumerGroup: OpenDCAE-c12\n subscriberConsumerId: c12\n subscriberContentType: application/json\n subscriberHostName:\n get_input: dmaap_host\n subscriberHostPort:\n get_input: dmaap_port\n subscriberMessageLimit: \'-1\'\n subscriberPollingInterval: \'30000\'\n subscriberProtocol: http\n subscriberTimeoutMS: \'-1\'\n subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT\n tca_policy: \'\'\n service_component_type: dcaegen2-analytics_tca\n interfaces:\n cloudify.interfaces.lifecycle:\n start:\n inputs:\n envs:\n DMAAPHOST:\n { get_input: dmaap_host }\n DMAAPPORT:\n { get_input: dmaap_port }\n DMAAPPUBTOPIC: \"unauthenticated.DCAE_CL_OUTPUT\"\n DMAAPSUBTOPIC: \"unauthenticated.VES_MEASUREMENT_OUTPUT\"\n AAIHOST:\n { get_input: aaiEnrichmentHost }\n AAIPORT:\n { get_input: aaiEnrichmentPort }\n CONSUL_HOST:\n { get_input: consul_host }\n CONSUL_PORT:\n { get_input: consul_port }\n CBS_HOST:\n { get_input: cbs_host }\n CBS_PORT:\n { get_input: cbs_port }\n CONFIG_BINDING_SERVICE: \"config_binding_service\"\n ports:\n - concat: [\"11011:\", { get_input: external_port }]\n tca_policy:\n type: dcae.nodes.policy\n properties:\n policy_id:\n get_input: policy_id\n policy_model_id: \n get_input: policy_model_id\n','typeId-0f2c9b76-d66b-42cc-a7ed-518351f6b084',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); +INSERT INTO `loop_templates` VALUES ('LOOP_TEMPLATE_ykXZp_v1_0_ResourceInstanceName2_tca_2','Not found','2020-03-13 13:23:59.627560','Not found','2020-03-13 13:23:59.627560','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-4b1f12aa-24aa-4716-8f72-d42f9d8d829b',0,'VESapp',1,'63cac700-ab9a-4115-a74f-7eac85e3fce0'); /*!40000 ALTER TABLE `loop_templates` ENABLE KEYS */; UNLOCK TABLES; @@ -122,9 +122,9 @@ UNLOCK TABLES; LOCK TABLES `looptemplates_to_loopelementmodels` WRITE; /*!40000 ALTER TABLE `looptemplates_to_loopelementmodels` DISABLE KEYS */; -INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_mnekp_v1_0_ResourceInstanceName1_tca',0); -INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_mnekp_v1_0_ResourceInstanceName1_tca_3',0); -INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_mnekp_v1_0_ResourceInstanceName2_tca_2',0); +INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_ykXZp_v1_0_ResourceInstanceName1_tca',0); +INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_ykXZp_v1_0_ResourceInstanceName1_tca_3',0); +INSERT INTO `looptemplates_to_loopelementmodels` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','LOOP_TEMPLATE_ykXZp_v1_0_ResourceInstanceName2_tca_2',0); /*!40000 ALTER TABLE `looptemplates_to_loopelementmodels` ENABLE KEYS */; UNLOCK TABLES; @@ -152,13 +152,13 @@ UNLOCK TABLES; LOCK TABLES `policy_models` WRITE; /*!40000 ALTER TABLE `policy_models` DISABLE KEYS */; -INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.Blacklist','1.0.0','Not found','2020-03-13 11:00:00.756848','Not found','2020-03-13 11:00:01.083764','Blacklist','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.Blacklist:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports blacklist of entity id\'s from performing control loop actions on.\n properties:\n blacklist:\n type: list\n description: List of entity id\'s\n required: true\n entry_schema:\n type: string','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"xacml\"\n ]\n }\n ]\n}'); -INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.FrequencyLimiter','1.0.0','Not found','2020-03-13 11:00:00.565289','Not found','2020-03-13 11:00:01.126892','FrequencyLimiter','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.FrequencyLimiter:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports limiting the frequency of actions being taken by a Actor.\n properties:\n timeWindow:\n type: integer\n description: The time window to count the actions against.\n required: true\n timeUnits:\n type: string\n description: The units of time the window is counting.\n constraints:\n - valid_values: [\"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"year\"]\n limit:\n type: integer\n description: The limit\n required: true\n constraints:\n - greater_than: 0','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"xacml\"\n ]\n }\n ]\n}'); -INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.MinMax','2.0.0','Not found','2020-03-13 11:00:00.562857','Not found','2020-03-13 11:00:00.562857','MinMax','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.MinMax:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports Min/Max number of entity for scaling operations\n properties:\n min:\n type: integer\n required: true\n description: The minimum instances of this entity\n max:\n type: integer\n required: false\n description: The maximum instances of this entity',NULL); -INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Apex','1.0.0','Not found','2020-03-13 11:00:00.560476','Not found','2020-03-13 11:00:01.159737','Apex','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.operational.common.Apex:\n derived_from: onap.policies.controlloop.operational.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Operational policies for Apex PDP\n properties:\n engineServiceParameters:\n type: string\n description: The engine parameters like name, instanceCount, policy implementation, parameters etc.\n required: true\n eventInputParameters:\n type: string\n description: The event input parameters.\n required: true\n eventOutputParameters:\n type: string\n description: The event output parameters.\n required: true\n javaProperties:\n type: string\n description: Name/value pairs of properties to be set for APEX if needed.\n required: false\n onap.policies.controlloop.operational.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n Policy Types. This does NOT support the legacy Policy YAML policy type.\n properties:\n id:\n type: string\n description: The unique control loop id.\n required: true\n timeout:\n type: integer\n description: |\n Overall timeout for executing all the operations. This timeout should equal or exceed the total\n timeout for each operation listed.\n required: true\n abatement:\n type: boolean\n description: Whether an abatement event message will be expected for the control loop from DCAE.\n required: true\n default: false\n trigger:\n type: string\n description: Initial operation to execute upon receiving an Onset event message for the Control Loop.\n required: true\n operations:\n type: list\n description: List of operations to be performed when Control Loop is triggered.\n required: true\n entry_schema:\n type: onap.datatype.controlloop.Operation\ndata_types:\n onap.datatype.controlloop.Target:\n derived_from: tosca.datatypes.Root\n description: Definition for a entity in A&AI to perform a control loop operation on\n properties:\n targetType:\n type: string\n description: Category for the target type\n required: true\n constraints:\n - valid_values: [VNF, VM, VFMODULE, PNF]\n entityIds:\n type: map\n description: |\n Map of values that identify the resource. If none are provided, it is assumed that the\n entity that generated the ONSET event will be the target.\n required: false\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Actor:\n derived_from: tosca.datatypes.Root\n description: An actor/operation/target definition\n properties:\n actor:\n type: string\n description: The actor performing the operation.\n required: true\n operation:\n type: string\n description: The operation the actor is performing.\n required: true\n target:\n type: onap.datatype.controlloop.Target\n description: The resource the operation should be performed on.\n required: true\n metadata:\n clamp_possible_values: test\n payload:\n type: map\n description: Name/value pairs of payload information passed by Policy to the actor\n required: false\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Operation:\n derived_from: tosca.datatypes.Root\n description: An operation supported by an actor\n properties:\n id:\n type: string\n description: Unique identifier for the operation\n required: true\n description:\n type: string\n description: A user-friendly description of the intent for the operation\n required: false\n operation:\n type: onap.datatype.controlloop.Actor\n description: The definition of the operation to be performed.\n required: true\n metadata:\n clamp_possible_values: test\n timeout:\n type: integer\n description: The amount of time for the actor to perform the operation.\n required: true\n retries:\n type: integer\n description: The number of retries the actor should attempt to perform the operation.\n required: true\n default: 0\n success:\n type: string\n description: Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.\n required: false\n default: final_success\n failure:\n type: string\n description: Points to the operation to invoke on Actor operation failure.\n required: false\n default: final_failure\n failure_timeout:\n type: string\n description: Points to the operation to invoke when the time out for the operation occurs.\n required: false\n default: final_failure_timeout\n failure_retries:\n type: string\n description: Points to the operation to invoke when the current operation has exceeded its max retries.\n required: false\n default: final_failure_retries\n failure_exception:\n type: string\n description: Points to the operation to invoke when the current operation causes an exception.\n required: false\n default: final_failure_exception\n failure_guard:\n type: string\n description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.\n required: false\n default: final_failure_guard','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"drools\"\n ]\n }\n ]\n}'); -INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Drools','1.0.0','Not found','2020-03-13 11:00:00.560585','Not found','2020-03-13 11:00:01.212654','Drools','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.operational.common.Drools:\n derived_from: onap.policies.controlloop.operational.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Operational policies for Drools PDP\n properties:\n controllerName:\n type: string\n description: Drools controller properties\n required: false\n onap.policies.controlloop.operational.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n Policy Types. This does NOT support the legacy Policy YAML policy type.\n properties:\n id:\n type: string\n description: The unique control loop id.\n required: true\n timeout:\n type: integer\n description: |\n Overall timeout for executing all the operations. This timeout should equal or exceed the total\n timeout for each operation listed.\n required: true\n abatement:\n type: boolean\n description: Whether an abatement event message will be expected for the control loop from DCAE.\n required: true\n default: false\n trigger:\n type: string\n description: Initial operation to execute upon receiving an Onset event message for the Control Loop.\n required: true\n operations:\n type: list\n description: List of operations to be performed when Control Loop is triggered.\n required: true\n entry_schema:\n type: onap.datatype.controlloop.Operation\ndata_types:\n onap.datatype.controlloop.Target:\n derived_from: tosca.datatypes.Root\n description: Definition for a entity in A&AI to perform a control loop operation on\n properties:\n targetType:\n type: string\n description: Category for the target type\n required: true\n constraints:\n - valid_values: [VNF, VM, VFMODULE, PNF]\n entityIds:\n type: map\n description: |\n Map of values that identify the resource. If none are provided, it is assumed that the\n entity that generated the ONSET event will be the target.\n required: false\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Actor:\n derived_from: tosca.datatypes.Root\n description: An actor/operation/target definition\n properties:\n actor:\n type: string\n description: The actor performing the operation.\n required: true\n operation:\n type: string\n description: The operation the actor is performing.\n required: true\n target:\n type: onap.datatype.controlloop.Target\n description: The resource the operation should be performed on.\n required: true\n metadata:\n clamp_possible_values: test\n payload:\n type: map\n description: Name/value pairs of payload information passed by Policy to the actor\n required: false\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Operation:\n derived_from: tosca.datatypes.Root\n description: An operation supported by an actor\n properties:\n id:\n type: string\n description: Unique identifier for the operation\n required: true\n description:\n type: string\n description: A user-friendly description of the intent for the operation\n required: false\n operation:\n type: onap.datatype.controlloop.Actor\n description: The definition of the operation to be performed.\n required: true\n metadata:\n clamp_possible_values: test\n timeout:\n type: integer\n description: The amount of time for the actor to perform the operation.\n required: true\n retries:\n type: integer\n description: The number of retries the actor should attempt to perform the operation.\n required: true\n default: 0\n success:\n type: string\n description: Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.\n required: false\n default: final_success\n failure:\n type: string\n description: Points to the operation to invoke on Actor operation failure.\n required: false\n default: final_failure\n failure_timeout:\n type: string\n description: Points to the operation to invoke when the time out for the operation occurs.\n required: false\n default: final_failure_timeout\n failure_retries:\n type: string\n description: Points to the operation to invoke when the current operation has exceeded its max retries.\n required: false\n default: final_failure_retries\n failure_exception:\n type: string\n description: Points to the operation to invoke when the current operation causes an exception.\n required: false\n default: final_failure_exception\n failure_guard:\n type: string\n description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.\n required: false\n default: final_failure_guard','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"drools\"\n ]\n }\n ]\n}'); -INSERT INTO `policy_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','1.0.0','Not found','2020-03-13 10:59:53.506410','Not found','2020-03-13 11:00:01.250555','app','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.Monitoring:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: a base policy type for all policies that govern monitoring provisioning\n onap.policies.monitoring.cdap.tca.hi.lo.app:\n derived_from: onap.policies.Monitoring\n version: 1.0.0\n properties:\n tca_policy:\n type: onap.datatypes.monitoring.tca_policy\n description: TCA Policy JSON\n required: true\ndata_types:\n onap.datatypes.monitoring.metricsPerEventName:\n derived_from: tosca.datatypes.Root\n properties:\n controlLoopSchemaType:\n type: string\n required: true\n description: Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\n constraints:\n - valid_values:\n - VM\n - VNF\n eventName:\n type: string\n required: true\n description: Event name to which thresholds need to be applied\n policyName:\n type: string\n required: true\n description: TCA Policy Scope Name\n policyScope:\n type: string\n required: true\n description: TCA Policy Scope\n policyVersion:\n type: string\n required: true\n description: TCA Policy Scope Version\n thresholds:\n type: list\n required: true\n description: Thresholds associated with eventName\n entry_schema:\n type: onap.datatypes.monitoring.thresholds\n onap.datatypes.monitoring.tca_policy:\n derived_from: tosca.datatypes.Root\n properties:\n domain:\n type: string\n required: true\n description: Domain name to which TCA needs to be applied\n default: measurementsForVfScaling\n constraints:\n - equal: measurementsForVfScaling\n metricsPerEventName:\n type: list\n required: true\n description: Contains eventName and threshold details that need to be applied to given eventName\n entry_schema:\n type: onap.datatypes.monitoring.metricsPerEventName\n onap.datatypes.monitoring.thresholds:\n derived_from: tosca.datatypes.Root\n properties:\n closedLoopControlName:\n type: string\n required: true\n description: Closed Loop Control Name associated with the threshold\n closedLoopEventStatus:\n type: string\n required: true\n description: Closed Loop Event Status of the threshold\n constraints:\n - valid_values:\n - ONSET\n - ABATED\n direction:\n type: string\n required: true\n description: Direction of the threshold\n constraints:\n - valid_values:\n - LESS\n - LESS_OR_EQUAL\n - GREATER\n - GREATER_OR_EQUAL\n - EQUAL\n fieldPath:\n type: string\n required: true\n description: Json field Path as per CEF message which needs to be analyzed for TCA\n constraints:\n - valid_values:\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage\n - $.event.measurementsForVfScalingFields.meanRequestLatency\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed\n - $.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\n severity:\n type: string\n required: true\n description: Threshold Event Severity\n constraints:\n - valid_values:\n - CRITICAL\n - MAJOR\n - MINOR\n - WARNING\n - NORMAL\n thresholdValue:\n type: integer\n required: true\n description: Threshold value for the field Path inside CEF message\n version:\n type: string\n required: true\n description: Version number associated with the threshold','{\n \"supportedPdpGroups\": [\n {\n \"monitoring\": [\n \"xacml\"\n ]\n }\n ]\n}'); -INSERT INTO `policy_models` VALUES ('onap.policies.operational.legacy','1.0.0','Not found','2020-03-13 10:58:57.288612','Not found','2020-03-13 10:58:57.288612','OperationalPolicyLegacy','',NULL); +INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.Blacklist','1.0.0','Not found','2020-03-13 13:24:07.091190','Not found','2020-03-13 13:24:07.620720','Blacklist','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.Blacklist:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports blacklist of entity id\'s from performing control loop actions on.\n properties:\n blacklist:\n type: list\n description: List of entity id\'s\n required: true\n entry_schema:\n type: string','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"xacml\"\n ]\n }\n ]\n}'); +INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.FrequencyLimiter','1.0.0','Not found','2020-03-13 13:24:07.004259','Not found','2020-03-13 13:24:07.653588','FrequencyLimiter','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.FrequencyLimiter:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports limiting the frequency of actions being taken by a Actor.\n properties:\n timeWindow:\n type: integer\n description: The time window to count the actions against.\n required: true\n timeUnits:\n type: string\n description: The units of time the window is counting.\n constraints:\n - valid_values: [\"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"year\"]\n limit:\n type: integer\n description: The limit\n required: true\n constraints:\n - greater_than: 0','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"xacml\"\n ]\n }\n ]\n}'); +INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.guard.common.MinMax','2.0.0','Not found','2020-03-13 13:24:07.004022','Not found','2020-03-13 13:24:07.004022','MinMax','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.guard.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n This is the base Policy Type for Guard policies that guard the execution of Operational\n Policies.\n properties:\n actor:\n type: string\n description: Specifies the Actor the guard applies to.\n required: true\n operation:\n type: string\n description: Specified the operation that the actor is performing the guard applies to.\n required: true\n timeRange:\n type: tosca.datatypes.TimeInterval\n description: |\n An optional range of time during the day the guard policy is valid for.\n required: false\n id:\n type: string\n description: The Control Loop id this applies to.\n required: false\n onap.policies.controlloop.guard.common.MinMax:\n derived_from: onap.policies.controlloop.guard.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Supports Min/Max number of entity for scaling operations\n properties:\n min:\n type: integer\n required: true\n description: The minimum instances of this entity\n max:\n type: integer\n required: false\n description: The maximum instances of this entity',NULL); +INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Apex','1.0.0','Not found','2020-03-13 13:24:07.004010','Not found','2020-03-13 13:24:07.664075','Apex','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.operational.common.Apex:\n derived_from: onap.policies.controlloop.operational.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Operational policies for Apex PDP\n properties:\n engineServiceParameters:\n type: string\n description: The engine parameters like name, instanceCount, policy implementation, parameters etc.\n required: true\n eventInputParameters:\n type: string\n description: The event input parameters.\n required: true\n eventOutputParameters:\n type: string\n description: The event output parameters.\n required: true\n javaProperties:\n type: string\n description: Name/value pairs of properties to be set for APEX if needed.\n required: false\n onap.policies.controlloop.operational.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n Policy Types. This does NOT support the legacy Policy YAML policy type.\n properties:\n id:\n type: string\n description: The unique control loop id.\n required: true\n timeout:\n type: integer\n description: |\n Overall timeout for executing all the operations. This timeout should equal or exceed the total\n timeout for each operation listed.\n required: true\n abatement:\n type: boolean\n description: Whether an abatement event message will be expected for the control loop from DCAE.\n required: true\n default: false\n trigger:\n type: string\n description: Initial operation to execute upon receiving an Onset event message for the Control Loop.\n required: true\n operations:\n type: list\n description: List of operations to be performed when Control Loop is triggered.\n required: true\n entry_schema:\n type: onap.datatype.controlloop.Operation\ndata_types:\n onap.datatype.controlloop.Target:\n derived_from: tosca.datatypes.Root\n description: Definition for a entity in A&AI to perform a control loop operation on\n properties:\n targetType:\n type: string\n description: Category for the target type\n required: true\n constraints:\n - valid_values: [VNF, VM, VFMODULE, PNF]\n entityIds:\n type: map\n description: |\n Map of values that identify the resource. If none are provided, it is assumed that the\n entity that generated the ONSET event will be the target.\n required: false\n metadata:\n clamp_possible_values: test\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Actor:\n derived_from: tosca.datatypes.Root\n description: An actor/operation/target definition\n properties:\n actor:\n type: string\n description: The actor performing the operation.\n required: true\n metadata:\n clamp_possible_values: test\n operation:\n type: string\n description: The operation the actor is performing.\n required: true\n metadata:\n clamp_possible_values: test\n target:\n type: onap.datatype.controlloop.Target\n description: The resource the operation should be performed on.\n required: true\n metadata:\n clamp_possible_values: test\n payload:\n type: map\n description: Name/value pairs of payload information passed by Policy to the actor\n required: false\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Operation:\n derived_from: tosca.datatypes.Root\n description: An operation supported by an actor\n properties:\n id:\n type: string\n description: Unique identifier for the operation\n required: true\n description:\n type: string\n description: A user-friendly description of the intent for the operation\n required: false\n operation:\n type: onap.datatype.controlloop.Actor\n description: The definition of the operation to be performed.\n required: true\n timeout:\n type: integer\n description: The amount of time for the actor to perform the operation.\n required: true\n retries:\n type: integer\n description: The number of retries the actor should attempt to perform the operation.\n required: true\n default: 0\n success:\n type: string\n description: Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.\n required: false\n default: final_success\n failure:\n type: string\n description: Points to the operation to invoke on Actor operation failure.\n required: false\n default: final_failure\n failure_timeout:\n type: string\n description: Points to the operation to invoke when the time out for the operation occurs.\n required: false\n default: final_failure_timeout\n failure_retries:\n type: string\n description: Points to the operation to invoke when the current operation has exceeded its max retries.\n required: false\n default: final_failure_retries\n failure_exception:\n type: string\n description: Points to the operation to invoke when the current operation causes an exception.\n required: false\n default: final_failure_exception\n failure_guard:\n type: string\n description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.\n required: false\n default: final_failure_guard','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"drools\"\n ]\n }\n ]\n}'); +INSERT INTO `policy_models` VALUES ('onap.policies.controlloop.operational.common.Drools','1.0.0','Not found','2020-03-13 13:24:07.025409','Not found','2020-03-13 13:24:07.683584','Drools','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.controlloop.operational.common.Drools:\n derived_from: onap.policies.controlloop.operational.Common\n type_version: 1.0.0\n version: 1.0.0\n description: Operational policies for Drools PDP\n properties:\n controllerName:\n type: string\n description: Drools controller properties\n required: false\n onap.policies.controlloop.operational.Common:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: |\n Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant\n Policy Types. This does NOT support the legacy Policy YAML policy type.\n properties:\n id:\n type: string\n description: The unique control loop id.\n required: true\n timeout:\n type: integer\n description: |\n Overall timeout for executing all the operations. This timeout should equal or exceed the total\n timeout for each operation listed.\n required: true\n abatement:\n type: boolean\n description: Whether an abatement event message will be expected for the control loop from DCAE.\n required: true\n default: false\n trigger:\n type: string\n description: Initial operation to execute upon receiving an Onset event message for the Control Loop.\n required: true\n operations:\n type: list\n description: List of operations to be performed when Control Loop is triggered.\n required: true\n entry_schema:\n type: onap.datatype.controlloop.Operation\ndata_types:\n onap.datatype.controlloop.Target:\n derived_from: tosca.datatypes.Root\n description: Definition for a entity in A&AI to perform a control loop operation on\n properties:\n targetType:\n type: string\n description: Category for the target type\n required: true\n constraints:\n - valid_values: [VNF, VM, VFMODULE, PNF]\n entityIds:\n type: map\n description: |\n Map of values that identify the resource. If none are provided, it is assumed that the\n entity that generated the ONSET event will be the target.\n required: false\n metadata:\n clamp_possible_values: test\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Actor:\n derived_from: tosca.datatypes.Root\n description: An actor/operation/target definition\n properties:\n actor:\n type: string\n description: The actor performing the operation.\n required: true\n metadata:\n clamp_possible_values: test\n operation:\n type: string\n description: The operation the actor is performing.\n required: true\n metadata:\n clamp_possible_values: test\n target:\n type: onap.datatype.controlloop.Target\n description: The resource the operation should be performed on.\n required: true\n metadata:\n clamp_possible_values: test\n payload:\n type: map\n description: Name/value pairs of payload information passed by Policy to the actor\n required: false\n entry_schema:\n type: string\n\n onap.datatype.controlloop.Operation:\n derived_from: tosca.datatypes.Root\n description: An operation supported by an actor\n properties:\n id:\n type: string\n description: Unique identifier for the operation\n required: true\n description:\n type: string\n description: A user-friendly description of the intent for the operation\n required: false\n operation:\n type: onap.datatype.controlloop.Actor\n description: The definition of the operation to be performed.\n required: true\n timeout:\n type: integer\n description: The amount of time for the actor to perform the operation.\n required: true\n retries:\n type: integer\n description: The number of retries the actor should attempt to perform the operation.\n required: true\n default: 0\n success:\n type: string\n description: Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.\n required: false\n default: final_success\n failure:\n type: string\n description: Points to the operation to invoke on Actor operation failure.\n required: false\n default: final_failure\n failure_timeout:\n type: string\n description: Points to the operation to invoke when the time out for the operation occurs.\n required: false\n default: final_failure_timeout\n failure_retries:\n type: string\n description: Points to the operation to invoke when the current operation has exceeded its max retries.\n required: false\n default: final_failure_retries\n failure_exception:\n type: string\n description: Points to the operation to invoke when the current operation causes an exception.\n required: false\n default: final_failure_exception\n failure_guard:\n type: string\n description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.\n required: false\n default: final_failure_guard','{\n \"supportedPdpGroups\": [\n {\n \"controlloop\": [\n \"drools\"\n ]\n }\n ]\n}'); +INSERT INTO `policy_models` VALUES ('onap.policies.monitoring.cdap.tca.hi.lo.app','1.0.0','Not found','2020-03-13 13:23:59.685094','Not found','2020-03-13 13:24:07.709071','app','tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n onap.policies.Monitoring:\n derived_from: tosca.policies.Root\n version: 1.0.0\n description: a base policy type for all policies that govern monitoring provisioning\n onap.policies.monitoring.cdap.tca.hi.lo.app:\n derived_from: onap.policies.Monitoring\n version: 1.0.0\n properties:\n tca_policy:\n type: onap.datatypes.monitoring.tca_policy\n description: TCA Policy JSON\n required: true\ndata_types:\n onap.datatypes.monitoring.metricsPerEventName:\n derived_from: tosca.datatypes.Root\n properties:\n controlLoopSchemaType:\n type: string\n required: true\n description: Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\n constraints:\n - valid_values:\n - VM\n - VNF\n eventName:\n type: string\n required: true\n description: Event name to which thresholds need to be applied\n policyName:\n type: string\n required: true\n description: TCA Policy Scope Name\n policyScope:\n type: string\n required: true\n description: TCA Policy Scope\n policyVersion:\n type: string\n required: true\n description: TCA Policy Scope Version\n thresholds:\n type: list\n required: true\n description: Thresholds associated with eventName\n entry_schema:\n type: onap.datatypes.monitoring.thresholds\n onap.datatypes.monitoring.tca_policy:\n derived_from: tosca.datatypes.Root\n properties:\n domain:\n type: string\n required: true\n description: Domain name to which TCA needs to be applied\n default: measurementsForVfScaling\n constraints:\n - equal: measurementsForVfScaling\n metricsPerEventName:\n type: list\n required: true\n description: Contains eventName and threshold details that need to be applied to given eventName\n entry_schema:\n type: onap.datatypes.monitoring.metricsPerEventName\n onap.datatypes.monitoring.thresholds:\n derived_from: tosca.datatypes.Root\n properties:\n closedLoopControlName:\n type: string\n required: true\n description: Closed Loop Control Name associated with the threshold\n closedLoopEventStatus:\n type: string\n required: true\n description: Closed Loop Event Status of the threshold\n constraints:\n - valid_values:\n - ONSET\n - ABATED\n direction:\n type: string\n required: true\n description: Direction of the threshold\n constraints:\n - valid_values:\n - LESS\n - LESS_OR_EQUAL\n - GREATER\n - GREATER_OR_EQUAL\n - EQUAL\n fieldPath:\n type: string\n required: true\n description: Json field Path as per CEF message which needs to be analyzed for TCA\n constraints:\n - valid_values:\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage\n - $.event.measurementsForVfScalingFields.meanRequestLatency\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed\n - $.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\n severity:\n type: string\n required: true\n description: Threshold Event Severity\n constraints:\n - valid_values:\n - CRITICAL\n - MAJOR\n - MINOR\n - WARNING\n - NORMAL\n thresholdValue:\n type: integer\n required: true\n description: Threshold value for the field Path inside CEF message\n version:\n type: string\n required: true\n description: Version number associated with the threshold','{\n \"supportedPdpGroups\": [\n {\n \"monitoring\": [\n \"xacml\"\n ]\n }\n ]\n}'); +INSERT INTO `policy_models` VALUES ('onap.policies.operational.legacy','1.0.0','Not found','2020-03-13 13:22:52.629787','Not found','2020-03-13 13:22:52.629787','OperationalPolicyLegacy','',NULL); /*!40000 ALTER TABLE `policy_models` ENABLE KEYS */; UNLOCK TABLES; @@ -180,4 +180,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2020-03-13 18:01:08 +-- Dump completed on 2020-03-13 20:25:40 diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java index 355a889e..528d695c 100644 --- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java +++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java @@ -152,6 +152,7 @@ public class OperationalPolicy extends Policy implements Serializable { /** * This method can generate a Json representation (json schema) for an operational policy. * This is mainly to support a legacy case and a generic case. + * For the legacy case the operational policy given is modified (configurationJson). * * @param operationalPolicy The operational policy * @param toscaConverter The tosca converter @@ -166,7 +167,7 @@ public class OperationalPolicy extends Policy implements Serializable { } if (operationalPolicy.isLegacy()) { // Op policy Legacy case - LegacyOperationalPolicy.preloadConfiguration(jsonReturned, operationalPolicy.loop); + LegacyOperationalPolicy.preloadConfiguration(operationalPolicy.getConfigurationsJson(), operationalPolicy.loop); jsonReturned = OperationalPolicyRepresentationBuilder .generateOperationalPolicySchema(operationalPolicy.loop.getModelService()); } diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java index 0298cfde..c88c1b98 100644 --- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java +++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java @@ -52,15 +52,13 @@ public class OperationalPolicyRepresentationBuilder { JsonObject jsonSchema = JsonUtils.GSON.fromJson( ResourceFileUtil.getResourceAsString("clds/json-schema/operational_policies/operational_policy.json"), JsonObject.class); - jsonSchema.get("schema").getAsJsonObject().get("items").getAsJsonObject().get("properties").getAsJsonObject() - .get("configurationsJson").getAsJsonObject().get("properties").getAsJsonObject() + jsonSchema.get("properties").getAsJsonObject() .get("operational_policy").getAsJsonObject().get("properties").getAsJsonObject().get("policies") .getAsJsonObject().get("items").getAsJsonObject().get("properties").getAsJsonObject().get("target") .getAsJsonObject().get("anyOf").getAsJsonArray().addAll(createAnyOfArray(modelJson)); // update CDS recipe and payload information to schema - JsonArray actors = jsonSchema.get("schema").getAsJsonObject().get("items").getAsJsonObject().get("properties") - .getAsJsonObject().get("configurationsJson").getAsJsonObject().get("properties").getAsJsonObject() + JsonArray actors = jsonSchema.get("properties").getAsJsonObject() .get("operational_policy").getAsJsonObject().get("properties").getAsJsonObject().get("policies") .getAsJsonObject().get("items").getAsJsonObject().get("properties").getAsJsonObject().get("actor") .getAsJsonObject().get("anyOf").getAsJsonArray(); diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html index 0451f1e0..61b9d26c 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
  • 2. Paths
      -
    • 2.1. GET /v1/healthcheck +
    • 2.1. GET /v1/healthcheck
    • -
    • 2.2. GET /v1/user/getUser +
    • 2.2. GET /v1/user/getUser
    • -
    • 2.3. GET /v2/clampInformation +
    • 2.3. GET /v2/clampInformation
    • -
    • 2.4. GET /v2/dictionary +
    • 2.4. GET /v2/dictionary
    • -
    • 2.5. PUT /v2/dictionary +
    • 2.5. PUT /v2/dictionary
    • -
    • 2.9. DELETE /v2/dictionary/{name} +
    • 2.9. DELETE /v2/dictionary/{name}
    • -
    • 2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion} +
    • 2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}
    • -
    • 2.12. POST /v2/loop/create/{loopName}?templateName={templateName} +
    • 2.12. POST /v2/loop/create/{loopName}?templateName={templateName}
    • -
    • 2.13. PUT /v2/loop/delete/{loopName} +
    • 2.13. PUT /v2/loop/delete/{loopName}
    • -
    • 2.14. PUT /v2/loop/deploy/{loopName} +
    • 2.14. PUT /v2/loop/deploy/{loopName}
    • -
    • 2.15. GET /v2/loop/getAllNames +
    • 2.15. GET /v2/loop/getAllNames
    • -
    • 2.16. GET /v2/loop/getstatus/{loopName} +
    • 2.16. GET /v2/loop/getstatus/{loopName}
    • -
    • 2.17. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName} +
    • 2.17. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}
    • -
    • 2.18. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion} +
    • 2.18. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}
    • -
    • 2.19. PUT /v2/loop/restart/{loopName} +
    • 2.19. PUT /v2/loop/restart/{loopName}
    • -
    • 2.20. PUT /v2/loop/stop/{loopName} +
    • 2.20. PUT /v2/loop/stop/{loopName}
    • -
    • 2.21. PUT /v2/loop/submit/{loopName} +
    • 2.21. PUT /v2/loop/submit/{loopName}
    • -
    • 2.22. GET /v2/loop/svgRepresentation/{loopName} +
    • 2.22. GET /v2/loop/svgRepresentation/{loopName}
    • -
    • 2.23. PUT /v2/loop/undeploy/{loopName} +
    • 2.23. PUT /v2/loop/undeploy/{loopName}
    • -
    • 2.24. POST /v2/loop/updateGlobalProperties/{loopName} +
    • 2.24. POST /v2/loop/updateGlobalProperties/{loopName}
    • -
    • 2.25. POST /v2/loop/updateMicroservicePolicy/{loopName} +
    • 2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}
    • -
    • 2.26. POST /v2/loop/updateOperationalPolicies/{loopName} +
    • 2.26. POST /v2/loop/updateOperationalPolicies/{loopName}
    • -
    • 2.27. GET /v2/loop/{loopName} +
    • 2.27. GET /v2/loop/{loopName}
    • -
    • 2.28. POST /v2/policyToscaModels +
    • 2.28. POST /v2/policyToscaModels
    • -
    • 2.29. GET /v2/policyToscaModels +
    • 2.29. GET /v2/policyToscaModels
    • -
    • 2.32. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion} +
    • 2.32. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}
    • -
    • 2.33. GET /v2/templates +
    • 2.33. GET /v2/templates
      • 2.33.1. Responses
      • 2.33.2. Produces
      • @@ -736,7 +736,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

        1.2. URI scheme

        -

        Host : localhost:41607
        +

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

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

        2. Paths

        -

        2.1. GET /v1/healthcheck

        +

        2.1. GET /v1/healthcheck

        2.1.1. Responses

        @@ -784,7 +784,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -818,7 +818,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -855,7 +855,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -892,7 +892,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1141,7 +1141,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1265,7 +1265,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1339,7 +1339,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1411,7 +1411,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1460,7 +1460,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1522,7 +1522,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1559,7 +1559,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1621,7 +1621,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1683,7 +1683,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1757,7 +1757,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1819,7 +1819,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1881,7 +1881,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -1943,7 +1943,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -2005,7 +2005,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -2067,7 +2067,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -2145,7 +2145,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -2223,7 +2223,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -2301,7 +2301,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -2363,7 +2363,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -2435,7 +2435,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -2608,7 +2608,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        @@ -2692,7 +2692,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
        diff --git a/src/main/resources/clds/json-schema/operational_policies/operational_policy.json b/src/main/resources/clds/json-schema/operational_policies/operational_policy.json index ef22e815..49d7878a 100644 --- a/src/main/resources/clds/json-schema/operational_policies/operational_policy.json +++ b/src/main/resources/clds/json-schema/operational_policies/operational_policy.json @@ -1,483 +1,464 @@ { - "schema": { - "uniqueItems": "true", - "format": "tabs", - "type": "array", - "minItems": 1, - "maxItems": 1, - "title": "Operational policies", - "items": { + "type": "object", + "title": "Configuration", + "required": [ + "operational_policy", + "guard_policies" + ], + "properties": { + "operational_policy": { + "type": "object", + "title": "Related Parameters", + "required": [ + "controlLoop", + "policies" + ], + "properties": { + "controlLoop": { + "type": "object", + "title": "Control Loop details", + "required": [ + "timeout", + "abatement", + "trigger_policy", + "controlLoopName" + ], + "properties": { + "timeout": { + "type": "string", + "title": "Overall Time Limit", + "default": "0", + "format": "number" + }, + "abatement": { + "type": "string", + "title": "Abatement", + "enum": [ + "True", + "False" + ] + }, + "trigger_policy": { + "type": "string", + "title": "Policy Decision Entry" + }, + "controlLoopName": { + "type": "string", + "title": "Control loop name", + "readOnly": "True" + } + } + }, + "policies": { + "uniqueItems": "true", + "id": "policies_array", + "type": "array", + "title": "Policy Decision Tree", + "format": "tabs-top", + "items": { + "title": "Policy Decision", "type": "object", - "title": "Operational Policy Item", - "id": "operational_policy_item", - "headerTemplate": "{{self.name}}", + "id": "policy_item", + "headerTemplate": "{{self.id}} - {{self.recipe}}", + "format": "categories", + "basicCategoryTitle": "recipe", "required": [ - "name", - "configurationsJson" + "id", + "retry", + "timeout", + "actor", + "success", + "failure", + "failure_timeout", + "failure_retries", + "failure_exception", + "failure_guard", + "target" ], "properties": { - "name": { - "type": "string", - "title": "Operational policy name", - "readOnly": "True" - }, - "configurationsJson": { - "type": "object", - "title": "Configuration", - "required": [ - "operational_policy", - "guard_policies" - ], + "id": { + "default": "Policy 1", + "title": "Policy ID", + "type": "string" + }, + "retry": { + "default": "0", + "title": "Number of Retry", + "type": "string", + "format": "number" + }, + "timeout": { + "default": "0", + "title": "Timeout", + "type": "string", + "format": "number" + }, + "actor": { + "type": "object", + "title": "Actor", + "anyOf": [ + { + "title": "APPC", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "APPC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "SO", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "SO", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "VF Module Create", + "VF Module Delete" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "SDNC", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "SDNC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "Reroute", + "BandwidthOnDemand" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "VFC", "properties": { - "operational_policy": { - "type": "object", - "title": "Related Parameters", - "required": [ - "controlLoop", - "policies" - ], + "actor": { + "title": "actor", + "type": "string", + "default": "VFC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "required": [ + "payload" + ], + "default": "", + "enum": [ + "ModifyConfig" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "CDS", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "CDS", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "object", + "required": [ + "payload" + ], + "anyOf": [ + { + "title": "user-defined", "properties": { - "controlLoop": { - "type": "object", - "title": "Control Loop details", - "required": [ - "timeout", - "abatement", - "trigger_policy", - "controlLoopName" - ], - "properties": { - "timeout": { - "type": "string", - "title": "Overall Time Limit", - "default": "0", - "format": "number" - }, - "abatement": { - "type": "string", - "title": "Abatement", - "enum": [ - "True", - "False" - ] - }, - "trigger_policy": { - "type": "string", - "title": "Policy Decision Entry" - }, - "controlLoopName": { - "type": "string", - "title": "Control loop name", - "readOnly": "True" - } - } - }, - "policies": { - "uniqueItems": "true", - "id": "policies_array", - "type": "array", - "title": "Policy Decision Tree", - "format": "tabs-top", - "items": { - "title": "Policy Decision", - "type": "object", - "id": "policy_item", - "headerTemplate": "{{self.id}} - {{self.recipe}}", - "format": "categories", - "basicCategoryTitle": "recipe", - "required": [ - "id", - "retry", - "timeout", - "actor", - "success", - "failure", - "failure_timeout", - "failure_retries", - "failure_exception", - "failure_guard", - "target" - ], - "properties": { - "id": { - "default": "Policy 1", - "title": "Policy ID", - "type": "string" - }, - "retry": { - "default": "0", - "title": "Number of Retry", - "type": "string", - "format": "number" - }, - "timeout": { - "default": "0", - "title": "Timeout", - "type": "string", - "format": "number" - }, - "actor": { - "type": "object", - "title": "Actor", - "anyOf": [ - { - "title": "APPC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "APPC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "SO", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "SO", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "VF Module Create", - "VF Module Delete" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "SDNC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "SDNC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "Reroute", - "BandwidthOnDemand" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "VFC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "VFC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "required": [ - "payload" - ], - "default": "", - "enum": [ - "ModifyConfig" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "CDS", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "CDS", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "object", - "required": [ - "payload" - ], - "anyOf": [ - { - "title": "user-defined", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default" : "", - "format" : "textarea" - } - } - } - ] - } - } - } - ] - }, - "success": { - "default": "final_success", - "title": "When Success", - "type": "string" - }, - "failure": { - "default": "final_failure", - "title": "When Failure", - "type": "string" - }, - "failure_timeout": { - "default": "final_failure_timeout", - "title": "When Failure Timeout", - "type": "string" - }, - "failure_retries": { - "default": "final_failure_retries", - "title": "When Failure Retries", - "type": "string" - }, - "failure_exception": { - "default": "final_failure_exception", - "title": "When Failure Exception", - "type": "string" - }, - "failure_guard": { - "default": "final_failure_guard", - "title": "When Failure Guard", - "type": "string" - }, - "target": { - "type": "object", - "required": [ - "type", - "resourceID" - ], - "anyOf": [ - { - "title": "User Defined", - "additionalProperties": "True", - "properties": { - "type": { - "title": "Target type", - "type": "string", - "default": "", - "enum": [ - "VNF", - "VFMODULE", - "VM" - ] - }, - "resourceID": { - "title": "Target type", - "type": "string", - "default": "" - } - } - } - ] - } - } - } - } + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "", + "format": "textarea" + } } - }, - "guard_policies": { - "type": "array", - "format": "tabs-top", - "title": "Associated Guard policies", - "items": { - "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}", - "anyOf": [ - { - "title": "Guard MinMax", - "type": "object", - "properties": { - "policy-id": { - "type": "string", - "default": "guard.minmax.new", - "pattern": "^(guard.minmax\\..*)$" - }, - "content": { - "properties": { - "actor": { - "type": "string", - "enum": [ - "APPC", - "SO", - "VFC", - "SDNC", - "SDNR" - ] - }, - "recipe": { - "type": "string", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig", - "VF Module Create", - "VF Module Delete", - "Reroute" - ] - }, - "targets": { - "type": "string", - "default": ".*" - }, - "clname": { - "type": "string", - "template": "{{loopName}}", - "watch": { - "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName" - } - }, - "guardActiveStart": { - "type": "string", - "default": "00:00:00Z" - }, - "guardActiveEnd": { - "type": "string", - "default": "10:00:00Z" - }, - "min": { - "type": "string", - "default": "0" - }, - "max": { - "type": "string", - "default": "1" - } - } - } - } - }, - { - "title": "Guard Frequency", - "type": "object", - "properties": { - "policy-id": { - "type": "string", - "default": "guard.frequency.new", - "pattern": "^(guard.frequency\\..*)$" - }, - "content": { - "properties": { - "actor": { - "type": "string", - "enum": [ - "APPC", - "SO", - "VFC", - "SDNC", - "SDNR" - ] - }, - "recipe": { - "type": "string", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig", - "VF Module Create", - "VF Module Delete", - "Reroute" - ] - }, - "targets": { - "type": "string", - "default": ".*" - }, - "clname": { - "type": "string", - "template": "{{loopName}}", - "watch": { - "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName" - } - }, - "guardActiveStart": { - "type": "string", - "default": "00:00:00Z" - }, - "guardActiveEnd": { - "type": "string", - "default": "10:00:00Z" - }, - "limit": { - "type": "string" - }, - "timeWindow": { - "type": "string" - }, - "timeUnits": { - "type": "string", - "enum":["minute","hour","day","week","month","year"] - } - } - } - } - } - ] - } - } + } + ] + } } - } + } + ] + }, + "success": { + "default": "final_success", + "title": "When Success", + "type": "string" + }, + "failure": { + "default": "final_failure", + "title": "When Failure", + "type": "string" + }, + "failure_timeout": { + "default": "final_failure_timeout", + "title": "When Failure Timeout", + "type": "string" + }, + "failure_retries": { + "default": "final_failure_retries", + "title": "When Failure Retries", + "type": "string" + }, + "failure_exception": { + "default": "final_failure_exception", + "title": "When Failure Exception", + "type": "string" + }, + "failure_guard": { + "default": "final_failure_guard", + "title": "When Failure Guard", + "type": "string" + }, + "target": { + "type": "object", + "required": [ + "type", + "resourceID" + ], + "anyOf": [ + { + "title": "User Defined", + "additionalProperties": "True", + "properties": { + "type": { + "title": "Target type", + "type": "string", + "default": "", + "enum": [ + "VNF", + "VFMODULE", + "VM" + ] + }, + "resourceID": { + "title": "Target type", + "type": "string", + "default": "" + } + } + } + ] + } } + } } + } + }, + "guard_policies": { + "type": "array", + "format": "tabs-top", + "title": "Associated Guard policies", + "items": { + "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}", + "anyOf": [ + { + "title": "Guard MinMax", + "type": "object", + "properties": { + "policy-id": { + "type": "string", + "default": "guard.minmax.new", + "pattern": "^(guard.minmax\\..*)$" + }, + "content": { + "properties": { + "actor": { + "type": "string", + "enum": [ + "APPC", + "SO", + "VFC", + "SDNC", + "SDNR" + ] + }, + "recipe": { + "type": "string", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig", + "VF Module Create", + "VF Module Delete", + "Reroute" + ] + }, + "targets": { + "type": "string", + "default": ".*" + }, + "clname": { + "type": "string", + "template": "{{loopName}}", + "watch": { + "loopName": "operational_policy.controlLoop.controlLoopName" + } + }, + "guardActiveStart": { + "type": "string", + "default": "00:00:00Z" + }, + "guardActiveEnd": { + "type": "string", + "default": "10:00:00Z" + }, + "min": { + "type": "string", + "default": "0" + }, + "max": { + "type": "string", + "default": "1" + } + } + } + } + }, + { + "title": "Guard Frequency", + "type": "object", + "properties": { + "policy-id": { + "type": "string", + "default": "guard.frequency.new", + "pattern": "^(guard.frequency\\..*)$" + }, + "content": { + "properties": { + "actor": { + "type": "string", + "enum": [ + "APPC", + "SO", + "VFC", + "SDNC", + "SDNR" + ] + }, + "recipe": { + "type": "string", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig", + "VF Module Create", + "VF Module Delete", + "Reroute" + ] + }, + "targets": { + "type": "string", + "default": ".*" + }, + "clname": { + "type": "string", + "template": "{{loopName}}", + "watch": { + "loopName": "operational_policy.controlLoop.controlLoopName" + } + }, + "guardActiveStart": { + "type": "string", + "default": "00:00:00Z" + }, + "guardActiveEnd": { + "type": "string", + "default": "10:00:00Z" + }, + "limit": { + "type": "string" + }, + "timeWindow": { + "type": "string" + }, + "timeUnits": { + "type": "string", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "year" + ] + } + } + } + } + } + ] + } } + } } + diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file index 64ba559c..7d694eb8 100644 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file @@ -71,6 +71,8 @@ data_types: Map of values that identify the resource. If none are provided, it is assumed that the entity that generated the ONSET event will be the target. required: false + metadata: + clamp_possible_values: test entry_schema: type: string @@ -82,10 +84,14 @@ data_types: type: string description: The actor performing the operation. required: true + metadata: + clamp_possible_values: test operation: type: string description: The operation the actor is performing. required: true + metadata: + clamp_possible_values: test target: type: onap.datatype.controlloop.Target description: The resource the operation should be performed on. @@ -115,8 +121,6 @@ data_types: type: onap.datatype.controlloop.Actor description: The definition of the operation to be performed. required: true - metadata: - clamp_possible_values: test timeout: type: integer description: The amount of time for the actor to perform the operation. diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file index 1c082b1e..24000993 100644 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file @@ -59,6 +59,8 @@ data_types: Map of values that identify the resource. If none are provided, it is assumed that the entity that generated the ONSET event will be the target. required: false + metadata: + clamp_possible_values: test entry_schema: type: string @@ -70,10 +72,14 @@ data_types: type: string description: The actor performing the operation. required: true + metadata: + clamp_possible_values: test operation: type: string description: The operation the actor is performing. required: true + metadata: + clamp_possible_values: test target: type: onap.datatype.controlloop.Target description: The resource the operation should be performed on. @@ -103,8 +109,6 @@ data_types: type: onap.datatype.controlloop.Actor description: The definition of the operation to be performed. required: true - metadata: - clamp_possible_values: test timeout: type: integer description: The amount of time for the actor to perform the operation. diff --git a/src/test/resources/tosca/operational-policy-json-schema.json b/src/test/resources/tosca/operational-policy-json-schema.json index b43f6f9d..6ab84a8c 100644 --- a/src/test/resources/tosca/operational-policy-json-schema.json +++ b/src/test/resources/tosca/operational-policy-json-schema.json @@ -1,760 +1,734 @@ { - "schema": { - "uniqueItems": "true", - "format": "tabs", - "type": "array", - "minItems": 1, - "maxItems": 1, - "title": "Operational policies", - "items": { - "type": "object", - "title": "Operational Policy Item", - "id": "operational_policy_item", - "headerTemplate": "{{self.name}}", - "required": [ - "name", - "configurationsJson" - ], - "properties": { - "name": { - "type": "string", - "title": "Operational policy name", - "readOnly": "True" - }, - "configurationsJson": { - "type": "object", - "title": "Configuration", - "required": [ - "operational_policy", - "guard_policies" - ], - "properties": { - "operational_policy": { - "type": "object", - "title": "Related Parameters", - "required": [ - "controlLoop", - "policies" - ], - "properties": { - "controlLoop": { - "type": "object", - "title": "Control Loop details", - "required": [ - "timeout", - "abatement", - "trigger_policy", - "controlLoopName" - ], - "properties": { - "timeout": { - "type": "string", - "title": "Overall Time Limit", - "default": "0", - "format": "number" - }, - "abatement": { - "type": "string", - "title": "Abatement", - "enum": [ - "True", - "False" - ] - }, - "trigger_policy": { - "type": "string", - "title": "Policy Decision Entry" - }, - "controlLoopName": { - "type": "string", - "title": "Control loop name", - "readOnly": "True" - } - } - }, - "policies": { - "uniqueItems": "true", - "id": "policies_array", - "type": "array", - "title": "Policy Decision Tree", - "format": "tabs-top", - "items": { - "title": "Policy Decision", - "type": "object", - "id": "policy_item", - "headerTemplate": "{{self.id}} - {{self.recipe}}", - "format": "categories", - "basicCategoryTitle": "recipe", - "required": [ - "id", - "retry", - "timeout", - "actor", - "success", - "failure", - "failure_timeout", - "failure_retries", - "failure_exception", - "failure_guard", - "target" - ], - "properties": { - "id": { - "default": "Policy 1", - "title": "Policy ID", - "type": "string" - }, - "retry": { - "default": "0", - "title": "Number of Retry", - "type": "string", - "format": "number" - }, - "timeout": { - "default": "0", - "title": "Timeout", - "type": "string", - "format": "number" - }, - "actor": { - "type": "object", - "title": "Actor", - "anyOf": [ - { - "title": "APPC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "APPC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "SO", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "SO", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "VF Module Create", - "VF Module Delete" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "SDNC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "SDNC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "Reroute", - "BandwidthOnDemand" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "VFC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "VFC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "required": [ - "payload" - ], - "default": "", - "enum": [ - "ModifyConfig" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "CDS", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "CDS", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "object", - "required": [ - "payload" - ], - "anyOf": [ - { - "title": "user-defined", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "resource-assignment", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - }, - { - "title": "activate", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - }, - { - "title": "activate-restconf", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - }, - { - "title": "activate-cli", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - }, - { - "title": "assign-activate", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - }, - { - "title": "imperative-test-wf", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - } - ] - } - } - } - ] - }, - "success": { - "default": "final_success", - "title": "When Success", - "type": "string" - }, - "failure": { - "default": "final_failure", - "title": "When Failure", - "type": "string" - }, - "failure_timeout": { - "default": "final_failure_timeout", - "title": "When Failure Timeout", - "type": "string" - }, - "failure_retries": { - "default": "final_failure_retries", - "title": "When Failure Retries", - "type": "string" - }, - "failure_exception": { - "default": "final_failure_exception", - "title": "When Failure Exception", - "type": "string" - }, - "failure_guard": { - "default": "final_failure_guard", - "title": "When Failure Guard", - "type": "string" - }, - "target": { - "type": "object", - "required": [ - "type", - "resourceID" - ], - "anyOf": [ - { - "title": "User Defined", - "additionalProperties": "True", - "properties": { - "type": { - "title": "Target type", - "type": "string", - "default": "", - "enum": [ - "VNF", - "VFMODULE", - "VM" - ] - }, - "resourceID": { - "title": "Target type", - "type": "string", - "default": "" - } - } - }, - { - "title": "VNF-vLoadBalancerMS 0", - "properties": { - "type": { - "title": "Type", - "type": "string", - "default": "VNF", - "readOnly": "True" - }, - "resourceID": { - "title": "Resource ID", - "type": "string", - "default": "vLoadBalancerMS", - "readOnly": "True" - } - } - }, - { - "title": "VFMODULE-Vloadbalancerms..vpkg..module-1", - "properties": { - "type": { - "title": "Type", - "type": "string", - "default": "VFMODULE", - "readOnly": "True" - }, - "resourceID": { - "title": "Resource ID", - "type": "string", - "default": "Vloadbalancerms..vpkg..module-1", - "readOnly": "True" - }, - "modelInvariantId": { - "title": "Model Invariant Id (ModelInvariantUUID)", - "type": "string", - "default": "ca052563-eb92-4b5b-ad41-9111768ce043", - "readOnly": "True" - }, - "modelVersionId": { - "title": "Model Version Id (ModelUUID)", - "type": "string", - "default": "1e725ccc-b823-4f67-82b9-4f4367070dbc", - "readOnly": "True" - }, - "modelName": { - "title": "Model Name", - "type": "string", - "default": "Vloadbalancerms..vpkg..module-1", - "readOnly": "True" - }, - "modelVersion": { - "title": "Model Version", - "type": "string", - "default": "1", - "readOnly": "True" - }, - "modelCustomizationId": { - "title": "Customization ID", - "type": "string", - "default": "1bffdc31-a37d-4dee-b65c-dde623a76e52", - "readOnly": "True" - } - } - }, - { - "title": "VFMODULE-Vloadbalancerms..vdns..module-3", - "properties": { - "type": { - "title": "Type", - "type": "string", - "default": "VFMODULE", - "readOnly": "True" - }, - "resourceID": { - "title": "Resource ID", - "type": "string", - "default": "Vloadbalancerms..vdns..module-3", - "readOnly": "True" - }, - "modelInvariantId": { - "title": "Model Invariant Id (ModelInvariantUUID)", - "type": "string", - "default": "4c10ba9b-f88f-415e-9de3-5d33336047fa", - "readOnly": "True" - }, - "modelVersionId": { - "title": "Model Version Id (ModelUUID)", - "type": "string", - "default": "4fa73b49-8a6c-493e-816b-eb401567b720", - "readOnly": "True" - }, - "modelName": { - "title": "Model Name", - "type": "string", - "default": "Vloadbalancerms..vdns..module-3", - "readOnly": "True" - }, - "modelVersion": { - "title": "Model Version", - "type": "string", - "default": "1", - "readOnly": "True" - }, - "modelCustomizationId": { - "title": "Customization ID", - "type": "string", - "default": "bafcdab0-801d-4d81-9ead-f464640a38b1", - "readOnly": "True" - } - } - }, - { - "title": "VFMODULE-Vloadbalancerms..base_template..module-0", - "properties": { - "type": { - "title": "Type", - "type": "string", - "default": "VFMODULE", - "readOnly": "True" - }, - "resourceID": { - "title": "Resource ID", - "type": "string", - "default": "Vloadbalancerms..base_template..module-0", - "readOnly": "True" - }, - "modelInvariantId": { - "title": "Model Invariant Id (ModelInvariantUUID)", - "type": "string", - "default": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3", - "readOnly": "True" - }, - "modelVersionId": { - "title": "Model Version Id (ModelUUID)", - "type": "string", - "default": "63734409-f745-4e4d-a38b-131638a0edce", - "readOnly": "True" - }, - "modelName": { - "title": "Model Name", - "type": "string", - "default": "Vloadbalancerms..base_template..module-0", - "readOnly": "True" - }, - "modelVersion": { - "title": "Model Version", - "type": "string", - "default": "1", - "readOnly": "True" - }, - "modelCustomizationId": { - "title": "Customization ID", - "type": "string", - "default": "86baddea-c730-4fb8-9410-cd2e17fd7f27", - "readOnly": "True" - } - } - }, - { - "title": "VFMODULE-Vloadbalancerms..vlb..module-2", - "properties": { - "type": { - "title": "Type", - "type": "string", - "default": "VFMODULE", - "readOnly": "True" - }, - "resourceID": { - "title": "Resource ID", - "type": "string", - "default": "Vloadbalancerms..vlb..module-2", - "readOnly": "True" - }, - "modelInvariantId": { - "title": "Model Invariant Id (ModelInvariantUUID)", - "type": "string", - "default": "a772a1f4-0064-412c-833d-4749b15828dd", - "readOnly": "True" - }, - "modelVersionId": { - "title": "Model Version Id (ModelUUID)", - "type": "string", - "default": "0f5c3f6a-650a-4303-abb6-fff3e573a07a", - "readOnly": "True" - }, - "modelName": { - "title": "Model Name", - "type": "string", - "default": "Vloadbalancerms..vlb..module-2", - "readOnly": "True" - }, - "modelVersion": { - "title": "Model Version", - "type": "string", - "default": "1", - "readOnly": "True" - }, - "modelCustomizationId": { - "title": "Customization ID", - "type": "string", - "default": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806", - "readOnly": "True" - } - } - } - ] - } - } - } - } - } - }, - "guard_policies": { - "type": "array", - "format": "tabs-top", - "title": "Associated Guard policies", - "items": { - "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}", - "anyOf": [ - { - "title": "Guard MinMax", - "type": "object", - "properties": { - "policy-id": { - "type": "string", - "default": "guard.minmax.new", - "pattern": "^(guard.minmax\\..*)$" - }, - "content": { - "properties": { - "actor": { - "type": "string", - "enum": [ - "APPC", - "SO", - "VFC", - "SDNC", - "SDNR" - ] - }, - "recipe": { - "type": "string", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig", - "VF Module Create", - "VF Module Delete", - "Reroute" - ] - }, - "targets": { - "type": "string", - "default": ".*" - }, - "clname": { - "type": "string", - "template": "{{loopName}}", - "watch": { - "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName" - } - }, - "guardActiveStart": { - "type": "string", - "default": "00:00:00Z" - }, - "guardActiveEnd": { - "type": "string", - "default": "10:00:00Z" - }, - "min": { - "type": "string", - "default": "0" - }, - "max": { - "type": "string", - "default": "1" - } - } - } - } - }, - { - "title": "Guard Frequency", - "type": "object", - "properties": { - "policy-id": { - "type": "string", - "default": "guard.frequency.new", - "pattern": "^(guard.frequency\\..*)$" - }, - "content": { - "properties": { - "actor": { - "type": "string", - "enum": [ - "APPC", - "SO", - "VFC", - "SDNC", - "SDNR" - ] - }, - "recipe": { - "type": "string", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig", - "VF Module Create", - "VF Module Delete", - "Reroute" - ] - }, - "targets": { - "type": "string", - "default": ".*" - }, - "clname": { - "type": "string", - "template": "{{loopName}}", - "watch": { - "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName" - } - }, - "guardActiveStart": { - "type": "string", - "default": "00:00:00Z" - }, - "guardActiveEnd": { - "type": "string", - "default": "10:00:00Z" - }, - "limit": { - "type": "string" - }, - "timeWindow": { - "type": "string" - }, - "timeUnits": { - "type": "string", - "enum": [ - "minute", - "hour", - "day", - "week", - "month", - "year" - ] - } - } - } - } - } - ] - } - } - } - } - } - } - } + "type": "object", + "title": "Configuration", + "required": [ + "operational_policy", + "guard_policies" + ], + "properties": { + "operational_policy": { + "type": "object", + "title": "Related Parameters", + "required": [ + "controlLoop", + "policies" + ], + "properties": { + "controlLoop": { + "type": "object", + "title": "Control Loop details", + "required": [ + "timeout", + "abatement", + "trigger_policy", + "controlLoopName" + ], + "properties": { + "timeout": { + "type": "string", + "title": "Overall Time Limit", + "default": "0", + "format": "number" + }, + "abatement": { + "type": "string", + "title": "Abatement", + "enum": [ + "True", + "False" + ] + }, + "trigger_policy": { + "type": "string", + "title": "Policy Decision Entry" + }, + "controlLoopName": { + "type": "string", + "title": "Control loop name", + "readOnly": "True" + } + } + }, + "policies": { + "uniqueItems": "true", + "id": "policies_array", + "type": "array", + "title": "Policy Decision Tree", + "format": "tabs-top", + "items": { + "title": "Policy Decision", + "type": "object", + "id": "policy_item", + "headerTemplate": "{{self.id}} - {{self.recipe}}", + "format": "categories", + "basicCategoryTitle": "recipe", + "required": [ + "id", + "retry", + "timeout", + "actor", + "success", + "failure", + "failure_timeout", + "failure_retries", + "failure_exception", + "failure_guard", + "target" + ], + "properties": { + "id": { + "default": "Policy 1", + "title": "Policy ID", + "type": "string" + }, + "retry": { + "default": "0", + "title": "Number of Retry", + "type": "string", + "format": "number" + }, + "timeout": { + "default": "0", + "title": "Timeout", + "type": "string", + "format": "number" + }, + "actor": { + "type": "object", + "title": "Actor", + "anyOf": [ + { + "title": "APPC", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "APPC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "SO", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "SO", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "VF Module Create", + "VF Module Delete" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "SDNC", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "SDNC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "Reroute", + "BandwidthOnDemand" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "VFC", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "VFC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "required": [ + "payload" + ], + "default": "", + "enum": [ + "ModifyConfig" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "CDS", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "CDS", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "object", + "required": [ + "payload" + ], + "anyOf": [ + { + "title": "user-defined", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "", + "format": "textarea" + } + } + }, + { + "title": "resource-assignment", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + }, + { + "title": "activate", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + }, + { + "title": "activate-restconf", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + }, + { + "title": "activate-cli", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + }, + { + "title": "assign-activate", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + }, + { + "title": "imperative-test-wf", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + } + ] + } + } + } + ] + }, + "success": { + "default": "final_success", + "title": "When Success", + "type": "string" + }, + "failure": { + "default": "final_failure", + "title": "When Failure", + "type": "string" + }, + "failure_timeout": { + "default": "final_failure_timeout", + "title": "When Failure Timeout", + "type": "string" + }, + "failure_retries": { + "default": "final_failure_retries", + "title": "When Failure Retries", + "type": "string" + }, + "failure_exception": { + "default": "final_failure_exception", + "title": "When Failure Exception", + "type": "string" + }, + "failure_guard": { + "default": "final_failure_guard", + "title": "When Failure Guard", + "type": "string" + }, + "target": { + "type": "object", + "required": [ + "type", + "resourceID" + ], + "anyOf": [ + { + "title": "User Defined", + "additionalProperties": "True", + "properties": { + "type": { + "title": "Target type", + "type": "string", + "default": "", + "enum": [ + "VNF", + "VFMODULE", + "VM" + ] + }, + "resourceID": { + "title": "Target type", + "type": "string", + "default": "" + } + } + }, + { + "title": "VNF-vLoadBalancerMS 0", + "properties": { + "type": { + "title": "Type", + "type": "string", + "default": "VNF", + "readOnly": "True" + }, + "resourceID": { + "title": "Resource ID", + "type": "string", + "default": "vLoadBalancerMS", + "readOnly": "True" + } + } + }, + { + "title": "VFMODULE-Vloadbalancerms..vpkg..module-1", + "properties": { + "type": { + "title": "Type", + "type": "string", + "default": "VFMODULE", + "readOnly": "True" + }, + "resourceID": { + "title": "Resource ID", + "type": "string", + "default": "Vloadbalancerms..vpkg..module-1", + "readOnly": "True" + }, + "modelInvariantId": { + "title": "Model Invariant Id (ModelInvariantUUID)", + "type": "string", + "default": "ca052563-eb92-4b5b-ad41-9111768ce043", + "readOnly": "True" + }, + "modelVersionId": { + "title": "Model Version Id (ModelUUID)", + "type": "string", + "default": "1e725ccc-b823-4f67-82b9-4f4367070dbc", + "readOnly": "True" + }, + "modelName": { + "title": "Model Name", + "type": "string", + "default": "Vloadbalancerms..vpkg..module-1", + "readOnly": "True" + }, + "modelVersion": { + "title": "Model Version", + "type": "string", + "default": "1", + "readOnly": "True" + }, + "modelCustomizationId": { + "title": "Customization ID", + "type": "string", + "default": "1bffdc31-a37d-4dee-b65c-dde623a76e52", + "readOnly": "True" + } + } + }, + { + "title": "VFMODULE-Vloadbalancerms..vdns..module-3", + "properties": { + "type": { + "title": "Type", + "type": "string", + "default": "VFMODULE", + "readOnly": "True" + }, + "resourceID": { + "title": "Resource ID", + "type": "string", + "default": "Vloadbalancerms..vdns..module-3", + "readOnly": "True" + }, + "modelInvariantId": { + "title": "Model Invariant Id (ModelInvariantUUID)", + "type": "string", + "default": "4c10ba9b-f88f-415e-9de3-5d33336047fa", + "readOnly": "True" + }, + "modelVersionId": { + "title": "Model Version Id (ModelUUID)", + "type": "string", + "default": "4fa73b49-8a6c-493e-816b-eb401567b720", + "readOnly": "True" + }, + "modelName": { + "title": "Model Name", + "type": "string", + "default": "Vloadbalancerms..vdns..module-3", + "readOnly": "True" + }, + "modelVersion": { + "title": "Model Version", + "type": "string", + "default": "1", + "readOnly": "True" + }, + "modelCustomizationId": { + "title": "Customization ID", + "type": "string", + "default": "bafcdab0-801d-4d81-9ead-f464640a38b1", + "readOnly": "True" + } + } + }, + { + "title": "VFMODULE-Vloadbalancerms..base_template..module-0", + "properties": { + "type": { + "title": "Type", + "type": "string", + "default": "VFMODULE", + "readOnly": "True" + }, + "resourceID": { + "title": "Resource ID", + "type": "string", + "default": "Vloadbalancerms..base_template..module-0", + "readOnly": "True" + }, + "modelInvariantId": { + "title": "Model Invariant Id (ModelInvariantUUID)", + "type": "string", + "default": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3", + "readOnly": "True" + }, + "modelVersionId": { + "title": "Model Version Id (ModelUUID)", + "type": "string", + "default": "63734409-f745-4e4d-a38b-131638a0edce", + "readOnly": "True" + }, + "modelName": { + "title": "Model Name", + "type": "string", + "default": "Vloadbalancerms..base_template..module-0", + "readOnly": "True" + }, + "modelVersion": { + "title": "Model Version", + "type": "string", + "default": "1", + "readOnly": "True" + }, + "modelCustomizationId": { + "title": "Customization ID", + "type": "string", + "default": "86baddea-c730-4fb8-9410-cd2e17fd7f27", + "readOnly": "True" + } + } + }, + { + "title": "VFMODULE-Vloadbalancerms..vlb..module-2", + "properties": { + "type": { + "title": "Type", + "type": "string", + "default": "VFMODULE", + "readOnly": "True" + }, + "resourceID": { + "title": "Resource ID", + "type": "string", + "default": "Vloadbalancerms..vlb..module-2", + "readOnly": "True" + }, + "modelInvariantId": { + "title": "Model Invariant Id (ModelInvariantUUID)", + "type": "string", + "default": "a772a1f4-0064-412c-833d-4749b15828dd", + "readOnly": "True" + }, + "modelVersionId": { + "title": "Model Version Id (ModelUUID)", + "type": "string", + "default": "0f5c3f6a-650a-4303-abb6-fff3e573a07a", + "readOnly": "True" + }, + "modelName": { + "title": "Model Name", + "type": "string", + "default": "Vloadbalancerms..vlb..module-2", + "readOnly": "True" + }, + "modelVersion": { + "title": "Model Version", + "type": "string", + "default": "1", + "readOnly": "True" + }, + "modelCustomizationId": { + "title": "Customization ID", + "type": "string", + "default": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806", + "readOnly": "True" + } + } + } + ] + } + } + } + } + } + }, + "guard_policies": { + "type": "array", + "format": "tabs-top", + "title": "Associated Guard policies", + "items": { + "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}", + "anyOf": [ + { + "title": "Guard MinMax", + "type": "object", + "properties": { + "policy-id": { + "type": "string", + "default": "guard.minmax.new", + "pattern": "^(guard.minmax\\..*)$" + }, + "content": { + "properties": { + "actor": { + "type": "string", + "enum": [ + "APPC", + "SO", + "VFC", + "SDNC", + "SDNR" + ] + }, + "recipe": { + "type": "string", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig", + "VF Module Create", + "VF Module Delete", + "Reroute" + ] + }, + "targets": { + "type": "string", + "default": ".*" + }, + "clname": { + "type": "string", + "template": "{{loopName}}", + "watch": { + "loopName": "operational_policy.controlLoop.controlLoopName" + } + }, + "guardActiveStart": { + "type": "string", + "default": "00:00:00Z" + }, + "guardActiveEnd": { + "type": "string", + "default": "10:00:00Z" + }, + "min": { + "type": "string", + "default": "0" + }, + "max": { + "type": "string", + "default": "1" + } + } + } + } + }, + { + "title": "Guard Frequency", + "type": "object", + "properties": { + "policy-id": { + "type": "string", + "default": "guard.frequency.new", + "pattern": "^(guard.frequency\\..*)$" + }, + "content": { + "properties": { + "actor": { + "type": "string", + "enum": [ + "APPC", + "SO", + "VFC", + "SDNC", + "SDNR" + ] + }, + "recipe": { + "type": "string", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig", + "VF Module Create", + "VF Module Delete", + "Reroute" + ] + }, + "targets": { + "type": "string", + "default": ".*" + }, + "clname": { + "type": "string", + "template": "{{loopName}}", + "watch": { + "loopName": "operational_policy.controlLoop.controlLoopName" + } + }, + "guardActiveStart": { + "type": "string", + "default": "00:00:00Z" + }, + "guardActiveEnd": { + "type": "string", + "default": "10:00:00Z" + }, + "limit": { + "type": "string" + }, + "timeWindow": { + "type": "string" + }, + "timeUnits": { + "type": "string", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "year" + ] + } + } + } + } + } + ] + } + } + } } \ No newline at end of file diff --git a/ui-react/src/components/dialogs/Policy/PolicyModal.js b/ui-react/src/components/dialogs/Policy/PolicyModal.js index 08bc8e0d..7151725c 100644 --- a/ui-react/src/components/dialogs/Policy/PolicyModal.js +++ b/ui-react/src/components/dialogs/Policy/PolicyModal.js @@ -112,12 +112,15 @@ export default class PolicyModal extends React.Component { disable_array_reorder: true, disable_array_delete_last_row: true, disable_array_delete_all_rows: false, - no_additional_properties: true, + array_controls_top: true, + keep_oneof_values: false, + collapsed:true, show_errors: 'always', display_required_only: false, show_opt_in: true, prompt_before_delete: true, - required_by_default: false + required_by_default: false, + array_controls_top: true }) }