Versions Compared

Key

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

...

Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleTemplate for the HPA policies
linenumberstrue
collapsetrue
{
    "service": "{the model name of a policy}",
    "policyName": "{policy scope folder}.{policy name; must be unique}",
    "description": "{description of a policy}",
    "templateVersion": "{policy model version}",
    "version": "{policy version}",
    "priority": "{priority in 1-10; larger the number higher the priority is}",
    "riskType": "{the type of risk}",
    "riskLevel": "{the level of risk}",
    "guard": "{True/False flag to indicate whether guard is applicable or not}",
    "content": { 
      "resource": "{resource name}",
      "identity": "{policy identity}",
      "policyScope": ["{a tag representing policy scope}"],
      "policyType": "{policy type}",
      "flavorFeatures": [
        {
          "flavorLabel": "{VM/VFC id}",
          "flavorProperties":[
            {
              "hpaFeaturehpa-feature" : "{HPA feature type}",
              "mandatory" : "{mandatoriness of the feature}",
              "score" : "{priority of this feature if the feature is not mandatory for VM}"
              "architecture": "{supported architecuture}",
              "hpaVersionhpa-version": "{version for hpa capability}",
              "hpaFeatureAttributeshpa-feature-attributes": [
                {
                  "hpaAttributeKeyhpa-attribute-key": "{attribute name}", 
                  "hpaAttributeValuehpa-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 Policy Example
linenumberstrue
collapsetrue
{
    "service": "hpaPolicy",
    "policyName": "oofBeijing.hpaPolicy_vGMuxInfra",
    "description": "HPA policy for vGMuxInfra",
    "templateVersion": "0.0.1",
    "version": "1.0",
    "priority": "3",
    "riskType": "test",
    "riskLevel": "2",
    "guard": "False",
    "content": { 
      "resources": "vGMuxInfra",
      "identity": "hpaPolicy_vGMuxInfra",
      "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],
      "policyType": "hpaPolicy",
      "flavorFeatures": [
        {
          "flavorLabel": "flavor_label_vm_01",
          "flavorProperties":[
            {
              "hpaFeaturehpa-feature" : "cpuTopology",
              "mandatory" : "True",
              "architecture": "generic",
              "hpaFeatureAttributeshpa-feature-attributes": [
                {"hpaAttributeKeyhpa-attribute-key":"numCpuSockets", "hpaAttributeValuehpa-attribute-value": "2","operator": ">=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key":"numCpuSockets", "hpaAttributeValuehpa-attribute-value": "4","operator": "<=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key":"numCpuCores", "hpaAttributeValuehpa-attribute-value": "2", "operator":">=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key":"numCpuCores", "hpaAttributeValuehpa-attribute-value": "4", "operator":"<=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key":"numCpuThreads", "hpaAttributeValuehpa-attribute-value": "4", "operator":">=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key":"numCpuThreads", "hpaAttributeValuehpa-attribute-value": "8", "operator":"<=", "unit": ""}
              ]
            },
            {
              "hpa-feature" : "basicCapabilities",
              "mandatory" : "True",
              "architecture": "generic",
              "hpa-feature-attributes": [
                {"hpaAttributeKeyhpa-attribute-key": "numVirtualCpu", "hpaAttributeValuehpa-attribute-value": "6", "operator": "=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key": "virtualMemSize", "hpaAttributeValuehpa-attribute-value":"6", "operator": "=", "unit": "GB"}
              ]
            },
            {
              "hpa-feature" : "ovsDpdk",
              "mandatory" : "False",
              "score" : "3",
              "architecture": "generic",
              "hpa-feature-attributes": [
                 {"hpaAttributeKeyhpa-attribute-key":"dataProcessingAccelerationLibrary", "hpaAttributeValuehpa-attribute-value":"ovsDpdk_version", "operator": "=", "unit":""}
              ]
            },
            {
              "hpa-feature" : "cpuInstructionSetExtensions",
              "mandatory" : "True",
              "architecture": "INTEL-64",
              "hpa-feature-attributes": [
                {"hpaAttributeKeyhpa-attribute-key":"instructionSetExtensions", "hpaAttributeValuehpa-attribute-value":["<CPUINST>", "<CPUINST>"] "operator": "ALL", "unit":""}
              ]
            }
          ] 
        },
        {
          "flavorLabel": "flavor_label_vm_02",
          "flavorProperties":[
            {
              "hpa-feature" : "cpuPinningy",
              "mandatory" : "True",
              "architecture": "generic",
              "hpa-feature-attributes": [
                {"hpaAttributeKeyhpa-attribute-key":"logicalCpuThreadPinningPolicy", "hpaAttributeValuehpa-attribute-value":"<CPUTHREADPOLICY>", "operator": "=", "unit":""},
                {"hpaAttributeKeyhpa-attribute-key":"logicalCpuPinningPolicy", "hpaAttributeValuehpa-attribute-value": "<CPUPOLICY>","operator": "=", "unit":""},
              ]
            },
            {
              "hpa-feature" : "basicCapabilities",
              "mandatory" : "True",
              "architecture": "generic",
              "hpa-feature-attributes": [
                {"hpaAttributeKeyhpa-attribute-key": "numVirtualCpu", "hpaAttributeValuehpa-attribute-value": "6", "operator": "=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key": "virtualMemSize", "hpaAttributeValuehpa-attribute-value":"6", "operator": "=", "unit": "GB"}
              ]
            },
            {
              "hpa-feature" : "localStorage",
              "mandatory" : "False",
              "score" : "5",
              "architecture": "generic",
              "hpa-feature-attributes": [
                {"hpaAttributeKeyhpa-attribute-key": "diskSize", "hpaAttributeValuehpa-attribute-value": "2", "operator": "=", "unit": "GB"},   
      	        {"hpaAttributeKey"hpa-attribute-key": "ephemeralDiskSize", "hpaAttributeValuehpa-attribute-value": "2", "operator": "=", "unit": "GB"},
		        {"hpaAttributeKeyhpa-attribute-key": "swapMemSize", "hpaAttributeValuehpa-attribute-value":"16", "operator": "=", "unit": "MB"},
              ]
            },
            {
              "hpa-feature" : "pcie",
              "mandatory" : "True",
              "architecture": "generic",
              "hpa-feature-attributes": [
                {"hpaAttributeKeyhpa-attribute-key": "pciCount", "hpaAttributeValuehpa-attribute-value": "2", "operator": "=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key": "pciVendorId", "hpaAttributeValuehpa-attribute-value":"8086", "operator": "=", "unit": ""},
	            {"hpaAttributeKeyhpa-attribute-key": "pciDeviceId", "hpaAttributeValuehpa-attribute-value": "2", "operator": "=", "unit": ""} 
                {"hpaAttributeKeyhpa-attribute-key": "functionType", "hpaAttributeValuehpa-attribute-value": "<PCITYPEVALUE>","operator": "=", "unit": ""} 
              ]
            }
          ] 
        },
        {
          "flavorLabel": "flavor_label_vm_03",
          "flavorProperties":[
            {
              "hpa-feature" : "numa",
              "mandatory" : "False",
              "score" : "5",
              "architecture": "generic",
              "hpa-feature-attributes": [
                {"hpaAttributeKeyhpa-attribute-key": "numaNodes", "hpaAttributeValuehpa-attribute-value": "2", "operator": "=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key": "numaCpu-0", "hpaAttributeValuehpa-attribute-value":"2", "operator": "=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key": "numaMem-0", "hpaAttributeValuehpa-attribute-value": "2048", "operator": "=", "unit": "MB"}
                {"hpaAttributeKey"hpa-attribute-key": "numaCpu-1", "hpaAttributeValuehpa-attribute-value":"4", "operator": "=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key": "numaMem-1", "value": "4096", "operator": "=", "unit": "MB"}
              ]
            },
            {
              "hpa-feature" : "basicCapabilities",
              "mandatory" : "True",
              "architecture": "generic",
              "hpa-feature-attributes": [
                {"hpaAttributeKeyhpa-attribute-key": "numVirtualCpu", "hpaAttributeValuehpa-attribute-value": "6", "operator": "=", "unit": ""},
                {"hpaAttributeKeyhpa-attribute-key": "virtualMemSize", "hpaAttributeValuehpa-attribute-value":"6", "operator": "=", "unit": "GB"}
              ]
            },
            {
              "hpa-feature" : "hugePages",
              "mandatory" : "False",
              "score" : "7",
              "architecture": "generic",
              "hpa-feature-attributes": [
                 {"hpaAttributeKeyhpa-attribute-key": "memoryPageSize", "hpaAttributeValuehpa-attribute-value": "<MEMORYPAGESIZE>", "operator": "=", "unit": ""}
              ]
            }
          ] 
        }
      ]
    }
}
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.



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
titleHPA Basic Capabilities Policy Example
linenumberstrue
collapsetrue
{
    "hpa-feature" : "basicCapabilities",
    "mandatory" : "False",
    "score" : "5"
    "architecture": "generic",
    "hpa-feature-attributes": [
       {"hpaAttributeKeyhpa-attribute-key": "numVirtualCpu", "hpaAttributeValuehpa-attribute-value": "6", "operator": "=", "unit": ""},
       {"hpaAttributeKeyhpa-attribute-key": "virtualMemSize", "hpaAttributeValuehpa-attribute-value":"6", "operator": "=", "unit": "GB"}
    ]
}
Column
width45%
Expand
titleComments and Notes: 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
titleHPA OVS DPDK Policy Example
linenumberstrue
collapsetrue
{
    "hpa-feature" : "ovsDpdk",
    "mandatory" : "False",
    "score" : "5"
    "architecture": "INTEL-64",
    "hpa-feature-attributes": [
      {"hpaAttributeKeyhpa-attribute-key":"dataProcessingAccelerationLibrary", "hpaAttributeValuehpa-attribute-value":"ovsDpdk_version", "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.

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",
   "score" : "5"
   "architecture": "generic",
   "hpa-feature-attributes": [
     {"hpaAttributeKeyhpa-attribute-key":"logicalCpuThreadPinningPolicy", "hpaAttributeValuehpa-attribute-value":"<CPUTHREADPOLICY>", "operator": "=", "unit":""},
     {"hpaAttributeKeyhpa-attribute-key":"logicalCpuPinningPolicy", "hpaAttributeValue"hpa-attribute-value": "<CPUPOLICY>","operator": "=", "unit":""},
    ]
}
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.


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


Section
bordertrue
Column
width60%
Code Block
languagejs
themeEclipse
titleHPA NUMA Policy Example
linenumberstrue
collapsetrue
{
    "hpa-feature" : "numa",
    "mandatory" : "False",
    "score" : "5"
    "architecture": "generic",
    "hpa-feature-attributes": [
       {"hpaAttributeKeyhpa-attribute-key": "numaNodes", "hpaAttributeValuehpa-attribute-value": "2", "operator": "=", "unit": ""},
       {"hpaAttributeKeyhpa-attribute-key": "numaCpu-0", "hpaAttributeValuehpa-attribute-value":"2", "operator": "=", "unit": ""},
       {"hpaAttributeKeyhpa-attribute-key": "numaMem-0", "hpaAttributeValuehpa-attribute-value": "2048", "operator": "=", "unit": "MB"},
       {"hpaAttributeKeyhpa-attribute-key": "numaCpu-1", "hpaAttributeValuehpa-attribute-value":"4", "operator": "=", "unit": ""},
       {"hpaAttributeKeyhpa-attribute-key": "numaMem-1", "hpaAttributeValuehpa-attribute-value": "4096", "operator": "=", "unit": "MB"}
    ]
}
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-feature-attributes": [
      {"hpaAttributeKeyhpa-attribute-key":"numCpuSockets", "hpaAttributeValuehpa-attribute-value": "2","operator": ">=", "unit": ""},
      {"hpaAttributeKeyhpa-attribute-key":"numCpuSockets", "hpaAttributeValuehpa-attribute-value": "4","operator": "<=", "unit": ""},
      {"hpaAttributeKeyhpa-attribute-key":"numCpuCores", "hpaAttributeValuehpa-attribute-value": "2", "operator":">=", "unit": ""},
      {"hpaAttributeKeyhpa-attribute-key":"numCpuCores", "hpaAttributeValuehpa-attribute-value": "4", "operator":"<=", "unit": ""},
      {"hpaAttributeKeyhpa-attribute-key":"numCpuThreads", "hpaAttributeValuehpa-attribute-value": "4", "operator":">=", "unit": ""},
      {"hpaAttributeKeyhpa-attribute-key":"numCpuThreads", "hpaAttributeValuehpa-attribute-value": "8", "operator":"<=", "unit": ""}
   ]
}
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
titleHPA PCIe Policy Example
linenumberstrue
collapsetrue
{
    "hpa-feature" : "pcie",
    "mandatory" : "False",
    "score" : "5"
    "architecture": "generic",
    "hpa-feature-attributes": [
      {"hpaAttributeKeyhpa-attribute-key": "pciCount", "hpaAttributeValuehpa-attribute-value": "2", "operator": "=", "unit": ""},
      {"hpaAttributeKeyhpa-attribute-key": "pciVendorId", "hpaAttributeValuehpa-attribute-value":"8086", "operator": "=", "unit": ""},
	  {"hpaAttributeKeyhpa-attribute-key": "pciDeviceId", "hpaAttributeValuehpa-attribute-value": "2", "operator": "=", "unit": ""} 
      {"hpaAttributeKeyhpa-attribute-key": "functionType", "hpaAttributeValuehpa-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-feature-attributes": [
       {"hpaAttributeKeyhpa-attribute-key": "diskSize", "hpaAttributeValuehpa-attribute-value": "2", "operator": "=", "unit": "GB"},   
       {"hpaAttributeKeyhpa-attribute-key": "ephemeralDiskSize", "hpaAttributeValuehpa-attribute-value": "2", "operator": "=", "unit": "GB"},
	   {"hpaAttributeKeyhpa-attribute-key": "swapMemSize", "hpaAttributeValuehpa-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-feature-attributes": [
      {"hpaAttributeKeyhpa-attribute-key":"instructionSetExtensions", "hpaAttributeValuehpa-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-feature-attributes": [
      {"hpaAttributeKeyhpa-attribute-key": "memoryPageSize", "hpaAttributeValuehpa-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

...