From b9747f62b05cd81c09c732f85f20fe0da6820d3a Mon Sep 17 00:00:00 2001 From: liuxinguo Date: Thu, 6 Aug 2015 14:48:32 +0800 Subject: [PATCH] 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 --- cinder/volume/drivers/huawei/rest_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ' -- 2.45.2