Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 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
                    });
                }
            }
Ejemplo n.º 3
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));
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 6
0
 public LVMoHBAWarningDialog(FibreChannelDevice currentDevice, int remainingDevicesCount,
                             bool foundExistingSR)
 {
     InitializeComponent();
     this.currentDevice         = currentDevice;
     this.remainingDevicesCount = remainingDevicesCount;
     this.foundExistingSR       = foundExistingSR;
     PopulateControls();
     ActiveControl = buttonCancel;
 }
Ejemplo n.º 7
0
 public LVMoHBAWarningDialog(FibreChannelDevice currentDevice, int remainingDevicesCount,
     bool foundExistingSR)
 {
     InitializeComponent();
     this.currentDevice = currentDevice;
     this.remainingDevicesCount = remainingDevicesCount;
     this.foundExistingSR = foundExistingSR;
     PopulateControls();
     ActiveControl = buttonCancel;
 }
Ejemplo n.º 8
0
 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 12
0
 public virtual LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return(new LvmOhbaSrDescriptor(device, Connection));
 }
Ejemplo n.º 13
0
 protected override FibreChannelDescriptor CreateGfs2Descriptor(FibreChannelDevice device)
 {
     return(new Gfs2FcoeSrDescriptor(device));
 }
Ejemplo n.º 14
0
 public override LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return(SrType == SR.SRTypes.gfs2 ? new Gfs2FcoeSrDescriptor(device) : new FcoeSrDescriptor(device));
 }
Ejemplo n.º 15
0
        public LvmOhbaSrDescriptor(FibreChannelDevice device)
        {
            Device = device;

            Description = string.Format(Messages.NEWSR_LVMOHBA_DESCRIPTION, device.Vendor, device.Serial);
        }
Ejemplo n.º 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});
            }
Ejemplo n.º 17
0
 public virtual LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return new LvmOhbaSrDescriptor(device, Connection);
 }
Ejemplo n.º 18
0
 public override LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return(new FcoeSrDescriptor(device));
 }
Ejemplo n.º 19
0
 public override LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return new FcoeSrDescriptor(device);
 }
Ejemplo n.º 20
0
 protected virtual FibreChannelDescriptor CreateLvmSrDescriptor(FibreChannelDevice device)
 {
     return(new LvmOhbaSrDescriptor(device));
 }
Ejemplo n.º 21
0
 private FibreChannelDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return(SrType == SR.SRTypes.gfs2 ? CreateGfs2Descriptor(device) : CreateLvmSrDescriptor(device));
 }
Ejemplo n.º 22
0
        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;
        }
Ejemplo n.º 23
0
 protected virtual FibreChannelDescriptor CreateGfs2Descriptor(FibreChannelDevice device)
 {
     return(new Gfs2HbaSrDescriptor(device));
 }
Ejemplo n.º 24
0
 public virtual LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
 {
     return(SrType == SR.SRTypes.gfs2 ? new Gfs2HbaSrDescriptor(device) : new LvmOhbaSrDescriptor(device, Connection));
 }