Background
...
OOF is going to support both two orchestrators (SO and VF-C) in ONAP in Casablanca Release. As they are using two different Models(HEAT and Pure Tosca), the expression differs from each other. In order to make OOF capable to process these two different requests within the same engine, we'd like to combine these expressions together inside a single Policy.
Sample Policy Schema
Thus a data block called 'directives' will be added inside policy to transfer the information that needed by OOF. And it also contains two parts, one includes the flavor at a VNFC level, the other contains the specific information needed by such hpa-feature.
...
language | py |
---|---|
theme | DJango |
title | R3 HPA Policy example |
linenumbers | true |
...
In R2, SO is the only consumer of OOF. When it sends out homing requests, OOF will respond with the most appropriate flavors accordingly.
Taking the VNF vG inside vCPE use case as an example:
Inside the vG VNF Resources, there's one VFC(or VNFC) called vG(could be multiple VFCs inside one VNF Resource, but only got one here in this example). And for the vG VFC, there's a vG VF Module which is somewhat a deployment unit in HEAT for that VFC. And the vG VF Module can be used to deploy multiple vG VFCs in one time.
When SO sends out a request containing the vG VNF information to OOF, OOF will respond with flavor for each VFC inside vG VNF Resources. And let SO do the extra steps of deployments.
Now in R3, OOF is going to support both two orchestrators (SO and VF-C) in ONAP. As they are using two different Models(HEAT and Pure Tosca), the expression differs from each other. In order to make OOF capable to process these two different requests within the same engine, we'd like to combine these expressions together inside a single Policy.
Sample Policy Schema
Thus a data block called 'directives' and some attributes(type and id) will be added inside policy to transfer the information that needed by OOF. And it also contains two parts, one includes the flavor at a VNFC level, the other contains the specific information needed by such hpa-feature.
The newly added attributes 'id' and 'type' will be used by VF-C to identify each vdu(a corresponding concept to VNFC) and the 'directive' data block will be used as a placeholder for the values provided by Policy or AAI.
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
#
#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":"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",
"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_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, 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 ", //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",
"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": "physnet2", "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 ", //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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
#
#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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
#
#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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
#
# 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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
# # 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": " " } ] } ] } ] } } ] } ] ], "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 sriovNICNetwork 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": "oof_directives", "value": { "directives": [ { "id": "<vdu.name>", "type": "vnfc/vdu", "directives": [ { "type": "flavor_directives", "attributes": [ { { "directiveattribute_name": "oof_returned_flavor_label_for_firewall", "attributes":[ { "attribute_value": "<flavor_name>" "attribute_name":" oof_returned_flavor_for_firewall ", //Admin needs to ensure that} this value is same as flavor parameter in HOT ] "attribute_value": "<Blank>" }, ] { "type": "sriovNICNetwork_directives", } ] "flavorPropertiesattributes": [ { { "hpa-feature": "basicCapabilities", "mandatory": "True", "architectureattribute_name": "genericoof_returned_vnic_type_for_firewall_protected", "hpa-feature-attributes": [ { "hpa-attribute-key_value": "numVirtualCpudirect", "hpa-attribute-value": "6", "operator": "=", "unit": "" } ] }, }, { { "hpa-feature": "basicCapabilities", "mandatory": "True", "architectureattribute_name": "genericoof_returned_provider_network_for_firewall_protected", "hpa-feature-attributes": [ { "hpa-attribute-key": "virtualMemSize", "hpa-attribute-_value": "6physnet1", "operator": "=", "unit": "GB" }, ] } } ] } ] } } # #Example 2: vFW, Pcie Passthrough #one VNFC(VFC) with two Pcie Passthrough 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": [ {}, { "type": "sriovNICNetwork_directives", "attributes": [ { "attribute_name": "oof_returned_vnic_type_for_firewall_unprotected", "vduName" : "<vdu.Name>", "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute", "directivesattribute_value":[ "direct" { }, "directive_name":"flavor", "attributes":[ { { "attribute_name": " oof_returned_provider_flavornetwork_for_firewall _unprotected", //Admin needs to ensure that this value is same as flavor parameter in HOT "attribute_value": "<Blank>”"physnet2" } ] ] } ] "flavorProperties":} [ { ] "hpa-feature": "pciePassthrough", "mandatory": "True", }, "architecture": "generic", { "directives" : [ "id": "<vdu.name>", { "directive_nametype": "pciePassthrough_directive"?vnfc/vdu", "attributesdirectives": [ { "attribute_nametype": "oof_returned_vnic_type_for_firewall_protected",flavor_directives", "attribute_valueattributes": "direct" [ { }, { "attribute_name": "oof_returned_providerflavor_networklabel_for_firewall_protectedgenerator", "attribute_value": "physnet1"<flavor_name>" } } ] ] } ], } "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": ">=", "unitid": " ", } ] "type": "vnf", }, { "directives": [ "hpa-feature": "pciePassthrough", { "mandatorytype": "True ", "architectureattributes": "generic", [ "directives" : [ { { "directiveattribute_name": "pciePassthrough_directive"? ", "attributesattribute_value": [" " { "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-attributeslicenseSoutions": [ { { "hpa-attribute-keyresourceModuleName": "pciVendorIdstring", "hpa-attribute-valueserviceResourceId": "3333string", "operator": "=", "unit": "" }, "entitlementPoolUUID": [ "string" ], { "hpa-attribute-keylicenseKeyGroupUUID": "pciDeviceId", "hpa-attribute-value": "7777", "operator": "=", "unit": "" }, [ "string" ], { "hpa-attribute-keyentitlementPoolInvariantUUID": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" } [ "string" ], "licenseKeyGroupInvariantUUID": ][ }"string" ] } ] } } |