Versions Compared

Key

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

Contents

Table of Contents
maxLevel3

Summary

Introduction

The OOF retrieves applicable constraints and objective functions as policies from the policy platform. These policies are retrieved at runtime, thus allowing an operator to change policies as and when needed. These policies are specified using policy models that are on-boarded during the OOF application deployment-time in the policy platform. The OOF-related policy models are typically derived from the constraints and objective functions of an OOF-application. Currently, for R2, these models will be pushed into the policy platform manually using the OOF policy uploader module.

Policy Platform

The OOF currently relies on the following features of the policy platform:

  • Policy specification: Optimization constraints and objective functions can be specified in terms of policies by service providers and operators.
  • Policy prioritization: Policies capturing constraints and objectives can be prioritized.
  • Policy searching and filtering: OOF policies can be searched and filtered based on different criteria; by scope or by name patterns.

Resources Related to Policy

OOF Policies (multiple applications)

Anchor
OOF-HAS Policies
OOF-HAS Policies
OOF-HAS Policies

OOF-HAS Service Design Policies

Service design policies are typically defined as a part of a service design model and evaluated/enforced prior to the service instantiation phase. For example, Hardware Platform Enablement (HPA) policies are defined in an SDC service model and evaluated/enforced during the homing optimization process in ONAP.

