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 many 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 discovery part code and make it into a driver.
we need to add hook in Openstack, Kubernetes and others plugin. then we develop driver for various languages.
We plan to develop python language and 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 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 hpa-discovery-driver1(device vendor1)
add hpa-discovery-driver2(device vendor2)
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