Background
...
- NIC configuration refer to https://docs.openstack.org/neutron/pike/admin/config-sriov.html
An example of a site having three types of compute nodes. 1st set of compute nodes have two SRIOV NIC cards with vendor/device id as 1234, 5678 and vendor/device id as 2345 &6789. 2nd set of compute nodes have two SRIOV-NIC of same type 4321 & 8765. And third set of compute nodes don't have any SRIOV-NIC cards. And hence Openstack administrator at the site creates three flavors to reflect the hardware the site has. As you see in this example, it is expected that alias format is followed. Alias value supposed to be of the form "NIC-sriov-<vendor ID>-<device ID>-<Provider network>
$ openstack flavor create flavor1 --id auto --ram 512 --disk 40 --vcpus 4
$ openstack flavor set flavor1 --property pci_passthrough:alias=SRIOV-NIC_1234_5678_sriov-nic-intel-1234-5678-physnet1:1
$ openstack flavor set flavor1 --property pci_passthrough:alias=SRIOV-NIC_2345_6789_sriov-nic-intel-2345-6789-physnet2:1
Flavor2:
$ openstack flavor create flavor2 --id auto --ram 512 --disk 40 --vcpus 4$ openstack flavor set flavor2 --property pci_passthrough:alias=SRIOV-NIC_4321_8765sriov-nic-intel-4321-8765-physnet3:2
Flavor3
$ openstack flavor create flavor3 --id auto --ram 512 --disk 40 --vcpus 4
...
Hpa-attribute-key | Hpa-attribute-value |
pciVendorId | 1234 |
pciDeviceId | 5678 |
pciCount | 1 |
vnicTypedirective | direct |
providerNetwork | physnet1 |
...
[ {"attribute_name": "vnic-type", "attribute_value": "direct"}, {"attribute_name": "physical-network", "attribute_value": "physnet1"}, ] |
hpa-feature=”pciePassthrough”,
architecture=”{hw_arch}",
...
Hpa-attribute-key | Hpa-attribute-value |
pciVendorId | 2345 |
pciDeviceId | 6789 |
pciCount | 1 |
directive | |
vnicType | direct |
providerNetwork | physnet2[ {"attribute_name": "vnic-type", "attribute_value": "direct"}, {"attribute_name": "physical-network", "attribute_value": "physnet2"}, ] |
1.3 SO call OOF
SO will get pciVendorId, pciDeviceId and interfaceType from CSAR file, then call to OOF. OOF will response homing information to SO, SO don't interpret it and pass through it to Multi-cloud.
...
If interfaceType is SRIOV-NIC, then OOF returns 'vnic-type' as 'direct', If interfaceType is not SRIOV-NIC, OOF return 'vnic-type' as 'normal'.
1.6 Policy Data
"flavorLabel": "flavor_label_1",
"sriovNICLabel": "oof_returned_vnic_type_1
"flavorProperties":[
{
"hpa-feature" : "pciePassthrough",
"mandatory" : "True",
"architecture": "generic",
"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":"cardType "hpa-attribute-value": "sriov-nic","operator": "=", "unit": ""},
{"hpa-attribute-key":"providerNetwork "hpa-attribute-value": "physnet1","operator": "=", "unit": ""},
]
},
{
"hpa-feature" : "pciePassthrough",
...