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 sriovNICNetwork
#one VNFC(VFC) with one basic capability requirement and two sriovNICNetworkF 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":[  
           {  
             "directive_nametype":"flavor_directives",
             "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": "sriovNICNetwork",
  } }       # #Example 2"mandatory": vFW"True",
Pcie Passthrough #one VNFC(VFC) with two Pcie Passthrough requirements # {
  "servicearchitecture": "hpaPolicygeneric",
   "policyName": "oofCasablanca.hpaPolicy_vFW",   "description": "HPA policy for vFW",   "templateVersionhpa-version": "0.0.1v1",
    "version": "1.0",   "priority": "3",   "riskTypedirectives" : "test",[
     "riskLevel": "2",   "guard": "False",   "content": {
    "resources": "vFW",     "identity": "hpaPolicy_vFW",     "policyScopetype": ["vFWsriovNICNetwork_directives",
"US", "INTERNATIONAL", "ip", "vFW"],          "policyType": "hpaPolicy",     "flavorFeaturesattributes": [
      {         "id" : "<vdu.Name>",         "type{ "attribute_name":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
     "oof_returned_vnic_type_for_firewall_protected",
      {                "directiveattribute_namevalue": "flavordirect",
             "attributes":[      },
            {                     { "attribute_name": " oof_returned_provider_flavornetwork_for_firewall _protected",
//Admin needs to ensure that this value is same as flavor parameter in HOT                    "attribute_value": "<Blank>physnet1"
                   }
                ]
              }
            ],
        "flavorProperties    "hpa-feature-attributes": [
          {             { "hpa-featureattribute-key": "pciePassthroughpciVendorId",
            "mandatoryhpa-attribute-value": "True1234",
            "architectureoperator": "generic=",             "directives" : ["unit": "" },
              { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "5678",             "directive_name"operator": "=", "unit": "pciePassthrough_directive" },
              {  "attributeshpa-attribute-key": [
    "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" },
              { "hpa-attribute_name-key": "oof_returned_vnic_type_for_firewall_protectedphysicalNetwork", "hpa-attribute-value": "physnet1", "operator": "=", "unit": "" }
              "attribute_value": "direct"]
          },
         },  {
                 { "attribute_name"hpa-feature": "oof_returned_provider_network_for_firewall_protectedsriovNICNetwork",
                     "attribute_value"mandatory": "physnet1True",
            "architecture": "generic",
     }       "hpa-version": "v1",
        ]    "directives" : [
        }      {
      ],             "hpa-feature-attributes"type": [
"sriovNICNetwork_directives",
             { "hpa-attribute-key": "pciVendorId", "hpa-attribute-valueattributes": "1234", "operator": "=", "unit": "" },[
                   { "hpa-attribute-key_name": "pciDeviceIdoof_returned_vnic_type_for_firewall_unprotected",
"hpa-attribute-value": "5678", "operator": "=", "unit": "" },               { "hpa-attribute-key_value": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" }direct"
                 ]  },
        },           { "attribute_name": "oof_returned_provider_network_for_firewall_unprotected",
          "hpa-feature": "pciePassthrough",             "mandatoryattribute_value": "Truephysnet2",
            "architecture": "generic",      }
      "directives" : [        ]
      {        }
        "directive_name": "pciePassthrough_directive",   ],
             "hpa-feature-attributes": [
  
                { "hpa-attribute_name-key": "oof_returned_vnic_type_for_firewall_unprotectedpciVendorId",      "hpa-attribute-value": "3333", "operator": "=", "unit": "" },
              { "hpa-attribute_value-key": "directpciDeviceId", "hpa-attribute-value": "7777", "operator": "=", "unit":               }"" },
              { "hpa-attribute-key":    { "attribute_name"pciCount", "hpa-attribute-value": "oof_returned_provider_for_firewall_unprotected1", "operator": ">=", "unit": "" },
              {  "hpa-attribute_value-key": "physnet2physicalNetwork"
       , "hpa-attribute-value": "physnet2", "operator": "=", "unit": "" }
           } ]
          }
    ]    ]
      }
   } ]
  }
}