The HPA requirements are captured in a VNF descriptor provided by a vendor. During the service-design phase, these requirements are extracted out from the VNF descriptor and captured in a service model. Some of the HPA requirements cannot be changed during the lifecycle of a service; while other optional requirements can be changed by a service designer or operator over time (e.g. the use of SR-IOV may be preferred by an operator if the SR-IOV capability is optionally provided by a vendor). Once a service model is designed and uploaded into the SDC repository, SDC notifies the policy service about the distribution of a new service model. The policy service then fetches the service model and extracts out the HPA requirements through model decomposition. Next, the policy service creates HPA policies for the homing service (OOF-HAS) by populating the HPA requirements in policy models provided by OOF, and stores the policies in a repository. When the homing service receives a homing request from SO, the homing service asks for the associated HPA policies from the policy platform. Finally, the homing service finds homing solutions based on the evaluation of the received HPA policies and returns the solutions to SO.


Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleHPA Hyper-Threading Policy Example
linenumberstrue
collapsetrue
{
  "service": "hpaHyperThreadingPolicy",
  "policyName": "oofBeijing.hyperThreadingPolicy_vGMuxInfra",
  "description": "Hyper threading policy for vGMuxInfra",
  "templateVersion": "0.0.1",
  "version": "oofBeijing",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "hyperThreadingProperties": {
      "cpuCores": { "value": 4, "operator": "="},
      "cpuThreads": { "value": 2, "operator": "="},
      "cpuThreadsPolicy": { "value": "dedicated", "operator": "="},
      "cpuSockets": { "value": 2, "operator": "="}
    },
    "identity": "hyperThreading_vGMuxInfra",
    "policyScope": {
      "serviceType": ["vCPE"],
      "geoRegion": ["US", "INTERNATIONAL"],
      "networkType": ["ip"],
      "resourceInstanceType": ["vGMuxInfra"]
    },
    "type": "hpaHyperThreadingPolicy",
    "resourceInstanceType": ["vGMuxInfra"]
  }
}
Column
width45%
Expand
titleComments and Notes: HPA Hyper-Threading Policy Example

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. This policy cannot be changed during the life-cycle of a service.

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleDistance Policy Example
linenumberstrue
collapsetrue
{
  "service": "distancePolicy",
  "policyName": "oofBeijing.distancePolicy_vGMuxInfra",
  "description": "Distance Policy for vGMuxInfra",
  "templateVersion": "0.0.1",
  "version": "oofBeijing",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "distanceProperties": {
      "locationInfo": { "value": "customer_location", "operator": "="},
      "distance": { "value": "500", "operator": "<", "unit": "km" },
      "resourceInstanceType": { "value": "vGMuxInfra", "operator": "="},
    },
    "identity": "distance-vGMuxInfra",
    "policyScope": {
      "serviceType": ["vCPE"],
      "geoRegion": ["US", "INTERNATIONAL"],
      "networkType": ["ip"],
      "resourceInstanceType": ["vGMuxInfra"]
    },
    "type": "distancePolicy"
  }
}
Column
width45%
Expand
titleComments and Notes: Distance Policy

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. However, the policy can be updated over time by operators.

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleHPA AES Policy Example
linenumberstrue
collapsetrue
{
    "service": "hpaAesPolicy",
    "policyName": "oofBeijing.aesPolicy_vGMuxInfra",
    "description": "AES policy for vGMuxInfra",
    "templateVersion": "0.0.1",
    "version": "oofBeijing",
    "priority": "3",
    "riskType": "test",
    "riskLevel": "2",
    "guard": "False",
    "content": {
        "aesProperties": {
	    	"version": { "values": 1.0, "operator": "="},
	    	"hwArch": { "values": "intel_64", "operator": "="},
	    	"aesFeature": {"values": "true","operator": "="}
        },
        "identity": "aes_vGMuxInfra",
        "policyScope": {
			"serviceType": ["vCPE"],
            "geoRegion": ["US", "INTERNATIONAL"],
            "networkType": ["ip"],
            "resourceInstanceType": ["vGMuxInfra"]
        },
        "type": "hpaAesPolicy",
        "resourceInstanceType": ["vGMuxInfra"]
    }
}
Column
width45%
Expand
titleComments and Notes: HPA AES Policy

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. This policy cannot be changed during the life-cycle of a service.

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleHPA OCS_DPDK Policy Example
linenumberstrue
collapsetrue
{
    "service": "hpaOvsDpdkPolicy",
    "policyName": "oofBeijing.hpaOvsDpdkPolicy_vGMuxInfra",
    "description": "HPA OVS DPDK policy for vGMuxInfra",
    "templateVersion": "0.0.1",
    "version": "oofBeijing",
    "priority": "3",
    "riskType": "test",
    "riskLevel": "2",
    "guard": "False",
    "content": {
        "ovsDpdkProperties": {
	    	"version": { "values": 1.0, "operator": "="},
            "hwArch": { "values": "*", "operator": "="},
	    	"OvsDpdk": {"values": "true", "operator": "="}
        },
        "identity": "ovsDpdk_vGMuxInfra",
        "policyScope": {
            "serviceType": ["vCPE"],
            "geoRegion": ["US", "INTERNATIONAL"],
            "networkType": ["ip"],
            "resourceInstanceType": ["vGMuxInfra"]
        },
        "type": "hpaOvsDpdkPolicy",
        "resourceInstanceType": ["vGMuxInfra"]
    }
}
Column
width45%
Expand
titleComments and Notes: HPA OVS_DPDK Policy

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. This policy cannot be changed during the life-cycle of a service.

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleHPA CPU_Pinning Policy Example
linenumberstrue
collapsetrue
{
    "service": "hpaCpuPinningPolicy",
    "policyName": "oofBeijing.hpaCpuPinningPolicy_vGMuxInfra",
    "description": "CPU Pinning policy for vGMuxInfra",
    "templateVersion": "0.0.1",
    "version": "oofBeijing",
    "priority": "3",
    "riskType": "test",
    "riskLevel": "2",
    "guard": "False",
    "content": {
        "cpuPinningProperties": {
	    	"pinning": { "values": "prefer", "operator": "="}
        },
        "identity": "cpuPinning_vGMuxInfra",
        "policyScope": {
            "serviceType": ["vCPE"],
            "geoRegion": ["US", "INTERNATIONAL"],
            "networkType": ["ip"],
            "resourceInstanceType": ["vGMuxInfra"]
        },
        "type": "hpaCpuPinning",
        "resourceInstanceType": ["vGMuxInfra"]
    }
}
Column
width45%
Expand
titleComments and Notes: HPA CPU_Pinning Policy

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. This policy cannot be changed during the life-cycle of a service.

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleHPA NUMA Policy Example
linenumberstrue
collapsetrue
{
    "service": "hpaNumaPolicy",
    "policyName": "oofBeijing.hpaNumaPolicy_vGMuxInfra",
    "description": "Hyper NUMA policy for vGMuxInfra",
    "templateVersion": "0.0.1",
    "version": "oofBeijing",
    "priority": "3",]
    "riskType": "test",
    "riskLevel": "2",
    "guard": "False",
    "content": {
        "numaProperties": {
	    	"version": { "values": 1.0, "operator": "="},
            "hwArch": { "values": "*", "operator": "="},
			"numaNodes": { "values": 2, "operator": "="},
			"complexAttributes": [
				{
					"numaCpu": { "values": [0, 1], "operator": "="},
					"numaMem": { "values": 2, "operator": "=", "unit": "GB"},
				},
				{
					"numaCpu": { "values": [2, 3, 4, 5], "operator": "="},
					"numaMem": { "values": 4, "operator": "=", "unit": "GB"},      
                }
	    	]
        },
        "identity": "numa_vGMuxInfra",
        "policyScope": {
            "serviceType": ["vCPE"],
            "geoRegion": ["US", "INTERNATIONAL"],
            "networkType": ["ip"],
            "resourceInstanceType": ["vGMuxInfra"]
        },
        "type": "hpaNumaPolicy",
        "resourceInstanceType": ["vGMuxInfra"]
    }
}
Column
width45%
Expand
titleComments and Notes: HPA NUMA Policy

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. This policy cannot be changed during the life-cycle of a service.

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleHPA SGX Policy Example
linenumberstrue
collapsetrue
{
    "service": "hpaSgxPolicy",
    "policyName": "oofBeijing.hpaSgxPolicy_vGMuxInfra",
    "description": "SGX policy for vGMuxInfra",
    "templateVersion": "0.0.1",
    "version": "oofBeijing",
    "priority": "3",
    "riskType": "test",
    "riskLevel": "2",
    "guard": "False",
    "content": {
        "sgxProperties": {
	    	"version": { "values": 1.0, "operator": "="},
			"hwArch": { "values": "intel_64", "operator": "="},
			"sgxMemSize": { "values": "128", "operator": "=", "unit": "MB"},
            "sgxPubkeyHash": { "values": "octect_string", "operator": "="}
        },
        "identity": "sgx_vGMuxInfra",
        "policyScope": {
            "serviceType": ["vCPE"],
            "geoRegion": ["US", "INTERNATIONAL"],
            "networkType": ["ip"],
            "resourceInstanceType": ["vGMuxInfra"]
        },
        "type": "hpaSgxPolicy",
        "resourceInstanceType": ["vGMuxInfra"]
    }
}
Column
width45%
Expand
titleComments and Notes: HPA SGX Policy

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. This policy cannot be changed during the life-cycle of a service.

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleAffinity Policy Example
linenumberstrue
collapsetrue
{
    "service": "affinityPolicy",
    "policyName": "oofBeijing.affinityPolicy_vcpe",
    "description": "Affinity policy for vCPE",
    "templateVersion": "1702.03",
    "version": "oofBeijing",
    "priority": "5",
    "riskType": "test",
    "riskLevel": "2",
    "guard": "False",
    "content": {
        "identity": "affinity_vCPE",
        "policyScope": {
            "serviceType": ["vCPE"],
            "geoRegion": ["US", "INTERNATIONAL"],
            "networkType": ["ip"],
            "resourceInstanceType": ["vGMuxInfra", "vG"]
        },
        "affinityProperty": {
            "qualifier": {"value": "different", "operator": "="},
            "category": {"value": "complex", "operator": "="}
        },
        "type": "affinityPolicy",
        "resourceInstanceType": ["vGMuxInfra", "vG"]
    }
}
Column
width45%
Expand
titleComments and Notes: Affinity Policy

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. This policy cannot be changed during the life-cycle of a service.

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleCapacity Policy Example
linenumberstrue
collapsetrue
{
    "service": "capacityPolicy",
    "policyName": "oofBeijing.capacityPolicy_vGMuxInfra",
    "description": "Capacity policy for vGMuxInfra",
    "templateVersion": "1702.03",
    "version": "oofBeijing",
    "priority": "5",
    "riskType": "test",
    "riskLevel": "2",
    "guard": "False",
    "content": {
        "identity": "capacity_vGMuxInfra",
        "policyScope": {
            "serviceType": ["VCPE"],
            "geoRegion": ["US", "INTERNATIONAL"],
            "networkType": ["ip"],
            "resourceInstanceType": ["vGMuxInfra"]
        },
        "capacityProperty": {
            "cpu": {"value": 2, "operator": ">"},
            "memory": {"value": 4, "operator": ">", "unit": "Gb"}
        },
        "type": "capacityPolicy",
        "resourceInstanceType": ["vGMuxInfra"]
    }
}
Column
width45%
Expand
titleComments and Notes: Capacity Policy

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. This policy cannot be changed during the life-cycle of a service.

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleMin Guarantee Policy Example
linenumberstrue
collapsetrue
{
    "service": "minGuaranteePolicy",
    "policyName": "oofBeijing.minGuaranee_vGMuxInfra",
    "description": "Min guarantee policy for vGMuxInfra",
    "templateVersion": "1702.03",
    "version": "oofBeijing",
    "priority": "5",
    "riskType": "test",
    "riskLevel": "2",
    "guard": "False",
    "content": {
        "identity": "minGuarantee_vGMuxInfra",
        "policyScope": {
            "serviceType": ["vCPE"],
            "geoRegion": ["US", "INTERNATIONAL"],
            "networkType": ["ip"],
            "resourceInstanceType": ["vGMuxInfra"]
        },
        "minGuaranteeProperty": {
            "cpu": {"value": "true", "operator": "="},
            "memory": {"value": "false", "operator": "="}
        },
        "type": "minGuaraneePolicy",
        "resourceInstanceType": ["vGMuxInfra"]
    }
}
Column
width45%
Expand
titleComments and Notes: Min Guarantee Policy

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. This policy cannot be changed during the life-cycle of a service.

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleOptimization Policy Example
linenumberstrue
collapsetrue
{
    "service": "PlacementOptimizationPolicy",
    "policyName": "oofBeijing.PlacementOptimizationPolicy_vGMuxInfra",
    "description": "Placement Optimization Policy for vGMuxInfra",
    "templateVersion": "1702.03",
    "version": "oofBeijing",
    "priority": "5",
    "riskType": "test",
    "riskLevel": "3",
    "guard": "False",
    "content": {
        "objectiveParameter": {
            "parameterAttributes": [
                {
                    "resource": ["vGMuxInfra"],
                    "customerLocationInfo": "customer_loc",
                    "parameter": "distance",
                    "weight": "1",
                    "operator": "product"=
                },
                {
                    "resource": ["vG"],
                    "customerLocationInfo": "customer_loc",
                    "parameter": "distance",
                    "weight": "1",
                    "operator": "product"
                }
            ],
            "operator": "sum"
        },
        "identity": "optimization",
        "policyScope": {
            "serviceType": ["vCPE"],
            "geoRegion": ["US", "INTERNATIONAL"],
            "networkType": ["ip"],
            "resourceInstanceType": ["vGMuxInfra", "vG"]
        },
        "type": "placementOptimization",
        "objective": "minimize"
    }
}
Column
width45%
Expand
titleComments and Notes: Optimization Policy

The fields in this example policy are typically generated from a TOSCA service model specified by VNF vendors or service designers. This policy cannot be changed during the life-cycle of a service.

Anchor
OOF-CMSO Policies
OOF-CMSO Policies
OOF-CMSO Policies

TBD

Modes for Fetching Policies

OOF can fetch optimzation policies using the getConfig API of the policy system. The policies can be searched and filtered in two different modes; by-name and by-scope from the policy system.

By-name: OOF can send an explicite policy name or a regular expression matching a set of policy names as a part of the getConfig API payload. In return, OOF expects to receive a specific policy or a set of policies with name matching to the regular expression.

By-scope: A scope is the domain to which a policy is applicable. Scope information can be captured as a set of attribute-value pairs, which can be sent as a part of the getConfig API payload. In response, the policy system is expected to return a set of policies with the matching attribute-value pairs. A policy can only be included in the response if all the matching attribute-value pairs exist.

OOF can requerst prioritization by enabling a prioritization flag in the getConfig API call to the policy system, and expects to receive a single policy with the highest priority policy among the set of policies meeting the search criteria.