Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Sample Threshold Policy

Code Block
languagetext
titleSample Threshold Policy
linenumberstrue
collapsetrue
{
    "OSDF_FRANKFURT.Threshold_URLLC_Core_1":{
tosca_definitions_version": "tosca_simple_yaml_1_0_0",
    "topology_template": {
         "typepolicies":"onap.policies.optimization.ThresholdPolicy", [
             {
   "OSDF_FRANKFURT.Threshold_URLLC_Core_1":{
      "type":"onap.policies.optimization.resource.ThresholdPolicy",
      "version":"1.0.0",
      "type_version":"1.0.0",
      "metadata":{
         "policy-id":"OSDF_FRANKFURT.Threshold_URLLC_Core_1",
         "policy-version":1
      },
      "properties":{
         "scope":[
            "OSDF_FRANKFURT",
            "URLLC_1",
            "URLLC_Core_1"
         ],
         "resources":[
            "URLLC_Core_1"
         ],
         "services":[
            "URLLC_1"
         ],
         "identitygeography": [],
         "identity":"Threshold_URLLC_Core_1",
         "thresholdProperties":[
               {
                  "attribute":"latency",
                  "operator":"lte",
                  "threshold":5,
                  "unit":"ms"
               },
               {
                  "attribute":"reliability",
                  "operator":"gte",
                  "threshold":99.999,
                  "unit":""
               }

         ]
      }
   }
}


Code Block
languagetext
titleThreshold Policy ModelType
linenumberstrue
collapsetrue
{
   "tosca_definitions_version": "tosca_simple_yaml_1_01_0",
   "policy_types": {
      "onap.policies.Optimizationoptimization.resource.ThresholdPolicy": {
         "derived_from": "toscaonap.policies.optimization.RootResource",
         "version": "1.0.0",
         "descriptionproperties":"a base{
 policy type for all policies that govern optimization"applicableResources": {
      },
    "type":  "onap.policies.optimization.ThresholdPolicy":{"list",
          "derived_fromrequired":"onap.policies.Optimization" true,
          "propertiesentry_schema": {
            "scopetype":{
   "string",
             "typeconstraints":"list", [
               "description":"scope where the policy is applicable",
{
                  "valid_values": [
   "required":true,
               "matchableany":true,
               "entry_schema":{   "all"
                  "type":"string"
 ]
              }
            },]
          }
  "identity":{
      },
         "typethresholdProperties":"string", {
              "type": "requiredlist":true,
            }"required": true,
            "resourcesentry_schema": {
               "type":"list", "policy.data.thresholdProperties_properties"
          }
     "required":true,
   }
      }
    }
  },
  "entrydata_schematypes": {
            "policy.data.thresholdProperties_properties": {
      "typederived_from": "stringtosca.nodes.Root",
      "properties": {
        }"attribute": {
            },
			"services":{
               "type":"list",
     "type": "string",
          "required": true,
        },
        "entry_schemaoperator": {
                  "type": "string",
               }"required": true
            },
            "thresholdPropertiesthreshold": {
               "type": "listfloat",
               "required": true,
        },
        "entry_schemaunit": {
				          "type":"policy.data.thresholdProperties_properties"
				}
 "string",
            }
 "required": false
        }
      }
    },
   "data_types":}
}


Code Block
languagetext
titleSample Aggregation Policy
linenumberstrue
collapsetrue
{
      "policy.data.thresholdProperties_properties":{
      "tosca_definitions_version":"tosca_simple_yaml_1_0_0",
   "name":"ToscaServiceTemplateSimple",
   "derived_fromversion":"tosca1.nodes0.Root0",
   "topology_template":{
      "propertiespolicies":{[
         {
   "attributeOSDF_FRANKFURT.Aggregation_URLLC_1":{
        "type":"onap.policies.optimization.resource.AggregationPolicy",
       "typeversion":"string1.0.0",
        "type_version":"1.0.0",
       "requiredmetadata":true{
            },
   "policy-id":"OSDF_FRANKFURT.Aggregation_URLLC_1",
         "operatorpolicy-version":{1
         },
      "typeproperties":"string",
      {
         "requiredscope":true[
            }"OSDF_FRANKFURT",
            "thresholdURLLC_1":{
         ],
         "typegeography":"float" [],
         "resources":[
      "required":true
      "URLLC_Core_1"
      },
   ],
         "unitservices":{[
               "type":"string",URLLC_1"
          ],
         "requiredidentity":false"Aggregation_URLLC_1",
         "applicableResources":"any",
   }
      "aggregationProperties":[
   }
      }
   }
}

Aggregation Policy

Code Block
languagetext
titleAggregation Policy
collapsetrue
{
   "OSDF_FRANKFURT.Aggregation_URLLC_1":{
            "typeattribute":"onap.policies.optimization.AggregationPolicylatency",
         "version":"1.0.0",
      "type_versionfunction":"1.0.0sum",
      "metadata":{
           "policy-idoperator":"OSDF_FRANKFURT.Aggregation_URLLC_1lte",
         "policy-version":1
      "threshold":{"get_param":"serviceProfile.latency"},
      "properties":{
         "scopeunit":["ms"
            "OSDF_FRANKFURT",
}
            "URLLC_1"]
         ],}
         "resources":[
            "URLLC_1"
  }
}
       ],
         "services":[
            "URLLC_1"
         ],
         "identity":"Aggregation_URLLC_1",
         "applicableResources":"any",
         "aggregationProperty":[
            {
               "attribute":"latency",
               "function":"sum",
               "operator":"lte",
               "threshold":40,
               "unit":"ms"
            }
         ]
      }
   }
}}
}


Code Block
languagetext
titleAggregation Policy Type
linenumberstrue
collapsetrue
{
  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
  "policy_types": {
    "onap.policies.optimization.resource.AggregationPolicy": {
      "derived_from": "onap.policies.optimization.Resource",
      "version": "1.0.0",
      "properties": {
Code Block
languagetext
titleAggregation Policy Model
collapsetrue
{
   "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.AggregationPolicy":{
         "derived_from":"onap.policies.Optimization",
         "properties":{
            "scope":{
               "type":"list",
               "description":"scope where the policy is applicable",
               "required":true,
               "matchable":true,
               "entry_schema":{
                  "type":"string"
               }
            },
            "identity":{
               "type":"string",
               "required":true
            },
            "resourcesapplicableResources": {
               "type": "list",
               "required": true,
          "entry_schema": {
            "entry_schematype":{ "string",
            "constraints": [
     "type":"string"
         {
      }
            },
			"services"valid_values":{ [
                  "type":"listany",
                  "requiredall":true,
                "entry_schema":{]
              }
    "type":"string"
         ]
      }
    }
        },
            "aggregationProperties": {
               "type": "list",
               "required": true,
               "entry_schema": {
				            "type": "policy.data.aggregationProperties_properties"
				}
            }
         }
      }
    }
  },
   "data_types": {
      "policy.data.aggregationProperties_properties": {
         "derived_from": "tosca.nodes.Root",
         "properties": {
            "attribute": {
               "type": "string",
               "required": true
            },
            "operator":{
      {
          "type": "string",
               "required": true
            },
            "threshold": {
               "type":"float "policy.data.thresh_properties",
               "required": true
            },
            "unit": {
               "type": "string",
               "required": false
            },
            "function": {
               "type": "string",
               "required": true
        }
      }
    },
    "policy.data.thresh_properties":{
   }
   	"derived_from": "tosca.nodes.Root"
    }
   }
}