Versions Compared

Key

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

Table of Contents


NEW POLICY TYPES

Code Block
languagetext
titleSample Threshold Policy Type
linenumberstrue
collapsetrue
{
    "tosca_definitions_version": "tosca_simple_yaml_1_01_0",
    "topologypolicy_templatetypes": {
    "onap.policies.optimization.resource.ThresholdPolicy": {
      "policiesderived_from": ["onap.policies.optimization.Resource",
      "version": "1.0.0",
      "properties": {
        "OSDF_FRANKFURT.Threshold_URLLC_Core_1applicableResources": {
          "type":"onap.policies.optimization.resource.ThresholdPolicy "list",
          "versionrequired":"1.0.0" true,
          "typeentry_versionschema":"1.0.0",
  {
     "metadata":{
         "policy-idtype":"OSDF_FRANKFURT.Threshold_URLLC_Core_1 "string",
            "policy-versionconstraints":1 [
       },
       "properties":{
         "scope":[
            "OSDF_FRANKFURT","valid_values": [
            "URLLC_1",
            "URLLC_Core_1""any",
         ],
         "resourcesall":[
            "URLLC_Core_1"
    ]
     ],
         "services":[}
            "URLLC_1"]
          }
         ]},
         "geographythresholdProperties": [],{
          "identitytype":"Threshold_URLLC_Core_1 "list",
          "thresholdPropertiesrequired":[ true,
              "entry_schema": {
                  "attribute"type":"latency", "policy.data.thresholdProperties_properties"
          }
        "operator":"lte",}
      }
    }
      },
  "thresholddata_types":5, {
    "policy.data.thresholdProperties_properties": {
             "unit":"ms""derived_from": "tosca.nodes.Root",
      "properties": {
         },"attribute": {
          "type": "string",
    {
      "required": true
           "attribute":"reliability"},
        "operator": {
          "operatortype": "gtestring",
          "required": true
        "threshold":99.999},
        "threshold": {
          "unittype": "float",
          "required": true
        }
,
        "unit": ]{
       }
   }
}   "type": "string",
          "required": false
        }
      }
    }
  }
}


Code Blockcode
languagetext
titleThreshold Aggregation Policy Type
linenumberstrue
collapsetrue
{
  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
  "policy_types": {
    "onap.policies.optimization.resource.ThresholdPolicyAggregationPolicy": {
      "derived_from": "onap.policies.optimization.Resource",
      "version": "1.0.0",
      "properties": {
        "applicableResources": {
          "type": "list",
          "required": true,
          "entry_schema": {
            "type": "string",
            "constraints": [
              {
                "valid_values": [
                  "any",
                  "all"
                ]
              }
            ]
          }
        },
        "thresholdPropertiesaggregationProperties": {
          "type": "list",
          "required": true,
          "entry_schema": {
            "type": "policy.data.thresholdPropertiesaggregationProperties_properties"
          }
        }
      }
    }
  },
  "data_types": {
    "policy.data.thresholdPropertiesaggregationProperties_properties": {
      "derived_from": "tosca.nodes.Root",
      "properties": {
        "attribute": {
          "type": "string",
          "required": true
        },
        "operator": {
          "type": "string",
          "required": true
        },
        "threshold": {
          "type": "floatpolicy.data.thresh_properties",
          "required": true
        },
        "unit": {
          "type": "string",
          "required": false
        },
        }
"function": {
     }
  }
}
Code Block
languagetext
titleSample Aggregation Policy
linenumberstrue
collapsetrue
{
   "tosca_definitions_versiontype":"tosca_simple_yaml_1_0_0",
   "name":"ToscaServiceTemplateSimple",
   "version":"1.0.0",
 "string",
          "topology_templaterequired":{ true
        "policies":[}
      }
    {},
   "OSDF_FRANKFURT.Aggregation_URLLC_1 "policy.data.thresh_properties":{
      "type	"derived_from": "onaptosca.policies.optimization.resource.AggregationPolicy",nodes.Root"
      "version":"1.0.0",}
  }
}


SAMPLE POLICIES

Code Block
languagetext
titleSample Threshold Policy
linenumberstrue
collapsetrue
{
   "OSDF_FRANKFURT.Threshold_URLLC_Core_1":{
    "type_version":"1.0.0",
      "metadata":{
         "policy-idtype":"OSDF_FRANKFURT.Aggregation_URLLC_1onap.policies.optimization.resource.ThresholdPolicy",
         "policy-"version":"1.0.0",
      }"type_version":"1.0.0",
      "propertiesmetadata":{
         "scope":[
   policy-id":"OSDF_FRANKFURT.Threshold_URLLC_Core_1",
         "OSDF_FRANKFURT",policy-version":1
       },
      "URLLC_1properties":{
         ],"scope":[
         "geography": []   "OSDF_FRANKFURT",
            "resourcesEmbbNst":[,
            "URLLC_Core_1EmbbCn"
         ],
         "servicesresources":[
            "URLLC_1EmbbCn"
         ],
         "identityservices":"Aggregation_URLLC_1",[
         "applicableResources":"any",   "EmbbNst"
         "aggregationProperties":[],
         "geography":[

   {
      ],
         "attributeidentity":"latencyThreshold_URLLC_Core_1",
         "thresholdProperties":[
            "function":"sum",{
               "operatorattribute":"ltelatency",
               "thresholdoperator":{"get_param":"latency"}"lte",
               "unitthreshold":"ms"
50,
               }
"unit":"ms"
            ]}
      }
   }
}]
      ]}
   }
}


