diff --git a/XenAdmin/TabPages/NICPage.Designer.cs b/XenAdmin/TabPages/NICPage.Designer.cs
index 16b4c5fd1..939156bd7 100644
--- a/XenAdmin/TabPages/NICPage.Designer.cs
+++ b/XenAdmin/TabPages/NICPage.Designer.cs
@@ -46,6 +46,7 @@ namespace XenAdmin.TabPages
this.TitleLabel = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
+ this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ColumnNIC = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnMAC = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnLinkStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -54,7 +55,7 @@ namespace XenAdmin.TabPages
this.ColumnVendorName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnDeviceName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnBusPath = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.ColumnFCoECapable = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pageContainerPanel.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.panel1.SuspendLayout();
@@ -137,7 +138,6 @@ namespace XenAdmin.TabPages
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.dataGridView1);
this.panel1.Controls.Add(this.flowLayoutPanel1);
- this.panel1.MaximumSize = new System.Drawing.Size(900, 400);
this.panel1.Name = "panel1";
//
// dataGridView1
@@ -157,15 +157,21 @@ namespace XenAdmin.TabPages
this.ColumnDuplex,
this.ColumnVendorName,
this.ColumnDeviceName,
- this.ColumnBusPath});
+ this.ColumnBusPath,
+ this.ColumnFCoECapable});
resources.ApplyResources(this.dataGridView1, "dataGridView1");
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
- this.dataGridView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.dataGridView1_MouseClick);
this.dataGridView1.SelectionChanged += new System.EventHandler(this.datagridview_SelectedIndexChanged);
+ this.dataGridView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.dataGridView1_MouseClick);
+ //
+ // contextMenuStrip1
+ //
+ this.contextMenuStrip1.Name = "contextMenuStrip1";
+ resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
//
// ColumnNIC
//
@@ -205,21 +211,23 @@ namespace XenAdmin.TabPages
//
// ColumnDeviceName
//
+ this.ColumnDeviceName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
resources.ApplyResources(this.ColumnDeviceName, "ColumnDeviceName");
this.ColumnDeviceName.Name = "ColumnDeviceName";
this.ColumnDeviceName.ReadOnly = true;
+ this.ColumnDeviceName.Resizable = System.Windows.Forms.DataGridViewTriState.False;
//
// ColumnBusPath
//
- this.ColumnBusPath.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
resources.ApplyResources(this.ColumnBusPath, "ColumnBusPath");
this.ColumnBusPath.Name = "ColumnBusPath";
this.ColumnBusPath.ReadOnly = true;
//
- // contextMenuStrip1
+ // ColumnFCoECapable
//
- this.contextMenuStrip1.Name = "contextMenuStrip1";
- resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
+ resources.ApplyResources(this.ColumnFCoECapable, "ColumnFCoECapable");
+ this.ColumnFCoECapable.Name = "ColumnFCoECapable";
+ this.ColumnFCoECapable.ReadOnly = true;
//
// NICPage
//
@@ -235,6 +243,7 @@ namespace XenAdmin.TabPages
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
+ this.PerformLayout();
}
@@ -262,5 +271,6 @@ namespace XenAdmin.TabPages
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnVendorName;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDeviceName;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnBusPath;
+ private System.Windows.Forms.DataGridViewTextBoxColumn ColumnFCoECapable;
}
}
diff --git a/XenAdmin/TabPages/NICPage.cs b/XenAdmin/TabPages/NICPage.cs
index 7ebaba7cd..e13a7b831 100644
--- a/XenAdmin/TabPages/NICPage.cs
+++ b/XenAdmin/TabPages/NICPage.cs
@@ -166,13 +166,16 @@ namespace XenAdmin.TabPages
p.Selected = true;
}
- //CA-47050: the ColumnBusPath should be autosized to Fill, but should not become smaller than a minimum
- //width, which is chosen to be the column's contents (including header) width. To find what this is
- //set temporarily the column's autosize mode to AllCells.
- ColumnBusPath.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
- int storedWidth = ColumnBusPath.Width;
- ColumnBusPath.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- ColumnBusPath.MinimumWidth = storedWidth;
+ //show the FCoE column for Dundee or higher hosts only
+ ColumnFCoECapable.Visible = Helpers.DundeeOrGreater(host);
+
+ //CA-47050: the Device column should be autosized to Fill, but should not become smaller than a minimum
+ //width, which here is chosen to be the column header width. To find what this width is
+ //set temporarily the column's autosize mode to ColumnHeader.
+ ColumnDeviceName.AutoSizeMode = DataGridViewAutoSizeColumnMode.ColumnHeader;
+ int storedWidth = ColumnDeviceName.Width;
+ ColumnDeviceName.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
+ ColumnDeviceName.MinimumWidth = storedWidth;
if (dataGridView1.SortedColumn != null)
dataGridView1.Sort(dataGridView1.SortedColumn, dataGridView1.SortOrder == SortOrder.Ascending ? ListSortDirection.Ascending : ListSortDirection.Descending);
@@ -201,7 +204,7 @@ namespace XenAdmin.TabPages
device = PIFMetrics.device_name;
busPath = PIFMetrics.pci_bus_path;
}
- for (int i = 0; i < 8; i++)
+ for (int i = 0; i < 9; i++)
{
Cells.Add(new DataGridViewTextBoxCell());
updateCell(i);
@@ -237,6 +240,9 @@ namespace XenAdmin.TabPages
case 7:
Cells[7].Value = busPath;
break;
+ case 8:
+ Cells[8].Value = pif.FCoECapable ? Messages.YES : Messages.NO;
+ break;
}
}
}
diff --git a/XenAdmin/TabPages/NICPage.resx b/XenAdmin/TabPages/NICPage.resx
index 344d32313..1b504d42d 100644
--- a/XenAdmin/TabPages/NICPage.resx
+++ b/XenAdmin/TabPages/NICPage.resx
@@ -112,29 +112,29 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
Top, Bottom, Left, Right
-
+
True
NIC
-
+
70
70
-
+
True
@@ -143,16 +143,19 @@
56
-
+
True
Link Status
+
+ 88
+
88
-
+
True
@@ -161,7 +164,7 @@
64
-
+
True
@@ -170,7 +173,7 @@
68
-
+
True
@@ -179,16 +182,16 @@
70
-
+
True
Device
-
+
65
-
+
True
@@ -197,15 +200,27 @@
100
+
+ True
+
+
+ FCoE Capable
+
+
+ 105
+
+
+ 105
+
Fill
-
+
0, 0
- 897, 316
+ 897, 275
5
@@ -214,7 +229,7 @@
dataGridView1
- System.Windows.Forms.DataGridView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
panel1
@@ -247,7 +262,7 @@
CreateBondButton
- System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
flowLayoutPanel1
@@ -280,7 +295,7 @@
DeleteBondButton
- System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
flowLayoutPanel1
@@ -307,7 +322,7 @@
buttonRescan
- System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
flowLayoutPanel1
@@ -319,7 +334,7 @@
Bottom
- 0, 316
+ 0, 275
0, 0, 0, 0
@@ -337,7 +352,7 @@
flowLayoutPanel1
- System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
panel1
@@ -348,8 +363,11 @@
10, 33
+
+ 900, 400
+
- 897, 342
+ 897, 301
6
@@ -358,7 +376,7 @@
panel1
- System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
pageContainerPanel
@@ -391,7 +409,7 @@
label1
- System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
pageContainerPanel
@@ -399,14 +417,17 @@
1
+
+ 0, 78
+
- 920, 397
+ 920, 356
pageContainerPanel
- System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
$this
@@ -433,7 +454,7 @@
label6
- System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
NoControl
@@ -451,7 +472,7 @@
label10
- System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
NoControl
@@ -469,7 +490,7 @@
label9
- System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
NoControl
@@ -487,7 +508,7 @@
label8
- System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
NoControl
@@ -505,7 +526,7 @@
label7
- System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Fill
@@ -538,9 +559,9 @@
TitleLabel
- System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
17, 17
@@ -550,9 +571,9 @@
contextMenuStrip1
- System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
True
@@ -571,49 +592,55 @@
ColumnNIC
- System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
ColumnMAC
- System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
ColumnLinkStatus
- System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
ColumnSpeed
- System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
ColumnDuplex
- System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
ColumnVendorName
- System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
ColumnDeviceName
- System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
ColumnBusPath
- System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ColumnFCoECapable
+
+
+ System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
NICPage
diff --git a/XenModel/XenAPI-Extensions/PIF.cs b/XenModel/XenAPI-Extensions/PIF.cs
index 4a3a87f88..a89db4fce 100644
--- a/XenModel/XenAPI-Extensions/PIF.cs
+++ b/XenModel/XenAPI-Extensions/PIF.cs
@@ -31,6 +31,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using XenAdmin;
using XenAdmin.Core;
@@ -453,5 +454,10 @@ namespace XenAPI
}
}
}
+
+ public bool FCoECapable
+ {
+ get { return capabilities.Any(capability => capability == "fcoe"); }
+ }
}
}