protected override IscsiChoicesDialog NewDialog()
        {
            var dev = new FibreChannelDevice(
                "1234-5678-9012-3456", "path", "vendor", 200000000000, null, "adapter", "1", "ID", "lun");

            return(new IscsiChoicesDialog(GetAnyConnection(), dev));
        }
Beispiel #2
0
            public FCDeviceRow(FibreChannelDevice device, bool showNicColumn)
            {
                Device = device;

                string id      = string.IsNullOrEmpty(device.SCSIid) ? device.Path : device.SCSIid;
                string details = String.Format("{0}:{1}:{2}:{3}", device.adapter, device.channel, device.id, device.lun);

                Cells.AddRange(new DataGridViewCheckBoxCell {
                    ThreeState = false, Value = false
                },
                               new DataGridViewTextBoxCell {
                    Value = Util.DiskSizeString(device.Size)
                },
                               new DataGridViewTextBoxCell {
                    Value = device.Serial
                },
                               new DataGridViewTextBoxCell {
                    Value = id
                },
                               new DataGridViewTextBoxCell {
                    Value = details
                });

                if (showNicColumn)
                {
                    Cells.Add(new DataGridViewTextBoxCell {
                        Value = device.eth
                    });
                }
            }
        public IscsiChoicesDialog(IXenConnection connection, FibreChannelDevice dev)
            : base(connection)
        {
            InitializeComponent();

            this.labelSRinfo.Text = String.Format(Messages.ISCSI_DIALOG_SR_DETAILS_FOR_FIBRECHANNEL,
                                                  dev.Vendor, dev.Serial, string.IsNullOrEmpty(dev.SCSIid) ? dev.Path : dev.SCSIid, Util.DiskSizeString(dev.Size));
        }
Beispiel #4
0
        public FcoeSrDescriptor(FibreChannelDevice device)
            : base(device)
        {
            DeviceConfig[SrProbeAction.SCSIid] = device.SCSIid;
            DeviceConfig[SrProbeAction.PATH] = device.Path;

            Description = string.Format(Messages.NEWSR_LVMOFCOE_DESCRIPTION, device.Vendor, device.Serial);
        }
Beispiel #5
0
        public IscsiChoicesDialog(IXenConnection connection, FibreChannelDevice dev)
            : base(connection)
        {
            InitializeComponent();

            this.labelSRinfo.Text = String.Format(Messages.ISCSI_DIALOG_SR_DETAILS_FOR_FIBRECHANNEL,
                dev.Vendor, dev.Serial, string.IsNullOrEmpty(dev.SCSIid) ? dev.Path : dev.SCSIid, Util.DiskSizeString(dev.Size));
        }
 public LVMoHBAWarningDialog(FibreChannelDevice currentDevice, int remainingDevicesCount,
                             bool foundExistingSR)
 {
     InitializeComponent();
     this.currentDevice         = currentDevice;
     this.remainingDevicesCount = remainingDevicesCount;
     this.foundExistingSR       = foundExistingSR;
     PopulateControls();
     ActiveControl = buttonCancel;
 }
Beispiel #7
0
 public LVMoHBAWarningDialog(FibreChannelDevice currentDevice, int remainingDevicesCount,
     bool foundExistingSR)
 {
     InitializeComponent();
     this.currentDevice = currentDevice;
     this.remainingDevicesCount = remainingDevicesCount;
     this.foundExistingSR = foundExistingSR;
     PopulateControls();
     ActiveControl = buttonCancel;
 }
 public LVMoHBAWarningDialog(FibreChannelDevice currentDevice, int remainingDevicesCount,
                             bool foundExistingSR, SR.SRTypes existingSrType, SR.SRTypes requestedSrType)
 {
     InitializeComponent();
     this.currentDevice         = currentDevice;
     this.remainingDevicesCount = remainingDevicesCount;
     this.foundExistingSR       = foundExistingSR;
     this.existingSrType        = existingSrType;
     this.requestedSrType       = requestedSrType;
     PopulateControls();
     ActiveControl = buttonCancel;
 }
Beispiel #9
0
        private Dictionary <String, String> GetFCDeviceConfig(FibreChannelDevice device)
        {
            if (device == null)
            {
                return(null);
            }

            var dconf = new Dictionary <string, string>();

            dconf[SrProbeAction.SCSIid] = device.SCSIid;

            return(dconf);
        }
