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:
Mihaela Stoica 2016-05-11 13:53:45 +01:00 committed by Gabor Apati-Nagy
parent 6249663ae2
commit 304b2c9fab
4 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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)

View File

@ -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);