Hi Yongli,
In today's IRC meeting, we discussed this a little bit. I think the answer
probably lies in the definition of the PCI request. In the current
implementation of _translate_alias_to_requests(), a new property (assume it's
called requestor_id) maybe added to the PCI request. And this is how it works:
-- add a requestor_id to the request spec, and return it to the
caller
-- when a device is allocated, a mapping requester_id to the pci
device can be established
-- the requestor later can retrieve the device by calling something
like get_pci_device(requestor_id)
The requestor id could be a UUID that is generated by the python uuid module.
In the neutron SRIOV case, we need to create a PCI request per nic (or per
requested_network). Therefore, the generic PCI may provide an API so that we
can do so. Such API may look like:
create_pci_request(count, request_spec), The request_spec is key
value pairs. It returns a requestor_id.
Also if PCI flavor API is available later, I guess we can have an API like:
create_pci_request_from_pci_flavor(count, pci_flavor). It returns
a requestor_id as well.
Let me know what you think.
thanks,
Robert
_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev