]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix RestURL to storage backend in Huawei driver
authorliuxinguo <liuxinguo@huawei.com>
Thu, 6 Aug 2015 06:48:32 +0000 (14:48 +0800)
committerliuxinguo <liuxinguo@huawei.com>
Thu, 6 Aug 2015 06:48:32 +0000 (14:48 +0800)
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

cinder/volume/drivers/huawei/rest_client.py

index 578d160a2f0c18f77d654be4221871bfbb8a29bb..a7e56017364e19d4d90c025c2e50131696a0e86d 100644 (file)
@@ -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 '