CP-41281: Exposed pool option for migration compression.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
Konstantina Chremmou 2022-12-15 20:28:54 +00:00
parent fa04fda84a
commit 512d2c217d
14 changed files with 1288 additions and 353 deletions

View File

@ -81,6 +81,7 @@ namespace XenAdmin.Dialogs
private NetworkOptionsEditPage NetworkOptionsEditPage;
private ClusteringEditPage ClusteringEditPage;
private SrReadCachingEditPage SrReadCachingEditPage;
private PoolAdvancedEditPage _poolAdvancedEditPage;
#endregion
private IXenObject xenObject, xenObjectBefore, xenObjectCopy;
@ -217,6 +218,9 @@ namespace XenAdmin.Dialogs
if (is_pool_or_standalone && !Helpers.FeatureForbidden(xenObject.Connection, Host.RestrictCorosync))
ShowTab(ClusteringEditPage = new ClusteringEditPage());
if (is_pool && Helpers.Post82X(xenObject.Connection) && Helpers.XapiEqualOrGreater_22_33_0(xenObject.Connection))
ShowTab(_poolAdvancedEditPage = new PoolAdvancedEditPage());
if (is_network)
ShowTab(editNetworkPage = new EditNetworkPage());
@ -282,43 +286,39 @@ namespace XenAdmin.Dialogs
if (is_sr && ((SR)xenObjectCopy).SupportsReadCaching() && !Helpers.FeatureForbidden(xenObjectCopy, Host.RestrictReadCaching))
ShowTab(SrReadCachingEditPage = new SrReadCachingEditPage());
//
// Now add one tab per VBD (for VDIs only)
//
if (!is_vdi)
return;
ShowTab(vdiSizeLocation = new VDISizeLocationPage());
VDI vdi = xenObjectCopy as VDI;
List<VBDEditPage> vbdEditPages = new List<VBDEditPage>();
foreach (VBD vbd in vdi.Connection.ResolveAll(vdi.VBDs))
if (is_vdi)
{
VBDEditPage editPage = new VBDEditPage();
ShowTab(vdiSizeLocation = new VDISizeLocationPage());
editPage.SetXenObjects(null, vbd);
vbdEditPages.Add(editPage);
ShowTab(editPage);
}
VDI vdi = xenObjectCopy as VDI;
if (vbdEditPages.Count <= 0)
return;
List<VBDEditPage> vbdEditPages = new List<VBDEditPage>();
using (var dialog = new ActionProgressDialog(
new DelegatedAsyncAction(vdi.Connection, Messages.DEVICE_POSITION_SCANNING,
Messages.DEVICE_POSITION_SCANNING, Messages.DEVICE_POSITION_SCANNED,
delegate(Session session)
{
foreach (VBDEditPage page in vbdEditPages)
page.UpdateDevicePositions(session);
}),
ProgressBarStyle.Continuous))
{
dialog.ShowCancel = true;
dialog.ShowDialog(Program.MainWindow);
foreach (VBD vbd in vdi.Connection.ResolveAll(vdi.VBDs))
{
VBDEditPage editPage = new VBDEditPage();
editPage.SetXenObjects(null, vbd);
vbdEditPages.Add(editPage);
ShowTab(editPage);
}
if (vbdEditPages.Count <= 0)
return;
using (var dialog = new ActionProgressDialog(
new DelegatedAsyncAction(vdi.Connection, Messages.DEVICE_POSITION_SCANNING,
Messages.DEVICE_POSITION_SCANNING, Messages.DEVICE_POSITION_SCANNED,
delegate(Session session)
{
foreach (VBDEditPage page in vbdEditPages)
page.UpdateDevicePositions(session);
}),
ProgressBarStyle.Continuous))
{
dialog.ShowCancel = true;
dialog.ShowDialog(Program.MainWindow);
}
}
}
finally

View File

