diff --git a/XenAdmin/Dialogs/PropertiesDialog.cs b/XenAdmin/Dialogs/PropertiesDialog.cs index 156401b96..025993a46 100755 --- a/XenAdmin/Dialogs/PropertiesDialog.cs +++ b/XenAdmin/Dialogs/PropertiesDialog.cs @@ -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 vbdEditPages = new List(); - - 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 vbdEditPages = new List(); - 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 diff --git a/XenAdmin/Dialogs/PropertiesDialog.resx b/XenAdmin/Dialogs/PropertiesDialog.resx index 2a9282c8b..612a84b15 100644 --- a/XenAdmin/Dialogs/PropertiesDialog.resx +++ b/XenAdmin/Dialogs/PropertiesDialog.resx @@ -121,10 +121,6 @@ Top, Left - - - True - Fill @@ -136,7 +132,7 @@ 10, 49, 10, 10 - 651, 509 + 627, 504 ContentPanel @@ -151,13 +147,13 @@ 1 - 206, 511 + 230, 506 verticalTabs - XenAdmin.Controls.VerticalTabs, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + XenAdmin.Controls.VerticalTabs, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null splitContainer.Panel1 @@ -166,7 +162,7 @@ 0 - 800, 529 + 800, 524 cancelButton @@ -181,7 +177,7 @@ 1 - 720, 529 + 720, 524 okButton @@ -220,10 +216,11 @@ 1 - 863, 511 + 863, 506 + - 206 + 230 splitContainer @@ -238,13 +235,13 @@ 0 - 653, 511 + 629, 506 blueBorder - XenAdmin.Controls.BlueBorderPanel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 splitContainer.Panel2 @@ -259,7 +256,7 @@ 96, 96 - 884, 566 + 884, 561 Tahoma, 8pt @@ -271,6 +268,6 @@ PropertiesDialog - XenAdmin.Dialogs.VerticallyTabbedDialog, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + XenAdmin.Dialogs.VerticallyTabbedDialog, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null \ No newline at end of file diff --git a/XenAdmin/SettingsPanels/PoolAdvancedEditPage.Designer.cs b/XenAdmin/SettingsPanels/PoolAdvancedEditPage.Designer.cs new file mode 100644 index 000000000..5645d345f --- /dev/null +++ b/XenAdmin/SettingsPanels/PoolAdvancedEditPage.Designer.cs @@ -0,0 +1,119 @@ +namespace XenAdmin.SettingsPanels +{ + partial class PoolAdvancedEditPage + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} diff --git a/XenAdmin/SettingsPanels/PoolAdvancedEditPage.cs b/XenAdmin/SettingsPanels/PoolAdvancedEditPage.cs new file mode 100644 index 000000000..25bd58641 --- /dev/null +++ b/XenAdmin/SettingsPanels/PoolAdvancedEditPage.cs @@ -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() + { + } + } +} diff --git a/XenAdmin/SettingsPanels/PoolAdvancedEditPage.ja.resx b/XenAdmin/SettingsPanels/PoolAdvancedEditPage.ja.resx new file mode 100644 index 000000000..d00213b78 --- /dev/null +++ b/XenAdmin/SettingsPanels/PoolAdvancedEditPage.ja.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/XenAdmin/SettingsPanels/PoolAdvancedEditPage.resx b/XenAdmin/SettingsPanels/PoolAdvancedEditPage.resx new file mode 100644 index 000000000..9d21f9a46 --- /dev/null +++ b/XenAdmin/SettingsPanels/PoolAdvancedEditPage.resx @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + True + + + + GrowAndShrink + + + 2 + + + True + + + + 3, 3 + + + 3, 3, 3, 10 + + + 322, 17 + + + 0 + + + &Compress VM memory and vGPU data during VM live migration + + + checkBoxCompression + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 0 + + + True + + + 25, 62 + + + 3, 6, 3, 0 + + + 387, 13 + + + 2 + + + Enabling this feature does not compress VM disk data during a storage migration. + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 1 + + + Left, Right + + + True + + + 25, 30 + + + 411, 26 + + + 1 + + + Using compression when migrating VMs between pool servers can reduce migration times and network utilization. + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 2 + + + 3, 33 + + + 16, 16 + + + 3 + + + pictureBox1 + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 3 + + + 3, 62 + + + 3, 6, 3, 3 + + + 16, 16 + + + 4 + + + pictureBox2 + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 4 + + + Fill + + + 3, 19 + + + 4 + + + 439, 126 + + + 0 + + + tableLayoutPanel1 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxPerf + + + 0 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="checkBoxCompression" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="label2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="label1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pictureBox1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="pictureBox2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Percent,100" /></TableLayoutSettings> + + + Top + + + 0, 0 + + + 3, 6, 3, 3 + + + 445, 148 + + + 0 + + + Performance enhancements + + + groupBoxPerf + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 96, 96 + + + 445, 264 + + + PoolAdvancedEditPage + + + System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/XenAdmin/SettingsPanels/PoolAdvancedEditPage.zh-CN.resx b/XenAdmin/SettingsPanels/PoolAdvancedEditPage.zh-CN.resx new file mode 100644 index 000000000..d00213b78 --- /dev/null +++ b/XenAdmin/SettingsPanels/PoolAdvancedEditPage.zh-CN.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/XenAdmin/XenAdmin.csproj b/XenAdmin/XenAdmin.csproj index e542e4a3b..b58ce33ec 100755 --- a/XenAdmin/XenAdmin.csproj +++ b/XenAdmin/XenAdmin.csproj @@ -425,6 +425,12 @@ NetworkOptionsEditPage.cs + + UserControl + + + PoolAdvancedEditPage.cs + UserControl @@ -2063,6 +2069,15 @@ NetworkOptionsEditPage.cs + + PoolAdvancedEditPage.cs + + + PoolAdvancedEditPage.cs + + + PoolAdvancedEditPage.cs + SecurityEditPage.cs diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index 8ece2b936..59ba9d95c 100755 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -996,6 +996,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to Enabling VM memory and vGPU data compression during VM live migration on '{0}'. + /// + public static string ACTION_ENABLE_MIGRATION_COMPRESSION { + get { + return ResourceManager.GetString("ACTION_ENABLE_MIGRATION_COMPRESSION", resourceCulture); + } + } + /// /// Looks up a localized string similar to Enable PVS-Accelerator. /// @@ -13050,6 +13059,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to Don't compress VMs during migration. + /// + public static string DISABLED_MIGRATION_COMPRESSION { + get { + return ResourceManager.GetString("DISABLED_MIGRATION_COMPRESSION", resourceCulture); + } + } + /// /// Looks up a localized string similar to Snapshot schedule '{0}' disabled.. /// @@ -15492,6 +15510,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to Compress VMs during migration. + /// + public static string ENABLED_MIGRATION_COMPRESSION { + get { + return ResourceManager.GetString("ENABLED_MIGRATION_COMPRESSION", resourceCulture); + } + } + /// /// Looks up a localized string similar to Snapshot schedule '{0}' enabled.. /// diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index 8a56f5bfe..e51b31c99 100755 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -429,6 +429,9 @@ Enable IGMP snooping + + Enabling VM memory and vGPU data compression during VM live migration on '{0}' + Enable PVS-Accelerator @@ -4623,6 +4626,9 @@ Plugging in untrustworthy USB devices to your computer may put your computer at Disabled clustering on {0}. + + Don't compress VMs during migration + Snapshot schedule '{0}' disabled. @@ -5457,6 +5463,9 @@ Would you like to eject these ISOs before continuing? Enabled clustering on {0}. + + Compress VMs during migration + Snapshot schedule '{0}' enabled. diff --git a/XenModel/Utils/Helpers.Versions.cs b/XenModel/Utils/Helpers.Versions.cs index 43ac85aef..d5d8cbd79 100644 --- a/XenModel/Utils/Helpers.Versions.cs +++ b/XenModel/Utils/Helpers.Versions.cs @@ -365,23 +365,6 @@ namespace XenAdmin.Core return platformVersion != null && ProductVersionCompare(platformVersion, "3.1.50") >= 0; } - /// May be null, in which case true is returned. - public static bool Post82X(IXenConnection conn) - { - return conn == null || Post82X(GetCoordinator(conn)); - } - - /// May be null, in which case true is returned. - 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; - } - /// May be null, in which case true is returned. public static bool YangtzeOrGreater(IXenConnection conn) { @@ -400,6 +383,23 @@ namespace XenAdmin.Core return platformVersion != null && ProductVersionCompare(platformVersion, "3.2.1") >= 0; } + /// May be null, in which case true is returned. + public static bool Post82X(IXenConnection conn) + { + return conn == null || Post82X(GetCoordinator(conn)); + } + + /// May be null, in which case true is returned. + 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 } } diff --git a/XenModel/XenAPI/JsonRpcClient.cs b/XenModel/XenAPI/JsonRpcClient.cs index 67dd3d01c..8bf167237 100755 --- a/XenModel/XenAPI/JsonRpcClient.cs +++ b/XenModel/XenAPI/JsonRpcClient.cs @@ -15250,5 +15250,19 @@ namespace XenAPI var serializer = CreateSerializer(converters); return Rpc, Repository>>("Repository.get_all_records", new JArray(session), serializer); } + + public bool pool_get_migration_compression(string session, string _pool) + { + var converters = new List { }; + var serializer = CreateSerializer(converters); + return Rpc("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 { }; + var serializer = CreateSerializer(converters); + Rpc("pool.set_migration_compression", new JArray(session, _pool ?? "", _migration_compression), serializer); + } } } \ No newline at end of file diff --git a/XenModel/XenAPI/Pool.cs b/XenModel/XenAPI/Pool.cs index 6e677603a..5bab9d037 100644 --- a/XenModel/XenAPI/Pool.cs +++ b/XenModel/XenAPI/Pool.cs @@ -95,7 +95,8 @@ namespace XenAPI bool client_certificate_auth_enabled, string client_certificate_auth_name, string repository_proxy_url, - string repository_proxy_username) + string repository_proxy_username, + bool migration_compression) { this.uuid = uuid; this.name_label = name_label; @@ -141,6 +142,7 @@ namespace XenAPI this.client_certificate_auth_name = client_certificate_auth_name; this.repository_proxy_url = repository_proxy_url; this.repository_proxy_username = repository_proxy_username; + this.migration_compression = migration_compression; } /// @@ -216,6 +218,7 @@ namespace XenAPI client_certificate_auth_name = record.client_certificate_auth_name; repository_proxy_url = record.repository_proxy_url; repository_proxy_username = record.repository_proxy_username; + migration_compression = record.migration_compression; } internal void UpdateFrom(Proxy_Pool proxy) @@ -230,13 +233,13 @@ namespace XenAPI other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); ha_enabled = (bool)proxy.ha_enabled; ha_configuration = proxy.ha_configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.ha_configuration); - ha_statefiles = proxy.ha_statefiles == null ? new string[] {} : (string [])proxy.ha_statefiles; + ha_statefiles = proxy.ha_statefiles == null ? new string[] { } : (string[])proxy.ha_statefiles; ha_host_failures_to_tolerate = proxy.ha_host_failures_to_tolerate == null ? 0 : long.Parse(proxy.ha_host_failures_to_tolerate); ha_plan_exists_for = proxy.ha_plan_exists_for == null ? 0 : long.Parse(proxy.ha_plan_exists_for); ha_allow_overcommit = (bool)proxy.ha_allow_overcommit; ha_overcommitted = (bool)proxy.ha_overcommitted; blobs = proxy.blobs == null ? null : Maps.convert_from_proxy_string_XenRefBlob(proxy.blobs); - tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags; + tags = proxy.tags == null ? new string[] { } : (string[])proxy.tags; gui_config = proxy.gui_config == null ? null : Maps.convert_from_proxy_string_string(proxy.gui_config); health_check_config = proxy.health_check_config == null ? null : Maps.convert_from_proxy_string_string(proxy.health_check_config); wlb_url = proxy.wlb_url == null ? null : proxy.wlb_url; @@ -264,6 +267,7 @@ namespace XenAPI client_certificate_auth_name = proxy.client_certificate_auth_name == null ? null : proxy.client_certificate_auth_name; repository_proxy_url = proxy.repository_proxy_url == null ? null : proxy.repository_proxy_url; repository_proxy_username = proxy.repository_proxy_username == null ? null : proxy.repository_proxy_username; + migration_compression = (bool)proxy.migration_compression; } /// @@ -362,6 +366,8 @@ namespace XenAPI repository_proxy_url = Marshalling.ParseString(table, "repository_proxy_url"); if (table.ContainsKey("repository_proxy_username")) repository_proxy_username = Marshalling.ParseString(table, "repository_proxy_username"); + if (table.ContainsKey("migration_compression")) + migration_compression = Marshalling.ParseBool(table, "migration_compression"); } public Proxy_Pool ToProxy() @@ -394,9 +400,9 @@ namespace XenAPI result_.redo_log_vdi = redo_log_vdi ?? ""; result_.vswitch_controller = vswitch_controller ?? ""; result_.restrictions = Maps.convert_to_proxy_string_string(restrictions); - result_.metadata_VDIs = metadata_VDIs == null ? new string[] {} : Helper.RefListToStringArray(metadata_VDIs); + result_.metadata_VDIs = metadata_VDIs == null ? new string[] { } : Helper.RefListToStringArray(metadata_VDIs); result_.ha_cluster_stack = ha_cluster_stack ?? ""; - result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations); + result_.allowed_operations = allowed_operations == null ? new string[] { } : Helper.ObjectListToStringArray(allowed_operations); result_.current_operations = Maps.convert_to_proxy_string_pool_allowed_operations(current_operations); result_.guest_agent_config = Maps.convert_to_proxy_string_string(guest_agent_config); result_.cpu_info = Maps.convert_to_proxy_string_string(cpu_info); @@ -406,11 +412,12 @@ namespace XenAPI result_.uefi_certificates = uefi_certificates ?? ""; result_.is_psr_pending = is_psr_pending; result_.tls_verification_enabled = tls_verification_enabled; - result_.repositories = repositories == null ? new string[] {} : Helper.RefListToStringArray(repositories); + result_.repositories = repositories == null ? new string[] { } : Helper.RefListToStringArray(repositories); result_.client_certificate_auth_enabled = client_certificate_auth_enabled; result_.client_certificate_auth_name = client_certificate_auth_name ?? ""; result_.repository_proxy_url = repository_proxy_url ?? ""; result_.repository_proxy_username = repository_proxy_username ?? ""; + result_.migration_compression = migration_compression; return result_; } @@ -425,48 +432,49 @@ namespace XenAPI return false; return Helper.AreEqual2(this._uuid, other._uuid) && - Helper.AreEqual2(this._name_label, other._name_label) && - Helper.AreEqual2(this._name_description, other._name_description) && - Helper.AreEqual2(this._master, other._master) && - Helper.AreEqual2(this._default_SR, other._default_SR) && - Helper.AreEqual2(this._suspend_image_SR, other._suspend_image_SR) && - Helper.AreEqual2(this._crash_dump_SR, other._crash_dump_SR) && - Helper.AreEqual2(this._other_config, other._other_config) && - Helper.AreEqual2(this._ha_enabled, other._ha_enabled) && - Helper.AreEqual2(this._ha_configuration, other._ha_configuration) && - Helper.AreEqual2(this._ha_statefiles, other._ha_statefiles) && - Helper.AreEqual2(this._ha_host_failures_to_tolerate, other._ha_host_failures_to_tolerate) && - Helper.AreEqual2(this._ha_plan_exists_for, other._ha_plan_exists_for) && - Helper.AreEqual2(this._ha_allow_overcommit, other._ha_allow_overcommit) && - Helper.AreEqual2(this._ha_overcommitted, other._ha_overcommitted) && - Helper.AreEqual2(this._blobs, other._blobs) && - Helper.AreEqual2(this._tags, other._tags) && - Helper.AreEqual2(this._gui_config, other._gui_config) && - Helper.AreEqual2(this._health_check_config, other._health_check_config) && - Helper.AreEqual2(this._wlb_url, other._wlb_url) && - Helper.AreEqual2(this._wlb_username, other._wlb_username) && - Helper.AreEqual2(this._wlb_enabled, other._wlb_enabled) && - Helper.AreEqual2(this._wlb_verify_cert, other._wlb_verify_cert) && - Helper.AreEqual2(this._redo_log_enabled, other._redo_log_enabled) && - Helper.AreEqual2(this._redo_log_vdi, other._redo_log_vdi) && - Helper.AreEqual2(this._vswitch_controller, other._vswitch_controller) && - Helper.AreEqual2(this._restrictions, other._restrictions) && - Helper.AreEqual2(this._metadata_VDIs, other._metadata_VDIs) && - Helper.AreEqual2(this._ha_cluster_stack, other._ha_cluster_stack) && - Helper.AreEqual2(this._allowed_operations, other._allowed_operations) && - Helper.AreEqual2(this._guest_agent_config, other._guest_agent_config) && - Helper.AreEqual2(this._cpu_info, other._cpu_info) && - Helper.AreEqual2(this._policy_no_vendor_device, other._policy_no_vendor_device) && - Helper.AreEqual2(this._live_patching_disabled, other._live_patching_disabled) && - Helper.AreEqual2(this._igmp_snooping_enabled, other._igmp_snooping_enabled) && - Helper.AreEqual2(this._uefi_certificates, other._uefi_certificates) && - Helper.AreEqual2(this._is_psr_pending, other._is_psr_pending) && - Helper.AreEqual2(this._tls_verification_enabled, other._tls_verification_enabled) && - Helper.AreEqual2(this._repositories, other._repositories) && - Helper.AreEqual2(this._client_certificate_auth_enabled, other._client_certificate_auth_enabled) && - Helper.AreEqual2(this._client_certificate_auth_name, other._client_certificate_auth_name) && - Helper.AreEqual2(this._repository_proxy_url, other._repository_proxy_url) && - Helper.AreEqual2(this._repository_proxy_username, other._repository_proxy_username); + Helper.AreEqual2(this._name_label, other._name_label) && + Helper.AreEqual2(this._name_description, other._name_description) && + Helper.AreEqual2(this._master, other._master) && + Helper.AreEqual2(this._default_SR, other._default_SR) && + Helper.AreEqual2(this._suspend_image_SR, other._suspend_image_SR) && + Helper.AreEqual2(this._crash_dump_SR, other._crash_dump_SR) && + Helper.AreEqual2(this._other_config, other._other_config) && + Helper.AreEqual2(this._ha_enabled, other._ha_enabled) && + Helper.AreEqual2(this._ha_configuration, other._ha_configuration) && + Helper.AreEqual2(this._ha_statefiles, other._ha_statefiles) && + Helper.AreEqual2(this._ha_host_failures_to_tolerate, other._ha_host_failures_to_tolerate) && + Helper.AreEqual2(this._ha_plan_exists_for, other._ha_plan_exists_for) && + Helper.AreEqual2(this._ha_allow_overcommit, other._ha_allow_overcommit) && + Helper.AreEqual2(this._ha_overcommitted, other._ha_overcommitted) && + Helper.AreEqual2(this._blobs, other._blobs) && + Helper.AreEqual2(this._tags, other._tags) && + Helper.AreEqual2(this._gui_config, other._gui_config) && + Helper.AreEqual2(this._health_check_config, other._health_check_config) && + Helper.AreEqual2(this._wlb_url, other._wlb_url) && + Helper.AreEqual2(this._wlb_username, other._wlb_username) && + Helper.AreEqual2(this._wlb_enabled, other._wlb_enabled) && + Helper.AreEqual2(this._wlb_verify_cert, other._wlb_verify_cert) && + Helper.AreEqual2(this._redo_log_enabled, other._redo_log_enabled) && + Helper.AreEqual2(this._redo_log_vdi, other._redo_log_vdi) && + Helper.AreEqual2(this._vswitch_controller, other._vswitch_controller) && + Helper.AreEqual2(this._restrictions, other._restrictions) && + Helper.AreEqual2(this._metadata_VDIs, other._metadata_VDIs) && + Helper.AreEqual2(this._ha_cluster_stack, other._ha_cluster_stack) && + Helper.AreEqual2(this._allowed_operations, other._allowed_operations) && + Helper.AreEqual2(this._guest_agent_config, other._guest_agent_config) && + Helper.AreEqual2(this._cpu_info, other._cpu_info) && + Helper.AreEqual2(this._policy_no_vendor_device, other._policy_no_vendor_device) && + Helper.AreEqual2(this._live_patching_disabled, other._live_patching_disabled) && + Helper.AreEqual2(this._igmp_snooping_enabled, other._igmp_snooping_enabled) && + Helper.AreEqual2(this._uefi_certificates, other._uefi_certificates) && + Helper.AreEqual2(this._is_psr_pending, other._is_psr_pending) && + Helper.AreEqual2(this._tls_verification_enabled, other._tls_verification_enabled) && + Helper.AreEqual2(this._repositories, other._repositories) && + Helper.AreEqual2(this._client_certificate_auth_enabled, other._client_certificate_auth_enabled) && + Helper.AreEqual2(this._client_certificate_auth_name, other._client_certificate_auth_name) && + Helper.AreEqual2(this._repository_proxy_url, other._repository_proxy_url) && + Helper.AreEqual2(this._repository_proxy_username, other._repository_proxy_username) && + Helper.AreEqual2(this._migration_compression, other._migration_compression); } public override string SaveChanges(Session session, string opaqueRef, Pool server) @@ -482,62 +490,82 @@ namespace XenAPI { Pool.set_name_label(session, opaqueRef, _name_label); } + if (!Helper.AreEqual2(_name_description, server._name_description)) { Pool.set_name_description(session, opaqueRef, _name_description); } + if (!Helper.AreEqual2(_default_SR, server._default_SR)) { Pool.set_default_SR(session, opaqueRef, _default_SR); } + if (!Helper.AreEqual2(_suspend_image_SR, server._suspend_image_SR)) { Pool.set_suspend_image_SR(session, opaqueRef, _suspend_image_SR); } + if (!Helper.AreEqual2(_crash_dump_SR, server._crash_dump_SR)) { Pool.set_crash_dump_SR(session, opaqueRef, _crash_dump_SR); } + if (!Helper.AreEqual2(_other_config, server._other_config)) { Pool.set_other_config(session, opaqueRef, _other_config); } + if (!Helper.AreEqual2(_ha_allow_overcommit, server._ha_allow_overcommit)) { Pool.set_ha_allow_overcommit(session, opaqueRef, _ha_allow_overcommit); } + if (!Helper.AreEqual2(_tags, server._tags)) { Pool.set_tags(session, opaqueRef, _tags); } + if (!Helper.AreEqual2(_gui_config, server._gui_config)) { Pool.set_gui_config(session, opaqueRef, _gui_config); } + if (!Helper.AreEqual2(_health_check_config, server._health_check_config)) { Pool.set_health_check_config(session, opaqueRef, _health_check_config); } + if (!Helper.AreEqual2(_wlb_enabled, server._wlb_enabled)) { Pool.set_wlb_enabled(session, opaqueRef, _wlb_enabled); } + if (!Helper.AreEqual2(_wlb_verify_cert, server._wlb_verify_cert)) { Pool.set_wlb_verify_cert(session, opaqueRef, _wlb_verify_cert); } + if (!Helper.AreEqual2(_policy_no_vendor_device, server._policy_no_vendor_device)) { Pool.set_policy_no_vendor_device(session, opaqueRef, _policy_no_vendor_device); } + if (!Helper.AreEqual2(_live_patching_disabled, server._live_patching_disabled)) { Pool.set_live_patching_disabled(session, opaqueRef, _live_patching_disabled); } + if (!Helper.AreEqual2(_is_psr_pending, server._is_psr_pending)) { Pool.set_is_psr_pending(session, opaqueRef, _is_psr_pending); } + + if (!Helper.AreEqual2(_migration_compression, server._migration_compression)) + { + Pool.set_migration_compression(session, opaqueRef, _migration_compression); + } + if (!Helper.AreEqual2(_uefi_certificates, server._uefi_certificates)) { Pool.set_uefi_certificates(session, opaqueRef, _uefi_certificates); @@ -726,7 +754,7 @@ namespace XenAPI if (session.JsonRpcClient != null) return session.JsonRpcClient.pool_get_ha_statefiles(session.opaque_ref, _pool); else - return (string [])session.XmlRpcProxy.pool_get_ha_statefiles(session.opaque_ref, _pool ?? "").parse(); + return (string[])session.XmlRpcProxy.pool_get_ha_statefiles(session.opaque_ref, _pool ?? "").parse(); } /// @@ -810,7 +838,7 @@ namespace XenAPI if (session.JsonRpcClient != null) return session.JsonRpcClient.pool_get_tags(session.opaque_ref, _pool); else - return (string [])session.XmlRpcProxy.pool_get_tags(session.opaque_ref, _pool ?? "").parse(); + return (string[])session.XmlRpcProxy.pool_get_tags(session.opaque_ref, _pool ?? "").parse(); } /// @@ -1195,6 +1223,17 @@ namespace XenAPI return session.XmlRpcProxy.pool_get_repository_proxy_username(session.opaque_ref, _pool ?? "").parse(); } + /// + /// Get the migration_compression field of the given pool. + /// Experimental. First published in 22.33.0. + /// + /// The session + /// The opaque_ref of the given pool + public static bool get_migration_compression(Session session, string _pool) + { + return session.JsonRpcClient.pool_get_migration_compression(session.opaque_ref, _pool); + } + /// /// Set the name_label field of the given pool. /// First published in XenServer 4.0. @@ -1546,14 +1585,26 @@ namespace XenAPI } /// - /// Instruct host to join a new pool - /// First published in XenServer 4.0. + /// Set the migration_compression field of the given pool. + /// Experimental. First published in 22.33.0. /// /// The session - /// The hostname of the master of the pool to join - /// The username of the master (for initial authentication) - /// The password for the master (for initial authentication) - public static void join(Session session, string _master_address, string _master_username, string _master_password) + /// The opaque_ref of the given pool + /// New value to set + public static void set_migration_compression(Session session, string _pool, bool _migration_compression) + { + session.JsonRpcClient.pool_set_migration_compression(session.opaque_ref, _pool, _migration_compression); + } + + /// + /// Instruct host to join a new pool + /// First published in XenServer 4.0. + /// + /// The session + /// The hostname of the master of the pool to join + /// The username of the master (for initial authentication) + /// The password for the master (for initial authentication) + public static void join(Session session, string _master_address, string _master_username, string _master_password) { if (session.JsonRpcClient != null) session.JsonRpcClient.pool_join(session.opaque_ref, _master_address, _master_username, _master_password); @@ -1571,10 +1622,10 @@ namespace XenAPI /// The password for the master (for initial authentication) public static XenRef async_join(Session session, string _master_address, string _master_username, string _master_password) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_join(session.opaque_ref, _master_address, _master_username, _master_password); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_join(session.opaque_ref, _master_address ?? "", _master_username ?? "", _master_password ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_join(session.opaque_ref, _master_address, _master_username, _master_password); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_join(session.opaque_ref, _master_address ?? "", _master_username ?? "", _master_password ?? "").parse()); } /// @@ -1603,10 +1654,10 @@ namespace XenAPI /// The password for the master (for initial authentication) public static XenRef async_join_force(Session session, string _master_address, string _master_username, string _master_password) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_join_force(session.opaque_ref, _master_address, _master_username, _master_password); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_join_force(session.opaque_ref, _master_address ?? "", _master_username ?? "", _master_password ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_join_force(session.opaque_ref, _master_address, _master_username, _master_password); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_join_force(session.opaque_ref, _master_address ?? "", _master_username ?? "", _master_password ?? "").parse()); } /// @@ -1631,10 +1682,10 @@ namespace XenAPI /// The host to eject public static XenRef async_eject(Session session, string _host) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_eject(session.opaque_ref, _host); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_eject(session.opaque_ref, _host ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_eject(session.opaque_ref, _host); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_eject(session.opaque_ref, _host ?? "").parse()); } /// @@ -1684,10 +1735,10 @@ namespace XenAPI /// The session public static XenRef async_recover_slaves(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_recover_slaves(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_recover_slaves(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_recover_slaves(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_recover_slaves(session.opaque_ref).parse()); } /// @@ -1716,10 +1767,10 @@ namespace XenAPI /// VLAN tag for the new interface public static XenRef async_create_VLAN(Session session, string _device, string _network, long _vlan) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_create_vlan(session.opaque_ref, _device, _network, _vlan); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_create_vlan(session.opaque_ref, _device ?? "", _network ?? "", _vlan.ToString()).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_create_vlan(session.opaque_ref, _device, _network, _vlan); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_create_vlan(session.opaque_ref, _device ?? "", _network ?? "", _vlan.ToString()).parse()); } /// @@ -1744,10 +1795,10 @@ namespace XenAPI /// The network public static XenRef async_management_reconfigure(Session session, string _network) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_management_reconfigure(session.opaque_ref, _network); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_management_reconfigure(session.opaque_ref, _network ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_management_reconfigure(session.opaque_ref, _network); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_management_reconfigure(session.opaque_ref, _network ?? "").parse()); } /// @@ -1776,10 +1827,10 @@ namespace XenAPI /// VLAN tag for the new interface public static XenRef async_create_VLAN_from_PIF(Session session, string _pif, string _network, long _vlan) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_create_vlan_from_pif(session.opaque_ref, _pif, _network, _vlan); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_create_vlan_from_pif(session.opaque_ref, _pif ?? "", _network ?? "", _vlan.ToString()).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_create_vlan_from_pif(session.opaque_ref, _pif, _network, _vlan); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_create_vlan_from_pif(session.opaque_ref, _pif ?? "", _network ?? "", _vlan.ToString()).parse()); } /// @@ -1794,7 +1845,7 @@ namespace XenAPI if (session.JsonRpcClient != null) session.JsonRpcClient.pool_enable_ha(session.opaque_ref, _heartbeat_srs, _configuration); else - session.XmlRpcProxy.pool_enable_ha(session.opaque_ref, _heartbeat_srs == null ? new string[] {} : Helper.RefListToStringArray(_heartbeat_srs), Maps.convert_to_proxy_string_string(_configuration)).parse(); + session.XmlRpcProxy.pool_enable_ha(session.opaque_ref, _heartbeat_srs == null ? new string[] { } : Helper.RefListToStringArray(_heartbeat_srs), Maps.convert_to_proxy_string_string(_configuration)).parse(); } /// @@ -1806,10 +1857,10 @@ namespace XenAPI /// Detailed HA configuration to apply public static XenRef async_enable_ha(Session session, List> _heartbeat_srs, Dictionary _configuration) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_enable_ha(session.opaque_ref, _heartbeat_srs, _configuration); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_enable_ha(session.opaque_ref, _heartbeat_srs == null ? new string[] {} : Helper.RefListToStringArray(_heartbeat_srs), Maps.convert_to_proxy_string_string(_configuration)).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_enable_ha(session.opaque_ref, _heartbeat_srs, _configuration); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_enable_ha(session.opaque_ref, _heartbeat_srs == null ? new string[] { } : Helper.RefListToStringArray(_heartbeat_srs), Maps.convert_to_proxy_string_string(_configuration)).parse()); } /// @@ -1832,10 +1883,10 @@ namespace XenAPI /// The session public static XenRef async_disable_ha(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_disable_ha(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_disable_ha(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_disable_ha(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_disable_ha(session.opaque_ref).parse()); } /// @@ -1858,10 +1909,10 @@ namespace XenAPI /// The session public static XenRef async_sync_database(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_sync_database(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_sync_database(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_sync_database(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_sync_database(session.opaque_ref).parse()); } /// @@ -1886,10 +1937,10 @@ namespace XenAPI /// The host who should become the new master public static XenRef async_designate_new_master(Session session, string _host) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_designate_new_master(session.opaque_ref, _host); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_designate_new_master(session.opaque_ref, _host ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_designate_new_master(session.opaque_ref, _host); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_designate_new_master(session.opaque_ref, _host ?? "").parse()); } /// @@ -1959,7 +2010,7 @@ namespace XenAPI if (session.JsonRpcClient != null) return session.JsonRpcClient.pool_ha_compute_vm_failover_plan(session.opaque_ref, _failed_hosts, _failed_vms); else - return Maps.convert_from_proxy_XenRefVM_Dictionary_string_string(session.XmlRpcProxy.pool_ha_compute_vm_failover_plan(session.opaque_ref, _failed_hosts == null ? new string[] {} : Helper.RefListToStringArray(_failed_hosts), _failed_vms == null ? new string[] {} : Helper.RefListToStringArray(_failed_vms)).parse()); + return Maps.convert_from_proxy_XenRefVM_Dictionary_string_string(session.XmlRpcProxy.pool_ha_compute_vm_failover_plan(session.opaque_ref, _failed_hosts == null ? new string[] { } : Helper.RefListToStringArray(_failed_hosts), _failed_vms == null ? new string[] { } : Helper.RefListToStringArray(_failed_vms)).parse()); } /// @@ -1986,10 +2037,10 @@ namespace XenAPI /// New number of host failures to consider public static XenRef async_set_ha_host_failures_to_tolerate(Session session, string _pool, long _value) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_set_ha_host_failures_to_tolerate(session.opaque_ref, _pool, _value); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_set_ha_host_failures_to_tolerate(session.opaque_ref, _pool ?? "", _value.ToString()).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_set_ha_host_failures_to_tolerate(session.opaque_ref, _pool, _value); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_set_ha_host_failures_to_tolerate(session.opaque_ref, _pool ?? "", _value.ToString()).parse()); } /// @@ -2018,10 +2069,10 @@ namespace XenAPI /// The mime type for the data. Empty string translates to application/octet-stream public static XenRef async_create_new_blob(Session session, string _pool, string _name, string _mime_type) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_create_new_blob(session.opaque_ref, _pool, _name, _mime_type); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_create_new_blob(session.opaque_ref, _pool ?? "", _name ?? "", _mime_type ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_create_new_blob(session.opaque_ref, _pool, _name, _mime_type); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_create_new_blob(session.opaque_ref, _pool ?? "", _name ?? "", _mime_type ?? "").parse()); } /// @@ -2052,10 +2103,10 @@ namespace XenAPI /// True if the blob should be publicly available First published in XenServer 6.1. public static XenRef async_create_new_blob(Session session, string _pool, string _name, string _mime_type, bool _public) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_create_new_blob(session.opaque_ref, _pool, _name, _mime_type, _public); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_create_new_blob(session.opaque_ref, _pool ?? "", _name ?? "", _mime_type ?? "", _public).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_create_new_blob(session.opaque_ref, _pool, _name, _mime_type, _public); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_create_new_blob(session.opaque_ref, _pool ?? "", _name ?? "", _mime_type ?? "", _public).parse()); } /// @@ -2134,10 +2185,10 @@ namespace XenAPI /// The password used by the wlb server to authenticate with the xenserver public static XenRef async_initialize_wlb(Session session, string _wlb_url, string _wlb_username, string _wlb_password, string _xenserver_username, string _xenserver_password) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_initialize_wlb(session.opaque_ref, _wlb_url, _wlb_username, _wlb_password, _xenserver_username, _xenserver_password); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_initialize_wlb(session.opaque_ref, _wlb_url ?? "", _wlb_username ?? "", _wlb_password ?? "", _xenserver_username ?? "", _xenserver_password ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_initialize_wlb(session.opaque_ref, _wlb_url, _wlb_username, _wlb_password, _xenserver_username, _xenserver_password); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_initialize_wlb(session.opaque_ref, _wlb_url ?? "", _wlb_username ?? "", _wlb_password ?? "", _xenserver_username ?? "", _xenserver_password ?? "").parse()); } /// @@ -2160,10 +2211,10 @@ namespace XenAPI /// The session public static XenRef async_deconfigure_wlb(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_deconfigure_wlb(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_deconfigure_wlb(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_deconfigure_wlb(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_deconfigure_wlb(session.opaque_ref).parse()); } /// @@ -2188,10 +2239,10 @@ namespace XenAPI /// The configuration to use in optimizing this pool public static XenRef async_send_wlb_configuration(Session session, Dictionary _config) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_send_wlb_configuration(session.opaque_ref, _config); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_send_wlb_configuration(session.opaque_ref, Maps.convert_to_proxy_string_string(_config)).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_send_wlb_configuration(session.opaque_ref, _config); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_send_wlb_configuration(session.opaque_ref, Maps.convert_to_proxy_string_string(_config)).parse()); } /// @@ -2214,10 +2265,10 @@ namespace XenAPI /// The session public static XenRef async_retrieve_wlb_configuration(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_retrieve_wlb_configuration(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_retrieve_wlb_configuration(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_retrieve_wlb_configuration(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_retrieve_wlb_configuration(session.opaque_ref).parse()); } /// @@ -2240,10 +2291,10 @@ namespace XenAPI /// The session public static XenRef async_retrieve_wlb_recommendations(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_retrieve_wlb_recommendations(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_retrieve_wlb_recommendations(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_retrieve_wlb_recommendations(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_retrieve_wlb_recommendations(session.opaque_ref).parse()); } /// @@ -2272,10 +2323,10 @@ namespace XenAPI /// public static XenRef async_send_test_post(Session session, string _host, long _port, string _body) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_send_test_post(session.opaque_ref, _host, _port, _body); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_send_test_post(session.opaque_ref, _host ?? "", _port.ToString(), _body ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_send_test_post(session.opaque_ref, _host, _port, _body); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_send_test_post(session.opaque_ref, _host ?? "", _port.ToString(), _body ?? "").parse()); } /// @@ -2306,10 +2357,10 @@ namespace XenAPI [Deprecated("1.290.0")] public static XenRef async_certificate_install(Session session, string _name, string _cert) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_certificate_install(session.opaque_ref, _name, _cert); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_certificate_install(session.opaque_ref, _name ?? "", _cert ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_certificate_install(session.opaque_ref, _name, _cert); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_certificate_install(session.opaque_ref, _name ?? "", _cert ?? "").parse()); } /// @@ -2338,10 +2389,10 @@ namespace XenAPI [Deprecated("1.290.0")] public static XenRef async_certificate_uninstall(Session session, string _name) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_certificate_uninstall(session.opaque_ref, _name); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_certificate_uninstall(session.opaque_ref, _name ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_certificate_uninstall(session.opaque_ref, _name); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_certificate_uninstall(session.opaque_ref, _name ?? "").parse()); } /// @@ -2356,7 +2407,7 @@ namespace XenAPI if (session.JsonRpcClient != null) return session.JsonRpcClient.pool_certificate_list(session.opaque_ref); else - return (string [])session.XmlRpcProxy.pool_certificate_list(session.opaque_ref).parse(); + return (string[])session.XmlRpcProxy.pool_certificate_list(session.opaque_ref).parse(); } /// @@ -2368,10 +2419,10 @@ namespace XenAPI [Deprecated("1.290.0")] public static XenRef async_certificate_list(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_certificate_list(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_certificate_list(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_certificate_list(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_certificate_list(session.opaque_ref).parse()); } /// @@ -2398,10 +2449,10 @@ namespace XenAPI /// The certificate in PEM format public static XenRef async_install_ca_certificate(Session session, string _name, string _cert) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_install_ca_certificate(session.opaque_ref, _name, _cert); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_install_ca_certificate(session.opaque_ref, _name ?? "", _cert ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_install_ca_certificate(session.opaque_ref, _name, _cert); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_install_ca_certificate(session.opaque_ref, _name ?? "", _cert ?? "").parse()); } /// @@ -2426,10 +2477,10 @@ namespace XenAPI /// The certificate name public static XenRef async_uninstall_ca_certificate(Session session, string _name) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_uninstall_ca_certificate(session.opaque_ref, _name); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_uninstall_ca_certificate(session.opaque_ref, _name ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_uninstall_ca_certificate(session.opaque_ref, _name); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_uninstall_ca_certificate(session.opaque_ref, _name ?? "").parse()); } /// @@ -2456,10 +2507,10 @@ namespace XenAPI /// The CRL public static XenRef async_crl_install(Session session, string _name, string _cert) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_crl_install(session.opaque_ref, _name, _cert); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_crl_install(session.opaque_ref, _name ?? "", _cert ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_crl_install(session.opaque_ref, _name, _cert); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_crl_install(session.opaque_ref, _name ?? "", _cert ?? "").parse()); } /// @@ -2484,10 +2535,10 @@ namespace XenAPI /// The CRL name public static XenRef async_crl_uninstall(Session session, string _name) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_crl_uninstall(session.opaque_ref, _name); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_crl_uninstall(session.opaque_ref, _name ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_crl_uninstall(session.opaque_ref, _name); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_crl_uninstall(session.opaque_ref, _name ?? "").parse()); } /// @@ -2500,7 +2551,7 @@ namespace XenAPI if (session.JsonRpcClient != null) return session.JsonRpcClient.pool_crl_list(session.opaque_ref); else - return (string [])session.XmlRpcProxy.pool_crl_list(session.opaque_ref).parse(); + return (string[])session.XmlRpcProxy.pool_crl_list(session.opaque_ref).parse(); } /// @@ -2510,10 +2561,10 @@ namespace XenAPI /// The session public static XenRef async_crl_list(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_crl_list(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_crl_list(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_crl_list(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_crl_list(session.opaque_ref).parse()); } /// @@ -2536,10 +2587,10 @@ namespace XenAPI /// The session public static XenRef async_certificate_sync(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_certificate_sync(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_certificate_sync(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_certificate_sync(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_certificate_sync(session.opaque_ref).parse()); } /// @@ -2577,10 +2628,10 @@ namespace XenAPI /// SR to hold the redo log. public static XenRef async_enable_redo_log(Session session, string _sr) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_enable_redo_log(session.opaque_ref, _sr); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_enable_redo_log(session.opaque_ref, _sr ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_enable_redo_log(session.opaque_ref, _sr); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_enable_redo_log(session.opaque_ref, _sr ?? "").parse()); } /// @@ -2603,10 +2654,10 @@ namespace XenAPI /// The session public static XenRef async_disable_redo_log(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_disable_redo_log(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_disable_redo_log(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_disable_redo_log(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_disable_redo_log(session.opaque_ref).parse()); } /// @@ -2635,10 +2686,10 @@ namespace XenAPI [Deprecated("XenServer 7.2")] public static XenRef async_set_vswitch_controller(Session session, string _address) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_set_vswitch_controller(session.opaque_ref, _address); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_set_vswitch_controller(session.opaque_ref, _address ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_set_vswitch_controller(session.opaque_ref, _address); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_set_vswitch_controller(session.opaque_ref, _address ?? "").parse()); } /// @@ -2678,10 +2729,10 @@ namespace XenAPI /// The opaque_ref of the given pool public static XenRef async_enable_local_storage_caching(Session session, string _pool) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_enable_local_storage_caching(session.opaque_ref, _pool); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_enable_local_storage_caching(session.opaque_ref, _pool ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_enable_local_storage_caching(session.opaque_ref, _pool); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_enable_local_storage_caching(session.opaque_ref, _pool ?? "").parse()); } /// @@ -2706,10 +2757,10 @@ namespace XenAPI /// The opaque_ref of the given pool public static XenRef async_disable_local_storage_caching(Session session, string _pool) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_disable_local_storage_caching(session.opaque_ref, _pool); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_disable_local_storage_caching(session.opaque_ref, _pool ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_disable_local_storage_caching(session.opaque_ref, _pool); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_disable_local_storage_caching(session.opaque_ref, _pool ?? "").parse()); } /// @@ -2734,10 +2785,10 @@ namespace XenAPI /// The opaque_ref of the given pool public static XenRef async_get_license_state(Session session, string _pool) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_get_license_state(session.opaque_ref, _pool); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_get_license_state(session.opaque_ref, _pool ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_get_license_state(session.opaque_ref, _pool); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_get_license_state(session.opaque_ref, _pool ?? "").parse()); } /// @@ -2764,10 +2815,10 @@ namespace XenAPI /// The requested edition public static XenRef async_apply_edition(Session session, string _pool, string _edition) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_apply_edition(session.opaque_ref, _pool, _edition); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_apply_edition(session.opaque_ref, _pool ?? "", _edition ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_apply_edition(session.opaque_ref, _pool, _edition); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_apply_edition(session.opaque_ref, _pool ?? "", _edition ?? "").parse()); } /// @@ -2792,10 +2843,10 @@ namespace XenAPI /// The opaque_ref of the given pool public static XenRef async_enable_ssl_legacy(Session session, string _pool) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_enable_ssl_legacy(session.opaque_ref, _pool); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_enable_ssl_legacy(session.opaque_ref, _pool ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_enable_ssl_legacy(session.opaque_ref, _pool); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_enable_ssl_legacy(session.opaque_ref, _pool ?? "").parse()); } /// @@ -2824,10 +2875,10 @@ namespace XenAPI [Deprecated("Citrix Hypervisor 8.2")] public static XenRef async_disable_ssl_legacy(Session session, string _pool) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_disable_ssl_legacy(session.opaque_ref, _pool); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_disable_ssl_legacy(session.opaque_ref, _pool ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_disable_ssl_legacy(session.opaque_ref, _pool); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_disable_ssl_legacy(session.opaque_ref, _pool ?? "").parse()); } /// @@ -2854,10 +2905,10 @@ namespace XenAPI /// Enable or disable IGMP Snooping on the pool public static XenRef async_set_igmp_snooping_enabled(Session session, string _pool, bool _value) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_set_igmp_snooping_enabled(session.opaque_ref, _pool, _value); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_set_igmp_snooping_enabled(session.opaque_ref, _pool ?? "", _value).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_set_igmp_snooping_enabled(session.opaque_ref, _pool, _value); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_set_igmp_snooping_enabled(session.opaque_ref, _pool ?? "", _value).parse()); } /// @@ -2884,10 +2935,10 @@ namespace XenAPI /// The name of the API call public static XenRef async_has_extension(Session session, string _pool, string _name) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_has_extension(session.opaque_ref, _pool, _name); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_has_extension(session.opaque_ref, _pool ?? "", _name ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_has_extension(session.opaque_ref, _pool, _name); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_has_extension(session.opaque_ref, _pool ?? "", _name ?? "").parse()); } /// @@ -2916,10 +2967,10 @@ namespace XenAPI /// The value to add public static XenRef async_add_to_guest_agent_config(Session session, string _pool, string _key, string _value) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_add_to_guest_agent_config(session.opaque_ref, _pool, _key, _value); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_add_to_guest_agent_config(session.opaque_ref, _pool ?? "", _key ?? "", _value ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_add_to_guest_agent_config(session.opaque_ref, _pool, _key, _value); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_add_to_guest_agent_config(session.opaque_ref, _pool ?? "", _key ?? "", _value ?? "").parse()); } /// @@ -2946,10 +2997,10 @@ namespace XenAPI /// The key to remove public static XenRef async_remove_from_guest_agent_config(Session session, string _pool, string _key) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_remove_from_guest_agent_config(session.opaque_ref, _pool, _key); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_remove_from_guest_agent_config(session.opaque_ref, _pool ?? "", _key ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_remove_from_guest_agent_config(session.opaque_ref, _pool, _key); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_remove_from_guest_agent_config(session.opaque_ref, _pool ?? "", _key ?? "").parse()); } /// @@ -2972,10 +3023,10 @@ namespace XenAPI /// The session public static XenRef async_rotate_secret(Session session) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_rotate_secret(session.opaque_ref); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_rotate_secret(session.opaque_ref).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_rotate_secret(session.opaque_ref); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_rotate_secret(session.opaque_ref).parse()); } /// @@ -2990,7 +3041,7 @@ namespace XenAPI if (session.JsonRpcClient != null) session.JsonRpcClient.pool_set_repositories(session.opaque_ref, _pool, _value); else - session.XmlRpcProxy.pool_set_repositories(session.opaque_ref, _pool ?? "", _value == null ? new string[] {} : Helper.RefListToStringArray(_value)).parse(); + session.XmlRpcProxy.pool_set_repositories(session.opaque_ref, _pool ?? "", _value == null ? new string[] { } : Helper.RefListToStringArray(_value)).parse(); } /// @@ -3002,10 +3053,10 @@ namespace XenAPI /// The set of repositories to be enabled public static XenRef async_set_repositories(Session session, string _pool, List> _value) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_set_repositories(session.opaque_ref, _pool, _value); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_set_repositories(session.opaque_ref, _pool ?? "", _value == null ? new string[] {} : Helper.RefListToStringArray(_value)).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_set_repositories(session.opaque_ref, _pool, _value); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_set_repositories(session.opaque_ref, _pool ?? "", _value == null ? new string[] { } : Helper.RefListToStringArray(_value)).parse()); } /// @@ -3032,10 +3083,10 @@ namespace XenAPI /// The repository to be added to the enabled set public static XenRef async_add_repository(Session session, string _pool, string _value) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_add_repository(session.opaque_ref, _pool, _value); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_add_repository(session.opaque_ref, _pool ?? "", _value ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_add_repository(session.opaque_ref, _pool, _value); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_add_repository(session.opaque_ref, _pool ?? "", _value ?? "").parse()); } /// @@ -3062,10 +3113,10 @@ namespace XenAPI /// The repository to be removed public static XenRef async_remove_repository(Session session, string _pool, string _value) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_remove_repository(session.opaque_ref, _pool, _value); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_remove_repository(session.opaque_ref, _pool ?? "", _value ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_remove_repository(session.opaque_ref, _pool, _value); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_remove_repository(session.opaque_ref, _pool ?? "", _value ?? "").parse()); } /// @@ -3096,10 +3147,10 @@ namespace XenAPI /// The ID of the token public static XenRef async_sync_updates(Session session, string _pool, bool _force, string _token, string _token_id) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_sync_updates(session.opaque_ref, _pool, _force, _token, _token_id); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_sync_updates(session.opaque_ref, _pool ?? "", _force, _token ?? "", _token_id ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_sync_updates(session.opaque_ref, _pool, _force, _token, _token_id); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_sync_updates(session.opaque_ref, _pool ?? "", _force, _token ?? "", _token_id ?? "").parse()); } /// @@ -3114,7 +3165,7 @@ namespace XenAPI if (session.JsonRpcClient != null) return session.JsonRpcClient.pool_check_update_readiness(session.opaque_ref, _pool, _requires_reboot); else - return (string [])session.XmlRpcProxy.pool_check_update_readiness(session.opaque_ref, _pool ?? "", _requires_reboot).parse(); + return (string[])session.XmlRpcProxy.pool_check_update_readiness(session.opaque_ref, _pool ?? "", _requires_reboot).parse(); } /// @@ -3126,10 +3177,10 @@ namespace XenAPI /// Assume that the update will require host reboots public static XenRef async_check_update_readiness(Session session, string _pool, bool _requires_reboot) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_check_update_readiness(session.opaque_ref, _pool, _requires_reboot); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_check_update_readiness(session.opaque_ref, _pool ?? "", _requires_reboot).parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_check_update_readiness(session.opaque_ref, _pool, _requires_reboot); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_check_update_readiness(session.opaque_ref, _pool ?? "", _requires_reboot).parse()); } /// @@ -3156,10 +3207,10 @@ namespace XenAPI /// The name (CN/SAN) that an incoming client certificate must have to allow authentication public static XenRef async_enable_client_certificate_auth(Session session, string _pool, string _name) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_enable_client_certificate_auth(session.opaque_ref, _pool, _name); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_enable_client_certificate_auth(session.opaque_ref, _pool ?? "", _name ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_enable_client_certificate_auth(session.opaque_ref, _pool, _name); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_enable_client_certificate_auth(session.opaque_ref, _pool ?? "", _name ?? "").parse()); } /// @@ -3184,10 +3235,10 @@ namespace XenAPI /// The opaque_ref of the given pool public static XenRef async_disable_client_certificate_auth(Session session, string _pool) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_disable_client_certificate_auth(session.opaque_ref, _pool); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_disable_client_certificate_auth(session.opaque_ref, _pool ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_disable_client_certificate_auth(session.opaque_ref, _pool); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_disable_client_certificate_auth(session.opaque_ref, _pool ?? "").parse()); } /// @@ -3218,10 +3269,10 @@ namespace XenAPI /// The password used to authenticate with the proxy server public static XenRef async_configure_repository_proxy(Session session, string _pool, string _url, string _username, string _password) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_configure_repository_proxy(session.opaque_ref, _pool, _url, _username, _password); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_configure_repository_proxy(session.opaque_ref, _pool ?? "", _url ?? "", _username ?? "", _password ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_configure_repository_proxy(session.opaque_ref, _pool, _url, _username, _password); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_configure_repository_proxy(session.opaque_ref, _pool ?? "", _url ?? "", _username ?? "", _password ?? "").parse()); } /// @@ -3246,10 +3297,10 @@ namespace XenAPI /// The opaque_ref of the given pool public static XenRef async_disable_repository_proxy(Session session, string _pool) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_disable_repository_proxy(session.opaque_ref, _pool); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_disable_repository_proxy(session.opaque_ref, _pool ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_disable_repository_proxy(session.opaque_ref, _pool); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_disable_repository_proxy(session.opaque_ref, _pool ?? "").parse()); } /// @@ -3276,10 +3327,10 @@ namespace XenAPI /// The certificates to apply to the pool and its hosts public static XenRef async_set_uefi_certificates(Session session, string _pool, string _value) { - if (session.JsonRpcClient != null) - return session.JsonRpcClient.async_pool_set_uefi_certificates(session.opaque_ref, _pool, _value); - else - return XenRef.Create(session.XmlRpcProxy.async_pool_set_uefi_certificates(session.opaque_ref, _pool ?? "", _value ?? "").parse()); + if (session.JsonRpcClient != null) + return session.JsonRpcClient.async_pool_set_uefi_certificates(session.opaque_ref, _pool, _value); + else + return XenRef.Create(session.XmlRpcProxy.async_pool_set_uefi_certificates(session.opaque_ref, _pool ?? "", _value ?? "").parse()); } /// @@ -3323,6 +3374,7 @@ namespace XenAPI } } } + private string _uuid = ""; /// @@ -3340,6 +3392,7 @@ namespace XenAPI } } } + private string _name_label = ""; /// @@ -3357,6 +3410,7 @@ namespace XenAPI } } } + private string _name_description = ""; /// @@ -3375,6 +3429,7 @@ namespace XenAPI } } } + private XenRef _master = new XenRef(Helper.NullOpaqueRef); /// @@ -3393,6 +3448,7 @@ namespace XenAPI } } } + private XenRef _default_SR = new XenRef(Helper.NullOpaqueRef); /// @@ -3411,6 +3467,7 @@ namespace XenAPI } } } + private XenRef _suspend_image_SR = new XenRef(Helper.NullOpaqueRef); /// @@ -3429,6 +3486,7 @@ namespace XenAPI } } } + private XenRef _crash_dump_SR = new XenRef(Helper.NullOpaqueRef); /// @@ -3447,7 +3505,8 @@ namespace XenAPI } } } - private Dictionary _other_config = new Dictionary() {}; + + private Dictionary _other_config = new Dictionary() { }; /// /// true if HA is enabled on the pool, false otherwise @@ -3465,6 +3524,7 @@ namespace XenAPI } } } + private bool _ha_enabled = false; /// @@ -3484,7 +3544,8 @@ namespace XenAPI } } } - private Dictionary _ha_configuration = new Dictionary() {}; + + private Dictionary _ha_configuration = new Dictionary() { }; /// /// HA statefile VDIs in use @@ -3502,7 +3563,8 @@ namespace XenAPI } } } - private string[] _ha_statefiles = {}; + + private string[] _ha_statefiles = { }; /// /// Number of host failures to tolerate before the Pool is declared to be overcommitted @@ -3520,6 +3582,7 @@ namespace XenAPI } } } + private long _ha_host_failures_to_tolerate = 0; /// @@ -3538,6 +3601,7 @@ namespace XenAPI } } } + private long _ha_plan_exists_for = 0; /// @@ -3556,6 +3620,7 @@ namespace XenAPI } } } + private bool _ha_allow_overcommit = false; /// @@ -3574,6 +3639,7 @@ namespace XenAPI } } } + private bool _ha_overcommitted = false; /// @@ -3593,7 +3659,8 @@ namespace XenAPI } } } - private Dictionary> _blobs = new Dictionary>() {}; + + private Dictionary> _blobs = new Dictionary>() { }; /// /// user-specified tags for categorization purposes @@ -3611,7 +3678,8 @@ namespace XenAPI } } } - private string[] _tags = {}; + + private string[] _tags = { }; /// /// gui-specific configuration for pool @@ -3630,7 +3698,8 @@ namespace XenAPI } } } - private Dictionary _gui_config = new Dictionary() {}; + + private Dictionary _gui_config = new Dictionary() { }; /// /// Configuration for the automatic health check feature @@ -3649,7 +3718,8 @@ namespace XenAPI } } } - private Dictionary _health_check_config = new Dictionary() {}; + + private Dictionary _health_check_config = new Dictionary() { }; /// /// Url for the configured workload balancing host @@ -3667,6 +3737,7 @@ namespace XenAPI } } } + private string _wlb_url = ""; /// @@ -3685,6 +3756,7 @@ namespace XenAPI } } } + private string _wlb_username = ""; /// @@ -3703,6 +3775,7 @@ namespace XenAPI } } } + private bool _wlb_enabled = false; /// @@ -3721,6 +3794,7 @@ namespace XenAPI } } } + private bool _wlb_verify_cert = false; /// @@ -3739,6 +3813,7 @@ namespace XenAPI } } } + private bool _redo_log_enabled = false; /// @@ -3758,6 +3833,7 @@ namespace XenAPI } } } + private XenRef _redo_log_vdi = new XenRef("OpaqueRef:NULL"); /// @@ -3776,6 +3852,7 @@ namespace XenAPI } } } + private string _vswitch_controller = ""; /// @@ -3795,7 +3872,8 @@ namespace XenAPI } } } - private Dictionary _restrictions = new Dictionary() {}; + + private Dictionary _restrictions = new Dictionary() { }; /// /// The set of currently known metadata VDIs for this pool @@ -3814,7 +3892,8 @@ namespace XenAPI } } } - private List> _metadata_VDIs = new List>() {}; + + private List> _metadata_VDIs = new List>() { }; /// /// The HA cluster stack that is currently in use. Only valid when HA is enabled. @@ -3832,6 +3911,7 @@ namespace XenAPI } } } + private string _ha_cluster_stack = ""; /// @@ -3849,7 +3929,8 @@ namespace XenAPI } } } - private List _allowed_operations = new List() {}; + + private List _allowed_operations = new List() { }; /// /// links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. @@ -3866,7 +3947,8 @@ namespace XenAPI } } } - private Dictionary _current_operations = new Dictionary() {}; + + private Dictionary _current_operations = new Dictionary() { }; /// /// Pool-wide guest agent configuration information @@ -3885,7 +3967,8 @@ namespace XenAPI } } } - private Dictionary _guest_agent_config = new Dictionary() {}; + + private Dictionary _guest_agent_config = new Dictionary() { }; /// /// Details about the physical CPUs on the pool @@ -3904,7 +3987,8 @@ namespace XenAPI } } } - private Dictionary _cpu_info = new Dictionary() {}; + + private Dictionary _cpu_info = new Dictionary() { }; /// /// The pool-wide policy for clients on whether to use the vendor device or not on newly created VMs. This field will also be consulted if the 'has_vendor_device' field is not specified in the VM.create call. @@ -3922,6 +4006,7 @@ namespace XenAPI } } } + private bool _policy_no_vendor_device = false; /// @@ -3940,6 +4025,7 @@ namespace XenAPI } } } + private bool _live_patching_disabled = false; /// @@ -3958,6 +4044,7 @@ namespace XenAPI } } } + private bool _igmp_snooping_enabled = false; /// @@ -3976,6 +4063,7 @@ namespace XenAPI } } } + private string _uefi_certificates = ""; /// @@ -3994,6 +4082,7 @@ namespace XenAPI } } } + private bool _is_psr_pending = false; /// @@ -4012,6 +4101,7 @@ namespace XenAPI } } } + private bool _tls_verification_enabled = false; /// @@ -4031,7 +4121,8 @@ namespace XenAPI } } } - private List> _repositories = new List>() {}; + + private List> _repositories = new List>() { }; /// /// True if authentication by TLS client certificates is enabled @@ -4049,6 +4140,7 @@ namespace XenAPI } } } + private bool _client_certificate_auth_enabled = false; /// @@ -4067,6 +4159,7 @@ namespace XenAPI } } } + private string _client_certificate_auth_name = ""; /// @@ -4085,6 +4178,7 @@ namespace XenAPI } } } + private string _repository_proxy_url = ""; /// @@ -4103,6 +4197,26 @@ namespace XenAPI } } } + private string _repository_proxy_username = ""; + + /// + /// Default behaviour during migration, True if stream compression should be used + /// Experimental. First published in 22.33.0. + /// + public virtual bool migration_compression + { + get { return _migration_compression; } + set + { + if (!Helper.AreEqual(value, _migration_compression)) + { + _migration_compression = value; + NotifyPropertyChanged("migration_compression"); + } + } + } + + private bool _migration_compression = false; } } diff --git a/XenModel/XenAPI/Proxy.cs b/XenModel/XenAPI/Proxy.cs index 47e1299c9..7f85ac363 100755 --- a/XenModel/XenAPI/Proxy.cs +++ b/XenModel/XenAPI/Proxy.cs @@ -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)]