private bool CanShowLVMoHBASummaryPage(List <FibreChannelDescriptor> SrDescriptors) { string description = m_srWizardType.Description; string name = m_srWizardType.SrName; List <string> names = xenConnection.Cache.SRs.Select(sr => sr.Name()).ToList(); m_srWizardType.SrDescriptors.Clear(); foreach (var descriptor in SrDescriptors) { descriptor.Name = name; if (!string.IsNullOrEmpty(description)) { descriptor.Description = description; } m_srWizardType.SrDescriptors.Add(descriptor); m_srWizardType.IsGfs2 = descriptor is Gfs2HbaSrDescriptor || descriptor is Gfs2FcoeSrDescriptor; names.Add(name); name = SrWizardHelpers.DefaultSRName(m_srWizardType is SrWizardType_Hba ? Messages.NEWSR_HBA_DEFAULT_NAME : Messages.NEWSR_FCOE_DEFAULT_NAME, names); } xenTabPageLvmoHbaSummary.SuccessfullyCreatedSRs.Clear(); xenTabPageLvmoHbaSummary.FailedToCreateSRs.Clear(); bool closeWizard; RunFinalAction(out closeWizard); return(closeWizard); }
private bool CanShowLVMoMirrorSummaryPage() { string description = m_srWizardType.Description; string name = m_srWizardType.SrName; List <string> names = xenConnection.Cache.SRs.Select(sr => sr.Name).ToList(); m_srWizardType.SrDescriptors.Clear(); foreach (var lvmOmirrorSrDescriptor in xenTabPageLVMoMirrorChooseLog.SrDescriptors) { lvmOmirrorSrDescriptor.Name = name; if (!string.IsNullOrEmpty(description)) { lvmOmirrorSrDescriptor.Description = description; } m_srWizardType.SrDescriptors.Add(lvmOmirrorSrDescriptor); names.Add(name); name = SrWizardHelpers.DefaultSRName(Messages.NEWSR_LVMoMirror_DEFAULT_NAME, names); } xenTabPageLvmoMirrorSummary.SuccessfullyCreatedSRs.Clear(); xenTabPageLvmoMirrorSummary.FailedToCreateSRs.Clear(); bool closeWizard; RunFinalAction(out closeWizard); return(closeWizard); }