#
#Example 2: vFW, basicCapabilities, hugePages, ]sriovNICNetwork, cpuPinning.
#one VNFC(VFC) with basic capablity requirements, cpuPinning requirement and huge  "hpa-feature-attributes": [
              { "hpa-attribute-keypage requirement.
#the other VNFC(VFC) with basic capability requirements and sriovNICNetwork requirements.
#
{
  "service": "pciVendorIdhpaPolicy",
"hpa-attribute-value  "policyName": "3333oofCasablanca.hpaPolicy_vFW",
  "operatordescription": "=HPA policy for vFW",
  "unittemplateVersion": "0.0.1" },
      "version": "1.0",
       { "hpa-attribute-key"priority": "pciDeviceId3",
  "hpa-attribute-valueriskType": "7777test",
  "operatorriskLevel": "=2",
  "unitguard": "False" },
  "content": {
      "resources": "vFW",
   { "hpa-attribute-keyidentity": "pciCounthpaPolicy_vFW",
"hpa-attribute-value    "policyScope": ["1vFW", "operatorUS":, ">=INTERNATIONAL", "unitip":, "vFW"],
}    "policyType": "hpaPolicy",
    "flavorFeatures": [
 ]     {
     }   "id" : "<vdu.Name>",
   ]       }
    ]
  }
}


Code Block
languagepy
themeEmacs
titleCloud Agnostic Policy Example
linenumberstrue
collapsetrue
#
#Example 1: vCPE vgw, Burstable QoS
#vCPE: Infrastructure Resource Isolation for VNF with Burstable QoS
#
{
  "service": "cloudPolicy",
  "policyName": "oofCasablanca.cloudPolicy_vgw",
  "description": "Cloud policy for vgw",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vgw",
    "identity": "cloudPolicy_vgw",
    "policyScope": ["vgw", "US", "INTERNATIONAL", "ip", "vgw"],
    "policyType": "hpaPolicy",
    "flavorFeatures": ["type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_firewall ", //Admin needs to ensure that this value is same as flavor parameter in HOT 
         {         "idattribute_value" : "<vdu.Name><Blank>", 
       "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",         "directives":[} 
            {   ]
            "directive_name":"flavor",}
          ],
   "attributes":[     "flavorProperties": [
            {  
 
                "attribute_name"hpa-feature":" oof_returned_flavor_for_vgw  "basicCapabilities",
//Admin needs to ensure that this value is same as flavor parameter in HOT 
     "mandatory": "True",
            "attribute_valuearchitecture": "<Blank>generic",
            "hpa-version": "v1",
   }                 ]"directives": [],
           }
  "hpa-feature-attributes": [
        ]      { "hpa-attribute-key": "numVirtualCpu", "flavorProperties": [hpa-attribute-value": "6", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic", 
            "hpa-feature-attributesdirectives": [
 ],
            {"hpa-attributefeature-keyattributes":"Infrastructure Resource Isolation for VNF", "hpa-attribute-value": "Burstable QoS","operator": "=", "unit": ""},
			  { [
              { "hpa-attribute-key":"Burstable QoS Oversubscription Percentage "virtualMemSize", "hpa-attribute-value": "256", "operator": "=", "unit": "GB" },
            ]
          },
        ]  {
    }     ]   }
}

