]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Delete unuseful code in Huawei driver
authorhuyang <huyang1@huawei.com>
Tue, 16 Feb 2016 01:04:19 +0000 (09:04 +0800)
committerhuyang <huyang1@huawei.com>
Tue, 16 Feb 2016 01:04:19 +0000 (09:04 +0800)
In Huawei driver, "get_remote_device_info" is
unused. So delete it.

Change-Id: Ia13405d1b62f022a8410e10bc07455d02085d3d0
Closes-Bug: #1545894

cinder/volume/drivers/huawei/huawei_utils.py

index 1c403ee9a8c848544a66cf3a4bc06b9e8cb3cbcb..7d8de632501db4694a090198155509f4946ba8dc 100644 (file)
@@ -14,7 +14,6 @@
 #    under the License.
 
 import base64
-import json
 import six
 import time
 import uuid
@@ -81,24 +80,6 @@ def get_volume_size(volume):
     return volume_size
 
 
-def get_remote_device_info(valid_hypermetro_devices):
-    remote_device_info = {}
-    try:
-        if valid_hypermetro_devices:
-            remote_device_info = json.loads(valid_hypermetro_devices)
-        else:
-            return
-
-    except ValueError as err:
-        msg = _("Get remote device info error. %s.") % err
-        LOG.error(msg)
-        raise exception.VolumeBackendAPIException(data=msg)
-
-    if len(remote_device_info) == 1:
-        for device_key, device_value in remote_device_info.items():
-            return remote_device_info.get(device_key)
-
-
 def get_volume_metadata(volume):
     if type(volume) is objects.Volume:
         return volume.metadata