Versions Compared

Key

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

...

Code Block
languagepy
themeDJango
titleR3 HPA Policy example
linenumberstrue
collapsetrue
#
#Example 1: vFW, Basic Capability and sriovNicNetworksriovNICNetwork
#one VNFC(VFC) with one basic capability requirement and two sriovNicNetworkFsriovNICNetworkF requirements.
#
{
  "service": "hpaPolicy",
  "policyName": "oofCasablanca.hpaPolicy_vFW",
  "description": "HPA policy for vFW",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vFW",
    "identity": "hpaPolicy_vFW",
    "policyScope": ["vFW", "US", "INTERNATIONAL", "ip", "vFW"],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directivedirectives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_firewall ", //Admin needs to ensure that this value is same as flavor parameter in HOT 
                  "attribute_value": "<Blank>" 
                } 
               ]
           }
          ],
        "flavorProperties": [
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "virtualMemSize", "hpa-attribute-value": "6", "operator": "=", "unit": "GB" }
            ]
          },
          {
            "hpa-feature": "sriovNicNetworksriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives" : [
              {
                "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                "attributes": [
                   { "attribute_name": "oof_returned_vnic_type_for_firewall_protected",
                     "attribute_value": "direct"
                   },
                   { "attribute_name": "oof_returned_provider_network_for_firewall_protected",
                     "attribute_value": "physnet1"
                   }
                ]
              }
            ],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "pciVendorId", "hpa-attribute-value": "1234", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "5678", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" },
              { "hpa-attribute-key": "physicalNetwork", "hpa-attribute-value": "physnet1", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "sriovNicNetworksriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives" : [
              {
                "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                "attributes": [
                   { "attribute_name": "oof_returned_vnic_type_for_firewall_unprotected",
                     "attribute_value": "direct"
                   },
                   { "attribute_name": "oof_returned_provider_network_for_firewall_unprotected",
                     "attribute_value": "physnet2"
                   }
                ]
              }
            ],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "pciVendorId", "hpa-attribute-value": "3333", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "7777", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" },
            ]  { "hpa-attribute-key": "physicalNetwork", "hpa-attribute-value": "physnet2", "operator": "=", "unit": "" }
        ]    ]
          }
        ]
      }
    ]
  }
}

#
#Example 2: vFW, basicCapabilities, hugePages, sriovNicNetworksriovNICNetwork, cpuPinning.
#one VNFC(VFC) with basic capablity requirements, cpuPinning requirement and huge page requirement.
#the other VNFC(VFC) with basic capability requirements and sriovNicNetworksriovNICNetwork requirements.
#
{
  "service": "hpaPolicy",
  "policyName": "oofCasablanca.hpaPolicy_vFW",
  "description": "HPA policy for vFW",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vFW",
    "identity": "hpaPolicy_vFW",
    "policyScope": ["vFW", "US", "INTERNATIONAL", "ip", "vFW"],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directivedirectives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_firewall ", //Admin needs to ensure that this value is same as flavor parameter in HOT 
                  "attribute_value": "<Blank>" 
                } 
               ]
           }
          ],
        "flavorProperties": [
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "virtualMemSize", "hpa-attribute-value": "6", "operator": "=", "unit": "GB" }
            ]
          },
          {
            "hpa-feature": "sriovNicNetworksriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives" : [
              {
                "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                "attributes": [
                   { "attribute_name": "oof_returned_vnic_type_for_firewall_protected",
                     "attribute_value": "direct"
                   },
                   { "attribute_name": "oof_returned_provider_network_for_firewall_protected",
                     "attribute_value": "physnet1"
                   }
                ]
              }
            ],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "pciVendorId", "hpa-attribute-value": "1234", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "5678", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" },
              { "hpa-attribute-key": "physicalNetwork", "hpa-attribute-value": "physnet1", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "sriovNicNetworksriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives" : [
              {
                "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                "attributes": [
                   { "attribute_name": "oof_returned_vnic_type_for_firewall_unprotected",
                     "attribute_value": "direct"
                   }
                   { "attribute_name": "oof_returned_provider_for_firewall_unprotected",
                     "attribute_value": "physnet2"
                   }
                ]
              }
            ],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "pciVendorId", "hpa-attribute-value": "3333", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "7777", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" },
            ]  { "hpa-attribute-key":        "physicalNetwork", "hpa-attribute-value": "physnet2", "operator": "=", "unit": "" }
            ]
          }
        ]
      },
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directivedirectives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_generator ", //Admin needs to ensure that this value is same as flavor parameter in HOT 
                  "attribute_value": "<Blank>" 
                } 
               ]
           }
          ],
        "flavorProperties": [
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "virtualMemSize", "hpa-attribute-value": "6", "operator": "=", "unit": "GB" }
            ]
          },
          {
            "hpa-feature": "cpuPinning",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "logicalCpuThreadPinningPolicy", "hpa-attribute-value": "prefer", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "cpuPinning",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "logicalCpuPinningPolicy", "hpa-attribute-value": "dedicated", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "hugePages",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "memoryPageSize", "hpa-attribute-value": "2", "operator": "=", "unit": "GB" }
            ]
          }
        ]
      }
    ]
  }
}


