def __init__(self, source_helper, target_device): self._source_helper = source_helper connection_type = target_device.get('connection_type') if connection_type == storage.XIV_CONNECTION_TYPE_FC: self._target_helper = ( helper.DS8KReplicationTargetHelper(target_device)) elif connection_type == storage.XIV_CONNECTION_TYPE_FC_ECKD: self._target_helper = ( helper.DS8KReplicationTargetECKDHelper(target_device)) else: raise exception.InvalidParameterValue( err=(_("Param [connection_type] %s in replication_device " "is invalid.") % connection_type)) if self._target_helper.backend['lss_ids_for_cg']: if (len(self._target_helper.backend['lss_ids_for_cg']) != len( self._source_helper.backend['lss_ids_for_cg'])): raise exception.VolumeDriverException( message=_("Please reserve the same number of LSS for " "secondary DS8K just as the primary DS8K.")) else: self._target_helper.backend['lss_ids_for_cg'] = ( self._source_helper.backend['lss_ids_for_cg']) self._mm_manager = MetroMirrorManager(self._source_helper, self._target_helper)
def __init__(self, source_helper, target_device): self._source_helper = source_helper connection_type = target_device.get('connection_type') if connection_type == storage.XIV_CONNECTION_TYPE_FC: self._target_helper = ( helper.DS8KReplicationTargetHelper(target_device)) else: self._target_helper = ( helper.DS8KReplicationTargetECKDHelper(target_device)) self._mm_manager = MetroMirrorManager(self._source_helper, self._target_helper)
def __init__(self, source_helper, target_device): self._source_helper = source_helper connection_type = target_device.get('connection_type') if connection_type == storage.XIV_CONNECTION_TYPE_FC: self._target_helper = ( helper.DS8KReplicationTargetHelper(target_device)) elif connection_type == storage.XIV_CONNECTION_TYPE_FC_ECKD: self._target_helper = ( helper.DS8KReplicationTargetECKDHelper(target_device)) else: raise exception.InvalidParameterValue( err=(_("Param [connection_type] %s in replication_device " "is invalid.") % connection_type)) self._target_helper.backend['lss_ids_for_cg'] = ( self._source_helper.backend['lss_ids_for_cg']) self._mm_manager = MetroMirrorManager(self._source_helper, self._target_helper)