...
HPA VF-C External API Interaction for Casablanca
SDC
OOF
Pic:
NSLCM will call OOF to get homing allocation placement. And it will use the same API using by SO.
Sample request using these API:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{
"requestInfo": {
"transactionId": "2441780a-2710-4169-91ee-a9f52a705bb3 //UUID",
"requestId": "2441780a-2710-4169-91ee-a9f52a705bb3 //UUID",
"callbackUrl": "<callback URL from VFC>",
"sourceId": "vfc",
"requestType": "create",
"numSolutions": 1,
"optimizers": [
"placement"
],
"timeout": 600
},
"placementInfo": {
"placementDemands": [
{
"resourceModuleName": "vBRG //<VNF name from CSAR>",
"serviceResourceId": "<vnfInstanceId used inside VFC>",
"resourceModelInfo": {
"modelInvariantId": "no-resourceModelInvariantId",
"modelVersionId": "no-resourceModelVersionId"
}
}
]
},
"serviceInfo":
{
"serviceInstanceId": "9fd24064-a335-478c-bbb0-3b71b7fbc55f",
"serviceName": "vcpe",
"modelInfo": {
"modelInvariantId": "31390ef2-94a9-4cef-a09a-08f7d66540c9 //Id get from CSAR",
"modelVersionId": "1a32426f-3616-47d0-96eb-b20cc7fff9be //Id get from CSAR"
}
}
} |
After OOF got the request from OOF, it will try giving out homing placements through the following steps:
- Retrieve the policies for that service/VNF
- Check AAI database for existing instances/available cloud regions.
- OOF do homing placement
- Return homing placement to VFC
Retrieve the policies for that service/VNF
OOF need to retrieve policies for that VNF/service. Sample Policy schema will look like this:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#
#Example 1: vCPE, Basic Capability and pciePassthrough
#one VNFC(VFC) with one basic capability requirement and two pciePassthrough 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": "vG",
"identity": "hpaPolicy_vG",
"policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"],
"policyType": "hpaPolicy",
"flavorFeatures": [
{
"id" : "<vdu.Name>",
"type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
"directives":[
{
"directive_name":"flavor_directive",
"attributes":[
{
"attribute_name":"<Blank, or use Default value String 'flavor_label'>",
"attribute_value": "<Blank>"
}
]
}
],
"flavorProperties": [
{
"hpa-feature": "basicCapabilities",
"mandatory": "True",
"architecture": "generic",
"hpa-feature-attributes": [
{ "hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": "" }
]
},
{
"hpa-feature": "basicCapabilities",
"mandatory": "True",
"architecture": "generic",
"hpa-feature-attributes": [
{ "hpa-attribute-key": "virtualMemSize", "hpa-attribute-value": "6", "operator": "=", "unit": "GB" },
]
},
{
"hpa-feature": "pciePassthrough",
"mandatory": "True",
"architecture": "generic",
"directives" : [
{
"directive_name": "pciePassthrough_directive",
"attributes": [
{ "attribute_name": "<Blank>",
"attribute_value": "<Blank>"
},
{ "attribute_name": "<Blank>",
"attribute_value": "<Blank>"
}
]
}
],
"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-feature": "pciePassthrough",
"mandatory": "True",
"architecture": "generic",
"directives" : [
{
"directive_name": "pciePassthrough_directive",
"attributes": [
{ "attribute_name": "<Blank>",
"attribute_value": "<Blank>"
}
{ "attribute_name": "<Blank>",
"attribute_value": "<Blank>"
}
]
}
],
"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": "" }
]
}
]
}
]
}
}
|
Check AAI database for existing instances/available cloud regions
The data in AAI still follows the routine schema designed in HPA Policies and Mappings. The only part has been changed is inside pciePassthrough. We added one 'directive' attributes to contain the 'vnic_type' and 'physicalNetwork' that needed by VF-C.
Here we just provide data for one sample flavor including the requirements for the previous example:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
hpa-capability-id="b369fd3d-0b15-44e1-81b2-6210efc6dff9",
hpa-feature= "basicCapabilities",
architecture= "generic",
version= "v1",
hpa-attribute-key hpa-attribute-value
numVirtualCpu {value:6}
virtualMemSize {value:6, unit:"MB"}
hpa-capability-id="f453fd3d-0b15-11w4-81b2-6210efc6dff9",
hpa-feature= "pciePassthrough",
architecture= "intel64",
version= "v1",
hpa-attribute-key hpa-attribute-value
pciCount {value: 1}
pciVendorId {value: "8086"}
pciDeviceId {value: "0443"}
directive {value: "[{"attribute_name"="vnic_type", "attribute_value"="direct"},
{"attribute_name"="physical_network", "attribute_value"="physnet1"}]"}
hpa-capability-id="f453fd3d-0b15-11w4-81b2-873hf8oo98s0",
hpa-feature= "pciePassthrough",
architecture= "intel64",
version= "v1",
hpa-attribute-key hpa-attribute-value
pciCount {value: 1}
pciVendorId {value: "6808"}
pciDeviceId {value: "3440"}
directive {value: "[{"attribute_name"="vnic_type", "attribute_value"="direct"},
{"attribute_name"="physical_network", "attribute_value"="physnet2"}]"}
|
Return homing placements to VF-C
After OOF gives out the most appropriate placement for that VNF/services, it will respond the solution back to VF-C with schema like this:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{
"requestId": "xxxx",
"transactionId": " xxxx ",
"statusMessage": " xxxx ",
"requestStatus": "completed",
"solutions": {
"placementSolutions": [
[
{ "resourceModuleName": " vG ",
"serviceResourceId": " xxxx ",
"solution": {
"identifierType": "serviceInstanceId",
"identifiers": [
" xxxx "
],
"cloudOwner": " xxxx "
},
"assignmentInfo": [
{ "key":"isRehome",
"value":"false" },
{ "key":"locationId",
"value":"DLLSTX1A" },
{ "key":"locationType",
"value":"openstack-cloud" },
{ "key":"vimId",
"value":"rackspace_DLLSTX1A" },
{ "key":"physicalLocationId",
"value":"DLLSTX1223" },
{ "key":"oofDirectives",
"value": { "directives":[
{ "id":"<vdu.name>",
"type":"vnfc",
"directives":[
{ "type":"flavor_directive",
"attributes":[
{ "attribute_name":"flavor_name", //just a string 'flavor_name'
"attribute_value":"<flavor_name>" #VIM Flavor, which oof seleted.
}
]
},
{ "type": "pciePassthrough_directive",
"attributes":[
{"attribute_name":"vnic_type", "attribute_value":"direct"},
{"attribute_name":"provider_network", "attribute_value":"physnet1"}
]
},
{ "type": "pciePassthrough_directive",
"attributes": [
{"attribute_name":"vnic_type", "attribute_value":"direct"},
{"attribute_name":"provider_network", "attribute_value":"physnet2"}
]
}
]
}
]
}
}
]
}
]
],
"licenseSoutions": [
{
"resourceModuleName": "string",
"serviceResourceId": "string",
"entitlementPoolUUID": [
"string"
],
"licenseKeyGroupUUID": [
"string"
],
"entitlementPoolInvariantUUID": [
"string"
],
"licenseKeyGroupInvariantUUID": [
"string"
]
}
]
}
} |
MultiCloud
HPA VF-C Casablanca Stories
...