From: liuxinguo Date: Thu, 6 Aug 2015 06:48:32 +0000 (+0800) Subject: Fix RestURL to storage backend in Huawei driver X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b9747f62b05cd81c09c732f85f20fe0da6820d3a;p=openstack-build%2Fcinder-build.git Fix RestURL to storage backend in Huawei driver One RestURL "/mappingview/associate/portgroup" is not standard although it can work most time. This should be changed to "/portgroup/associate". Change-Id: I53705e1994dcac3ae381dbb12a28b2eda1097089 Closed-Bug: #1482076 --- diff --git a/cinder/volume/drivers/huawei/rest_client.py b/cinder/volume/drivers/huawei/rest_client.py index 578d160a2..a7e560173 100644 --- a/cinder/volume/drivers/huawei/rest_client.py +++ b/cinder/volume/drivers/huawei/rest_client.py @@ -875,9 +875,9 @@ class RestClient(object): return lunnum def is_portgroup_associated_to_view(self, view_id, portgroup_id): - """Check whether the portgroup is associated to the mapping view.""" - url_subfix = ("/mappingview/associate/portgroup?TYPE=257&" - "ASSOCIATEOBJTYPE=245&ASSOCIATEOBJID=%s" % view_id) + """Check whether the port group is associated to the mapping view.""" + url_subfix = ("/portgroup/associate?ASSOCIATEOBJTYPE=245&" + "ASSOCIATEOBJID=%s&range=[0-8191]" % view_id) url = self.url + url_subfix result = self.call(url, None, "GET") self._assert_rest_result(result, _('Find portgroup from mapping view '