Code Block
languagepy
themeEmacs
titleR3 Cloud Agnostic Policy Example
linenumberstrue
collapsetrue
#
#Example 1: vCPEvirtual firewall vgwvpg, Burstable QoS
#vCPE: Infrastructure Resource Isolation for VNF with Burstable QoS
#
{
  "service": "cloudPolicy",
  "policyName": "oofCasablanca.cloudPolicy_vgwvpg",
  "description": "Cloud policy for vgwvpg",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vgwvpg",
    "identity": "cloudPolicy_vgwvpg",
    "policyScope": ["vgw", "US", "INTERNATIONAL", "ip", "vgwvpg"],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directivedirectives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_vgwvpg ", //Admin needs to ensure that this value is same as flavor parameter in HOT 
                  "attribute_value": "<Blank>" 
                } 
               ]
           }
          ],
        "flavorProperties": [
          {
            "hpa-feature": "qosIntentCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1", 
            "directives": [],
            "hpa-feature-attributes": [
              {"hpa-attribute-key":"Infrastructure Resource Isolation for VNF", "hpa-attribute-value": "Burstable QoS","operator": "=", "unit": ""},
			  {"hpa-attribute-key":"Burstable QoS Oversubscription Percentage", "hpa-attribute-value": "25","operator": "=", "unit": ""},
            ]
          },
        ]
      }
    ]
  }
}

#
#Example 2: vCPEvirtual firewall vgwvfw, Guaranteed QoS
#vCPE: Infrastructure Resource Isolation for VNF with Guaranteed QoS
#
{
  "service": "cloudPolicy",
  "policyName": "oofCasablanca.cloudPolicy_vgwvfw",
  "description": "Cloud policy for vgwvfw",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vgwvfw",
    "identity": "cloudPolicy_vgwvfw",
    "policyScope": ["vgwvfw", "US", "INTERNATIONAL", "ip", "vgwvfw"],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directivedirectives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_vgwvfw ", //Admin needs to ensure that this value is same as flavor parameter in HOT 
                  "attribute_value": "<Blank>" 
                } 
               ]
           }
          ],
        "flavorProperties": [
          {
            "hpa-feature": "qosIntentCapabilities",
            "mandatory": "True",
            "architecture": "generic", 
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              {"hpa-attribute-key":"Infrastructure Resource Isolation for VNF", "hpa-attribute-value": "Guaranteed QoS","operator": "=", "unit": ""},
            ]
          },
        ]
      }
    ]
  }
}

#
#Example 3: vDNS, Burstable QoS & Infra HA
#vDNS: Infrastructure Resource Isolation for VNF with Burstable QoS & Infrastructure HA
#
{
  "service": "cloudPolicy",
  "policyName": "oofCasablanca.cloudPolicy_vdns",
  "description": "Cloud policy for vdns",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vdns",
    "identity": "cloudPolicy_vdns",
    "policyScope": ["vgw", "US", "INTERNATIONAL", "ip", "vdns"],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directivedirectives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_vdns ", //Admin needs to ensure that this value is same as flavor parameter in HOT 
                  "attribute_value": "<Blank>" 
                } 
               ]
           }
          ],
        "flavorProperties": [
          {
            "hpa-feature": "qosIntentCapabilities",
            "mandatory": "True",
            "architecture": "generic", 
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              {"hpa-attribute-key":"Infrastructure Resource Isolation for VNF", "hpa-attribute-value": "Burstable QoS","operator": "=", "unit": ""},
			  {"hpa-attribute-key":"Burstable QoS Oversubscription Percentage", "hpa-attribute-value": "25","operator": "=", "unit": ""},
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic", 
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
			  {"hpa-attribute-key":"Infrastructure High Availability for VNF", "hpa-attribute-value": "","operator": "", "unit": ""},
            ]
          },
        ]
      }
    ]
  }
}

#
#Example 4: vDNS, Guaranteed QoS & Infra HA
#vDNS: Infrastructure Resource Isolation for VNF with Burstable QoS & Infrastructure HA
#
{
  "service": "cloudPolicy",
  "policyName": "oofCasablanca.cloudPolicy_vdns",
  "description": "Cloud policy for vdns",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vdns",
    "identity": "cloudPolicy_vdns",
    "policyScope": ["vgw", "US", "INTERNATIONAL", "ip", "vdns"],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directivedirectives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_vdns ", //Admin needs to ensure that this value is same as flavor parameter in HOT 
                  "attribute_value": "<Blank>" 
                } 
               ]
           }
          ],
        "flavorProperties": [
          {
            "hpa-feature": "qosIntentCapabilities",
            "mandatory": "True",
            "architecture": "generic", 
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              {"hpa-attribute-key":"Infrastructure Resource Isolation for VNF", "hpa-attribute-value": "Guaranteed QoS","operator": "=", "unit": ""},
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1", 
            "directives": [],
            "hpa-feature-attributes": [
			  {"hpa-attribute-key":"Infrastructure High Availability for VNF", "hpa-attribute-value": "","operator": "", "unit": ""},
            ]
          },
        ]
      }
    ]
  }
}

Code Block
languagepy
themeEmacs
titleR3 HPA & Cloud Agnostic Policy Example
linenumberstrue
collapsetrue
#
#Example 1: vFW, Basic Capability + sriovNicNetworksriovNICNetwork + Cloud Agnostic Guaranteed QoS
#one VNFC(VFC) with one basic capability requirement
#
{
  "service": "hpaPolicy",
  "policyName": "oofCasablanca.hpaPolicy_vFW",
  "description": "HPA policy for vFW",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vFW",
    "identity": "hpaPolicy_vFW",
    "policyScope": ["vFW", "US", "INTERNATIONAL", "ip", "vFW"],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directivedirectives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_firewall ", //Admin needs to ensure that this value is same as flavor parameter in HOT 
                  "attribute_value": "<Blank>" 
                } 
               ]
           }
          ],
        "flavorProperties": [
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "hpa-"directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "virtualMemSize", "hpa-attribute-value": "6", "operator": "=", "unit": "GB" }
            ]
          },
          {
            "hpa-feature": "sriovNicNetworksriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives" : [
              {
                "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                "attributes": [
                   { "attribute_name": "oof_returned_vnic_type_for_firewall_protected",
                     "attribute_value": "direct"
                   },
                   { "attribute_name": "oof_returned_provider_network_for_firewall_protected",
                     "attribute_value": "physnet1"
                   }
                ]
              }
            ],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "pciVendorId", "hpa-attribute-value": "1234", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "5678", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" },
              { "hpa-attribute-key": "physicalNetwork", "hpa-attribute-value": "physnet1", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "sriovNicNetworksriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives" : [
              {
                "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                "attributes": [
                   { "attribute_name": "oof_returned_vnic_type_for_firewall_unprotected",
                     "attribute_value": "direct"
                   }
                   { "attribute_name": "oof_returned_provider_for_firewall_unprotected",
                     "attribute_value": "physnet2"
                   }
                ]
              }
            ],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "pciVendorId", "hpa-attribute-value": "3333", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "7777", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" },
            ]  { "hpa-attribute-key": "physicalNetwork", "hpa-attribute-value": "physnet1", "operator": "=", "unit": "" },
          {  ]
          "hpa-feature": "},
          {
            "hpa-feature": "qosIntentCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              {"hpa-attribute-key":"Infrastructure Resource Isolation for VNF", "hpa-attribute-value": "Guaranteed QoS","operator": "=", "unit": ""},
            ]
          }
        ]
      }
    ]
  }
}