#
#Example 2: vCPE vgw, Guaranteed QoS
#vCPE: Infrastructure Resource Isolation for VNF with Guaranteed QoS
#
{
  "service": "cloudPolicy",
  "policyName": "oofCasablanca.cloudPolicy_vgw",
  "description": "Cloud policy for vgw",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content":"hpa-feature": "sriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives" : [
              {
    "resources": "vgw",     "identity": "cloudPolicy_vgw",     "policyScopetype": ["vgwsriovNICNetwork_directives",
  "US", "INTERNATIONAL", "ip", "vgw"],     "policyType": "hpaPolicy",     "flavorFeaturesattributes": [
        {           { "idattribute_name" : "<vdu.Name>oof_returned_vnic_type_for_firewall_protected",
         "type            "attribute_value":"vnfc/tocsa.nodes.nfv.Vdu.Compute", "direct"
          "directives":[         },
    {               { "directiveattribute_name":"flavor "oof_returned_provider_network_for_firewall_protected",
             "attributes":[        "attribute_value": "physnet1"
                  { }
                ]
  "attribute_name":" oof_returned_flavor_for_vgw ", //Admin needs to ensure that this value is same as flavor parameter in HOT            }
            ],
            "attribute_valuehpa-feature-attributes": "<Blank>"[
              { "hpa-attribute-key": "pciVendorId",  } 
   "hpa-attribute-value": "1234", "operator": "=", "unit": "" },
           ]   { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "5678", "operator": "=", "unit": "" },
          ]        { "flavorPropertieshpa-attribute-key": [
          {
            "pciCount", "hpa-featureattribute-value": "basicCapabilities1",
            "mandatoryoperator": "True>=",
            "architectureunit": "generic" },
              "hpa-feature-attributes": [
              {{ "hpa-attribute-key":"Infrastructure Resource Isolation for VNF "physicalNetwork", "hpa-attribute-value": "Guaranteed QoSphysnet1", "operator": "=", "unit": "" },
            ]
          },
        ]  {
    }     ]   }
}"hpa-feature": "sriovNICNetwork",
 # #Example 3: vDNS, Burstable QoS & Infra HA #vDNS: Infrastructure Resource Isolation for VNF with Burstable QoS & Infrastructure HA
#
{"mandatory": "True",
            "servicearchitecture": "cloudPolicygeneric",
  "policyName": "oofCasablanca.cloudPolicy_vdns",   "description": "Cloud policy for vdns",   "templateVersionhpa-version": "0.0.1v1",
    "version": "1.0",   "priority": "3",   "riskTypedirectives" : "test",[
     "riskLevel": "2",   "guard": "False",   "content": {
          "resources": "vdns",     "identitytype": "cloudPolicysriovNICNetwork_vdnsdirectives",
    "policyScope": ["vgw", "US", "INTERNATIONAL", "ip", "vdns"],           "policyTypeattributes": "hpaPolicy",
[
   "flavorFeatures": [       {        { "idattribute_name" : "<vdu.Name>",oof_returned_vnic_type_for_firewall_unprotected",
                     "typeattribute_value":"vnfc/tocsa.nodes.nfv.Vdu.Compute", "direct"
          "directives":[         }
    {               { "directiveattribute_name":"flavor", "oof_returned_provider_for_firewall_unprotected",
                     "attributesattribute_value":[ "physnet2"
                   {}
                ]
    "attribute_name":" oof_returned_flavor_for_vdns ", //Admin needs to ensure that this value is same as flavor parameter in HOT          }
            ],
            "attribute_valuehpa-feature-attributes": "<Blank>"[
              { "hpa-attribute-key":  } 
    "pciVendorId", "hpa-attribute-value": "3333", "operator": "=", "unit": "" },
          ]    { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "7777", "operator": "=", "unit": "" }
,
         ]     {    "flavorProperties"hpa-attribute-key": [
          {"pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" },
              { "hpa-featureattribute-key": "basicCapabilitiesphysicalNetwork", "hpa-attribute-value": "physnet2", "operator": "=", "unit": "" }
     "mandatory": "True",      ]
      "architecture": "generic",   }
        ]
  "hpa-feature-attributes": [   },
      {
    {"hpa-attribute-key":"Infrastructure Resource Isolation for VNF"id", "hpa-attribute-value": "Burstable QoS<vdu.Name>","operator":
"=", "unit": ""}, 			  {"hpa-attribute-key":"Burstable QoS Oversubscription Percentage", "hpa-attribute-value"type": "25","operator": "=", "unit": ""},
			  {"hpa-attribute-key":"Infrastructure High Availability for VNF", "hpa-attribute-value": "","operator": "", "unit": ""},"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
     ]        "type":"flavor_directives",
  },         ]  "attributes":[  
  }     ]   } }    # #Example{ 4: vDNS,
Guaranteed QoS & Infra HA #vDNS: Infrastructure Resource Isolation for VNF with Burstable QoS & Infrastructure HA # {   "serviceattribute_name":" oof_returned_flavor_label_for_generator "cloudPolicy", //Admin needs "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": [to ensure that this value is same as flavor parameter in HOT 
                  "attribute_value": "<Blank>" 
                } 
               ]
           {}
        "id" : "<vdu.Name>"],
        "typeflavorProperties":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
 [
       "directives":[   {
          {  "hpa-feature": "basicCapabilities",
            "directive_namemandatory": "flavorTrue",

            "attributesarchitecture":[ "generic",
            "hpa-version": "v1",
    {        "directives": [],
           "attribute_name":" oof_returned_flavor_for_vdns ", //Admin needs to ensure that this value is same as flavor parameter in HOT 
                  "attribute_ "hpa-feature-attributes": [
              { "hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "<Blank>6", "operator": "=", "unit": "" }
            }]
          },
     ]     {
      }      "hpa-feature": "basicCapabilities",
   ]         "flavorPropertiesmandatory": ["True",
          {             "hpa-feature"architecture": "basicCapabilitiesgeneric",
            "mandatoryhpa-version": "Truev1",
            "architecturedirectives": "generic"[],
              "hpa-feature-attributes": [
              { "hpa-attribute-key": "virtualMemSize"Infrastructure Resource Isolation for VNF", ", "hpa-attribute-value": "Guaranteed QoS6", "operator": "=", "unit": "GB" }
            ]
          },
			  {"hpa-attribute-key":"Infrastructure High Availability for VNF",
          {
            "hpa-attribute-valuefeature": "cpuPinning","operator
            "mandatory": "True",
"unit": ""},            "architecture": "generic",
  ]           }"hpa-version": "v1",
        ]    "directives": [],
 }     ]   } }

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.

