This patch is not a plugin implementation
Cyborg agent can call driver as follow:
from cyborg.accelerator.drivers.fpga import base
fdriver = base.FPGADriver
# There maybe more than one vendor fpga card on a host.
venders = fdriver.discover_vendors()
for v in venders:
dr = fdriver.create(v)
dr.discover()
intel = base.FPGADriver.create("intel")
intel.program("/fpga/device/path", "/local/path/image")
When call IntelFPGADriver.discover(), we can get the result as follow:
[{'assignable': False,
'devices': '0000:5e:00.0',
'function': 'pf',
'parent_devices': '',
'path': '/sys/class/fpga/intel-fpga-dev.0',
'pr_num': '1',
'product_id': '0xbcc0',
'regions': [{'assignable': True,
'devices': '0000:5e:00.1',
'function': 'vf',
'parent_devices': '0000:5e:00.0',
'path': '/sys/class/fpga/intel-fpga-dev.2',
'product_id': '0xbcc1',
'vendor_id': '0x8086'}],
'vendor_id': '0x8086'},
{'assignable': True,
'devices': '0000:be:00.0',
'function': 'pf',
'parent_devices': '',
'path': '/sys/class/fpga/intel-fpga-dev.1',
'pr_num': '0',
'product_id': '0xbcc0',
'vendor_id': '0x8086'}]
Cyborg agent can use it to form it's DB.
Co-Authored-By: Dolpher Du <Dolpher.Du@intel.com>
Change-Id: I132be5ecdb90b385b68b0cdf306d1402ef4bfc04