Cinder/HuaweiSDSHypervisorDriver

Related blueprints
https://blueprints.launchpad.net/cinder/+spec/huawei-sdshypervisor-driver

https://blueprints.launchpad.net/nova/+spec/huawei-sdshypervisor-volume-driver

Related spec
https://review.openstack.org/#/c/101688/5

Overview
Huawei SDSHypervisor is a software defined storage product, is a software running in host, just focus on the data plane, the goal is to facilitate the reuse of customer's existing old and low-end devices. SDSHypervisor does not interact with the storage device in control plane, such as create volume, create snapshot, do not need third-party device manufacturers to develop any driver. Administrator just attaches Lun to the hypervisor node as hypervisor storage entity and hypervisor will provide virtual volume based user's QoS and patch advance feature to these Lun such as snapshot, link clone, cache, thin provision and so on.

For the middle-end and high-end device there is advanced features such as snapshots, thin provision, smart tier and so on, they will directly access to Cinder as before for better performance, and not access to hypervisor to loss their own performance.

The purpose of this blue print is to add Huawei SDSHypervisor Driver to Cinder.

Benefits of this driver
Currently there are many heterogeneous storage devices in user product environment which may not have driver in cinder and is low-level device without advance feature, e.g. snapshot, clone, cache, thin provision, QoS. So adding the SDShypervisor driver will bring the following advantages:
 * Better I/O performance using SDSHypervisor cache feature when there is SSD in host.
 * Facilitate the reuse of customer's existing old and low-end devices, patch advance feature to these device via SDSHypervisor, e.g. snapshot, clone, cache, thin provision, QoS
 * Help customer use Openstack build his cloud OS. For Cinder, we can’t allow driver to unlimited expand. For manufacturers, they may not want to spend more time to develop cinder driver for these obsolete and not be maintained devices. But in the customer's environment there are such devices which need to be accessed to openstack, in this situation customers can access these devices to hypervisor, indirect access to Cinder, use Openstack build his cloud OS.

Deployment



 * Attach Lun from heterogeneous SAN to host
 * Install SDShypervisor in these host, and config Lun which will be controlled
 * Config and run cinder volume using SDSHypervisor driver
 * Install other openstack service, and use QEMU/KVM as a hypervisor (via libvirt compute driver)

Cinder
Add new driver in /cinder/volume/drivers path that uses socket API interact with Huawei SDShypervisor storage., and realize cinder driver minimum features:
 * Volume Create/Delete
 * Volume Attach/Detach
 * Snapshot Create/Delete
 * Create Volume from Snapshot
 * Get Volume Stats
 * Copy Image to Volume
 * Copy Volume to Image
 * Clone Volume
 * Extend Volume

SDShypervisor data panel using private Key value protocal, so add a new connector in cinder/brick/initiator path to realize attach/detach volume, and realize abstract connector methods:
 * connect_volume
 * disconnect_volume

Nova
Also add a new volume driver in nova/virt/libvirt/volume.py file to realize attach/detach volume to qemu-kvm instance, and realize abstract volume dirver methods:
 * connect_volume
 * disconnect_volume