...

titleSample directive data in AAI

hpa-feature=”pciePassthrough”,

architecture=”{hw_arch}",

version=”v1”,

...

Hpa-attribute-key

...

Hpa-attribute-value

...

pciVendorId

...

2345

...

pciDeviceId

...

6789

...

pciCount

...

1

...

directive

...

[

{"attribute_name": "vnic-type", "attribute_value": "direct"},

{"attribute_name": "physical-network", "attribute_value": "physnet2"},

]

'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. 

In order to make the response more generic and extensible, all the attributes added will be add inside that 'directive' data block.  Please find the sample below for vG.

Status - Done

Code Block
languagejs
themeDJango
titleHAS Homing response (JSON)
linenumberstrue
collapsetrue
{
  "plans": [
    {
      "status": "done",
      "id": "plan_id",
      "name": "Plan Name 1",
      "links": [
        [  "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: virtual firewall vpg, Burstable QoS
#vCPE: Infrastructure Resource Isolation for VNF with Burstable QoS
#
{
  "service": "cloudPolicy",
  "policyName": "oofCasablanca.cloudPolicy_vpg",
  "description": "Cloud policy for vpg",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vpg",
    "identity": "cloudPolicy_vpg",
    "policyScope": ["vgw", "US", "INTERNATIONAL", "ip", "vpg"],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_vpg ", //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: virtual firewall vfw, Guaranteed QoS
#vCPE: Infrastructure Resource Isolation for VNF with Guaranteed QoS
#
{
  "service": "cloudPolicy",
  "policyName": "oofCasablanca.cloudPolicy_vfw",
  "description": "Cloud policy for vfw",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vfw",
    "identity": "cloudPolicy_vfw",
    "policyScope": ["vfw", "US", "INTERNATIONAL", "ip", "vfw"],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "type":"flavor_directives",
             "attributes":[  
                {  
                  "attribute_name":" oof_returned_flavor_label_for_vfw ", //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_directives",
             "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_directives",
             "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 + sriovNICNetwork + 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_directives",
             "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",
            "hpa-version": "v1",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "virtualMemSize", "hpa-attribute-value": "6", "operator": "=", "unit": "GB" }
            ]
          },
          {
            "hpa-feature": "sriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives" : [
              {
                "type": "sriovNICNetwork_directives",
                "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": "sriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives" : [
              {
                "type": "sriovNICNetwork_directives",
                "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": "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, sriovNICNetwork, cpuPinning.
#one VNFC(VFC) with basic capablity requirements, cpuPinning requirement and huge page requirement.
#the other VNFC(VFC) with basic capability requirements and sriovNICNetwork 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_directives",
            "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": "sriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [
              {
                "type": "sriovNICNetwork_directives",
                "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": "sriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "hpa-version": "v1",
            "directives": [
              {
                "type": "sriovNICNetwork_directives",
                "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_directives",
            "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",
            "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"}
            ]
          }
        ]
      }
    ]
  }
}




Sample HPA capability data in AAI 

Here lists the sample HPA capability data inside AAI for the examples above:

Section
Section
Column
width20%

HPA – basicCapabilities

Column
width20%

HPA – hugePages

Column
width20%

HPA – cpuPinning

Column
width20%

HPA – sriovNICNetwork

Column
width20%

CloudAgnostic

Section
Column
width20%

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
width20%

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
width20%

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
width20%

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

hpa-feature=”sriovNICNetwork”,

architecture=”intel64",

hpa-version=”v1”,

hpa-attribute-keyhpa-attribute-value

pciCount

{value: 1}

pciVendorId

{value: "1234"}

pciDeviceId{value: "5678"}
physicalNetwork

{value: "physnet1"}

Column
width20%

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

hpa-feature="qosIntentCapabilities",

architecture=”generic",

hpa-version=”v1”,

hpa-attribute-keyhpa-attribute-value
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. 

In order to make the response more generic and extensible, all the attributes added will be add inside that 'directive' data block.  Please find the sample below for the two examples for vFW.

Status - Done

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 sriovNICNetwork.
#
{
  "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/tocsa.nodes.nfv.Vdu.Compute>",
                    "directives": [
                      {
                        "type": "flavor_directives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_flavor_label_for_firewall",
                            "attribute_value": "vim_flavor_X"
                          }
                        ]
                      },
                      {
                        "type": "sriovNICNetwork_directives",
                        "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": "sriovNICNetwork_directives",
                        "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 sriovNICNetwork 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/tocsa.nodes.nfv.Vdu.Compute>",
                  "directives": [
                    {
                      "type": "flavor_directives",
                      "attributes": [
                        {
                          "attribute_name": "oof_returned_flavor_label_for_firewall",
                          "attribute_value": "vim_flavor_X"
                        }
                      ]
                    },
                    {
                      "type": "sriovNICNetwork_directives",
                      "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": "sriovNICNetwork_directives",
                      "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/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"
          }
        }
      ]
    }
  ]
}



OOF Asynchronous Response after changes

The asynchronous will be changed accordingly. And it also aligns with the schema from Multicloud( Gerrit link: https://gerrit.onap.org/r/#/c/60691/).

Here provides two asynchronous responses according to the two examples.

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 sriovNICNetwork.
#
{
  "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": "oof_directives",
              "value": {
                "directives": [
                  {
                    "id": "<vdu.name>",
                    "type": "vnfc/tocsa.nodes.nfv.Vdu.Compute",
                    "directives": [
                      {
                        "type": "flavor_directives",
                        "attributes": [
                          {
                            "attribute_name": "oof_returned_flavor_label_for_firewall",
                            "attribute_value": "<flavor_name>"
                          }
                        ]
                      },
                      {
                        "type": "sriovNICNetwork_directives",
                        "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": "sriovNICNetwork_directives",
                        "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": "",
                    "type": "vnf",
                    "directives": [
                      { "type": " ",
                        "attributes": [
                          {
                            "attribute_name": " ",
                            "attribute_value": " "
                          }
                    {    ]
        "href": "http://conductor:8091/v1/plans/plan_id",             "rel": "self"}
           }         ]
         ],         }
"recommendations": [         {      ]
    "vG": {         }
   "inventory_provider": "aai",        }
    "candidate": {     ]
        }
"candidate_id": "DLLSTX1A",     ]
    ],
    "cloud_ownerlicenseSoutions": "CloudOwner1",[
      {
        "inventory_typeresourceModuleName": "cloudstring",
   
          "location_idserviceResourceId": "DLLSTX1Astring",
        "entitlementPoolUUID": [
    "location_type": "openstack-cloud"      "string"
        }],
            "attributeslicenseKeyGroupUUID": {[
              "directivesstring":
[        ],
        {"identitlementPoolInvariantUUID": "<vdu.Name>", [
          "string"
       "type": "<vnfc/vdu>" ],
        "licenseKeyGroupInvariantUUID": [
       "directives": [  "string"
        ]
      }
 {"type": "flavor_directives",  ]
  }
}


#
# Example two: Two vnfc/vdu inside such  VNF. One with "attributes": [
                      {"attribute_name":"flavor_label_1requirements on basic capability and sriovNICNetwork and the other one with requirements on basic capabilities, cpu pinning and huge pages.
#
{
  "requestId": "xxxx",
  "transactionId": " xxxx ",
  "statusMessage": "       xxxx ",
      "attribute_value"requestStatus": "vim_flavor_Xcompleted",
  "solutions": {
    "placementSolutions": [
      [
     }   {
          "resourceModuleName": " vFW ",
   ]       "serviceResourceId": " xxxx ",
         },     "solution": {
              {"typeidentifierType": "pciePassthrough_directiveserviceInstanceId",
                    "attributes"identifiers": [
     
              " xxxx {"attribute_name": "vnic_label_1",
            ],
            "attribute_valuecloudOwner": "direct"
          CloudOwner1 "
           },
          "assignmentInfo": [
            { "attribute_namekey": "physicalNetworkisRehome",
  
                    "attribute_value": "physnet1false"
            },
         }   { "key": "locationId",
              "value": "DLLSTX1A"
  ]          },
         },   { "key": "locationType",
              {"typevalue": "pciePassthrough_directive",openstack-cloud"
            },
       "attributes": [    { "key": "vimId",
                {"attribute_name"value": "vnicCloudOwner1_label_2",DLLSTX1A"
            },
            { "attribute_valuekey": "directphysicalLocationId",
                "value": "DLLSTX1223"
     },       },
            {    {"attribute_name"key": "physicalNetworkoof_directives",
              "value": {
           "attribute_value": "physnet2"    "directives": [
                 } {
                    ]
"id": "<vdu.name>",
                  }  "type": "vnfc/vdu",
             ]       "directives": [
      },                { "cloud_ownertype": "CloudOwner1flavor_directives",
              "physical-location-id": "DLLSTX1A",
              "cloud_versionattributes": "3.0",
			  "vim-id": "CloudOwner1_DLLSTX1A"[
               }           }{
        },         {           "vGMuxInfraattribute_name": {"oof_returned_flavor_label_for_firewall",
            "attributes": {               "hostattribute_idvalue": "vgmux<flavor_host_name",name>"
                          }
              "cloud_owner": "CloudOwner1",         ]
     "physical-location-id": "DLLSTX1A",               "service_instance_id": "21d5f3e8-e714-4383-8f99-cc480144505a", },
                 "cloud_version": "3.0",
			  "vim-id     { "type": "CloudOwner1sriovNICNetwork_DLLSTX1Adirectives",
            },             "inventory_providerattributes": "aai",[
            "service_resource_id": "12345",             "candidate": {
              "is_rehome": "false",               "locationattribute_idname": "DLLSTX1Aoof_returned_vnic_type_for_firewall_protected",

             "inventory_type": "service",               "candidateattribute_idvalue": "21d5f3e8-e714-4383-8f99-cc480144505a",direct"
                         "host_id": "vgmux_host_name" },
              "cloud_owner": "CloudOwner1",           {
   "location_type": "openstack-cloud"             }           }
"attribute_name": "oof_returned_provider_network_for_firewall_protected",
       }       ]     }   ] }   

OOF Asynchronous Response after changes

The asynchronous will be changed accordingly. And it also aligns with the schema from Multicloud( Gerrit link: https://gerrit.onap.org/r/#/c/60691/).

Code Block
languagejs
themeDJango
titleOOF Asynchronous Homing response (JSON)
linenumberstrue
collapsetrue
{
  "requestId  "attribute_value": "xxxxphysnet1",
    "transactionId": " xxxx ",   "statusMessage": " xxxx ",   "requestStatus": "completed",   "solutions": {     "placementSolutions":}
[       [         { "resourceModuleName": " vG ",    ]
      "serviceResourceId": " xxxx ",           "solution": { },
          "identifierType": "serviceInstanceId",           { "identifierstype": ["sriovNICNetwork_directives",
             " xxxx "         "attributes": [
   ],            "cloudOwner": " xxxx "        {
  },          "assignmentInfo": [             {  "keyattribute_name":"isRehome "oof_returned_vnic_type_for_firewall_unprotected",

              "value":"false"    },             {  "keyattribute_value": "locationIddirect",
               "value":"DLLSTX1A"    },       },
     {  "key":"locationType",                "value":"openstack-cloud" },  {
          {  "key":"vimId",                "valueattribute_name":"rackspace_DLLSTX1A"  },
  "oof_returned_provider_network_for_firewall_unprotected",
          {  "key":"physicalLocationId",                "attribute_value": "DLLSTX1223physnet2"
        },                  }
            {  "key":"oofDirectives",          ]
     "value": { "directives":[               }
 { "id":"<vdu.name>",                  ]
   "type":"vnfc",               },
   "directives":[               {
                    "id": "<vdu.name>",
                  {  "type":"flavor_directive "vnfc/vdu",
 
                      "attributesdirectives":[
    [
                       {   "attribute_nametype": "flavor_label_1directives",
                        "attributes": [
        "attribute_value":"<flavor_name>"  #VIM Flavor, which oof seleted.            {
                }            "attribute_name": "oof_returned_flavor_label_for_generator",
           ]                 "attribute_value": "<flavor_name>"
   },                       }
{  "type": "pciePassthrough_directive",                     ]
   "attributes":[                   }
         {"attribute_name":"vnic_label_1", "attribute_value":"direct"},          ]
                  {"attribute_name":"provider_network", "attribute_value":"physnet1"}},
                  {
                   ] "id": " ",
                  },  "type": "vnf",
                  {  "typedirectives": "pciePassthrough_directive",[
                      { "type": "attributes": [ ",
                        "attributes": [
        {"attribute_name":"vnic_label_2", "attribute_value":"direct"},                 {
                            {"attribute_name": "provider_network ",
"attribute_value":"physnet2"}                         ]   "attribute_value": " "
                        }  }
                        ]
         ]             }
                     ]
                        }
                ]

              }
             }
           ]
         }
        ]
    ],
    "licenseSoutions": [
      {
        "resourceModuleName": "string",
        "serviceResourceId": "string",
        "entitlementPoolUUID": [
          "string"
        ],
        "licenseKeyGroupUUID": [
          "string"
        ],
        "entitlementPoolInvariantUUID": [
          "string"
        ],
        "licenseKeyGroupInvariantUUID": [
          "string"
        ]
      }
    ]
  }
}