private bool RunProbe(Host master, FibreChannelDescriptor srDescriptor, out List <SR.SRInfo> srs) { srs = new List <SR.SRInfo>(); var action = new SrProbeAction(Connection, master, srDescriptor.SrType, srDescriptor.DeviceConfig); using (var dlg = new ActionProgressDialog(action, ProgressBarStyle.Marquee)) dlg.ShowDialog(this); if (action.Succeeded) { try { srs = action.ProbeExtResult != null?SR.ParseSRList(action.ProbeExtResult) : SR.ParseSRListXML(action.Result); return(true); } catch (Exception) { return(false); } } //CA-335356 special treatment of case where gfs2 cannot see the same devices as lvmohba if (srDescriptor.SrType == SR.SRTypes.gfs2 && action.Exception is Failure f && f.ErrorDescription.Count > 1 && f.ErrorDescription[0].StartsWith("SR_BACKEND_FAILURE") && f.ErrorDescription[1] == "DeviceNotFoundException") { return(true); } return(false); }
private UserSelectedOption GetSelectedOption(FibreChannelDescriptor descriptor, int remainingCount, bool foundExistingSr, SR.SRTypes existingSrType, out bool repeatForRemainingLUNs) { using (var dialog = new LVMoHBAWarningDialog(descriptor.Device, remainingCount, foundExistingSr, existingSrType, requestedSrType)) { dialog.ShowDialog(owner); repeatForRemainingLUNs = dialog.RepeatForRemainingLUNs; return(dialog.SelectedOption); } }
private bool RunProbe(Host master, FibreChannelDescriptor srDescriptor, out List <SR.SRInfo> srs) { var action = new SrProbeAction(Connection, master, srDescriptor.SrType, srDescriptor.DeviceConfig); using (var dlg = new ActionProgressDialog(action, ProgressBarStyle.Marquee)) dlg.ShowDialog(this); srs = action.SRs ?? new List <SR.SRInfo>(); return(action.Succeeded); }
private UserSelectedOption GetSelectedOption(FibreChannelDescriptor descriptor, out bool repeatForRemainingLUNs) { int remainingCount = inputSrDescriptors.Count - 1 - inputSrDescriptors.IndexOf(descriptor); using (var dialog = new LVMoHBAWarningDialog(descriptor.Device, remainingCount, foundExistingSRs, descriptor.SrType, requestedSrType)) { dialog.ShowDialog(owner); repeatForRemainingLUNs = dialog.RepeatForRemainingLUNs; return(dialog.SelectedOption); } }
private LVMoHBAWarningDialog.UserSelectedOption GetSelectedOption(FibreChannelDescriptor descriptor, int remainingCount, bool foundExistingSr, SR.SRTypes existingSrType, out bool repeatForRemainingLUNs) { var deviceDetails = string.Format(Messages.LVMOHBA_WARNING_DIALOG_LUN_DETAILS, descriptor.Device.Vendor, descriptor.Device.Serial, string.IsNullOrEmpty(descriptor.Device.SCSIid) ? descriptor.Device.Path : descriptor.Device.SCSIid, Util.DiskSizeString(descriptor.Device.Size)); using (var dialog = new LVMoHBAWarningDialog(_connection, deviceDetails, remainingCount, foundExistingSr, existingSrType, requestedSrType)) { dialog.ShowDialog(owner); repeatForRemainingLUNs = dialog.RepeatForRemainingLUNs; return(dialog.SelectedOption); } }
private void ProcessSelectedOption(UserSelectedOption selectedOption, FibreChannelDescriptor descriptor) { switch (selectedOption) { case UserSelectedOption.Format: descriptor.UUID = null; SrDescriptors.Add(descriptor); // descriptor of requested SR break; case UserSelectedOption.Reattach: SrDescriptors.Add(inputSrDescriptors[descriptor]); // value = descriptor of existing SR break; case UserSelectedOption.Cancel: SrDescriptors.Clear(); Cancelled = true; return; } }
private bool RunProbe(Host master, FibreChannelDescriptor srDescriptor, out List <SR.SRInfo> srs) { srs = null; var action = new SrProbeAction(Connection, master, srDescriptor.SrType, srDescriptor.DeviceConfig); using (var dlg = new ActionProgressDialog(action, ProgressBarStyle.Marquee)) dlg.ShowDialog(this); if (action.Succeeded) { try { srs = action.ProbeExtResult != null?SR.ParseSRList(action.ProbeExtResult) : SR.ParseSRListXML(action.Result); return(true); } catch (Exception) { return(false); } } return(false); }