def _terminate_connection_snapshot_locked(self, host, snapshot, connector): LOG.info('Terminate iscsi connection for snapshot %(id)s, ' 'connector info %(conn)s.', {'id': snapshot.id, 'conn': connector}) huawei_flow.terminate_iscsi_connection( snapshot, constants.SNAPSHOT_TYPE, connector, self.local_cli, self.configuration) LOG.info('Terminate iscsi connection successfully.')
def terminate_connection_snapshot(self, snapshot, connector, **kwargs): LOG.info( 'Terminate iscsi connection for snapshot %(id)s, ' 'connector info %(conn)s.', { 'id': snapshot.id, 'conn': connector }) huawei_flow.terminate_iscsi_connection(snapshot, constants.SNAPSHOT_TYPE, connector, self.local_cli) LOG.info('Terminate iscsi connection successfully.')
def terminate_connection(self, volume, connector, **kwargs): LOG.info( 'Terminate iscsi connection for volume %(id)s, ' 'connector info %(conn)s.', { 'id': volume.id, 'conn': connector }) metadata = huawei_utils.get_volume_private_data(volume) if metadata.get('hypermetro_id'): huawei_flow.terminate_remote_iscsi_connection( metadata['hypermetro_id'], connector, self.hypermetro_rmt_cli) huawei_flow.terminate_iscsi_connection(volume, constants.LUN_TYPE, connector, self.local_cli) LOG.info('Terminate iscsi connection successfully.')
def _terminate_connection_locked(self, host, volume, connector): LOG.info('Terminate iscsi connection for volume %(id)s, ' 'connector info %(conn)s.', {'id': volume.id, 'conn': connector}) if self._is_volume_multi_attach_to_same_host(volume, connector): return metadata = huawei_utils.get_volume_private_data(volume) if metadata.get('hypermetro'): hypermetro = huawei_utils.get_hypermetro(self.local_cli, volume) if hypermetro: huawei_flow.terminate_remote_iscsi_connection( hypermetro['ID'], connector, self.hypermetro_rmt_cli, self.configuration) huawei_flow.terminate_iscsi_connection( volume, constants.LUN_TYPE, connector, self.local_cli, self.configuration) LOG.info('Terminate iscsi connection successfully.')