def _generate_volume_response(self, res): return Volume(vol_size_bytes=int(res.cap), vol_id=self._generate_volume_scsi_identifier(res.id), vol_name=res.name, array_address=self.service_address, pool_name=res.pool, array_type=self.array_type)
def _generate_volume_response(self, cli_volume): return Volume( int(cli_volume.capacity), cli_volume.vdisk_UID, cli_volume.name, self.endpoint, cli_volume.mdisk_grp_name, self.array_type)
def _generate_volume_response(self, cli_volume): # vol_copy_type and copy_master_wwn were added in a9k. In xiv they didn't exist is_copy = hasattr( cli_volume, "vol_copy_type") and cli_volume.vol_copy_type == "Copy" copy_src_object_wwn = cli_volume.copy_master_wwn if is_copy else None return Volume(self._convert_size_blocks_to_bytes(cli_volume.capacity), cli_volume.wwn, cli_volume.name, self.endpoint, cli_volume.pool_name, copy_src_object_wwn, self.array_type)
def _generate_volume_response(self, api_volume): source_volume_id = get_source_volume_id_if_exists(api_volume) return Volume(vol_size_bytes=int(api_volume.cap), vol_id=self._generate_volume_scsi_identifier( api_volume.id), vol_name=api_volume.name, array_address=self.service_address, copy_src_object_id=source_volume_id, pool_name=api_volume.pool, array_type=self.array_type)
def _generate_volume_response(self, api_volume): return Volume( vol_size_bytes=int(api_volume.cap), vol_id=self._generate_volume_scsi_identifier( volume_id=api_volume.id), vol_name=api_volume.name, array_address=self.service_address, copy_source_id=self._get_copy_source_id(api_volume=api_volume), pool=api_volume.pool, array_type=self.array_type)
def _generate_volume_response(self, api_volume): space_efficiency = _get_parameter_space_efficiency(api_volume.tp) return Volume( capacity_bytes=int(api_volume.cap), id=self._generate_volume_scsi_identifier(volume_id=api_volume.id), internal_id=api_volume.id, name=api_volume.name, array_address=self.service_address, copy_source_id=self._get_copy_source_id(api_volume=api_volume), pool=api_volume.pool, array_type=self.array_type, space_efficiency=space_efficiency, default_space_efficiency=config.SPACE_EFFICIENCY_NONE )
def _generate_volume_response(self, cli_volume): source_volume_wwn = self._get_source_volume_wwn_if_exists(cli_volume) return Volume(int(cli_volume.capacity), cli_volume.vdisk_UID, cli_volume.name, self.endpoint, cli_volume.mdisk_grp_name, source_volume_wwn, self.array_type)
def _generate_volume_response(self, cli_volume): return Volume( self._convert_size_blocks_to_bytes(int(cli_volume.capacity)), cli_volume.wwn, cli_volume.name, self.endpoint, cli_volume.pool_name, self.array_type)