Code Block
languagetext
titleAggregation Sample Subscriber Policy Type
linenumberstrue
collapsetrue
{
   "tosca_definitions_versionOSDF_FRANKFURT.SubscriberPolicy_URLLC_1": "tosca_simple_yaml_1_1_0",
{
      "policy_typestype": {
    "onap.policies.optimization.resourceservice.AggregationPolicySubscriberPolicy": {,
      "derived_fromversion": "onap1.policies0.optimization.Resource0",
      "type_version": "1.0.0",
      "propertiesmetadata": {
         "applicableResources": {
 policy-id":"OSDF_FRANKFURT.SubscriberPolicy_URLLC_1",
         "typepolicy-version":1
 "list",
     },
      "requiredproperties": true,{
          "entry_schemascope": {[
            "type": "string"OSDF_FRANKFURT",
            "constraintsEmbbNst": [
              {],
                "valid_values"services": [
            "EmbbNst"
         "any"],
         "identity":"subscriber_URLLC_1",
         "allproperties":{
            "subscriberName":[
    ]
              }"EmbbCn"
            ]
          }
      }
   },
  
}


Code Block
languagetext
titleSample Vnf Policy
linenumberstrue
collapsetrue
{
   "OSDF_FRANKFURT.vnfPolicy_URLLC_Core_1":{
      "type":"onap.policies.optimization.resource.VnfPolicy",
      "version":"1.0.0",
      "type_version":"1.0.0",
      "metadata":{
         "policy-id":"OSDF_FRANKFURT.vnfPolicy_URLLC_Core_1",
         "policy-version":1
      },
      "properties":{
         "scope":[
            "OSDF_FRANKFURT",
            "EmbbNst",
            "EmbbCn"
         ],
         "resources":[
            "EmbbCn"
         ],
         "services":[
            "EmbbNst"
         ],
         "identity":"vnf_URLLC_Core_1",
         "applicableResources":"any",
         "vnfProperties":[
            {
               "inventoryProvider":"aai",
               "inventoryType":"nssi",
               "region":"RegionOne",
               "attributes":{
                  "orchestrationStatus":"active",
                  "service-role":"nssi",
                  "modelInvariantId":"c0eeaa3b-625c-4518-bd1f-f01cc784813c",
                  "modelVersionId":"836eb219-346d-4b8b-8376-b0c4d17954a9"
               }
            }
         ]
      }
   }
}



Code Block
languagetext
titleSample Query Policy
linenumberstrue
collapsetrue
{
  "OSDF_FRANKFURT.queryPolicy_URLLC_1": {
    "type": "onap.policies.optimization.service.QueryPolicy",
    "version": "1.0.0",
    "type_version": "1.0.0",
    "metadata": {
      "policy-id": "OSDF_FRANKFURT.queryPolicy_URLLC_1",
      "policy-version": 1
    },
    "properties": {
      "scope": [
        "OSDF_FRANKFURT"
      ],
      "services": [
        "URLLC_1"
      ],
      "geography": [
        "US"
      ],
      "identity": "queryPolicy_URLLC_1",
      "queryProperties": [
        {
          "attribute": "latency",
          "attribute_location": "latency"
        }
      ]
    }
  }
}


Code Block
languagetext
titleSample Aggregation Policy
linenumberstrue
collapsetrue
{
   "OSDF_FRANKFURT.Aggregation_URLLC_1":{
      "type":"onap.policies.optimization.resource.AggregationPolicy",
      "aggregationPropertiesversion": {
 "1.0.0",
         "type_version": "list1.0.0",
      "metadata":{
         "required": truepolicy-id":"OSDF_FRANKFURT.Aggregation_URLLC_1",
          "entry_schema"policy-version": {1
      },
      "typeproperties": "policy.data.aggregationProperties_properties"{
          }"scope":[
        }
      }"OSDF_FRANKFURT",
    }
  },
  "data_types": {
    "policy.data.aggregationProperties_properties": {
URLLC_1"
        "derived_from": "tosca.nodes.Root" ],
         "propertiesgeography": {[],
         "attributeresources":[
 {
          "type": "stringURLLC_Core_1",
         ],
  "required": true
      "services":[
  },
          "operator": {URLLC_1"
          "type": "string"],
          "requiredidentity": true
"Aggregation_URLLC_1",
         }"applicableResources":"any",
         "thresholdaggregationProperties":[
 {
          "type": "policy.data.thresh_properties",
 {
               "requiredattribute": true"latency",
        },
        "unitfunction": {
"sum",
               "typeoperator": "stringlte",
               "requiredthreshold": false{
        },
        "functionget_param": {
"latency"
              "type": "string" },
               "requiredunit": true"ms"
        }
      }
     },
    "policy.data.thresh_properties":{
]
     	"derived_from": "tosca.nodes.Root"
  }
   }
  }
}