#
#Example two: vFW, basicCapabilities, hugePages, sriovNicNetworksriovNICNetwork, cpuPinning.
#one VNFC(VFC) with basic capablity requirements, cpuPinning requirement and huge page requirement.
#the other VNFC(VFC) with basic capability requirements and sriovNicNetworksriovNICNetwork requirements.
#
{
  "service": "hpaPolicy",
  "policyName": "oofCasablanca.hpaPolicy_vFW",
  "description": "HPA policy for vFW",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vFW",
    "identity": "hpaPolicy_vFW",
    "policyScope": ["vFW", "US", "INTERNATIONAL", "ip", "vFW" ],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id": "<vdu.Name>",
        "type": "vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives": [
          {
            "type": "flavor_directivedirectives",
            "attributes": [
              {
                "attribute_name": " oof_returned_flavor_label_for_firewall ",
                "attribute_value": "<Blank>"
              }
            ]
          }
        ],
        "flavorProperties": [
          {
            "hpa-feature": "qosIntentCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              {"hpa-attribute-key": "Infrastructure Resource Isolation for VNF", "hpa-attribute-value": "Guaranteed QoS", "operator": "=", "unit": ""}
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "virtualMemSize", "hpa-attribute-value": "6", "operator": "=", "unit": "GB" }
            ]
          },
          {
            "hpa-feature": "sriovNicNetworksriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [
              {
                "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                "attributes": [
                  {
                    "attribute_name": "oof_returned_vnic_type_for_firewall_protected",
                    "attribute_value": "direct"
                  },
                  {
                    "attribute_name": "oof_returned_provider_network_for_firewall_protected",
                    "attribute_value": "physnet1"
                  }
                ]
              }
            ],
            "hpa-feature-attributes": [
              {"hpa-attribute-key": "pciVendorId", "hpa-attribute-value": "1234", "operator": "=", "unit": ""},
              {"hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "5678", "operator": "=", "unit": ""},
              {"hpa-attribute-key": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": ""},
            ]  { "hpa-attribute-key": "physicalNetwork", "hpa-attribute-value": "physnet1", "operator": "=", "unit": "" },
          {  ]
          },
          {
            "hpa-feature": "sriovNicNetworksriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [
              {
                "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                "attributes": [
                  {
                    "attribute_name": "oof_returned_vnic_type_for_firewall_unprotected",
                    "attribute_value": "direct"
                  },
                  {
                    "attribute_name": "oof_returned_provider_for_firewall_unprotected",
                    "attribute_value": "physnet2"
                  }
                ]
              }
            ],
            "hpa-feature-attributes": [
              {"hpa-attribute-key": "pciVendorId", "hpa-attribute-value": "3333", "operator": "=", "unit": ""},
              {"hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "7777", "operator": "=", "unit": ""},
              {"hpa-attribute-key": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": ""},
              { "hpa-attribute-key": "physicalNetwork", "hpa-attribute-value": "physnet1", "operator": "=", "unit": "" }
            ]
          }
        ]
      },
      {
        "id": "<vdu.Name>",
        "type": "vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives": [
          {
            "type": "flavor_directivedirectives",
            "attributes": [
              {
                "attribute_name": " oof_returned_flavor_label_for_generator ",
                "attribute_value": "<Blank>"
              }
            ]
          }
        ],
        "flavorProperties": [
          {
            "hpa-feature": "qosIntentCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              {"hpa-attribute-key": "Infrastructure Resource Isolation for VNF", "hpa-attribute-value": "Guaranteed QoS", "operator": "=", "unit": ""}
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "virtualMemSize", "hpa-attribute-value": "6", "operator": "=", "unit": "GB" }
            ]
          },
          {
            "hpa-feature": "cpuPinning",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "hpa-feature-attributesdirectives": [],
            "hpa-feature-attributes": [
              {"hpa-attribute-key": "logicalCpuThreadPinningPolicy", "hpa-attribute-value": "prefer", "operator": "=", "unit": ""}
            ]
          },
          {
            "hpa-feature": "cpuPinning",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              {"hpa-attribute-key": "logicalCpuPinningPolicy", "hpa-attribute-value": "dedicated", "operator": "=", "unit": ""}
            ]
          },
          {
            "hpa-feature": "hugePages",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              {"hpa-attribute-key": "memoryPageSize", "hpa-attribute-value": "2", "operator": "=", "unit": "GB"}
            ]
          }
        ]
      }
    ]
  }
}



...

Section
Section
Column
width25%20%

HPA – basicCapabilities

Column
width25%20%

HPA – hugePages

Column
width25%20%

