CP-6085: Per-pool overview of vGPUs (PR-1675)

# HG changeset patch
# User Mihaela Stoica <Mihaela.Stoica@citrix.com>
# Date 1382997218 0
#      Mon Oct 28 21:53:38 2013 +0000
# Node ID c82052cb3e73d23ce4d1f14cb9f771b7e43f1cdd
# Parent  765758a41fcc8491cf3a269e071baf96cd619b41

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2013-11-14 11:15:52 +00:00
parent 3f148d1ea7
commit a1fc0f5e7d
5 changed files with 158 additions and 101 deletions

View File

@ -29,43 +29,39 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GpuPlacementPolicyPanel));
this.panel = new XenAdmin.Controls.PanelWithBorder();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.placementPolicyLabel = new XenAdmin.Controls.Common.AutoHeightLabel();
this.panelWithBorder = new XenAdmin.Controls.PanelWithBorder();
this.containerPanel = new System.Windows.Forms.Panel();
this.placementPolicyLabel = new System.Windows.Forms.Label();
this.editPlacementPolicyButton = new System.Windows.Forms.Button();
this.panel.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.panelWithBorder.SuspendLayout();
this.containerPanel.SuspendLayout();
this.SuspendLayout();
//
// panel
// panelWithBorder
//
resources.ApplyResources(this.panel, "panel");
this.panel.BackColor = System.Drawing.Color.Transparent;
this.panel.Controls.Add(this.tableLayoutPanel1);
this.panel.Name = "panel";
this.panel.VisibleChanged += new System.EventHandler(this.GpuPlacementPolicyPanel_VisibleChanged);
resources.ApplyResources(this.panelWithBorder, "panelWithBorder");
this.panelWithBorder.BackColor = System.Drawing.Color.Transparent;
this.panelWithBorder.Controls.Add(this.containerPanel);
this.panelWithBorder.Name = "panelWithBorder";
//
// tableLayoutPanel1
// containerPanel
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.placementPolicyLabel, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.editPlacementPolicyButton, 1, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
resources.ApplyResources(this.containerPanel, "containerPanel");
this.containerPanel.Controls.Add(this.placementPolicyLabel);
this.containerPanel.Controls.Add(this.editPlacementPolicyButton);
this.containerPanel.Name = "containerPanel";
//
// placementPolicyLabel
//
resources.ApplyResources(this.placementPolicyLabel, "placementPolicyLabel");
this.placementPolicyLabel.AutoEllipsis = true;
this.placementPolicyLabel.BackColor = System.Drawing.Color.Transparent;
this.placementPolicyLabel.MinimumSize = new System.Drawing.Size(0, 16);
resources.ApplyResources(this.placementPolicyLabel, "placementPolicyLabel");
this.placementPolicyLabel.Name = "placementPolicyLabel";
//
// editPlacementPolicyButton
//
resources.ApplyResources(this.editPlacementPolicyButton, "editPlacementPolicyButton");
this.editPlacementPolicyButton.BackColor = System.Drawing.Color.Transparent;
this.editPlacementPolicyButton.Name = "editPlacementPolicyButton";
this.editPlacementPolicyButton.UseVisualStyleBackColor = false;
this.editPlacementPolicyButton.UseVisualStyleBackColor = true;
this.editPlacementPolicyButton.Click += new System.EventHandler(this.editPlacementPolicyButton_Click);
//
// GpuPlacementPolicyPanel
@ -73,21 +69,25 @@
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.panel);
this.Controls.Add(this.panelWithBorder);
this.DoubleBuffered = true;
this.MinimumSize = new System.Drawing.Size(519, 32);
this.MinimumSize = new System.Drawing.Size(400, 32);
this.Name = "GpuPlacementPolicyPanel";
this.panel.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.VisibleChanged += new System.EventHandler(this.GpuPlacementPolicyPanel_VisibleChanged);
this.panelWithBorder.ResumeLayout(false);
this.containerPanel.ResumeLayout(false);
this.containerPanel.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private PanelWithBorder panel;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private PanelWithBorder panelWithBorder;
private System.Windows.Forms.Button editPlacementPolicyButton;
private XenAdmin.Controls.Common.AutoHeightLabel placementPolicyLabel;
private System.Windows.Forms.Label placementPolicyLabel;
private System.Windows.Forms.Panel containerPanel;
}
}

