Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We plan to develop python language and GO language(in R6 support python language).


2. Design

2.1 Security(results too large)


we solve one flavor each time, the result maximin is 1500 bytes. We will verify the validity of the data

2.2 CRUD

Driver don't write AAI, plugin will write AAI. driver just format data.

Create
fill discover hpa content
transfer data, format data in the driver, and then return the data, call AAI.

Delete
driver don't write aai.

flavors = cloudregiondata.get("flavors", None)
for flavor in flavors.get("flavor", []) if flavors else []:
resource_url = delete_hpa_capabilities(flavor, cloud_owner, cloud_region_id)
# remove hpa-capability
retcode, content, status_code = \
restcall.req_to_aai(resource_url, "DELETE")

Update
update same as create, please see https://git.onap.org/multicloud/openstack/tree/share/common/msapi/helper.py L142

2.3 Consume

Q1 OOF understand new driver schema, OOF output?(cloud_region, flavor)
A1: OOF can parse the AAI data, the driver just need to follow AAI schema. OOF output is oof_directives which is defined in https://git.onap.org/multicloud/framework/tree/docs/specs/multicloud_infra_workload.rst

Q2: Consume more info.
networking, (create SRIOV-NIC, sriov physical network id, pci vendor id, pci device id)
common or driver code()

search check_vim_capacity

VIM capacity will store in driver. driver will get information from "Collectd". This will be completed in next release.

2.4 FCAPS

Driver with some issue: alarm(pool or other mode).
if driver have some issues, the hpa capabilities will be empty.

2.Driver code Management

For python language driver, we put it into multi-cloud openstack plugin.

...

We will put HPA discovery drivers as pip package to release pip REPO. name like onap-device-driver-<drivername>

4.1 Construct package:

$ python setup.py compilebuild


4.2 upload package

python


5. Usage

For python, run below command in openstack plugincreate docker image

$ python setup.py build

$ python setup.py install

6. Test

Unit Tests with tox, Integration test will use SRIOV-NIC as example.