]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Huawei: fix multi REST-URLs bug
authorzhaohua <zhaohua.zhao@huawei.com>
Wed, 19 Aug 2015 07:57:48 +0000 (15:57 +0800)
committerzhaohua <zhaohua.zhao@huawei.com>
Thu, 10 Sep 2015 11:22:02 +0000 (19:22 +0800)
commit6e827667ef732ed48e78fcc8cb867067169ea6f9
treecbfe6a719d329972d85fa863eacea8e5f479407d
parent31ff5b05879fcec5124291816077660aa46f30f5
Huawei: fix multi REST-URLs bug

Huawei driver now supports multi REST-URLs, which means users can
write more than one REST-URLs in the config file(seperated by ";")
and driver can choose the usable one to set up a connection(see
function "login" in rest_client.py of Huawei driver).

But if the chosen REST-URL has some failures, Huawei driver can
not change to another REST-URL automatically.

To resolve this, rewrite the "call" function in rest_client.py of
Huawei driver. If REST command failed to send, driver will do a
"login" process to set up another connection, and send the failed
command to a new REST-URL again.

And change REST command timeout to 52s, change login timeout to 4s,
to avoid long time waiting for failure.

Change-Id: I50701b19896941db2a57984bd26a06ab7d2a7b4b
Closes-Bug: #1486326
cinder/tests/unit/test_huawei_drivers.py
cinder/volume/drivers/huawei/constants.py
cinder/volume/drivers/huawei/rest_client.py