@ -121,10 +121,6 @@
<data name="ContentPanel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="ContentPanel.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="ContentPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -136,7 +132,7 @@
<value>10, 49, 10, 10</value>
</data>
<data name="ContentPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>651, 509</value>
<value>627, 504</value>
</data>
<data name="&gt;&gt;ContentPanel.Name" xml:space="preserve">
<value>ContentPanel</value>
@ -151,13 +147,13 @@
<value>1</value>
</data>
<data name="verticalTabs.Size" type="System.Drawing.Size, System.Drawing">
<value>206, 511</value>
<value>230, 506</value>
</data>
<data name="&gt;&gt;verticalTabs.Name" xml:space="preserve">
<value>verticalTabs</value>
</data>
<data name="&gt;&gt;verticalTabs.Type" xml:space="preserve">
<value>XenAdmin.Controls.VerticalTabs, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.VerticalTabs, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;verticalTabs.Parent" xml:space="preserve">
<value>splitContainer.Panel1</value>
@ -166,7 +162,7 @@
<value>0</value>
</data>
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
<value>800, 529</value>
<value>800, 524</value>
</data>
<data name="&gt;&gt;cancelButton.Name" xml:space="preserve">
<value>cancelButton</value>
@ -181,7 +177,7 @@
<value>1</value>
</data>
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
<value>720, 529</value>
<value>720, 524</value>
</data>
<data name="&gt;&gt;okButton.Name" xml:space="preserve">
<value>okButton</value>
@ -220,10 +216,11 @@
<value>1</value>
</data>
<data name="splitContainer.Size" type="System.Drawing.Size, System.Drawing">
<value>863, 511</value>
<value>863, 506</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="splitContainer.SplitterDistance" type="System.Int32, mscorlib">
<value>206</value>
<value>230</value>
</data>
<data name="&gt;&gt;splitContainer.Name" xml:space="preserve">
<value>splitContainer</value>
@ -238,13 +235,13 @@
<value>0</value>
</data>
<data name="blueBorder.Size" type="System.Drawing.Size, System.Drawing">
<value>653, 511</value>
<value>629, 506</value>
</data>
<data name="&gt;&gt;blueBorder.Name" xml:space="preserve">
<value>blueBorder</value>
</data>
<data name="&gt;&gt;blueBorder.Type" xml:space="preserve">
<value>XenAdmin.Controls.BlueBorderPanel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;blueBorder.Parent" xml:space="preserve">
<value>splitContainer.Panel2</value>
@ -259,7 +256,7 @@
<value>96, 96</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>884, 566</value>
<value>884, 561</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
@ -271,6 +268,6 @@
<value>PropertiesDialog</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>XenAdmin.Dialogs.VerticallyTabbedDialog, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Dialogs.VerticallyTabbedDialog, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -0,0 +1,119 @@
namespace XenAdmin.SettingsPanels
{
partial class PoolAdvancedEditPage
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PoolAdvancedEditPage));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.checkBoxCompression = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.groupBoxPerf = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.groupBoxPerf.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.checkBoxCompression, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.label2, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.label1, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.pictureBox1, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.pictureBox2, 0, 2);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// checkBoxCompression
//
resources.ApplyResources(this.checkBoxCompression, "checkBoxCompression");
this.tableLayoutPanel1.SetColumnSpan(this.checkBoxCompression, 2);
this.checkBoxCompression.Name = "checkBoxCompression";
this.checkBoxCompression.UseVisualStyleBackColor = true;
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// pictureBox1
//
this.pictureBox1.Image = global::XenAdmin.Properties.Resources._000_Info3_h32bit_16;
resources.ApplyResources(this.pictureBox1, "pictureBox1");
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
//
// pictureBox2
//
this.pictureBox2.Image = global::XenAdmin.Properties.Resources._000_Info3_h32bit_16;
resources.ApplyResources(this.pictureBox2, "pictureBox2");
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.TabStop = false;
//
// groupBoxPerf
//
this.groupBoxPerf.Controls.Add(this.tableLayoutPanel1);
resources.ApplyResources(this.groupBoxPerf, "groupBoxPerf");
this.groupBoxPerf.Name = "groupBoxPerf";
this.groupBoxPerf.TabStop = false;
//
// PoolAdvancedEditPage
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.groupBoxPerf);
this.Name = "PoolAdvancedEditPage";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.groupBoxPerf.ResumeLayout(false);
this.groupBoxPerf.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.CheckBox checkBoxCompression;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBoxPerf;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox2;
}
}

View File

