示例#1
0
    def _check_migration_valid(self, host, volume):
        if "pool_name" not in host["capabilities"]:
            return False

        target_device = host["capabilities"]["location_info"]

        # Source and destination should be on same array.
        if target_device != self.restclient.device_id:
            return False

        # Same protocol should be used if volume is in-use.
        protocol = huawei_utils.get_protocol(self.xml_file_path)
        if host["capabilities"]["storage_protocol"] != protocol and self._get_original_status(volume) == "in-use":
            return False

        pool_name = host["capabilities"]["pool_name"]
        if len(pool_name) == 0:
            return False

        return True
示例#2
0
    def _check_migration_valid(self, host, volume):
        if 'pool_name' not in host['capabilities']:
            return False

        target_device = host['capabilities']['location_info']

        # Source and destination should be on same array.
        if target_device != self.restclient.device_id:
            return False

        # Same protocol should be used if volume is in-use.
        protocol = huawei_utils.get_protocol(self.xml_file_path)
        if (host['capabilities']['storage_protocol'] != protocol
                and self._get_original_status(volume) == 'in-use'):
            return False

        pool_name = host['capabilities']['pool_name']
        if len(pool_name) == 0:
            return False

        return True
示例#3
0
    def _check_migration_valid(self, host, volume):
        if 'pool_name' not in host['capabilities']:
            return False

        target_device = host['capabilities']['location_info']

        # Source and destination should be on same array.
        if target_device != self.restclient.device_id:
            return False

        # Same protocol should be used if volume is in-use.
        protocol = huawei_utils.get_protocol(self.xml_file_path)
        if (host['capabilities']['storage_protocol'] != protocol
                and self._get_original_status(volume) == 'in-use'):
            return False

        pool_name = host['capabilities']['pool_name']
        if len(pool_name) == 0:
            return False

        return True