Beispiel #10
0
        public LvmOhbaSrDescriptor(FibreChannelDevice device, IXenConnection connection)
        {
            Host master = Helpers.GetMaster(connection);
            Device = device;

            // CA-19025: Change XenCenter SR.create for LVMoHBA to use the
            // updated SCSIid parameter rather than the device path
            if (master != null && (Helpers.HostBuildNumber(master) >= 9633
                                   || Helpers.HostBuildNumber(master) == Helpers.CUSTOM_BUILD_NUMBER))
            {
                DeviceConfig[SrProbeAction.SCSIid] = device.SCSIid;
            }
            else
            {
                DeviceConfig[SrProbeAction.DEVICE] = device.Path;
            }

            Description = string.Format(Messages.NEWSR_LVMOHBA_DESCRIPTION, device.Vendor, device.Serial);
        }
        private Dictionary <String, String> GetFCDeviceConfig(FibreChannelDevice device)
        {
            if (device == null)
            {
                return(null);
            }

            Dictionary <String, String> dconf = new Dictionary <String, String>();

            Host master = Helpers.GetMaster(Connection);

            if (master != null && (Helpers.HostBuildNumber(master) >= 9633 ||
                                   Helpers.HostBuildNumber(master) == Helpers.CUSTOM_BUILD_NUMBER))
            {
                dconf[SrProbeAction.SCSIid] = device.SCSIid;
            }
            else
            {
                dconf[SrProbeAction.DEVICE] = device.Path;
            }

            return(dconf);
        }
Beispiel #12
0
 public virtual LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return(new LvmOhbaSrDescriptor(device, Connection));
 }
Beispiel #13
0
 protected override FibreChannelDescriptor CreateGfs2Descriptor(FibreChannelDevice device)
 {
     return(new Gfs2FcoeSrDescriptor(device));
 }
Beispiel #14
0
 public override LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return(SrType == SR.SRTypes.gfs2 ? new Gfs2FcoeSrDescriptor(device) : new FcoeSrDescriptor(device));
 }
Beispiel #15
0
        public LvmOhbaSrDescriptor(FibreChannelDevice device)
        {
            Device = device;

            Description = string.Format(Messages.NEWSR_LVMOHBA_DESCRIPTION, device.Vendor, device.Serial);
        }
Beispiel #16
0
            public FCDeviceRow(FibreChannelDevice device, bool showNicColumn)
            {
                Device = device;

                string id = string.IsNullOrEmpty(device.SCSIid) ? device.Path : device.SCSIid;
                string details = String.Format("{0}:{1}:{2}:{3}", device.adapter, device.channel, device.id, device.lun);

                Cells.AddRange(new DataGridViewCheckBoxCell{ThreeState = false, Value = false},
                    new DataGridViewTextBoxCell { Value = Util.DiskSizeString(device.Size) },
                    new DataGridViewTextBoxCell { Value = device.Serial },
                    new DataGridViewTextBoxCell { Value = id },
                    new DataGridViewTextBoxCell { Value = details });

                if (showNicColumn)
                    Cells.Add(new DataGridViewTextBoxCell {Value = device.eth});
            }
Beispiel #17
0
 public virtual LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return new LvmOhbaSrDescriptor(device, Connection);
 }
Beispiel #18
0
 public override LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return(new FcoeSrDescriptor(device));
 }
Beispiel #19
0
 public override LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return new FcoeSrDescriptor(device);
 }
Beispiel #20
0
 protected virtual FibreChannelDescriptor CreateLvmSrDescriptor(FibreChannelDevice device)
 {
     return(new LvmOhbaSrDescriptor(device));
 }
Beispiel #21
0
 private FibreChannelDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return(SrType == SR.SRTypes.gfs2 ? CreateGfs2Descriptor(device) : CreateLvmSrDescriptor(device));
 }
        private Dictionary<String, String> GetFCDeviceConfig(FibreChannelDevice device)
        {
            if (device == null)
                return null;

            Dictionary<String, String> dconf = new Dictionary<String, String>();

            Host master = Helpers.GetMaster(Connection);

            if (master != null && (Helpers.HostBuildNumber(master) >= 9633
                                || Helpers.HostBuildNumber(master) == Helpers.CUSTOM_BUILD_NUMBER))
            {
                dconf[SrProbeAction.SCSIid] = device.SCSIid;
            }
            else
            {
                dconf[SrProbeAction.DEVICE] = device.Path;
            }

            return dconf;
        }
Beispiel #23
0
 protected virtual FibreChannelDescriptor CreateGfs2Descriptor(FibreChannelDevice device)
 {
     return(new Gfs2HbaSrDescriptor(device));
 }
Beispiel #24
0
 public virtual LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return(SrType == SR.SRTypes.gfs2 ? new Gfs2HbaSrDescriptor(device) : new LvmOhbaSrDescriptor(device, Connection));
 }