View File

@ -46,7 +46,7 @@ namespace XenAdmin.Controls
}
currentAllocationAlgorithm = gpu_group.allocation_algorithm;
}
placementPolicyLabel.Text = string.Format("Placement policy: {0}",
placementPolicyLabel.Text = string.Format(Messages.GPU_PLACEMENT_POLICY_DESCRIPTION,
PlacementPolicyWrapper.ToString(currentAllocationAlgorithm));
}
@ -135,11 +135,11 @@ namespace XenAdmin.Controls
switch (x)
{
case allocation_algorithm.breadth_first:
return "Maximum performance: put VMs on as many GPUs as possible";
return Messages.GPU_PLACEMENT_POLICY_MAX_PERFORMANCE_DESCRIPTION;
case allocation_algorithm.depth_first:
return "Maximum density: put as many VMs as possible on the same GPU";
return Messages.GPU_PLACEMENT_POLICY_MAX_DENSITY_DESCRIPTION;
default:
return "Unknown or mixture";
return Messages.GPU_PLACEMENT_POLICY_MIXED_DESCRIPTION;
}
}
}

View File

@ -117,44 +117,47 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="panelWithBorder.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="panel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<data name="panelWithBorder.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="containerPanel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
<data name="containerPanel.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="placementPolicyLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="placementPolicyLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
<data name="placementPolicyLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="placementPolicyLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="placementPolicyLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 10</value>
</data>
<data name="placementPolicyLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 10, 5, 5</value>
<value>3, 10</value>
</data>
<data name="placementPolicyLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>431, 16</value>
<value>110, 13</value>
</data>
<data name="placementPolicyLabel.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
<value>2</value>
</data>
<data name="placementPolicyLabel.Text" xml:space="preserve">
<value>placementPolicyLabel</value>
</data>
<data name="&gt;&gt;placementPolicyLabel.Name" xml:space="preserve">
<value>placementPolicyLabel</value>
</data>
<data name="&gt;&gt;placementPolicyLabel.Type" xml:space="preserve">
<value>XenAdmin.Controls.Common.AutoHeightLabel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;placementPolicyLabel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
<value>containerPanel</value>
</data>
<data name="&gt;&gt;placementPolicyLabel.ZOrder" xml:space="preserve">
<value>0</value>
@ -166,16 +169,13 @@
<value>NoControl</value>
</data>
<data name="editPlacementPolicyButton.Location" type="System.Drawing.Point, System.Drawing">
<value>447, 6</value>
</data>
<data name="editPlacementPolicyButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>6, 6, 6, 6</value>
<value>398, 5</value>
</data>
<data name="editPlacementPolicyButton.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 22</value>
<value>61, 22</value>
</data>
<data name="editPlacementPolicyButton.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
<value>1</value>
</data>
<data name="editPlacementPolicyButton.Text" xml:space="preserve">
<value>&amp;Edit...</value>
@ -187,63 +187,57 @@
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;editPlacementPolicyButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
<value>containerPanel</value>
</data>
<data name="&gt;&gt;editPlacementPolicyButton.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
<data name="containerPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>1, 1</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<data name="containerPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>462, 33</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>519, 32</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>panel</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="placementPolicyLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="editPlacementPolicyButton" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,81.8951,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="panel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="panel.Size" type="System.Drawing.Size, System.Drawing">
<value>519, 32</value>
</data>
<data name="panel.TabIndex" type="System.Int32, mscorlib">
<data name="containerPanel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;panel.Name" xml:space="preserve">
<value>panel</value>
<data name="&gt;&gt;containerPanel.Name" xml:space="preserve">
<value>containerPanel</value>
</data>
<data name="&gt;&gt;panel.Type" xml:space="preserve">
<data name="&gt;&gt;containerPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;containerPanel.Parent" xml:space="preserve">
<value>panelWithBorder</value>
</data>
<data name="&gt;&gt;containerPanel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="panelWithBorder.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panelWithBorder.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panelWithBorder.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="panelWithBorder.Size" type="System.Drawing.Size, System.Drawing">
<value>464, 35</value>
</data>
<data name="panelWithBorder.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;panelWithBorder.Name" xml:space="preserve">
<value>panelWithBorder</value>
</data>
<data name="&gt;&gt;panelWithBorder.Type" xml:space="preserve">
<value>XenAdmin.Controls.PanelWithBorder, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;panel.Parent" xml:space="preserve">
<data name="&gt;&gt;panelWithBorder.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel.ZOrder" xml:space="preserve">
<data name="&gt;&gt;panelWithBorder.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@ -252,11 +246,14 @@
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
</data>
<data name="$this.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>519, 32</value>
<value>464, 35</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>GpuPlacementPolicyPanel</value>