@ -0,0 +1,89 @@
/* Copyright (c) Cloud Software Group Holdings, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System.Drawing;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAPI;
namespace XenAdmin.SettingsPanels
{
public partial class PoolAdvancedEditPage : UserControl, IEditPage
{
private Pool _pool;
public PoolAdvancedEditPage()
{
InitializeComponent();
Text = Messages.ADVANCED_OPTIONS;
}
public string SubText => checkBoxCompression.Checked ? Messages.ENABLED_MIGRATION_COMPRESSION : Messages.DISABLED_MIGRATION_COMPRESSION;
public Image Image => Images.StaticImages._002_Configure_h32bit_16;
public bool HasChanged => checkBoxCompression.Checked != _pool.migration_compression;
public bool ValidToSave => true;
public void SetXenObjects(IXenObject orig, IXenObject clone)
{
if (clone is Pool pool)
{
_pool = pool;
checkBoxCompression.Checked = pool.migration_compression;
}
}
public AsyncAction SaveSettings()
{
var msg = string.Format(Messages.ACTION_ENABLE_MIGRATION_COMPRESSION, _pool.Name());
return new DelegatedAsyncAction(_pool.Connection, msg, msg, null,
delegate (Session session) { Pool.set_migration_compression(session, _pool.opaque_ref,checkBoxCompression.Checked); },
true,
"pool.set_migration_compression"
);
}
public void ShowLocalValidationMessages()
{
}
public void HideLocalValidationMessages()
{
}
public void Cleanup()
{
}
}
}

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,342 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="checkBoxCompression.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="checkBoxCompression.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="checkBoxCompression.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 10</value>
</data>
<data name="checkBoxCompression.Size" type="System.Drawing.Size, System.Drawing">
<value>322, 17</value>
</data>
<data name="checkBoxCompression.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="checkBoxCompression.Text" xml:space="preserve">
<value>&amp;Compress VM memory and vGPU data during VM live migration</value>
</data>
<data name="&gt;&gt;checkBoxCompression.Name" xml:space="preserve">
<value>checkBoxCompression</value>
</data>
<data name="&gt;&gt;checkBoxCompression.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBoxCompression.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;checkBoxCompression.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 62</value>
</data>
<data name="label2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>387, 13</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Enabling this feature does not compress VM disk data during a storage migration.</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 30</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>411, 26</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Using compression when migrating VMs between pool servers can reduce migration times and network utilization.</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 33</value>
</data>
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="pictureBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;pictureBox1.Name" xml:space="preserve">
<value>pictureBox1</value>
</data>
<data name="&gt;&gt;pictureBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="pictureBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 62</value>
</data>
<data name="pictureBox2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 3</value>
</data>
<data name="pictureBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="pictureBox2.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;pictureBox2.Name" xml:space="preserve">
<value>pictureBox2</value>
</data>
<data name="&gt;&gt;pictureBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;pictureBox2.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 19</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>439, 126</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>groupBoxPerf</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="checkBoxCompression" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pictureBox1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="pictureBox2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="groupBoxPerf.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="groupBoxPerf.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="groupBoxPerf.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 3</value>
</data>
<data name="groupBoxPerf.Size" type="System.Drawing.Size, System.Drawing">
<value>445, 148</value>
</data>
<data name="groupBoxPerf.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="groupBoxPerf.Text" xml:space="preserve">
<value>Performance enhancements</value>
</data>
<data name="&gt;&gt;groupBoxPerf.Name" xml:space="preserve">
<value>groupBoxPerf</value>
</data>
<data name="&gt;&gt;groupBoxPerf.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxPerf.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBoxPerf.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>445, 264</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>PoolAdvancedEditPage</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -425,6 +425,12 @@
<Compile Include="SettingsPanels\NetworkOptionsEditPage.Designer.cs">
<DependentUpon>NetworkOptionsEditPage.cs</DependentUpon>
</Compile>
<Compile Include="SettingsPanels\PoolAdvancedEditPage.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SettingsPanels\PoolAdvancedEditPage.Designer.cs">
<DependentUpon>PoolAdvancedEditPage.cs</DependentUpon>
</Compile>
<Compile Include="SettingsPanels\SecurityEditPage.cs">
<SubType>UserControl</SubType>
</Compile>
@ -2063,6 +2069,15 @@
<EmbeddedResource Include="SettingsPanels\NetworkOptionsEditPage.zh-CN.resx">
<DependentUpon>NetworkOptionsEditPage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SettingsPanels\PoolAdvancedEditPage.ja.resx">
<DependentUpon>PoolAdvancedEditPage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SettingsPanels\PoolAdvancedEditPage.resx">
<DependentUpon>PoolAdvancedEditPage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SettingsPanels\PoolAdvancedEditPage.zh-CN.resx">
<DependentUpon>PoolAdvancedEditPage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SettingsPanels\SecurityEditPage.ja.resx">
<DependentUpon>SecurityEditPage.cs</DependentUpon>
</EmbeddedResource>

View File

@ -996,6 +996,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Enabling VM memory and vGPU data compression during VM live migration on &apos;{0}&apos;.
/// </summary>
public static string ACTION_ENABLE_MIGRATION_COMPRESSION {
get {
return ResourceManager.GetString("ACTION_ENABLE_MIGRATION_COMPRESSION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Enable PVS-Accelerator.
/// </summary>
@ -13050,6 +13059,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Don&apos;t compress VMs during migration.
/// </summary>
public static string DISABLED_MIGRATION_COMPRESSION {
get {
return ResourceManager.GetString("DISABLED_MIGRATION_COMPRESSION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Snapshot schedule &apos;{0}&apos; disabled..
/// </summary>
@ -15492,6 +15510,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Compress VMs during migration.
/// </summary>
public static string ENABLED_MIGRATION_COMPRESSION {
get {
return ResourceManager.GetString("ENABLED_MIGRATION_COMPRESSION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Snapshot schedule &apos;{0}&apos; enabled..
/// </summary>

View File

@ -429,6 +429,9 @@
<data name="ACTION_ENABLE_IGMP_SNOOPING" xml:space="preserve">
<value>Enable IGMP snooping</value>
</data>
<data name="ACTION_ENABLE_MIGRATION_COMPRESSION" xml:space="preserve">
<value>Enabling VM memory and vGPU data compression during VM live migration on '{0}'</value>
</data>
<data name="ACTION_ENABLE_PVS_READ_CACHING" xml:space="preserve">
<value>Enable PVS-Accelerator</value>
</data>
@ -4623,6 +4626,9 @@ Plugging in untrustworthy USB devices to your computer may put your computer at
<data name="DISABLED_CLUSTERING_ON_POOL" xml:space="preserve">
<value>Disabled clustering on {0}.</value>
</data>
<data name="DISABLED_MIGRATION_COMPRESSION" xml:space="preserve">
<value>Don't compress VMs during migration</value>
</data>
<data name="DISABLED_VMSS" xml:space="preserve">
<value>Snapshot schedule '{0}' disabled.</value>
</data>
@ -5457,6 +5463,9 @@ Would you like to eject these ISOs before continuing?</value>
<data name="ENABLED_CLUSTERING_ON_POOL" xml:space="preserve">
<value>Enabled clustering on {0}.</value>
</data>
<data name="ENABLED_MIGRATION_COMPRESSION" xml:space="preserve">
<value>Compress VMs during migration</value>
</data>
<data name="ENABLED_VMSS" xml:space="preserve">
<value>Snapshot schedule '{0}' enabled.</value>
</data>

View File

@ -365,23 +365,6 @@ namespace XenAdmin.Core
return platformVersion != null && ProductVersionCompare(platformVersion, "3.1.50") >= 0;
}
/// <param name="conn">May be null, in which case true is returned.</param>
public static bool Post82X(IXenConnection conn)
{
return conn == null || Post82X(GetCoordinator(conn));
}
/// <param name="host">May be null, in which case true is returned.</param>
public static bool Post82X(Host host)
{
return host == null || Post82X(HostPlatformVersion(host));
}
public static bool Post82X(string platformVersion)
{
return platformVersion != null && ProductVersionCompare(platformVersion, "3.2.50") >= 0;
}
/// <param name="conn">May be null, in which case true is returned.</param>
public static bool YangtzeOrGreater(IXenConnection conn)
{
@ -400,6 +383,23 @@ namespace XenAdmin.Core
return platformVersion != null && ProductVersionCompare(platformVersion, "3.2.1") >= 0;
}
/// <param name="conn">May be null, in which case true is returned.</param>
public static bool Post82X(IXenConnection conn)
{
return conn == null || Post82X(GetCoordinator(conn));
}
/// <param name="host">May be null, in which case true is returned.</param>
public static bool Post82X(Host host)
{
return host == null || Post82X(HostPlatformVersion(host));
}
public static bool Post82X(string platformVersion)
{
return platformVersion != null && ProductVersionCompare(platformVersion, "3.2.50") >= 0;
}
public static bool XapiEqualOrGreater_1_290_0(IXenConnection conn)
{
var coordinator = GetCoordinator(conn);
@ -439,6 +439,12 @@ namespace XenAdmin.Core
return host == null || ProductVersionCompare(host.GetXapiVersion(), "22.20.0") >= 0;
}
public static bool XapiEqualOrGreater_22_33_0(IXenConnection conn)
{
var coordinator = GetCoordinator(conn);
return coordinator == null || ProductVersionCompare(coordinator.GetXapiVersion(), "22.33.0") >= 0;
}
#endregion
}
}

View File

@ -15250,5 +15250,19 @@ namespace XenAPI
var serializer = CreateSerializer(converters);
return Rpc<Dictionary<XenRef<Repository>, Repository>>("Repository.get_all_records", new JArray(session), serializer);
}
public bool pool_get_migration_compression(string session, string _pool)
{
var converters = new List<JsonConverter> { };
var serializer = CreateSerializer(converters);
return Rpc<bool>("pool.get_migration_compression", new JArray(session, _pool ?? ""), serializer);
}
public void pool_set_migration_compression(string session, string _pool, bool _migration_compression)
{
var converters = new List<JsonConverter> { };
var serializer = CreateSerializer(converters);
Rpc("pool.set_migration_compression", new JArray(session, _pool ?? "", _migration_compression), serializer);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -8864,6 +8864,7 @@ namespace XenAPI
public string client_certificate_auth_name;
public string repository_proxy_url;
public string repository_proxy_username;
public bool migration_compression;
}
[XmlRpcMissingMapping(MappingAction.Ignore)]