cyborg/cyborg/tests/unit/accelerator/drivers/spdk
heluwei 488cc340ef Add Cyborg SPDK Driver
SPDKDRIVER is a virtual interface which provides common methods
for specific drivers (such as: VHOSTDRIVER, NVMFDRIVER, etc.).
For this reason, the Cyborg agent should invoke these drivers
via py-spdk[0] to communicate with the backend SPDK-base app server.
The py-spdk is management lib for SPDK applications which need to
be imported into the cyborg, so we put the pyspdk lib into cyborg/
cyborg/accelerator/drivers/spdk/util/. There are some unit tests
we added in cyborg/cyborg/tests/unit/accelerator/drivers/spdk/.
Now We are first implementing the unit tests of
test_discover_accelerator() and test_accelerator_list(),
and the rest will be added later.

For example:
When the Cyborg agent call the NVMFDRIVER.discover_accelerator(),
the return value we get is:
{
    'server': 'nvmf_tgt',
    'bdevs': [{
       "num_blocks": 131072,
       "name": "nvme1",
       "block_size": 512,
       ......
     }]
    'subsystems': [{
       "core": 0,
       "nqn": "nqn.2018-01.org.nvmexpress.discovery",
       "hosts": [],
       ......
     }]
}

[0] The implementation of py-spdk is subbmitted to
https://review.gerrithub.io/#/c/379741/, please visit it.

Change-Id: I2d0e4dc6b58e725584d22ee85961877a870c68a7
2018-02-05 00:57:30 +08:00
..
nvmf Add Cyborg SPDK Driver 2018-02-05 00:57:30 +08:00
vhost Add Cyborg SPDK Driver 2018-02-05 00:57:30 +08:00
__init__.py Add Cyborg SPDK Driver 2018-02-05 00:57:30 +08:00