]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Refactor Huawei Volume driver
authorchenzongliang <chenzongliang@huawei.com>
Thu, 4 Jun 2015 02:43:07 +0000 (10:43 +0800)
committerLiu Xinguo <295988511@qq.com>
Sat, 18 Jul 2015 08:49:05 +0000 (16:49 +0800)
commitc9bb99b52f2805acd86d56d156eec62690b9ff48
treeaa653197cef3510f0316a170e9373fceed4ac9ec
parenta5c988f93eda5581899ad67c514ed1cb5666ac27
Refactor Huawei Volume driver

This patch attempts to refactor Huawei volume driver in liberty.
We add a base driver to implement the basic functions.
The sub-class will inherit from the base driver according to different
storages.

The following changes were made in this refactor:
1. Abstract a base class named HuaweiBaseDriver to make Huawei driver more
universal. You can find it in the huawei_driver.py.
2. Put all static variables into the constants.py.
3. Rename rest_common.py to rest_client.py. rest_client.py stores the
relevant methods implemented for Huawei driver.
4. Migrate some public methods from rest_client.py to huawei_utils.py,
such as parse_xml_file(), _get_volume_type() and so on.
5. This refactor only involves structural adjustment and does not involve
functional changes.

Change-Id: I768889e2577a4d975397218eb31e89b42e08e04f
Implements: blueprint refactor-huawei-volume-driver
12 files changed:
cinder/tests/unit/test_huawei_18000.py [deleted file]
cinder/tests/unit/test_huawei_drivers.py [new file with mode: 0644]
cinder/tests/unit/test_huawei_drivers_compatibility.py
cinder/volume/drivers/huawei/__init__.py
cinder/volume/drivers/huawei/constants.py [new file with mode: 0644]
cinder/volume/drivers/huawei/huawei_18000.py [deleted file]
cinder/volume/drivers/huawei/huawei_driver.py [new file with mode: 0644]
cinder/volume/drivers/huawei/huawei_utils.py
cinder/volume/drivers/huawei/rest_client.py [new file with mode: 0644]
cinder/volume/drivers/huawei/rest_common.py [deleted file]
cinder/volume/manager.py
tox.ini