View File

@ -13929,6 +13929,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Placement policy: {0}.
/// </summary>
public static string GPU_PLACEMENT_POLICY_DESCRIPTION {
get {
return ResourceManager.GetString("GPU_PLACEMENT_POLICY_DESCRIPTION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Maximum density.
/// </summary>
@ -13938,6 +13947,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Maximum density: put as many VMs as possible on the same GPU.
/// </summary>
public static string GPU_PLACEMENT_POLICY_MAX_DENSITY_DESCRIPTION {
get {
return ResourceManager.GetString("GPU_PLACEMENT_POLICY_MAX_DENSITY_DESCRIPTION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Maximum performance.
/// </summary>
@ -13947,6 +13965,33 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Maximum performance: put VMs on as many GPUs as possible.
/// </summary>
public static string GPU_PLACEMENT_POLICY_MAX_PERFORMANCE_DESCRIPTION {
get {
return ResourceManager.GetString("GPU_PLACEMENT_POLICY_MAX_PERFORMANCE_DESCRIPTION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Mixed.
/// </summary>
public static string GPU_PLACEMENT_POLICY_MIXED {
get {
return ResourceManager.GetString("GPU_PLACEMENT_POLICY_MIXED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Mixed: different settings for different GPU groups.
/// </summary>
public static string GPU_PLACEMENT_POLICY_MIXED_DESCRIPTION {
get {
return ResourceManager.GetString("GPU_PLACEMENT_POLICY_MIXED_DESCRIPTION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You can improve graphics performance by assigning a dedicated graphics processing unit (GPU) to a VM. However, no GPUs have been detected in this pool, so this option is not currently available..
/// </summary>

View File

@ -4880,12 +4880,27 @@ Would you like to eject these ISOs before continuing?</value>
<data name="GPU_NONE" xml:space="preserve">
<value>None</value>
</data>
<data name="GPU_PLACEMENT_POLICY_DESCRIPTION" xml:space="preserve">
<value>Placement policy: {0}</value>
</data>
<data name="GPU_PLACEMENT_POLICY_MAX_DENSITY" xml:space="preserve">
<value>Maximum density</value>
</data>
<data name="GPU_PLACEMENT_POLICY_MAX_DENSITY_DESCRIPTION" xml:space="preserve">
<value>Maximum density: put as many VMs as possible on the same GPU</value>
</data>
<data name="GPU_PLACEMENT_POLICY_MAX_PERFORMANCE" xml:space="preserve">
<value>Maximum performance</value>
</data>
<data name="GPU_PLACEMENT_POLICY_MAX_PERFORMANCE_DESCRIPTION" xml:space="preserve">
<value>Maximum performance: put VMs on as many GPUs as possible</value>
</data>
<data name="GPU_PLACEMENT_POLICY_MIXED" xml:space="preserve">
<value>Mixed</value>
</data>
<data name="GPU_PLACEMENT_POLICY_MIXED_DESCRIPTION" xml:space="preserve">
<value>Mixed: different settings for different GPU groups</value>
</data>
<data name="GPU_RUBRIC_NO_GPUS_POOL" xml:space="preserve">
<value>You can improve graphics performance by assigning a dedicated graphics processing unit (GPU) to a VM. However, no GPUs have been detected in this pool, so this option is not currently available.</value>
</data>