1.Overview
To better support more HPA capabilities without modifying the implementation code for Multi-cloud. so we need to extract the HPA discovery part of the code make it into a drivermany drivers(HPA Discovery Driver). if we want to add new HPA feature or modify the implementation code for the currently feature, we just need to modify HPA Discovery Driver code.
Extract the original hpa HPA discovery part code and make it into a driver.
we need to add hook in openstackOpenstack, kubernetes Kubernetes and others plugin. then we develop driver for various languages.
We plan to develop python language and golang GO language(in R6 support python language).
2.Driver code Management
For python language driver, we put it into multi-cloud openstack plugin.
For golang language driver, we put it into multi-cloud kubernetes plugin.
3.Add New hardware
...
1.change the hpa discovery plugin
2.create new docker image based on the base image
example:
...
feature driver
- The hardware vendor determines whether to share the driver to community.
- If vendor share the driver to community, then submitted the driver code to multi-cloud repo, then we will put the driver to the docker image and release it.
- if vendor didn't share the driver to community, he/she can make new image base on the releasing docker image and upload to local docker image repo, then change the oom helm charts file to point this image repo.
# Dockerfile
from multi-windriver:1.4.0
add add hpa-discovery-driver1(device vendor1)
add add hpa-discovery-driver2(device vendor2)
AR:
The first question: the first use case, if you have one HPA discovery plugin, how can you build artifact and package.
$ python gerrit.com/**/setup.py compile and install # when docker build image time.
AR: add version control (branch name, commit id).
plugin → hpa-discovery-driver
starlingx (intel nic, )
4.Driver Version Control
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 compile
4.2 upload package
python
5. Usage
For python, run below command in openstack plugin
$ python setup.py
6. Test
Unit Tests with tox