docs/conf.pyc
docs/html/
docs/_static/
+docs/__pycache__/
of creating such type of policies. In the payload body of each policy to create, policy type name and version should be indicated and
the specified policy type should be valid and existing in policy database.
-In Dublin release, to ease policy creation, we preload several widely used policy types in policy database. Below is a table summarizing
+In El Alto release, to ease policy creation, we preload several widely used policy types in policy database. Below is a table summarizing
preloaded policy types.
.. csv-table::
- :header: "Policy Type Name", "Preloaded JSON"
+ :header: "Policy Type Name", "Payload"
:widths: 15,10
- "Controlloop.Guard.Blacklist", ":download:`link <policytypes/onap.policies.controlloop.guard.Blacklist.json>`"
- "Controlloop.Guard.FrequencyLimiter", ":download:`link <policytypes/onap.policies.controlloop.guard.FrequencyLimiter.json>`"
- "Controlloop.Guard.MinMax", ":download:`link <policytypes/onap.policies.controlloop.guard.MinMax.json>`"
- "Controlloop.Operational", ":download:`link <policytypes/onap.policies.controlloop.Operational.json>`"
- "Monitoring.TCA", ":download:`link <policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.json>`"
- "Monitoring.Collectors", ":download:`link <policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.json>`"
- "Optimization.AffinityPolicy", ":download:`link <policytypes/onap.policies.optimization.AffinityPolicy.json>`"
- "Optimization.DistancePolicy", ":download:`link <policytypes/onap.policies.optimization.DistancePolicy.json>`"
- "Optimization.HpaPolicy", ":download:`link <policytypes/onap.policies.optimization.HpaPolicy.json>`"
- "Optimization.OptimizationPolicy", ":download:`link <policytypes/onap.policies.optimization.OptimizationPolicy.json>`"
- "Optimization.PciPolicy", ":download:`link <policytypes/onap.policies.optimization.PciPolicy.json>`"
- "Optimization.QueryPolicy", ":download:`link <policytypes/onap.policies.optimization.QueryPolicy.json>`"
- "Optimization.SubscriberPolicy", ":download:`link <policytypes/onap.policies.optimization.SubscriberPolicy.json>`"
- "Optimization.Vim_fit", ":download:`link <policytypes/onap.policies.optimization.Vim_fit.json>`"
- "Optimization.VnfPolicy", ":download:`link <policytypes/onap.policies.optimization.VnfPolicy.json>`"
-
-
-Also, in Dublin release, We provide backward compatibility support for controlloop operational and guard
+ "Controlloop.Guard.Blacklist", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.Blacklist.yaml>`_
+ "Controlloop.Guard.FrequencyLimiter", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.FrequencyLimiter.yaml>`_
+ "Controlloop.Guard.MinMax", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.MinMax.yaml>`_
+ "Controlloop.Guard.Coordination.FirstBlocksSecond", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml>`_
+ "Controlloop.Operational", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.controlloop.Operational.yaml>`_
+ "Monitoring.TCA", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml>`_
+ "Monitoring.Collectors", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml>`_
+ "Optimization", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.Optimization.yaml>`_
+ "Optimization.AffinityPolicy", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.optimization.AffinityPolicy.yaml>`_
+ "Optimization.DistancePolicy", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.optimization.DistancePolicy.yaml>`_
+ "Optimization.HpaPolicy", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.optimization.HpaPolicy.yaml>`_
+ "Optimization.OptimizationPolicy", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.optimization.OptimizationPolicy.yaml>`_
+ "Optimization.PciPolicy", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.optimization.PciPolicy.yaml>`_
+ "Optimization.QueryPolicy", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.optimization.QueryPolicy.yaml>`_
+ "Optimization.SubscriberPolicy", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.optimization.SubscriberPolicy.yaml>`_
+ "Optimization.Vim_fit", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.optimization.Vim_fit.yaml>`_
+ "Optimization.VnfPolicy", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policytypes/onap.policies.optimization.VnfPolicy.yaml>`_
+
+Also, in El Alto release, We provide backward compatibility support for controlloop operational and guard
policies encoded in legacy format. Below is a table containing sample legacy guard/operational policies and
well-formed TOSCA monitoring policies.
.. csv-table::
- :header: "Policy Name", "Policy JSON"
+ :header: "Policy Name", "Payload"
:widths: 15,10
- "vCPE.Monitoring.Tosca", ":download:`link <policies/vCPE.policy.monitoring.input.tosca.json>`"
- "vCPE.Operational.Legacy", ":download:`link <policies/vCPE.policy.operational.input.json>`"
- "vDNS.Guard.FrequencyLimiting.Legacy", ":download:`link <policies/vDNS.policy.guard.frequency.input.json>`"
- "vDNS.Guard.MinMax.Legacy", ":download:`link <policies/vDNS.policy.guard.minmax.input.json>`"
- "vDNS.Monitoring.Tosca", ":download:`link <policies/vDNS.policy.monitoring.input.tosca.json>`"
- "vDNS.Operational.Legacy", ":download:`link <policies/vDNS.policy.operational.input.json>`"
- "vFirewall.Monitoring.Tosca", ":download:`link <policies/vFirewall.policy.monitoring.input.tosca.json>`"
- "vFirewall.Operational.Legacy", ":download:`link <policies/vFirewall.policy.operational.input.json>`"
+ "vCPE.Monitoring.Tosca", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.yaml>`_ | `json <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.json>`_
+ "vCPE.Operational.Legacy", `json <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vCPE.policy.operational.input.json>`_
+ "vDNS.Guard.FrequencyLimiting.Legacy", `json <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vDNS.policy.guard.frequency.input.json>`_
+ "vDNS.Guard.MinMax.Legacy", `json <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vDNS.policy.guard.minmax.input.json>`_
+ "vDNS.Monitoring.Tosca", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vDNS.policy.monitoring.input.tosca.yaml>`_ | `json <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vDNS.policy.monitoring.input.tosca.json>`_
+ "vDNS.Operational.Legacy", `json <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vDNS.policy.operational.input.json>`_
+ "vFirewall.Monitoring.Tosca", `yaml <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml>`_ | `json <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vFirewall.policy.monitoring.input.tosca.json>`_
+ "vFirewall.Operational.Legacy", `json <https://github.com/onap/policy-models/blob/elalto/models-examples/src/main/resources/policies/vFirewall.policy.operational.input.json>`_
Below is a global API table from where swagger JSON for different types of policy design API can be downloaded.
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0",
- "type_version": "1.0.0",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca_policy" : {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "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"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "policy-id" : "operational.restart",
- "content" : "controlLoop%3A%0A%20%20version%3A%202.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0A%20%20trigger_policy%3A%20unique-policy-id-1-restart%0A%20%20timeout%3A%203600%0A%20%20abatement%3A%20true%0A%20%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-1-restart%0A%20%20%20%20name%3A%20Restart%20the%20VM%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20APPC%0A%20%20%20%20recipe%3A%20Restart%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20type%3A%20VM%0A%20%20%20%20retry%3A%203%0A%20%20%20%20timeout%3A%201200%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard"
-}
\ No newline at end of file
+++ /dev/null
-{
- "policy-id" : "guard.frequency.scaleout",
- "content" : {
- "actor": "SO",
- "recipe": "scaleOut",
- "targets": ".*",
- "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "limit": "1",
- "timeWindow": "10",
- "timeUnits": "minute",
- "guardActiveStart": "00:00:01-05:00",
- "guardActiveEnd": "23:59:59-05:00"
- }
-}
+++ /dev/null
-{
- "policy-id" : "guard.minmax.scaleout",
- "content" : {
- "actor": "SO",
- "recipe": "scaleOut",
- "targets": ".*",
- "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "min": "1",
- "max": "5",
- "guardActiveStart": "00:00:01-05:00",
- "guardActiveEnd": "23:59:59-05:00"
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "topology_template": {
- "policies": [
- {
- "onap.scaleout.tca": {
- "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0",
- "metadata": {
- "policy-id": "onap.scaleout.tca"
- },
- "properties": {
- "tca_policy": {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "vLoadBalancer",
- "controlLoopSchemaType": "VNF",
- "policyScope": "type=configuration",
- "policyName": "onap.scaleout.tca",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "closedLoopEventStatus": "ONSET",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "thresholdValue": 500,
- "direction": "LESS_OR_EQUAL",
- "severity": "MAJOR"
- },
- {
- "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "closedLoopEventStatus": "ONSET",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "thresholdValue": 5000,
- "direction": "GREATER_OR_EQUAL",
- "severity": "CRITICAL"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "policy-id" : "operational.scaleout",
- "content" : "controlLoop%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20version%3A%202.0.0%0A%20%20%20%20%20%20%20%20%20%20%20%20%20controlLoopName%3A%20ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0A%20%20%20%20%20%20%20%20%20%20%20%20%20trigger_policy%3A%20unique-policy-id-1-scale-up%0A%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20abatement%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%20policies%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20-%20id%3A%20unique-policy-id-1-scale-up%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20Create%20a%20new%20VF%20Module%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20description%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20actor%3A%20SO%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20recipe%3A%20VF%20Module%20Create%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20target%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20VNF%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20payload%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20requestParameters%3A%20'%7B%22usePreload%22%3Atrue%2C%22userParams%22%3A%5B%5D%7D'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20configurationParameters%3A%20'%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B9%5D%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B16%5D%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B23%5D%22%7D%5D'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20retry%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20success%3A%20final_success%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_guard%3A%20final_failure_guard"
-}
\ No newline at end of file
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "topology_template": {
- "policies": [
- {
- "onap.vfirewall.tca": {
- "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0",
- "metadata": {
- "policy-id": "onap.vfirewall.tca"
- },
- "properties": {
- "tca_policy": {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "vLoadBalancer",
- "controlLoopSchemaType": "VNF",
- "policyScope": "resource=vLoadBalancer;type=configuration",
- "policyName": "onap.vfirewall.tca",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
- "closedLoopEventStatus": "ONSET",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "thresholdValue": 500,
- "direction": "LESS_OR_EQUAL",
- "severity": "MAJOR"
- },
- {
- "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
- "closedLoopEventStatus": "ONSET",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "thresholdValue": 5000,
- "direction": "GREATER_OR_EQUAL",
- "severity": "CRITICAL"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "policy-id" : "operational.modifyconfig",
- "content" : "controlLoop%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20version%3A%202.0.0%0A%20%20%20%20%20%20%20%20%20%20%20%20%20controlLoopName%3A%20ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0A%20%20%20%20%20%20%20%20%20%20%20%20%20trigger_policy%3A%20unique-policy-id-1-modifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20abatement%3A%20false%0A%20%0A%20%20%20%20%20%20%20%20%20%20%20policies%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20-%20id%3A%20unique-policy-id-1-modifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20modify%20packet%20gen%20config%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20description%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20actor%3A%20APPC%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20recipe%3A%20ModifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20target%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20TBD%20-%20Cannot%20be%20known%20until%20instantiation%20is%20done%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20resourceID%3A%20Eace933104d443b496b8.nodes.heat.vpg%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20VNF%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20retry%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%20300%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20success%3A%20final_success%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_guard%3A%20final_failure_guard"
-}
\ No newline at end of file
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.controlloop.Operational": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "Operational Policy for Control Loops"
- }
- }
- ]
-}
\ No newline at end of file
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.controlloop.Guard": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "Guard Policies for Control Loop Operational Policies"
- }
- },
- {
- "onap.policies.controlloop.guard.Blacklist": {
- "derived_from": "onap.policies.controlloop.Guard",
- "version": "1.0.0",
- "description": "Supports blacklist of VNF's from performing control loop actions on.",
- "properties": {
- "blacklist_policy": {
- "type": "map",
- "description": null,
- "entry_schema": {
- "type": "onap.datatypes.guard.Blacklist"
- }
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "onap.datatypes.guard.Blacklist": {
- "derived_from": "tosca.datatypes.Root",
- "properties": {
- "actor": {
- "type": "string",
- "description": "Specifies the Actor",
- "required": true
- },
- "recipe": {
- "type": "string",
- "description": "Specified the Recipe",
- "required": true
- },
- "time_range": {
- "type": "tosca.datatypes.TimeInterval",
- "description": "An optional range of time during the day the blacklist is valid for.",
- "required": false
- },
- "controlLoopName": {
- "type": "string",
- "description": "An optional specific control loop to apply this guard to.",
- "required": false
- },
- "blacklist": {
- "type": "list",
- "description": "List of VNF's",
- "required": true
- }
- }
- }
- }
- ]
-}
\ No newline at end of file
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.controlloop.Guard": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "Guard Policies for Control Loop Operational Policies"
- }
- },
- {
- "onap.policies.controlloop.guard.FrequencyLimiter": {
- "derived_from": "onap.policies.controlloop.Guard",
- "version": "1.0.0",
- "description": "Supports limiting the frequency of actions being taken by a Actor.",
- "properties": {
- "frequency_policy": {
- "type": "map",
- "description": null,
- "entry_schema": {
- "type": "onap.datatypes.guard.FrequencyLimiter"
- }
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "onap.datatypes.guard.FrequencyLimiter": {
- "derived_from": "tosca.datatypes.Root",
- "properties": {
- "actor": {
- "type": "string",
- "description": "Specifies the Actor",
- "required": true
- },
- "recipe": {
- "type": "string",
- "description": "Specified the Recipe",
- "required": true
- },
- "time_window": {
- "type": "scalar-unit.time",
- "description": "The time window to count the actions against.",
- "required": true
- },
- "limit": {
- "type": "integer",
- "description": "The limit",
- "required": true,
- "constraints": [
- {
- "greater_than": 0
- }
- ]
- },
- "time_range": {
- "type": "tosca.datatypes.TimeInterval",
- "description": "An optional range of time during the day the frequency is valid for.",
- "required": false
- },
- "controlLoopName": {
- "type": "string",
- "description": "An optional specific control loop to apply this guard to.",
- "required": false
- },
- "target": {
- "type": "string",
- "description": "An optional specific VNF to apply this guard to.",
- "required": false
- }
- }
- }
- }
- ]
-}
\ No newline at end of file
+++ /dev/null
-{
- "policy_types": [
- {
- "onap.policies.controlloop.Guard": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "Guard Policies for Control Loop Operational Policies"
- }
- },
- {
- "onap.policies.controlloop.guard.MinMax": {
- "derived_from": "onap.policies.controlloop.Guard",
- "version": "1.0.0",
- "description": "Supports Min/Max number of VF Modules",
- "properties": {
- "minmax_policy": {
- "type": "map",
- "description": null,
- "entry_schema": {
- "type": "onap.datatypes.guard.MinMax"
- }
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "onap.datatypes.guard.MinMax": {
- "derived_from": "tosca.datatypes.Root",
- "properties": {
- "actor": {
- "type": "string",
- "description": "Specifies the Actor",
- "required": true
- },
- "recipe": {
- "type": "string",
- "description": "Specified the Recipe",
- "required": true
- },
- "time_range": {
- "type": "tosca.datatypes.TimeInterval",
- "description": "An optional range of time during the day the Min/Max limit is valid for.",
- "required": false
- },
- "controlLoopName": {
- "type": "string",
- "description": "An optional specific control loop to apply this guard to.",
- "required": false
- },
- "min_vf_module_instances": {
- "type": "integer",
- "required": true,
- "description": "The minimum instances of this VF-Module"
- },
- "max_vf_module_instances": {
- "type": "integer",
- "required": false,
- "description": "The maximum instances of this VF-Module"
- }
- }
- }
- }
- ]
-}
\ No newline at end of file
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Monitoring": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "a base policy type for all policies that governs monitoring provisioning"
- }
- },
- {
- "onap.policies.monitoring.cdap.tca.hi.lo.app": {
- "derived_from": "onap.policies.Monitoring",
- "version": "1.0.0",
- "properties": {
- "tca_policy": {
- "type": "map",
- "description": "TCA Policy JSON",
- "entry_schema": {
- "type": "onap.datatypes.monitoring.tca_policy"
- }
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "onap.datatypes.monitoring.metricsPerEventName": {
- "derived_from": "tosca.datatypes.Root",
- "properties": {
- "controlLoopSchemaType": {
- "type": "string",
- "required": true,
- "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
- "constraints": [
- {
- "valid_values": [
- "VM",
- "VNF"
- ]
- }
- ]
- },
- "eventName": {
- "type": "string",
- "required": true,
- "description": "Event name to which thresholds need to be applied"
- },
- "policyName": {
- "type": "string",
- "required": true,
- "description": "TCA Policy Scope Name"
- },
- "policyScope": {
- "type": "string",
- "required": true,
- "description": "TCA Policy Scope"
- },
- "policyVersion": {
- "type": "string",
- "required": true,
- "description": "TCA Policy Scope Version"
- },
- "thresholds": {
- "type": "list",
- "required": true,
- "description": "Thresholds associated with eventName",
- "entry_schema": {
- "type": "onap.datatypes.monitoring.thresholds"
- }
- }
- }
- }
- },
- {
- "onap.datatypes.monitoring.tca_policy": {
- "derived_from": "tosca.datatypes.Root",
- "properties": {
- "domain": {
- "type": "string",
- "required": true,
- "description": "Domain name to which TCA needs to be applied",
- "default": "measurementsForVfScaling",
- "constraints": [
- {
- "equal": "measurementsForVfScaling"
- }
- ]
- },
- "metricsPerEventName": {
- "type": "list",
- "required": true,
- "description": "Contains eventName and threshold details that need to be applied to given eventName",
- "entry_schema": {
- "type": "onap.datatypes.monitoring.metricsPerEventName"
- }
- }
- }
- }
- },
- {
- "onap.datatypes.monitoring.thresholds": {
- "derived_from": "tosca.datatypes.Root",
- "properties": {
- "closedLoopControlName": {
- "type": "string",
- "required": true,
- "description": "Closed Loop Control Name associated with the threshold"
- },
- "closedLoopEventStatus": {
- "type": "string",
- "required": true,
- "description": "Closed Loop Event Status of the threshold",
- "constraints": [
- {
- "valid_values": [
- "ONSET",
- "ABATED"
- ]
- }
- ]
- },
- "direction": {
- "type": "string",
- "required": true,
- "description": "Direction of the threshold",
- "constraints": [
- {
- "valid_values": [
- "LESS",
- "LESS_OR_EQUAL",
- "GREATER",
- "GREATER_OR_EQUAL",
- "EQUAL"
- ]
- }
- ]
- },
- "fieldPath": {
- "type": "string",
- "required": true,
- "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
- "constraints": [
- {
- "valid_values": [
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
- "$.event.measurementsForVfScalingFields.meanRequestLatency",
- "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
- "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
- "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
- "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
- "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
- "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
- ]
- }
- ]
- },
- "severity": {
- "type": "string",
- "required": true,
- "description": "Threshold Event Severity",
- "constraints": [
- {
- "valid_values": [
- "CRITICAL",
- "MAJOR",
- "MINOR",
- "WARNING",
- "NORMAL"
- ]
- }
- ]
- },
- "thresholdValue": {
- "type": "integer",
- "required": true,
- "description": "Threshold value for the field Path inside CEF message"
- },
- "version": {
- "type": "string",
- "required": true,
- "description": "Version number associated with the threshold"
- }
- }
- }
- }
- ]
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Monitoring": {
- "derived_from": "tosca.policies.Root",
- "description": "a base policy type for all policies that govern monitoring provision",
- "version": "1.0.0"
- }
- },
- {
- "onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server": {
- "derived_from": "policy.nodes.Root",
- "version": "1.0.0",
- "properties": {
- "buscontroller_feed_publishing_endpoint": {
- "type": "string",
- "description": "DMAAP Bus Controller feed endpoint"
- },
- "datafile.policy": {
- "type": "string",
- "description": "datafile Policy JSON as string"
- }
- }
- }
- }
- ]
-}
\ No newline at end of file
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Optimization": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "a base policy type for all policies that govern optimization"
- }
- },
- {
- "onap.policies.optimization.AffinityPolicy": {
- "derived_from": "onap.policies.Optimization",
- "version": "1.0.0",
- "properties": {
- "policyScope": {
- "type": "list",
- "description": "scope where the policy is applicable",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "policyType": {
- "type": "list",
- "description": "type of a policy",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "zone"
- ]
- }
- ]
- }
- },
- "identity": {
- "type": "string",
- "required": true
- },
- "applicableResources": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "any",
- "all"
- ]
- }
- ]
- }
- },
- "affinityProperties": {
- "type": "policy.data.affinityProperties_properties",
- "required": true
- },
- "resources": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string"
- }
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "policy.data.affinityProperties_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "qualifier": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "same",
- "different"
- ]
- }
- ]
- }
- },
- "category": {
- "type": "string",
- "required": true
- }
- }
- }
- }
- ]
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Optimization": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "a base policy type for all policies that govern optimization"
- }
- },
- {
- "onap.policies.optimization.DistancePolicy": {
- "derived_from": "onap.policies.Optimization",
- "version": "1.0.0",
- "properties": {
- "policyScope": {
- "type": "list",
- "description": "scope where the policy is applicable",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "policyType": {
- "type": "list",
- "description": "type of a policy",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "distance_to_location"
- ]
- }
- ]
- }
- },
- "identity": {
- "type": "string",
- "required": true
- },
- "resources": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "applicableResources": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "any",
- "all"
- ]
- }
- ]
- }
- },
- "distanceProperties": {
- "type": "policy.data.distanceProperties_properties",
- "required": true
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "policy.data.distanceProperties_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "locationInfo": {
- "type": "string",
- "required": true
- },
- "distance": {
- "type": "policy.data.distance_properties",
- "required": true
- }
- }
- },
- "policy.data.distance_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "value": {
- "type": "string",
- "required": true
- },
- "operator": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "<",
- "<=",
- ">",
- ">=",
- "="
- ]
- }
- ]
- }
- },
- "unit": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "km"
- ]
- }
- ]
- }
- }
- }
- }
- }
- ]
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Optimization": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "a base policy type for all policies that govern optimization"
- }
- },
- {
- "onap.policies.optimization.HpaPolicy": {
- "derived_from": "onap.policies.Optimization",
- "version": "1.0.0",
- "properties": {
- "policyScope": {
- "type": "list",
- "description": "scope where the policy is applicable",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "policyType": {
- "type": "list",
- "description": "type of a policy",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "hpa"
- ]
- }
- ]
- }
- },
- "resources": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "identity": {
- "type": "string",
- "required": true
- },
- "flavorFeatures": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "policy.data.flavorFeatures_properties"
- }
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "policy.data.flavorFeatures_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "id": {
- "type": "string",
- "required": true
- },
- "type": {
- "type": "string",
- "required": true
- },
- "directives": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "policy.data.directives_properties"
- }
- },
- "flavorProperties": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "policy.data.flavorProperties_properties"
- }
- }
- }
- }
- },
- {
- "policy.data.directives_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "type": {
- "type": "string"
- },
- "attributes": {
- "type": "list",
- "entry_schema": {
- "type": "policy.data.directives_attributes_properties"
- }
- }
- }
- }
- },
- {
- "policy.data.directives_attributes_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "attribute_name": {
- "type": "string"
- },
- "attribute_value": {
- "type": "string"
- }
- }
- }
- },
- {
- "policy.data.flavorProperties_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "hpa-feature": {
- "type": "string",
- "required": true
- },
- "mandatory": {
- "type": "string",
- "required": true
- },
- "score": {
- "type": "string",
- "required": false
- },
- "architecture": {
- "type": "string",
- "required": true
- },
- "hpa-version": {
- "type": "string",
- "required": true
- },
- "directives": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "policy.data.directives_properties"
- }
- },
- "hpa-feature-attributes": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "policy.data.hpa-feature-attributes_properties"
- }
- }
- }
- }
- },
- {
- "policy.data.hpa-feature-attributes_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "hpa-attribute-key": {
- "type": "string",
- "required": true
- },
- "hpa-attribute-value": {
- "type": "string",
- "required": true
- },
- "operator": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "<",
- "<=",
- ">",
- ">=",
- "=",
- "!=",
- "any",
- "all",
- "subset"
- ]
- }
- ]
- }
- },
- "unit": {
- "type": "string",
- "required": false
- }
- }
- }
- }
- ]
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Optimization": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "a base policy type for all policies that govern optimization"
- }
- },
- {
- "onap.policies.optimization.OptimizationPolicy": {
- "derived_from": "onap.policies.Optimization",
- "version": "1.0.0",
- "properties": {
- "policyScope": {
- "type": "list",
- "description": "scope where the policy is applicable",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "policyType": {
- "type": "list",
- "description": "type of a policy",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "placement_optimization"
- ]
- }
- ]
- }
- },
- "identity": {
- "type": "string",
- "required": true
- },
- "objective": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "minimize",
- "maximize"
- ]
- }
- ]
- }
- },
- "objectiveParameter": {
- "type": "policy.data.objectiveParameter_properties",
- "required": true
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "policy.data.objectiveParameter_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "parameterAttributes": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "policy.data.parameterAttributes_properties"
- }
- },
- "operator": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "*",
- "+",
- "-",
- "/",
- "%"
- ]
- }
- ]
- }
- }
- }
- },
- "policy.data.parameterAttributes_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "resources": {
- "type": "string",
- "required": true
- },
- "customerLocationInfo": {
- "type": "string",
- "required": true
- },
- "parameter": {
- "type": "string",
- "required": true
- },
- "weight": {
- "type": "string",
- "required": true
- },
- "operator": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "*",
- "+",
- "-",
- "/",
- "%"
- ]
- }
- ]
- }
- }
- }
- }
- }
- ]
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Optimization": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "a base policy type for all policies that govern optimization"
- }
- },
- {
- "onap.policies.optimization.PciPolicy": {
- "derived_from": "onap.policies.Optimization",
- "version": "1.0.0",
- "properties": {
- "policyScope": {
- "type": "list",
- "description": "scope where the policy is applicable",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "policyType": {
- "type": "list",
- "description": "type of a policy",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "pciPolicy"
- ]
- }
- ]
- }
- },
- "identity": {
- "type": "string",
- "required": true
- },
- "resources": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "pciProperties": {
- "type": "list",
- "required": false,
- "entry_schema": {
- "type": "policy.data.pciProperties_properties"
- }
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "policy.data.pciProperties_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "algoCategory": {
- "type": "string",
- "required": false
- },
- "pciOptmizationAlgoName": {
- "type": "string",
- "required": false
- },
- "pciOptimizationNwConstraint": {
- "type": "string",
- "required": false
- },
- "pciOptimizationPriority": {
- "type": "string",
- "required": false
- },
- "pciOptimizationTimeConstraint": {
- "type": "string",
- "required": false
- }
- }
- }
- }
- ]
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Optimization": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "a base policy type for all policies that govern optimization"
- }
- },
- {
- "onap.policies.optimization.QueryPolicy": {
- "derived_from": "onap.policies.Optimization",
- "version": "1.0.0",
- "properties": {
- "policyScope": {
- "type": "list",
- "description": "scope where the policy is applicable",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "policyType": {
- "type": "list",
- "description": "type of a policy",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "request_param_query"
- ]
- }
- ]
- }
- },
- "identity": {
- "type": "string",
- "required": true
- },
- "queryProperties": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "policy.data.queryProperties_properties"
- }
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "policy.data.queryProperties_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "attribute": {
- "type": "string",
- "required": true
- },
- "value": {
- "type": "string",
- "required": true
- },
- "attribute_location": {
- "type": "string",
- "required": true
- }
- }
- }
- }
- ]
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Optimization": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "a base policy type for all policies that govern optimization"
- }
- },
- {
- "onap.policies.optimization.SubscriberPolicy": {
- "derived_from": "onap.policies.Optimization",
- "version": "1.0.0",
- "properties": {
- "policyScope": {
- "type": "list",
- "description": "scope where the policy is applicable",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "policyType": {
- "type": "list",
- "description": "type of a policy",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "subscriberPolicy"
- ]
- }
- ]
- }
- },
- "identity": {
- "type": "string",
- "required": true
- },
- "properties": {
- "type": "policy.data.properties_properties",
- "required": true
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "policy.data.properties_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "subscriberName": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "subscriberRole": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "provStatus": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string"
- }
- }
- }
- }
- }
- ]
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Optimization": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "a base policy type for all policies that govern optimization"
- }
- },
- {
- "onap.policies.optimization.Vim_fit": {
- "derived_from": "onap.policies.Optimization",
- "version": "1.0.0",
- "properties": {
- "policyScope": {
- "type": "list",
- "description": "scope where the policy is applicable",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "policyType": {
- "type": "list",
- "description": "type of a policy",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "vim_fit"
- ]
- }
- ]
- }
- },
- "identity": {
- "type": "string",
- "required": true
- },
- "applicableResources": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "any",
- "all"
- ]
- }
- ]
- }
- },
- "resources": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "capacityProperties": {
- "type": "policy.data.capacityProperties_properties",
- "required": true
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "policy.data.capacityProperties_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "controller": {
- "type": "string",
- "required": true
- },
- "request": {
- "type": "string",
- "required": true
- }
- }
- }
- }
- ]
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Optimization": {
- "derived_from": "tosca.policies.Root",
- "version": "1.0.0",
- "description": "a base policy type for all policies that govern optimization"
- }
- },
- {
- "onap.policies.optimization.VnfPolicy": {
- "derived_from": "onap.policies.Optimization",
- "version": "1.0.0",
- "properties": {
- "policyScope": {
- "type": "list",
- "description": "scope where the policy is applicable",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "policyType": {
- "type": "list",
- "description": "type of a policy",
- "required": true,
- "matchable": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "vnfPolicy"
- ]
- }
- ]
- }
- },
- "identity": {
- "type": "string",
- "required": true
- },
- "resources": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string"
- }
- },
- "applicableResources": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "any",
- "all"
- ]
- }
- ]
- }
- },
- "vnfProperties": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "policy.data.vnfProperties_properties"
- }
- }
- }
- }
- }
- ],
- "data_types": [
- {
- "policy.data.vnfProperties_properties": {
- "derived_from": "tosca.nodes.Root",
- "properties": {
- "inventoryProvider": {
- "type": "string",
- "required": true
- },
- "serviceType": {
- "type": "string",
- "required": true
- },
- "inventoryType": {
- "type": "list",
- "required": true,
- "entry_schema": {
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "serviceInstanceId",
- "vnfName",
- "cloudRegionId",
- "vimId"
- ]
- }
- ]
- }
- },
- "customerId": {
- "type": "string",
- "required": true
- }
- }
- }
- }
- ]
-}
These sub metadata structures are used to scope the resource the ONAP component is performing an action upon. At least
one must be specified in order for Policy to return a decision. Multiple structures may be utilized to help define a
-precise scope for a decision.
+precise scope for a decision.
+
+4.4.1 Policy Decision API - DCAE configuration examples
+-------------------------------------------------------
+
+These resource fields are examples on how DCAE implements its "configure" application to make Decision API calls.
================= ======= ======== ==================================================================
**Field** **R/O** **Type** **Description**
}
}
-End of Document
+4.4.2 Policy Decision API - Guard Decision API examples
+-------------------------------------------------------
+
+These resource fields are examples on how Drools-PDP implements its "guard" application to make Decision API calls. This
+structure is a transition from the legacy guard API calls. So each of these resources are contained under a "guard" object
+in the "resource" object of the JSON structure.
+
+================= ======= ======== ==================================================================
+**Field** **R/O** **Type** **Description**
+================= ======= ======== ==================================================================
+actor O String The actor (eg APPC, SO) that is performing a recipe
+recipe O String The recipe (eg Restart, Reboot) that the actor going to execute
+clname O String The unique ID for the Control Loop
+target O String The target VNF the actor is executing the recipe on
+vfCount O String Specific to SO "VF Module Create" - the current count of VNFs
+
+================= ======= ======== ==================================================================
+
+This example below shows the JSON body of a guard Decision API call.
+
+.. code-block:: json
+ :caption: Decision API Call - Guard
+ :linenos:
+
+ {
+ "ONAPName": "Policy",
+ "ONAPComponent": "drools-pdp",
+ "ONAPInstance": "usecase-template",
+ "requestId": "unique-request-id-1",
+ "action": "guard",
+ "resource": {
+ "guard": {
+ "actor": "SO",
+ "recipe": "VF Module Create",
+ "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
+ "target": "vLoadBalancer-00",
+ "vfCount": "1"
+ }
+ }
+ }
+
+.. code-block:: json
+ :caption: Decision Response - Guard
+ :linenos:
+ {"status":"Permit"}
+
+4.4.3 Policy Decision API - Optimize Decision API examples
+----------------------------------------------------------
+
+These resource fields are examples on how OOF project will make Decision API calls. NOTE: The OOF project
+has not yet upgraded to the API. This work is scheduled for Frankfurt.
+
+================= ======= ============== ==================================================================
+**Field** **R/O** **Type** **Description**
+================= ======= ============== ==================================================================
+scope O List of String Optional scope for the policy.
+services O List of String One or more services the policy applies to.
+resources O List of String The unique ID for the Control Loop
+geography O List of String The target VNF the actor is executing the recipe on
+
+================= ======= ======== ==================================================================
+
+This example below shows the JSON body of an Optimize Decision API call.
+
+.. code-block:: json
+ :caption: Decision API Call - Optimize vCPE service in US
+ :linenos:
+
+ {
+ "ONAPName": "OOF",
+ "ONAPComponent": "OOF-component",
+ "ONAPInstance": "OOF-component-instance",
+ "action": "optimize",
+ "resource": {
+ "scope": [],
+ "services": ["vCPE"],
+ "resources": [],
+ "geography": ["US"]
+ }
+ }
+
+.. code-block:: json
+ :caption: Decision Response -
+ :linenos:
+
+ {
+ "policies:" {
+ ### Omitted for brevity
+ }
+ }
+
+End of Document
"ONAPInstance": "OOF-component-instance",
"action": "optimize",
"resource": {
- "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"],
+ "scope": [],
+ "services": ["vCPE"],
+ "resources": ["vGMuxInfra", "vG"],
+ "geography": ["US", "INTERNATIONAL"],
"policyType": "zone"
}
}
ONAP Supported Policy Types
***************************
-In ONAP the following Policy Types are supported. Each Policy Type is implemented as an application that extends the **XacmlApplicationServiceProvider**. For details on each implementation, please refer to the `applications submodule of the onap/xacml-pdp project <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=tree;f=applications;h=047878fe14851d8a51998e065b8aca583ed8c994;hb=refs/heads/dublin>`__.
+In ONAP the following Policy Types are supported. Each Policy Type is implemented as an application that extends the **XacmlApplicationServiceProvider**. For details on each implementation, please refer to the `applications submodule of the onap/xacml-pdp project <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=tree;f=applications;h=047878fe14851d8a51998e065b8aca583ed8c994;hb=refs/heads/elalto>`__.
By cloning the policy/xacml-pdp repository, one can run the JUnit tests to get a better understanding on how applications are built using translators and the XACML Policies that are generated for each Policy Type. Each application supports one or more Policy Types and an associated "action" used by the Decision API when making these calls.
"onap.policies.monitoring.cdap.tca.hi.lo.app", "configure", "TCA DCAE microservice component"
"onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server", "configure", "REST Collector"
-The translator used to translate these TOSCA Policy Types is the `StdCombinedPolicyResultsTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslator.java;h=2d7386d99f97ccee828b665a46b46531495cdfcd;hb=refs/heads/dublin>`__.
+The translator used to translate these TOSCA Policy Types is the `StdCombinedPolicyResultsTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslator.java;h=2d7386d99f97ccee828b665a46b46531495cdfcd;hb=refs/heads/elalto>`__.
This is an example Decision API payload made to retrieve a decision for a Monitoring Policy Type.
Guard Policy Types
==================
-These Policy Types are used by Control Loop Drools Engine to support guarding of Control Loops during runtime control loop execution. NOTE: For Dublin, these policy types are not TOSCA compliant but rather a simple variation of the Casablanca legacy guard policy.
+These Policy Types are used by Control Loop Drools Engine to support guarding of Control Loops during runtime control loop execution. NOTE: For El Alto, these policy types are not TOSCA compliant but rather a simple variation of the Casablanca legacy guard policy.
.. csv-table::
:header: "Policy Type", "Action", "Description"
"onap.policies.controlloop.guard.Blacklist", "guard", "Blacklists a regexp of VNF IDs"
"onap.policies.controlloop.guard.MinMax", "guard", "For scaling, enforces a min/max number of VNFS"
-The translator used to translate these legacy Policy Types is the `LegacyGuardTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java;h=2917aab26dfbcf805dd00fead66ef68439561a11;hb=refs/heads/dublin>`__ which implements a more fine grained approach to translating the properties into a XACML policy.
+The translator used to translate these legacy Policy Types is the `LegacyGuardTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java;h=2917aab26dfbcf805dd00fead66ef68439561a11;hb=refs/heads/elalto>`__ which implements a more fine grained approach to translating the properties into a XACML policy.
This is an example Decision API payload made to retrieve a decision for a Guard Policy Type.
"onap.policies.controlloop.guard.coordination.FirstBlocksSecond", "guard", "Gives priority to one control loop vs another"
-The translator used to translate the coordination Policy Types is the `CoordinationGuardTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java;h=41c1428e3da4cc5b6c1bb091d0c16a6618a036ae;hb=refs/heads/dublin>`__ which uses a XACML Policy Template in its implementation. For example, when a new policy is loaded the translator copies the template to a new policy and replaces the CONTROL_LOOP_ONE and CONTROL_LOOP_TWO values with the specified control loops. See the `XAMCL Coordination Template for more details <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/resources/coordination/function/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.xml;h=bea05f264be5e422eb2da448d40057f736b7555c;hb=refs/heads/dublin>`__.
+The translator used to translate the coordination Policy Types is the `CoordinationGuardTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java;h=41c1428e3da4cc5b6c1bb091d0c16a6618a036ae;hb=refs/heads/elalto>`__ which uses a XACML Policy Template in its implementation. For example, when a new policy is loaded the translator copies the template to a new policy and replaces the CONTROL_LOOP_ONE and CONTROL_LOOP_TWO values with the specified control loops. See the `XAMCL Coordination Template for more details <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/resources/coordination/function/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.xml;h=bea05f264be5e422eb2da448d40057f736b7555c;hb=refs/heads/elalto>`__.
The same Decision API payload example for guard applies to this Policy Type.
Optimization Policy Types
=========================
-These Policy Types are used by the OOF Project support placement in ONAP. The OOF Platform makes a call to the Decision API to request these Policies based on the values specified in the **policyScope** and **policyType** properties. Please refer to the OOF Project for more details on how these Policy Types are using in their platform.
+These Policy Types are designed to be used by the OOF Project support placement in ONAP. The OOF Platform makes a call to the Decision API to request these Policies based on the values specified in the onap.policies.Optimization properties that have a metadata property called "matchable" and its value is set to "true". NOTE: For El Alto, this is dark code and OOF has not yet upgraded to the new Decision API to support this. Please refer to the OOF Project for more details on how it currently uses the Legacy API and policy models in their platform.
.. csv-table::
:header: "Policy Type", "Action"
+ "onap.policies.Optimization", "optimize"
"onap.policies.optimization.AffinityPolicy", "optimize"
"onap.policies.optimization.DistancePolicy", "optimize"
"onap.policies.optimization.HpaPolicy", "optimize"
"onap.policies.optimization.Vim_fit", "optimize"
"onap.policies.optimization.VnfPolicy", "optimize"
-The translator used to translate the optimization Policy Types is the `StdMatchableTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslator.java;h=dd44af7aa4ab2ef70b216f8a3a6a02c6f1fddf56;hb=refs/heads/dublin>`__.
+The translator used to translate the optimization Policy Types is the `StdMatchableTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslator.java;h=dd44af7aa4ab2ef70b216f8a3a6a02c6f1fddf56;hb=refs/heads/elalto>`__.
This is an example Decision API payload made to retrieve a decision for an Optimization Policy Type.