HPA – cpuPinning

Column
width25%20%

HPA – sriovNicNetworksriovNICNetwork

Column
width20%

CloudAgnostic

Section
Column
width25%20%

hpa-capability-id="b369fd3d-0b15-44e1-81b2-6210efc6dff9",

hpa-feature=”basicCapabilities”,

architecture=”generic",

hpa-version=”v1”,

hpa-attribute-keyhpa-attribute-value

numVirtualCpu

{value:6}

virtualMemSize

{value:6, unit:”GB”}

Column
width25%20%

hpa-capability-id="e769fd3d-0b15-77b3-81b2-6210efc6dffa",

hpa-feature=”hugePages”,

architecture=”generic",

hpa-version=”v1”,

hpa-attribute-keyhpa-attribute-value

memoryPageSize

{value:2, unit:”GB”}

Column
width25%20%

hpa-capability-id="c369fd3d-0b15-44e1-81b2-6210efc6dffa",

hpa-feature=”cpuPinning”,

architecture=”generic",

hpa-version=”v1”,

hpa-attribute-keyhpa-attribute-value

logicalCpuThreadPinningPolicy

{value:”prefer”}

logicalCpuPinningPolicy

{value:”dedicated”}

Column
width25%20%

hpa-capability-id="f453fd3d-0b15-11w4-81b2-6210efc6dff9",

hpa-feature=”sriovNicNetwork””sriovNICNetwork”,

architecture=”intel64",

hpa-version=”v1”,

hpa-attribute-keyhpa-attribute-value

pciCount

{value: 1}

pciVendorId

{value: "1234"}

pciDeviceId{value: "5678"}

HAS Homing Response after changes

Accordingly, the data structure 'directives' will also be added inside OOF HAS response. Since currently the pcie_directives can be get from either Policy or AAI,  HAS still need to process the pcie_directives.

Sample directive data in AAI6789
Expand
title
physicalNetwork

{value: "physnet1"}

Column
width20%

hpa-capability-id="5cc869ef-fc37-47b5-b304-ad8fabcbf955",

hpa-feature=

”sriovNicNetwork”

"qosIntentCapabilities",

architecture=

”{hw_arch}

”generic",

hpa-version=”v1”,

Hpa
hpa-attribute-key
Hpa
hpa-attribute-value

pciVendorId

2345

pciDeviceId

Infrastructure Resource Isolation for VNF

{"value": "Burstable QoS"}

Burstable QoS Oversubscription Percentage{"value": "25"}





HAS Homing Response after changes

Accordingly, the data structure 'directives' will also be added inside OOF HAS response.

'id' and 'type' will help VF-C to filter one VDU(VNFC in HEAT accordingly), and attributes inside will be used to pass down values of SRIOV NIC information. 

...

Code Block
languagejs
themeDJango
titleHAS Homing response (JSON)
linenumberstrue
collapsetrue
# 
# Example one: Only one vnfc/vdu inside such VNF, with requirements on basic capability and sriovNicNetworksriovNICNetwork.
#
{
  "plans": [
    {
      "status": "done",
      "id": "plan_id",
      "name": "Plan Name 1",
      "links": [
        [
          {
            "href": "http://conductor:8091/v1/plans/plan_id",
            "rel": "self"
          }
        ]
      ],
      "recommendations": [
        {
          "vFW": {
            "inventory_provider": "aai",
            "candidate": {
              "candidate_id": "DLLSTX1A",
              "cloud_owner": "CloudOwner1",
              "inventory_type": "cloud",
              "location_id": "DLLSTX1A",
              "location_type": "openstack-cloud"
            },
            "attributes": {
              "directives": {
                "directives": [
                  {
                    "id": "<vdu.Name>",
                    "type": "<vnfc/vdu>tocsa.nodes.nfv.Vdu.Compute>",
                    "directives": [
                      {
                        "type": "flavor_directives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_flavor_label_for_firewall",
                            "attribute_value": "vim_flavor_X"
                          }
                        ]
                      },
                      {
                        "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_vnic_type_for_firewall_protected",
                            "attribute_value": "direct"
                          },
                          {
                            "attribute_name": "oof_returned_provider_network_for_firewall_protected",
                            "attribute_value": "physnet1"
                          }
                        ]
                      },
                      {
                        "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_vnic_type_for_firewall_unprotected",
                            "attribute_value": "direct"
                          },
                          {
                            "attribute_name": "oof_returned_provider_network_for_firewall_unprotected",
                            "attribute_value": "physnet2"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              "cloud_owner": "CloudOwner1",
              "physical-location-id": "DLLSTX1A",
              "cloud_version": "3.0",
              "vim-id": "CloudOwner1_DLLSTX1A"
            }
          }
      ]  }
   }   ]
    }
  ]
}


