Versions Compared

Key

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

...

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleExtensible HPA Hyper-Threading Policy ExampleTemplate for the HPA policies
linenumberstrue
collapsetrue
{
    "service": "hpaHyperThreadingPolicy{the model name of a policy}",
    "policyName": "oofBeijing.hyperThreadingPolicy_vGMuxInfra",{policy scope folder}.{policy name; must be unique}",
    "description": "Hyper threading{description of a policy}",
for vGMuxInfra",   "templateVersion": "0.0.1{policy model version}",
    "version": "oofBeijing{policy version}",
    "priority": "3",{priority in  "riskType": "test",
  "riskLevel": "2",1-10; larger the number higher the priority is}",
    "guardriskType": "False{the type of risk}",
    "contentriskLevel": "{the level of risk}",
    "hyperThreadingPropertiesguard": [
      {"attribute": "hpaFeature", "value": "NUMA", "operator": "=", "unit": ""}"{True/False flag to indicate whether guard is applicable or not}",
    "content": { 
      "resource": "{resource name}",
      "identity": "{policy identity}",
      {"attributepolicyScope": "architecture", "value": "INTELx64", "operator": "=", "unit["{a tag representing policy scope}"],
      "policyType": "{policy type}"},
      {"attributeflavorFeatures": [
"mandatory", "value": "true", "operator": "=", "unit": ""},  {
    {"attribute": "score", "value": "4", "operator": "=", "unitflavorLabel": "{VM/VFC id}"},
      {"attribute": "cpuCores",    "valueflavorProperties":[
 "4", "operator": ">=", "unit": ""},       {"attribute": "cpuCores", "value": "10", "operator": "<=", "unit": ""},
              {"attributehpa-feature" : "cpuThreads", "value": "2", "operator": ">", "unit": ""},{HPA feature type}",
          {"attribute": "cpuThreadsPolicy", "value": "dedicated", "operator": "=", "unit": ""}    "mandatory" : "{mandatoriness of the feature}",
      {"attribute": "cpuSockets", "values": ["2", "4", "6"], "operator": "any", "unit": ""},
      {"attribute": "memory", "value": 8, "operator": ">", "unit": "GB"}        "score" : "{priority of this feature if the feature is not mandatory for VM}"
         ],     "identityarchitecture": "hyperThreading_vGMuxInfra{supported architecuture}",
        "policyScope      "hpa-version": ["vCPE"{version for hpa capability}",
"US", "INTERNATIONAL", "ip", "vGMuxInfra"],     "type": "hpaHyperThreadingPolicy",     "resourceInstanceTypehpa-feature-attributes": ["vGMuxInfra"]
                }
}
Column
width45%
Expand
titleComments and Notes: HPA Hyper-Threading Policy Example
  • Underlying model to generate this policy example is extensible
    and can be used to generate other HPA policies.
  • The value domain of the operator field is <, <=, >, >=, =, !=,
    any, all, many where any represents one from a set,
    all represents all the values of a set, and many represents more
    than one from a set.
  • The model can capture simple expressions. This example captures;
    4<=cpuCores<=10, cpuThreads>2, cpuThreadsPolicy=dedicated,
    cpuSockets is one from {2, 4, 6}, memory>8GB, etc.
  • Instead of modeling policy scope over multiple explicite dimentions,
    it is modeled as a list of tags/strings to achieve extensiblity and
    support model-agnostic getConfig query
    {
                      "hpa-attribute-key": "{attribute name}", 
                      "hpa-attribute-value": "{attribute value}",
                      "operator": "{comparison operator}", 
                      "unit": "{the unit of an attribute}"}
                  ]
                }
              ] 
            }
          ]
        }
    }
    Column
    width45%
    Expand
    titleComments and Notes: HPA CPU Topology Policy Example

    Template for the HPA policies.

    Section
    bordertrue
    Column
    width60%
    Code Block
    languagejs
    themeEclipse
    titleHPA CPU Topology Policy Example
    linenumberstrue
    collapsetrue
    {
        "service": "hpaCpuTopologyPolicyhpaPolicy",
        "policyName": "oofBeijing.hyperThreadingPolicyhpaPolicy_vGMuxInfra",
        "description": "Hyper threadingHPA policy for vGMuxInfra",
        "templateVersion": "0.0.1",
        "version": "oofBeijing1.0",
        "priority": "3",
        "riskType": "test",
        "riskLevel": "2",
        "guard": "False",
        "content": { 
          "cpuTopologyPropertiesresources": ["vGMuxInfra",
          {"attributeidentity": "hpaFeaturehpaPolicy_vGMuxInfra",
    "value      "policyScope": ["cpuTopologyvCPE", "operatorUS":, "=INTERNATIONAL", "unitip":, "vGMuxInfra"}],
          {"attributepolicyType": "architecturehpaPolicy", "value":
          "INTELx64flavorFeatures","operator": "=", "unit": ""},[
            {"attribute
              "flavorLabel":"mandatory "flavor_label_vm_01",
    "value": "true","operator": "=", "unit":""},       {"attributeflavorProperties":"score", "value": "4", "operator":"=", "unit": ""},[
                {"attribute":"cpuCores", "value": "2", "operator":">=", "unit": ""},
                  "hpa-feature" : "cpuTopology",
                  {"attributemandatory" : "cpuThreadsTrue",
    "value": "4", "operator":">=", "unit": ""},              {"attributearchitecture": "cpuSocketsgeneric",
    "values": "2","operator              "hpa-version": ">=v1",
    "unit": ""},              "hpa-feature-attributes": [
                    {"hpa-attribute-key":"cpuCoresnumCpuSockets", "hpa-attribute-value": "42", "operator": "<>=", "unit": ""},
                    {"hpa-attribute-key":"cpuThreadsnumCpuSockets", "hpa-attribute-value": "84", "operator": "<=", "unit": ""},
                    {"hpa-attribute-key":"cpuSocketsnumCpuCores", "valueshpa-attribute-value": "42", "operator": "<>=", "unit": ""},
               ],     {"identityhpa-attribute-key": "CpuTopology_vGMuxInfranumCpuCores",     "policyScope"hpa-attribute-value": ["vCPE4", "USoperator", :"INTERNATIONAL<=", "ipunit",: "vGMuxInfra"],},
                    {"typehpa-attribute-key": "hpaHyperThreadingPolicynumCpuThreads",
        "resourceInstanceTypehpa-attribute-value": ["vGMuxInfra4"]
      }
    }
    Column
    width45%
    Expand
    titleComments and Notes: HPA CPU Topology 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, "operator":">=", "unit": "distancePolicy"},
      "policyName": "oofBeijing.distancePolicy_vGMuxInfra",       "description": "Distance Policy for vGMuxInfra",   {"templateVersionhpa-attribute-key": "0.0.1numCpuThreads",   "version"hpa-attribute-value": "oofBeijing8",   "priorityoperator": "3<=",
      "riskTypeunit": "test",}
      "riskLevel": "2",   "guard": "False",   "content": {   ]
     "distanceProperties": {       "locationInfo": { "value": "customer_location", "operator": "="}, },
               "distance": {
    "value": "500", "operator": "<", "unit": "km" },              "resourceInstanceTypehpa-feature": { "value": "vGMuxInfrabasicCapabilities",
    "operator": "="},         },     "identitymandatory" : "distance-vGMuxInfraTrue",
          "policyScope": {       "serviceTypearchitecture": ["vCPEgeneric"],
          "geoRegion": ["US", "INTERNATIONAL"],       "networkTypehpa-version": ["ipv1"],
          "resourceInstanceType": ["vGMuxInfra"]        "hpa-feature-attributes": [
                     },
        "type{"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": "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"    {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}
                  ]
                },
                {
                  "hpa-feature" : "ovsDpdk",
                  "mandatory" : "False",
        "content": {         "aesPropertiesscore" : ["3",
    	      {"attribute":"hpaFeature", "value        "architecture": "cpuInstructionAESgeneric","operator
                  "hpa-version": "=v1", "unit":""},
                  {"attributehpa-feature-attributes":"architecture", "value": "INTELx64","operator": "=", "unit": ""}, [
                     {"hpa-attribute-key":"mandatorydataProcessingAccelerationLibrary", "hpa-attribute-value": "trueovsDpdk_version", "operator": "=", "unit":""},
               {"attribute":"score", "value": "4", "operator":"=", "unit": ""}, ]
                {"attribute":"instructionSetExtensions", "value":"aes", "operator": "=", "unit":""},
            ],    {
        "identity": "aes_vGMuxInfra",         "policyScopehpa-feature" : ["vCPEcpuInstructionSetExtensions",
    "US", "INTERNATIONAL", "ip", "vGMuxInfra"],              "typemandatory" : "hpaAesPolicyTrue",
            "resourceInstanceType": ["vGMuxInfra"]      "architecture": "INTEL-64",
                 }
    }
    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 OVS_DPDK Policy Example
    linenumberstrue
    collapsetrue
    { "hpa-version": "v1",
                  "hpa-feature-attributes": [
                    {"servicehpa-attribute-key":"instructionSetExtensions", "hpaOvsDpdkPolicy"hpa-attribute-value":["<CPUINST>",     "policyName"<CPUINST>"] "operator": "oofBeijing.hpaOvsDpdkPolicy_vGMuxInfraALL",     "descriptionunit": ""HPA}
    OVS DPDK policy for vGMuxInfra",     "templateVersion": "0.0.1",     ]
     "version": "oofBeijing",     "priority": "3",    }
    "riskType": "test",     "riskLevel": "2",   ] 
    "guard": "False",     "content": { },
           "ovsDpdkProperties": [{
    	      {"attribute":"hpaFeature", "value": "ovsDpdk","operator": "=", "unitflavorLabel": "flavor_label_vm_02"},
              {"attribute":"architecture", "value": "INTELx64","operator": "=", "unit": ""},flavorProperties":[
                {
                  {"attributehpa-feature" : "mandatorycpuPinningy",
    "value": "true","operator": "=", "unit":""},           {"attribute":"score", "value"mandatory" : "4True",
    "operator":"=", "unit": ""},              {"attributearchitecture": "dataProcessingAccelerationLibraygeneric",
    "value              "hpa-version": "library_versionv1",
     "operator": "=", "unit":""},            ],
      "hpa-feature-attributes": [
          "identity": "ovsDpdk_vGMuxInfra",         {"policyScopehpa-attribute-key": ["vCPElogicalCpuThreadPinningPolicy", "US"hpa-attribute-value":"<CPUTHREADPOLICY>", "INTERNATIONALoperator",: "ip=", "unit":"vGMuxInfra"]},
            "type": "hpaOvsDpdkPolicy",         "resourceInstanceType": ["vGMuxInfra"]{"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "<CPUPOLICY>","operator": "=", "unit":""},
                  ]
                }
    }
    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
    {,
                {
                  "servicehpa-feature" : "hpaCpuPinningPolicybasicCapabilities",
        "policyName": "oofBeijing.hpaCpuPinningPolicy_vGMuxInfra",          "descriptionmandatory" : "CPUTrue",
    Pinning policy for vGMuxInfra",     "templateVersion": "0.0.1",     "versionarchitecture": "oofBeijinggeneric",
        "priority": "3",     "riskType": "test",     "riskLevelhpa-version": "2v1",
        "guard": "False",     "content": {   "hpa-feature-attributes": [
        "cpuPinningProperties":  [           {"hpa-attribute-key": "hpaFeaturenumVirtualCpu", "hpa-attribute-value": "cpuPinning6", "operator": "=", "unit": ""},
                    {"hpa-attribute-key": "architecturevirtualMemSize", "hpa-attribute-value": "INTELx646", "operator": "=", "unit": "GB"},
                {"attribute":"mandatory", "value": "true","operator": "=", "unit":""  ]
                },
              {"attribute":"score", "value": "4", "operator":"=", "unit": ""},  {
                  {"attributehpa-feature" : "logicalCpuThreadPinningPolicylocalStorage",
    "value":"prefer", "operator": "=", "unit":""},           {"attributemandatory" : "logicalCpuPinningPolicyFalse",
                  "valuescore": "dedicated","operator": "=5",
    "unit":""},     ],         "identityarchitecture": "cpuPinning_vGMuxInfrageneric",
            "policyScope      "hpa-version": ["vCPEv1",
      "US", "INTERNATIONAL", "ip", "vGMuxInfra"],         "typehpa-feature-attributes": "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  {"hpa-attribute-key": "hpaNumaPolicydiskSize",     "policyName"hpa-attribute-value": "oofBeijing.hpaNumaPolicy_vGMuxInfra2",
        "descriptionoperator": "Hyper NUMA policy for vGMuxInfra=",
        "templateVersionunit": "0.0.1GB"},   
      "version": "oofBeijing",   	  "priority": "3",]     {"riskTypehpa-attribute-key": "testephemeralDiskSize",
        "riskLevel"hpa-attribute-value": "2",
        "guardoperator": "False=",     "contentunit": {
    "GB"},
    		        {"numaPropertieshpa-attribute-key": [   
    		 {"attribute": "hpaFeature", ""swapMemSize", "hpa-attribute-value": "numa16", "operator": "=", "unit": "MB"},
              {"attribute": "architecture", "value": "INTELx64", "operator": "=", "unit": ""    ]
                },
             {"attribute": "mandatory", "value": "true", "operator": "=", "unit": ""},   {
                  {"attributehpa-feature" : "scorepcie",
    "value"              "mandatory" : "4True",
          "operator        "architecture": "=generic",
      "unit            "hpa-version": "v1"},
    ,
                  "hpa-feature-attributes": [
                    {"hpa-attribute-key": "numaNodespciCount", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
                    {"hpa-attribute-key": "numaCpu-0pciVendorId", "valueshpa-attribute-value":["0", "1"]"8086", "operator": "any=", "unit": ""},
    	            {"hpa-attribute-key": "numaMem-0pciDeviceId", "hpa-attribute-value": "2", "operator": ">=", "unit": "GB"} 
            {"attribute": "numaCpu-1", "values":["2", "3"], "operator": "any", "unit": ""},          {"hpa-attribute-key": "numaMem-1functionType", "hpa-attribute-value": "4<PCITYPEVALUE>", "operator": ">=", "unit": "GB"} 
           ],       ]
      "identity": "numa_vGMuxInfra",
               }
          "policyScope":["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],] 
            },
            {
              "typeflavorLabel": "hpaNumaPolicyflavor_label_vm_03",
              "resourceInstanceTypeflavorProperties": ["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",     "policyNamehpa-feature" : "oofBeijing.hpaSgxPolicy_vGMuxInfranuma",
        "description": "SGX policy for vGMuxInfra",      "templateVersionmandatory" : "0.0.1False",
                  "versionscore" : "oofBeijing5",
        "priority": "3",          "riskTypearchitecture": "testgeneric",
         "riskLevel": "2",         "guardhpa-version": "Falsev1",
        "content": {         "sgxPropertieshpa-feature-attributes": [
                    {"hpa-attribute-key": "hpaFeaturenumaNodes", "hpa-attribute-value": "sgx2", "operator": "=", "unit": ""},
                    {"hpa-attribute-key": "architecturenumaCpu-0", "hpa-attribute-value": "INTELx642", "operator": "=", "unit": ""},
                    {"hpa-attribute-key": "mandatorynumaMem-0", "hpa-attribute-value": "true2048", "operator": "=", "unit": "MB"},
                    {"hpa-attribute-key": "scorenumaCpu-1", "hpa-attribute-value": "4", "operator": "=", "unit": ""},
                    {"hpa-attribute-key": "sgxMemSizenumaMem-1", "value": "654096", "operator": "=", "unit": "MB"},
               {"attribute":"sgxPubkeyHash", "value": "octect_string","operator": "=", "unit": ""}, ]
              ],  },
                {
                  "identityhpa-feature" : "sgx_vGMuxInfrabasicCapabilities",
                  "policyScopemandatory" :[ "vCPETrue",
                  "USarchitecture",: "INTERNATIONALgeneric", "ip", "vGMuxInfra"],
                  "typehpa-version": "hpaSgxPolicyv1",
                  "resourceInstanceTypehpa-feature-attributes": ["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
    {        {"servicehpa-attribute-key": "affinityPolicynumVirtualCpu",     "policyName"hpa-attribute-value": "oofBeijing.affinityPolicy_vcpe6",    "operator": "=", "descriptionunit": "Affinity policy for vCPE"},
        "templateVersion": "1702.03",     "version": "oofBeijing",     {"priorityhpa-attribute-key": "5virtualMemSize",
        "riskTypehpa-attribute-value": "test6",
        "riskLeveloperator": "2=",
        "guardunit": "FalseGB",}
         "content": {        ]
    "identity": "affinity_vCPE",         "policyScope": { },
               "serviceType": ["vCPE"], {
                  "geoRegionhpa-feature" : ["UShugePages",
     "INTERNATIONAL"],             "networkTypemandatory" : ["ipFalse"],
                  "resourceInstanceTypescore" : ["vGMuxInfra7",
    "vG"]         },         "affinityPropertyarchitecture": {"generic",
                "qualifier": {"value": "different", "operatorhpa-version": "=v1"},
                "category": {"value": "complex", "operator": "="}hpa-feature-attributes": [
            },         {"typehpa-attribute-key": "affinityPolicymemoryPageSize",         "resourceInstanceType"hpa-attribute-value": "<MEMORYPAGESIZE>", "operator": ["vGMuxInfra=", "vG"]unit": ""}
                  ]
                }
              ] 
            }
          ]
        }
    }
    
    Column
    width45%
    Expand
    titleComments and Notes: Affinity HPA CPU Topology 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



    CPUTHREADPOLICY = prefer, isolate, require

    CPUPOLICY = shared, dedicated

    PCIETYPEVALUE: SRIOV, PCI-PASSTHROUGH

    CPUINST = aes, avx, sha_ni, mpx, adcx, mpx, pclmulqdq, rdrand,sse, etc

    MEMORYPAGESIZE = 4KB (unit=KB), 2MB (unit=MB), 1GB(unit=GB), ANY, Other explicit Page size

    Section
    bordertrue
    Column
    width60%
    Code Block
    languagejs
    themeEclipse
    titleCapacity Distance Policy Example
    linenumberstrue
    collapsetrue
    {
    
       "service": "capacityPolicydistancePolicy",
     
      "policyName": "oofBeijing.capacityPolicydistancePolicy_vGMuxInfra",
        "description": "CapacityDistance policyPolicy for vGMuxInfra",
    
       "templateVersion": "17020.0.031",
        "version": "oofBeijing",
        "priority": "53",
    
       "riskType": "test",
        "riskLevel": "2",
        "guard": "False",
     
      "content": {
         "distanceProperties": {
          "identitylocationInfo": "capacitycustomer_vGMuxInfralocation",
     
          "policyScopedistance": { "value":            "serviceType"500", "operator": ["VCPE<"], "unit": "km" }
        },
        "geoRegionresources": ["USvGMuxInfra", "INTERNATIONALvG"],
           "applicableResources": "any",
        "networkTypeidentity": ["ipdistance-vGMuxInfra"],
        "policyScope": ["vCPE", "US",      "resourceInstanceType": ["INTERNATIONAL", "ip", "vGMuxInfra"],
            },"policyType": "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 Basic Capabilities Policy Example
    linenumberstrue
    collapsetrue
    {
        "hpa-feature" :   "capacityPropertybasicCapabilities":,
    {    "mandatory" : "False",
        "score" : "cpu": {"value5",
        "architecture": 2"generic",
    "operator    "hpa-version": ">v1"},
        "hpa-feature-attributes": [
          "memory {"hpa-attribute-key": "numVirtualCpu", {"hpa-attribute-value": 4"6", "operator": ">=", "unit": "Gb"}
            },
            "type{"hpa-attribute-key": "capacityPolicyvirtualMemSize",
            "resourceInstanceType"hpa-attribute-value": ["vGMuxInfra"]6", "operator": "=", "unit": "GB"}
        }]
    }
    Column
    width45%
    Expand
    titleComments and Notes: Capacity HPA Basic Capabilities 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 HPA OVS DPDK Policy Example
    linenumberstrue
    collapsetrue
    {
        "servicehpa-feature" : "minGuaranteePolicyovsDpdk",
        "policyNamemandatory" : "oofBeijing.minGuaranee_vGMuxInfraFalse",
        "descriptionscore" : "Min guarantee policy for vGMuxInfra5",
        "templateVersionarchitecture": "1702.03INTEL-64",
        "hpa-version": "oofBeijingv1",
        "priorityhpa-feature-attributes": "5",[
          {"riskTypehpa-attribute-key": "testdataProcessingAccelerationLibrary",     "riskLevel"hpa-attribute-value": "2ovsDpdk_version",
        "guardoperator": "False=",
        "contentunit": {
            "identity": "minGuarantee_vGMuxInfra",
            "policyScope": {
          "}
         "serviceType": ["vCPE"],
                "geoRegion": ["US", "INTERNATIONAL"],
            
    }
    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.

    For this policy others architectures are also applicable.

    Section
    bordertrue
    Column
    width60%
    Code Block
    languagejs
    themeEclipse
    titleHPA CPU Pinning Policy Example
    linenumberstrue
    collapsetrue
    {
       "hpa-feature" : "cpuPinning",
       "mandatory" : "False",
       "networkTypescore" : ["ip5"],
            "architecture": "generic",
       "resourceInstanceTypehpa-version": ["vGMuxInfra"]
            },
      v1",
         "minGuaranteeProperty"hpa-feature-attributes": {[
                "cpu": {"{"hpa-attribute-key":"logicalCpuThreadPinningPolicy", "hpa-attribute-value": "true<CPUTHREADPOLICY>", "operator": "=", "unit":""},
                "memory": {"{"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "false<CPUPOLICY>", "operator": "="}
            },
            "type": "minGuaraneePolicy", "unit":""},
            "resourceInstanceType": ["vGMuxInfra"]
    
       }
    }
    Column
    width45%
    Expand
    titleComments and Notes: Min Guarantee 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.


    CPUTHREADPOLICY = prefer, isolate, require
    CPUPOLICY = shared, dedicated


    Section
    bordertrue
    Column
    width60%
    Code Block
    languagejs
    themeEclipse
    titleOptimization HPA NUMA Policy Example
    linenumberstrue
    collapsetrue
    {
        "servicehpa-feature" : "PlacementOptimizationPolicynuma",
        "policyNamemandatory" : "oofBeijing.PlacementOptimizationPolicy_vGMuxInfraFalse",
        "descriptionscore" : "Placement Optimization Policy for vGMuxInfra5",
        "templateVersionarchitecture": "1702.03generic",
        "hpa-version": "oofBeijingv1",
        "priorityhpa-feature-attributes": "5", [
           {"riskTypehpa-attribute-key": "testnumaNodes",     "riskLevel"hpa-attribute-value": "32",
        "guardoperator": "False=",
        "contentunit": {""},
            "objectiveParameter{"hpa-attribute-key": {
        "numaCpu-0", "hpa-attribute-value":"2", "operator": "=", "unit": ""},
           {"parameterAttributeshpa-attribute-key": [
          "numaMem-0", "hpa-attribute-value": "2048", "operator": "=", "unit": "MB"},
             {
                        "resource": ["vGMuxInfra"],
                        "customerLocationInfo": "customer_loc"{"hpa-attribute-key": "numaCpu-1", "hpa-attribute-value":"4", "operator": "=", "unit": ""},
                        "parameter{"hpa-attribute-key": "distancenumaMem-1",                     "weight"hpa-attribute-value": "14096",
                        "operator": "product="=, "unit": "MB"}
                  },
                    {
                        "resource": ["vG"],
        ]
    }
    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 CPU Topology Policy Example
    linenumberstrue
    collapsetrue
    {
       "hpa-feature" : "cpuTopology",
       "mandatory" : "False",
       "score" : "5",
       "architecture": "generic",
       "hpa-version": "v1",
       "hpa-feature-attributes": [
          {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value":        "customerLocationInfo"2","operator": ">=", "unit": "customer_loc"},
                        "parameter": "distance",
        {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "4","operator": "<=", "unit": ""},
          {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value":        "weight"2", "operator":">=", "unit": "1"},
          {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "4", "operator":"<=", "unit": ""},
            "operator{"hpa-attribute-key":"numCpuThreads", "producthpa-attribute-value"
                    }
                ],
               : "4", "operator":">=", "sumunit"
            : ""},
            "identity{"hpa-attribute-key": "optimizationnumCpuThreads",
            "policyScope": {
                "serviceType": ["vCPE"],
                "geoRegion": ["US", "INTERNATIONAL"],
                "networkType": ["ip"],
                "resourceInstanceType": ["vGMuxInfra", "vG"]
            },
            "type": "placementOptimization",
            "objective": "minimize"
        }
    }
    Column
    width45%
    "hpa-attribute-value": "8", "operator":"<=", "unit": ""}
       ]
    }
    Column
    width45%
    Expand
    titleComments and Notes: Optimization HPA CPU Topology 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
    titleHPA PCIe Passthrough Affinity Policy Example
    linenumberstrue
    collapsetrue
    {
        "service": "hpaPciePassthroughPolicyaffinityPolicy",
        "policyName": "oofBeijing.hpaPciePassthroughPolicyaffinityPolicy_vGMuxInfravcpe",
        "description": "Pcie PassthroughAffinity policy for vGMuxInfravCPE",
        "templateVersion": "01702.0.103",
        "version": "oofBeijing",
        "priority": "35",
        "riskType": "test",
        "riskLevel": "2",
        "guard": "False",
        "content": {
            "PciePassthroughPropertiesidentity": ["affinity_vCPE",
              {"attributepolicyScope": ["hpaFeaturevCPE", "valueUS":, "pciePassthroughINTERNATIONAL", "operatorip":, "=vGMuxInfra"], "unit":""},
            "affinityProperties": {
              {"attribute":"architecture", "value": "INTELx64",qualifier"operator": "=different",
    "unit": ""},           {"attributecategory":"mandatory", "valuecomplex":
    "true","operator": "=", "unit":""},      },
        {"attribute":"score", "value": "4", "operator":"=", "unitpolicyType": "affinityPolicy"},
              {"attributeresources": ["pciCountvGMuxInfra", "value": "2", "operator": "=", "unit": ""},vG"],
                {"attributeapplicableResources": "pciVendorIdall",
    "value":"8086", "operator": "=", "unit": ""},
    	      {"attribute": "pciDeviceId", "value": "2", "operator": "=", "unit": ""}   
           ]
    }
    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",
            "identitytemplateVersion": "pciePassthrough_vGMuxInfra1702.03",
        "version": "oofBeijing",
        "policyScopepriority":[ "vCPE5",
       "US "riskType": "test",
        "INTERNATIONAL"riskLevel": "2",
      "ip  "guard": "False",
        "vGMuxInfra"],content": {
            "typeidentity": "hpaPciePassthroughPolicycapacity_vGMuxInfra",
            "resourceInstanceTypepolicyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],
    		"controller": "multicloud",
      }
    }
    Column
    width45%
    Expand
    titleComments and Notes: HPA PCIe Passthrough Policy Example
    Section
    bordertrue
    Column
    width60%
    Code Block
    languagejs
    themeEclipse
    titleHPA Generic Attributes Policy
    linenumberstrue
    collapsetrue
    {      "capacityProperties": {
          "service": "hpaGenericAttributesPolicy",     "policyNamecpu": {"oofBeijing.hpaGenericAttributesPolicy_vGMuxInfra",
        "descriptionvalue": 2, "operator": "HPA Generic Attributes policy for vGMuxInfra",">"},
                "templateVersionmemory": {"0.0.1",
        "versionvalue": 4, "operator": "oofBeijing>", "unit":    "priority"GB"}
    			"storage": {"3value": 80,
        "riskTypeoperator": "test>",
        "riskLevelunit": "2",GB"}
           "guard": "False", },
            "contentpolicyType": {"vim_fit",
            "GenericAttributesPropertiesresources": [
    "vGMuxInfra"],
             {"attributeapplicableResources":"hpaFeature", "valueany":
    "genericAttributes","operator": "=", "unit":""},  }
    }
    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
    {
           {"attributeservice": "architectureminGuaranteePolicy",
        "valuepolicyName": "INTELx64oofBeijing.minGuaranee_vGMuxInfra",
        "operatordescription": "=Min guarantee policy for vGMuxInfra",
        "unittemplateVersion": "1702.03"},
        "version": "oofBeijing",
        {"attributepriority": "mandatory5",
        "valueriskType": "truetest",
        "operatorriskLevel": "=2",
        "unitguard": "False"},
        "content": {
         {   "attributeidentity": "scoreminGuarantee_vGMuxInfra",
    "value        "policyScope": ["4vCPE", "operatorUS":, "=INTERNATIONAL", "unitip":, "vGMuxInfra"}],
     
            {"attributeminGuaranteeProperty": "numVirtualCpu", "value": "2", "operator {
                "cpu": "=true",
    "unit": ""},           {"attributememory": "virtualMemSizefalse", "value":"64", "operator
            },
            "type": "=minGuaranteePolicy",
    "unit": "MB"}, 	      {"attributeresources": ["diskSizevGMuxInfra"],
    		"valueapplicableResources": "2any",
     "operator": "=", "unit": "GB"},   
    	      {"attribute": "ephemeralDiskSize", "value": "2", "operator": "=", "unit":
    "GB"},
    		  {"attribute": "swapMemSize", "value":"16", "operator": "=", "unit": "MB"},
           ],
       }
    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. A min-guarantee policy can be specified using the HPA policy model.

    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",
        "identityversion": "genericAttributes_vGMuxInfraoofBeijing",
        "priority": "5",
        "policyScoperiskType":[ "vCPEtest",
        "riskLevel": "US3",
        "INTERNATIONALguard",: "ipFalse",
        "vGMuxInfra"],content": {
            "typeobjectiveParameter": "hpaGenericAttributesPolicy",{
                "resourceInstanceTypeparameterAttributes": ["vGMuxInfra"]
              }
    }
    Column
    width45%
    Expand
    titleComments and Notes: HPA Generic Attributes 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
    titleHPA AVX Example
    linenumberstrue
    collapsetrue
          {
        "service": "hpaAvxPolicy",        "policyName": "oofBeijing.avxPolicy_vGMuxInfra",        "descriptionresources": "AVX policy for vGMuxInfra",["vGMuxInfra"],
                        "templateVersioncustomerLocationInfo": "0.0.1customer_loc",
         "version": "oofBeijing",               "priorityparameter": "3distance",
            "riskType": "test",     "riskLevel": "2",     "guardweight": "False1",
        "content": {         "avxProperties": [ 	      {"attributeoperator": "hpaFeature", "value": "cpuInstructionAVX","operator": "=", "unit":""},product"=
                    },
                {"attribute":"architecture", "value": "INTELx64","operator": "=", "unit": ""},    {
                    {"attribute":"mandatory", "value": "true","operator": "=", "unitresources": ["vG"}],
              {"attribute":"score", "value          "customerLocationInfo": "4customer_loc", "operator":"=", "unit": ""},
                        {"attributeparameter":"instructionSetExtensions", "value":"avxdistance",
    "operator": "=", "unit":""},         ],         "identityweight": "avx_vGMuxInfra1",
            "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],
            "type": "hpaAvxPolicy",
            "resourceInstanceType": ["vGMuxInfra"]
        }
    }
    Column
    width45%
    Expand
    titleComments and Notes: HPA AVX Example

    ...

    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.

    ...

    "operator": "product"
                    }
                ],
                "operator": "sum"
            },
            "identity": "optimization",
            "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],
            "policyType": "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.



    Section
    bordertrue
    Column
    width60%
    Code Block
    languagejs
    themeEclipse
    titleHPA PCIe Policy Example
    linenumberstrue
    collapsetrue
    {
        "hpa-feature" : "pcie",
        "mandatory" : "False",
        "score" : "5",
        "architecture": "generic",
        "hpa-version": "v1",
        "hpa-feature-attributes": [
          {"hpa-attribute-key": "pciCount", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
          {"hpa-attribute-key": "pciVendorId", "hpa-attribute-value":"8086", "operator": "=", "unit": ""},
    	  {"hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "2", "operator": "=", "unit": ""} 
          {"hpa-attribute-key": "functionType", "hpa-attribute-value": "<PCIETYPEVALUE>","operator": "=", "unit": ""} 
         ]
    }
    Column
    width45%
    Expand
    titleComments and Notes: HPA PCIe Policy Example

    PCIETYPEVALUE: SRIOV, PCI-PASSTHROUGH

    Section
    bordertrue
    Column
    width60%
    Code Block
    languagejs
    themeEclipse
    titleHPA Local Storage Policy Example
    linenumberstrue
    collapsetrue
    {
        "hpa-feature" : "localStorage",
        "mandatory" : "False",
        "score" : "5",
        "architecture": "generic",
        "hpa-version": "v1",
        "hpa-feature-attributes": [
           {"hpa-attribute-key": "diskSize", "hpa-attribute-value": "2", "operator": "=", "unit": "GB"},   
           {"hpa-attribute-key": "ephemeralDiskSize", "hpa-attribute-value": "2", "operator": "=", "unit": "GB"},
    	   {"hpa-attribute-key": "swapMemSize", "hpa-attribute-value":"16", "operator": "=", "unit": "MB"},
         ]
    }
    Column
    width45%
    Expand
    titleComments and Notes: HPA Generic Attributes 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
    titleHPA CPU Instruction Set Extensions Policy Example
    linenumberstrue
    collapsetrue
    {
        "hpa-feature" : "cpuInstructionSetExtensions",
        "mandatory" : "False",
        "score" : "5",
        "architecture": "INTEL-64",
        "hpa-version": "v1",
        "hpa-feature-attributes": [
          {"hpa-attribute-key":"instructionSetExtensions", "hpa-attribute-value":["<CPUINST>", "<CPUINST>"] "operator": "ALL", "unit":""}
         ]
    }
    Column
    width45%
    Expand
    titleComments and Notes: HPA CPU Instruction Set Extensions Policy Example
    instructionSetExtensions attribute has a list of all instruction set extensions required. 
    CPUINST = aes, avx, sha_ni, mpx, adcx, mpx, pclmulqdq, rdrand,sse, etc
    Section
    bordertrue
    Column
    width60%
    Code Block
    languagejs
    themeEclipse
    titleHPA Huge Pages Policy Example
    linenumberstrue
    collapsetrue
    {
        "hpa-feature" : "hugePages",
        "mandatory" : "False",
        "score" : "5",
        "architecture": "generic",
        "hpa-version": "v1",
        "hpa-feature-attributes": [
          {"hpa-attribute-key": "memoryPageSize", "hpa-attribute-value": "<MEMORYPAGESIZE>", "operator": "=", "unit": ""}
        ]
    }
    Column
    width40%
    Expand
    titleComments and Notes: HPA Huge Pages Policy Example

    MEMORYPAGESIZE = 4KB (unit=KB), 2MB (unit=MB), 1GB(unit GB), ANY, Other explicit Page size

    Section
    bordertrue
    Column
    width60%
    Code Block
    languagejs
    themeEclipse
    titleVNF Policy Example
    linenumberstrue
    collapsetrue
    {
        "service": "vnfPolicy",
        "policyName": "oofBeijing.vnfPolicy_vGMuxInfra",
        "description": "vnfPolicy",
        "templateVersion": "1702.03",
        "version": "oofBeijing",
        "priority": "6",
        "riskType": "test",
        "riskLevel": "3",
        "guard": "False",
        "content": {
            "identity": "vnf_vGMuxInfra",
            "policyScope": ["vCPE", "INTERNATIONAL", "ip", "vGMuxInfra"],
            "policyType": "vnf_policy",
            "resources": ["vGMuxInfra"],
            "applicableResources": "any",
            "vnfProperties": [
                {
                    "inventoryProvider": "aai",
                    "serviceType": "",
                    "inventoryType": "cloudRegionId",
                    "customerId": ""
                },
                {
                    "inventoryProvider": "multicloud",
                    "serviceType": "HNGATEWAY",
                    "inventoryType": "serviceInstanceId",
                    "customerId": "21014aa2-526b-11e6-beb8-9e71128cae77"
                }
            ]
        }
    }
    Column
    width40%
    Expand
    titleComments and Notes: HPA Huge Pages Policy Example

    VNF policy captures the location of inventories and customer information.

    Section
    bordertrue
    Column
    width60%
    Code Block
    languagejs
    themeEclipse
    titleSubscriber Role Policy Example
    linenumberstrue
    collapsetrue
    {
     "service": "SubscriberPolicy",
     "policyName": "oofBeijing.SubscriberPolicy_v1",
     "description": "Subscriber Policy",
     "templateVersion": "0.0.1",
     "version": "oofBeijing",
     "priority": "1",
     "riskType": "test",
     "riskLevel": "3",
     "guard": "False",
     "content": {
            "identity": "subscriber",
            "policyScope": ["vCPE", "subscriber_x", "subscriber_y"],
            "properties": {
                    "subscriberName": ["subscriber_x", "subscriber_y"],
                    "subscriberRole": ["Test"],
                    "provStatus": ["CAPPED"]
            },
            "policyType": "SubscriberPolicy"
     }
    }
    Column
    width40%
    Expand
    titleComments and Notes: HPA Huge Pages Policy Example

    Subscriber role policy to capture the role of a subscriber and related provisioning states.

    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.

    TOSCA Policy Models

    The following TOSCA policy models need to be uploaded as a dictionary during the deployment-time of an optimization application. Currently, the model uploading porcess is manual since the policy system does not offer an interface to upload models programatically. Once the models are uploaded, policy templates are created in the policy portal/GUI using which optimization policies can be created. Alternatively, the policy system offers CRUD REST APIs using which the policies can be managed by the application.

    HAS Policies for Testing

    View file
    nameAffinity_vCPE_1.json
    height250
    View file
    nameCapacity_vG_1.json
    height250
    View file
    nameCapacity_vGMuxInfra.json
    height250
    View file
    nameDistance_vG_1.json
    height250
    View file
    nameDistance_vGMuxInfra_1.json
    height250
    View file
    namehpa_policy_vG_1.json
    height250
    View file
    namehpa_policy_vGMuxInfra_1.json
    height250
    View file
    namePlacement_Optimization_1.json
    height250
    View file
    nameQueryPolicy_vCPE.json
    height250
    View file
    namesubscriber_policy.json
    height250
    View file
    namevnfPolicy_vG.json
    height250
    View file
    namevnfPolicy_vGMuxInfra.json
    height250