mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CP-17098: Integrate gfs2 in New SR wizard for HBA and FCOE SRs
Changes following code review Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
6249663ae2
commit
304b2c9fab
@ -212,7 +212,7 @@ namespace XenAdmin.Wizards
|
||||
lvmOhbaSrDescriptor.Description = description;
|
||||
|
||||
m_srWizardType.SrDescriptors.Add(lvmOhbaSrDescriptor);
|
||||
m_srWizardType.IsGfs2 = lvmOhbaSrDescriptor is Gfs2SrDescriptor;
|
||||
m_srWizardType.IsGfs2 = lvmOhbaSrDescriptor is Gfs2HbaSrDescriptor;
|
||||
names.Add(name);
|
||||
name = SrWizardHelpers.DefaultSRName(m_srWizardType is SrWizardType_Hba
|
||||
? Messages.NEWSR_HBA_DEFAULT_NAME
|
||||
|
@ -48,14 +48,14 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
|
||||
public override string HelpID { get { return "Location_FCOE"; } }
|
||||
|
||||
public virtual LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
|
||||
public override LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
|
||||
{
|
||||
if (SrType == SR.SRTypes.gfs2)
|
||||
return new Gfs2SrDescriptor(device);
|
||||
return new Gfs2HbaSrDescriptor(device);
|
||||
return new FcoeSrDescriptor(device);
|
||||
}
|
||||
|
||||
public virtual LvmOhbaSrDescriptor CreateLvmSrDescriptor(FibreChannelDevice device)
|
||||
public override LvmOhbaSrDescriptor CreateLvmSrDescriptor(FibreChannelDevice device)
|
||||
{
|
||||
return new FcoeSrDescriptor(device);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
|
||||
public virtual LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
|
||||
{
|
||||
return SrType == SR.SRTypes.gfs2 ? new Gfs2SrDescriptor(device) : new LvmOhbaSrDescriptor(device, Connection);
|
||||
return SrType == SR.SRTypes.gfs2 ? new Gfs2HbaSrDescriptor(device) : new LvmOhbaSrDescriptor(device, Connection);
|
||||
}
|
||||
|
||||
public virtual LvmOhbaSrDescriptor CreateLvmSrDescriptor(FibreChannelDevice device)
|
||||
|
@ -84,11 +84,11 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
|
||||
}
|
||||
}
|
||||
|
||||
public class Gfs2SrDescriptor : LvmOhbaSrDescriptor
|
||||
public class Gfs2HbaSrDescriptor : LvmOhbaSrDescriptor
|
||||
{
|
||||
private const string URIFORMAT = "file:///dev/disk/by-id/scsi-{0}"; // uri=file:///dev/disk/by-id/scsi-<SCSIID>
|
||||
|
||||
public Gfs2SrDescriptor(FibreChannelDevice device)
|
||||
public Gfs2HbaSrDescriptor(FibreChannelDevice device)
|
||||
: base(device)
|
||||
{
|
||||
DeviceConfig[SrProbeAction.URI] = string.Format(URIFORMAT, device.SCSIid);
|
||||
|
Loading…
Reference in New Issue
Block a user