# 
# Example two: Two vnfc/vdu inside such VNF. One with requirements on basic capability and sriovNicNetworksriovNICNetwork and the other one with requirements on basic capabilities, cpu pinning and huge pages.
#

{
  "plans": [
    {
      "status": "done",
      "id": "plan_id",
      "name": "Plan Name 2",
      "links": [
        [
          {
            "href": "http://conductor:8091/v1/plans/plan_id",
            "rel": "self"
          }
        ]
      ],
      "recommendations": [
        {
          "vFW": {
            "inventory_provider": "aai",
            "candidate": {
              "candidate_id": "DLLSTX1A",
              "cloud_owner": "CloudOwner1",
              "inventory_type": "cloud",
              "location_id": "DLLSTX1A",
              "location_type": "openstack-cloud"
            },
            "attributes": {
              "directives":{
               "directives": [
                {
                  "id": "<vdu.Name>",
                  "type": "<vnfc/vdu>tocsa.nodes.nfv.Vdu.Compute>",
                  "directives": [
                    {
                      "type": "flavor_directives",
                      "attributes": [
                        {
                          "attribute_name": "oof_returned_flavor_label_for_firewall",
                          "attribute_value": "vim_flavor_X"
                        }
                      ]
                    },
                    {
                      "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                      "attributes": [
                        {
                          "attribute_name": "oof_returned_vnic_type_for_firewall_protected",
                          "attribute_value": "direct"
                        },
                        {
                          "attribute_name": "oof_returned_provider_network_for_firewall_protected",
                          "attribute_value": "physnet1"
                        }
                      ]
                    },
                    {
                      "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                      "attributes": [
                        {
                          "attribute_name": "oof_returned_vnic_type_for_firewall_unprotected",
                          "attribute_value": "direct"
                        },
                        {
                          "attribute_name": "oof_returned_provider_network_for_firewall_unprotected",
                          "attribute_value": "physnet2"
                        }
                      ]
                    }
                  ]
                },
                {
                  "id": "<vdu.Name>",
                  "type": "<vnfc/vdu>tocsa.nodes.nfv.Vdu.Compute>",
                  "directives": [
                    {
                      "type": "flavor_directives",
                      "attributes": [
                        {
                          "attribute_name": "oof_returned_flavor_label_for_generator",
                          "attribute_value": "vim_flavor_Y"
                        }
                      ]
                    }
                  ]
                }
              ]
             }
            },
            "cloud_owner": "CloudOwner1",
            "physical-location-id": "DLLSTX1A",
            "cloud_version": "3.0",
            "vim-id": "CloudOwner1_DLLSTX1A"
          }
        }
      ]
    }
  ]
}


...

Code Block
languagejs
themeDJango
titleOOF Asynchronous Homing response (JSON)
linenumberstrue
collapsetrue
#
# Example one: Only one vnfc/vdu inside such VNF, with requirements on basic capability and sriovNicNetworksriovNICNetwork.
#
{
  "requestId": "xxxx",
  "transactionId": " xxxx ",
  "statusMessage": " xxxx ",
  "requestStatus": "completed",
  "solutions": {
    "placementSolutions": [
      [
        {
          "resourceModuleName": " vFW ",
          "serviceResourceId": " xxxx ",
          "solution": {
            "identifierType": "serviceInstanceId",
            "identifiers": [
              " xxxx "
            ],
            "cloudOwner": "CloudOwner1 "
          },
          "assignmentInfo": [
            { "key": "isRehome",
              "value": "false"
            },
            { "key": "locationId",
              "value": "DLLSTX1A"
            },
            { "key": "locationType",
              "value": "openstack-cloud"
            },
            { "key": "vimId",
              "value": "CloudOwner1_DLLSTX1A"
            },
            { "key": "physicalLocationId",
              "value": "DLLSTX1223"
            },
            { "key": "oofDirectivesoof_directives",
              "value": {
                "directives": [
                  {
                    "id": "<vdu.name>",
                    "type": "vnfc/vdutocsa.nodes.nfv.Vdu.Compute",
                    "directives": [
                      {
                        "type": "flavor_directivedirectives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_flavor_label_for_firewall",
                            "attribute_value": "<flavor_name>"
                          }
                        ]
                      },
                      {
                        "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_vnic_type_for_firewall_protected",
                            "attribute_value": "direct"
                          },
                          {
                            "attribute_name": "oof_returned_provider_network_for_firewall_protected",
                            "attribute_value": "physnet1"
                          }
                        ]
                      },
                      {
                        "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_vnic_type_for_firewall_unprotected",
                            "attribute_value": "direct"
                          },
                          {
                            "attribute_name": "oof_returned_provider_network_for_firewall_unprotected",
                            "attribute_value": "physnet2"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "id": "<ID of VNF>",
                    "type": "vnf",
                    "directives": [
                      { "type": " ",
                        "attributes": [
                          {
                            "attribute_name": " ",
                            "attribute_value": " "
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          ]
        }
      ]
    ],
    "licenseSoutions": [
      {
        "resourceModuleName": "string",
        "serviceResourceId": "string",
        "entitlementPoolUUID": [
          "string"
        ],
        "licenseKeyGroupUUID": [
          "string"
        ],
        "entitlementPoolInvariantUUID": [
          "string"
        ],
        "licenseKeyGroupInvariantUUID": [
          "string"
        ]
      }
    ]
  }
}


#
# Example two: Two vnfc/vdu inside such VNF. One with requirements on basic capability and sriovNicNetworksriovNICNetwork and the other one with requirements on basic capabilities, cpu pinning and huge pages.
#
{
  "requestId": "xxxx",
  "transactionId": " xxxx ",
  "statusMessage": " xxxx ",
  "requestStatus": "completed",
  "solutions": {
    "placementSolutions": [
      [
        {
          "resourceModuleName": " vFW ",
          "serviceResourceId": " xxxx ",
          "solution": {
            "identifierType": "serviceInstanceId",
            "identifiers": [
              " xxxx "
            ],
            "cloudOwner": "CloudOwner1 "
          },
          "assignmentInfo": [
            { "key": "isRehome",
              "value": "false"
            },
            { "key": "locationId",
              "value": "DLLSTX1A"
            },
            { "key": "locationType",
              "value": "openstack-cloud"
            },
            { "key": "vimId",
              "value": "CloudOwner1_DLLSTX1A"
            },
            { "key": "physicalLocationId",
              "value": "DLLSTX1223"
            },
            { "key": "oofDirectivesoof_directives",
              "value": {
                "directives": [
                  {
                    "id": "<vdu.name>",
                    "type": "vnfc/vdu",
                    "directives": [
                      { "type": "flavor_directivedirectives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_flavor_label_for_firewall",
                            "attribute_value": "<flavor_name>"
                          }
                        ]
                      },
                      { "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_vnic_type_for_firewall_protected",
                            "attribute_value": "direct"
                          },
                          {
                            "attribute_name": "oof_returned_provider_network_for_firewall_protected",
                            "attribute_value": "physnet1"
                          }
                        ]
                      },
                      { "type": "sriovNicNetworksriovNICNetwork_directivedirectives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_vnic_type_for_firewall_unprotected",
                            "attribute_value": "direct"
                          },
                          {
                            "attribute_name": "oof_returned_provider_network_for_firewall_unprotected",
                            "attribute_value": "physnet2"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "id": "<vdu.name>",
                    "type": "vnfc/vdu",
                    "directives": [
                      { "type": "flavor_directivedirectives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_flavor_label_for_generator",
                            "attribute_value": "<flavor_name>"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "id": "<ID of VNF>",
                    "type": "vnf",
                    "directives": [
                      { "type": " ",
                        "attributes": [
                          {
                            "attribute_name": " ",
                            "attribute_value": " "
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          ]
        }
      ]
    ],
    "licenseSoutions": [
      {
        "resourceModuleName": "string",
        "serviceResourceId": "string",
        "entitlementPoolUUID": [
          "string"
        ],
        "licenseKeyGroupUUID": [
          "string"
        ],
        "entitlementPoolInvariantUUID": [
          "string"
        ],
        "licenseKeyGroupInvariantUUID": [
          "string"
        ]
      }
    ]
  }
}