From 8e5b40b84cde353fa79e7cf2596f06e5765be0fe Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Thu, 16 Nov 2017 15:18:10 +0000 Subject: [PATCH] Update XenAPI based on XS/master Signed-off-by: Mihaela Stoica --- XenModel/XenAPI/Auth.cs | 9 + XenModel/XenAPI/Blob.cs | 9 + XenModel/XenAPI/Bond.cs | 9 + XenModel/XenAPI/Console.cs | 9 + XenModel/XenAPI/Crashdump.cs | 9 + XenModel/XenAPI/DR_task.cs | 9 + XenModel/XenAPI/Data_source.cs | 9 + XenModel/XenAPI/Feature.cs | 9 + .../XenAPI/FriendlyErrorNames.Designer.cs | 157 +++++++++++++++++- XenModel/XenAPI/FriendlyErrorNames.resx | 6 + XenModel/XenAPI/GPU_group.cs | 9 + XenModel/XenAPI/Helper.cs | 30 +--- XenModel/XenAPI/Host.cs | 11 +- XenModel/XenAPI/Host_cpu.cs | 9 + XenModel/XenAPI/Host_crashdump.cs | 9 + XenModel/XenAPI/Host_metrics.cs | 9 + XenModel/XenAPI/Host_patch.cs | 9 + XenModel/XenAPI/LVHD.cs | 9 + XenModel/XenAPI/Maps.cs | 47 ++++++ XenModel/XenAPI/Message.cs | 9 + XenModel/XenAPI/Network.cs | 9 + XenModel/XenAPI/PBD.cs | 9 + XenModel/XenAPI/PCI.cs | 9 + XenModel/XenAPI/PGPU.cs | 50 +++++- XenModel/XenAPI/PIF.cs | 9 + XenModel/XenAPI/PIF_metrics.cs | 9 + XenModel/XenAPI/PUSB.cs | 9 + XenModel/XenAPI/PVS_cache_storage.cs | 9 + XenModel/XenAPI/PVS_proxy.cs | 9 + XenModel/XenAPI/PVS_server.cs | 9 + XenModel/XenAPI/PVS_site.cs | 9 + XenModel/XenAPI/Pool.cs | 9 + XenModel/XenAPI/Pool_patch.cs | 9 + XenModel/XenAPI/Pool_update.cs | 9 + XenModel/XenAPI/Proxy.cs | 26 +++ XenModel/XenAPI/Role.cs | 9 + XenModel/XenAPI/SDN_controller.cs | 9 + XenModel/XenAPI/SM.cs | 9 + XenModel/XenAPI/SR.cs | 11 +- XenModel/XenAPI/Secret.cs | 9 + XenModel/XenAPI/Subject.cs | 9 + XenModel/XenAPI/Task.cs | 9 + XenModel/XenAPI/Tunnel.cs | 9 + XenModel/XenAPI/USB_group.cs | 9 + XenModel/XenAPI/User.cs | 9 + XenModel/XenAPI/VBD.cs | 9 + XenModel/XenAPI/VBD_metrics.cs | 9 + XenModel/XenAPI/VDI.cs | 11 +- XenModel/XenAPI/VGPU.cs | 50 +++++- XenModel/XenAPI/VGPU_type.cs | 9 + XenModel/XenAPI/VIF.cs | 9 + XenModel/XenAPI/VIF_metrics.cs | 9 + XenModel/XenAPI/VLAN.cs | 9 + XenModel/XenAPI/VM.cs | 85 +++++++++- XenModel/XenAPI/VMPP.cs | 9 + XenModel/XenAPI/VMSS.cs | 9 + XenModel/XenAPI/VM_appliance.cs | 9 + XenModel/XenAPI/VM_guest_metrics.cs | 9 + XenModel/XenAPI/VM_metrics.cs | 9 + XenModel/XenAPI/VTPM.cs | 9 + XenModel/XenAPI/VUSB.cs | 9 + XenModel/XenAPI/Vdi_nbd_server_info.cs | 11 +- 62 files changed, 907 insertions(+), 38 deletions(-) diff --git a/XenModel/XenAPI/Auth.cs b/XenModel/XenAPI/Auth.cs index 19b951706..7a8ed3035 100644 --- a/XenModel/XenAPI/Auth.cs +++ b/XenModel/XenAPI/Auth.cs @@ -87,6 +87,15 @@ namespace XenAPI return false; } + internal static List ProxyArrayToObjectList(Proxy_Auth[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Auth(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Auth server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Blob.cs b/XenModel/XenAPI/Blob.cs index 677640def..9b3135068 100644 --- a/XenModel/XenAPI/Blob.cs +++ b/XenModel/XenAPI/Blob.cs @@ -138,6 +138,15 @@ namespace XenAPI Helper.AreEqual2(this._mime_type, other._mime_type); } + internal static List ProxyArrayToObjectList(Proxy_Blob[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Blob(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Blob server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Bond.cs b/XenModel/XenAPI/Bond.cs index 870cc84b8..4b78cca02 100644 --- a/XenModel/XenAPI/Bond.cs +++ b/XenModel/XenAPI/Bond.cs @@ -145,6 +145,15 @@ namespace XenAPI Helper.AreEqual2(this._links_up, other._links_up); } + internal static List ProxyArrayToObjectList(Proxy_Bond[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Bond(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Bond server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Console.cs b/XenModel/XenAPI/Console.cs index e6a2e04c5..1002637bd 100644 --- a/XenModel/XenAPI/Console.cs +++ b/XenModel/XenAPI/Console.cs @@ -124,6 +124,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_Console[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Console(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Console server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Crashdump.cs b/XenModel/XenAPI/Crashdump.cs index c4f78a760..a703d5fb4 100644 --- a/XenModel/XenAPI/Crashdump.cs +++ b/XenModel/XenAPI/Crashdump.cs @@ -117,6 +117,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_Crashdump[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Crashdump(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Crashdump server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/DR_task.cs b/XenModel/XenAPI/DR_task.cs index 32f8a231c..c19ad8d9d 100644 --- a/XenModel/XenAPI/DR_task.cs +++ b/XenModel/XenAPI/DR_task.cs @@ -103,6 +103,15 @@ namespace XenAPI Helper.AreEqual2(this._introduced_SRs, other._introduced_SRs); } + internal static List ProxyArrayToObjectList(Proxy_DR_task[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new DR_task(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, DR_task server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Data_source.cs b/XenModel/XenAPI/Data_source.cs index 266c9eeb7..8ada4695b 100644 --- a/XenModel/XenAPI/Data_source.cs +++ b/XenModel/XenAPI/Data_source.cs @@ -145,6 +145,15 @@ namespace XenAPI Helper.AreEqual2(this._value, other._value); } + internal static List ProxyArrayToObjectList(Proxy_Data_source[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Data_source(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Data_source server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Feature.cs b/XenModel/XenAPI/Feature.cs index c62d745bc..350c5684d 100644 --- a/XenModel/XenAPI/Feature.cs +++ b/XenModel/XenAPI/Feature.cs @@ -138,6 +138,15 @@ namespace XenAPI Helper.AreEqual2(this._host, other._host); } + internal static List ProxyArrayToObjectList(Proxy_Feature[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Feature(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Feature server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/FriendlyErrorNames.Designer.cs b/XenModel/XenAPI/FriendlyErrorNames.Designer.cs index 189a4753a..ad5550567 100644 --- a/XenModel/XenAPI/FriendlyErrorNames.Designer.cs +++ b/XenModel/XenAPI/FriendlyErrorNames.Designer.cs @@ -492,6 +492,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to The IGMP Snooping setting cannot be applied for some of the host, network(s).. + /// + public static string COULD_NOT_UPDATE_IGMP_SNOOPING_EVERYWHERE { + get { + return ResourceManager.GetString("COULD_NOT_UPDATE_IGMP_SNOOPING_EVERYWHERE", resourceCulture); + } + } + /// /// Looks up a localized string similar to The CPU does not support masking of features.. /// @@ -1770,6 +1779,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to You tried to add a purpose to a network but the new purpose is not compatible with an existing purpose of the network or other networks.. + /// + public static string NETWORK_INCOMPATIBLE_PURPOSES { + get { + return ResourceManager.GetString("NETWORK_INCOMPATIBLE_PURPOSES", resourceCulture); + } + } + /// /// Looks up a localized string similar to The network is not managed by xapi.. /// @@ -1842,6 +1860,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to Nvidia tools error. Please ensure that the latest Nvidia tools are installed. + /// + public static string NVIDIA_TOOLS_ERROR { + get { + return ResourceManager.GetString("NVIDIA_TOOLS_ERROR", resourceCulture); + } + } + /// /// Looks up a localized string similar to The specified object no longer exists.. /// @@ -1914,6 +1941,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to The passthrough_enabled must be true before passthrough usb to vm.. + /// + public static string PASSTHROUGH_NOT_ENABLED { + get { + return ResourceManager.GetString("PASSTHROUGH_NOT_ENABLED", resourceCulture); + } + } + /// /// Looks up a localized string similar to The update {0} has already been applied. /// @@ -2454,6 +2490,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to The VDI corresponding to this PUSB has existing VBDs.. + /// + public static string PUSB_VDI_CONFLICT { + get { + return ResourceManager.GetString("PUSB_VDI_CONFLICT", resourceCulture); + } + } + /// /// Looks up a localized string similar to The PVS site already has cache storage configured for the host.. /// @@ -3368,6 +3413,24 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to Given SMB version is not allowed. Choose either 1.0 or 3.0. + /// + public static string SR_BACKEND_FAILURE_227 { + get { + return ResourceManager.GetString("SR_BACKEND_FAILURE_227", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Require "-o" along with xe-mount-isosr. + /// + public static string SR_BACKEND_FAILURE_228 { + get { + return ResourceManager.GetString("SR_BACKEND_FAILURE_228", resourceCulture); + } + } + /// /// Looks up a localized string similar to The specified VDI is currently in use. /// @@ -3926,6 +3989,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to Failed to calculate changed blocks for given VDIs.. + /// + public static string SR_BACKEND_FAILURE_460 { + get { + return ResourceManager.GetString("SR_BACKEND_FAILURE_460", resourceCulture); + } + } + /// /// Looks up a localized string similar to The storage repository is not available. /// @@ -4646,6 +4718,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to The VM has too many VUSBs.. + /// + public static string TOO_MANY_VUSBS { + get { + return ResourceManager.GetString("TOO_MANY_VUSBS", resourceCulture); + } + } + /// /// Looks up a localized string similar to The tunnel transport PIF has no IP configuration set.. /// @@ -4781,6 +4862,51 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to The USB device is currently attached to a VM.. + /// + public static string USB_ALREADY_ATTACHED { + get { + return ResourceManager.GetString("USB_ALREADY_ATTACHED", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to USB_groups are currently restricted to contain no more than one VUSB.. + /// + public static string USB_GROUP_CONFLICT { + get { + return ResourceManager.GetString("USB_GROUP_CONFLICT", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The USB group does not contain any PUSBs.. + /// + public static string USB_GROUP_CONTAINS_NO_PUSBS { + get { + return ResourceManager.GetString("USB_GROUP_CONTAINS_NO_PUSBS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The USB group contains active PUSBs and cannot be deleted.. + /// + public static string USB_GROUP_CONTAINS_PUSB { + get { + return ResourceManager.GetString("USB_GROUP_CONTAINS_PUSB", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The USB group contains active VUSBs and cannot be deleted.. + /// + public static string USB_GROUP_CONTAINS_VUSB { + get { + return ResourceManager.GetString("USB_GROUP_CONTAINS_VUSB", resourceCulture); + } + } + /// /// Looks up a localized string similar to Only the local superuser can perform this operation. /// @@ -5078,6 +5204,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to The VGPU is not compatible with any PGPU in the destination.. + /// + public static string VGPU_DESTINATION_INCOMPATIBLE { + get { + return ResourceManager.GetString("VGPU_DESTINATION_INCOMPATIBLE", resourceCulture); + } + } + /// /// Looks up a localized string similar to The VM cannot start because all GPUs are fully used or are running other types of virtual GPU. /// @@ -5196,7 +5331,7 @@ namespace XenAPI { } /// - /// Looks up a localized string similar to The BIOS strings for this VM have already been set and cannot be changed anymore.. + /// Looks up a localized string similar to The BIOS strings for this VM have already been set and cannot be changed.. /// public static string VM_BIOS_STRINGS_ALREADY_SET { get { @@ -5321,6 +5456,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to The operation is not allowed when the VM has VUSBs.. + /// + public static string VM_HAS_VUSBS { + get { + return ResourceManager.GetString("VM_HAS_VUSBS", resourceCulture); + } + } + /// /// Looks up a localized string similar to This VM operation cannot be performed on an older-versioned host during an upgrade.. /// @@ -5331,7 +5475,7 @@ namespace XenAPI { } /// - /// Looks up a localized string similar to You attempted to migrate a VM to a destination host running a version of XenServer older than the source host.. + /// Looks up a localized string similar to You attempted to migrate a VM to a destination host which is older than the source host.. /// public static string VM_HOST_INCOMPATIBLE_VERSION_MIGRATE { get { @@ -5645,6 +5789,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to You attempted to run a VM on a host on which the VUSB required by the VM cannot be allocated on any PUSBs in the USB_group needed by the VM.. + /// + public static string VM_REQUIRES_VUSB { + get { + return ResourceManager.GetString("VM_REQUIRES_VUSB", resourceCulture); + } + } + /// /// Looks up a localized string similar to An error occurred while reverting the specified virtual machine to the specified snapshot. /// diff --git a/XenModel/XenAPI/FriendlyErrorNames.resx b/XenModel/XenAPI/FriendlyErrorNames.resx index a05554900..06eb6d04e 100644 --- a/XenModel/XenAPI/FriendlyErrorNames.resx +++ b/XenModel/XenAPI/FriendlyErrorNames.resx @@ -717,6 +717,9 @@ The upper limit of active redo log instances was reached. + + Nvidia tools error. Please ensure that the latest Nvidia tools are installed + The specified object no longer exists. @@ -1832,6 +1835,9 @@ Authorized Roles: {1} The VDI is too small. Please resize it to at least the minimum size. + + The VGPU is not compatible with any PGPU in the destination. + The VM cannot start because all GPUs are fully used or are running other types of virtual GPU diff --git a/XenModel/XenAPI/GPU_group.cs b/XenModel/XenAPI/GPU_group.cs index 4ec9f7305..e223ac460 100644 --- a/XenModel/XenAPI/GPU_group.cs +++ b/XenModel/XenAPI/GPU_group.cs @@ -159,6 +159,15 @@ namespace XenAPI Helper.AreEqual2(this._enabled_VGPU_types, other._enabled_VGPU_types); } + internal static List ProxyArrayToObjectList(Proxy_GPU_group[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new GPU_group(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, GPU_group server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Helper.cs b/XenModel/XenAPI/Helper.cs index 405755709..fd2271de7 100644 --- a/XenModel/XenAPI/Helper.cs +++ b/XenModel/XenAPI/Helper.cs @@ -1,19 +1,19 @@ /* * Copyright (c) Citrix Systems, 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: - * + * * 1) Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2) 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 @@ -140,7 +140,7 @@ namespace XenAPI } /// - /// + /// /// /// /// Must not be null. @@ -271,26 +271,6 @@ namespace XenAPI return result; } - internal static List Proxy_Data_sourceArrayToData_sourceList(Proxy_Data_source[] input) - { - List result = new List(); - foreach (Proxy_Data_source pd in input) - { - result.Add(new Data_source(pd)); - } - return result; - } - - internal static List Proxy_Vdi_nbd_server_infoArrayToVdi_nbd_server_infoList(Proxy_Vdi_nbd_server_info[] input) - { - List result = new List(); - foreach (Proxy_Vdi_nbd_server_info pd in input) - { - result.Add(new Vdi_nbd_server_info(pd)); - } - return result; - } - internal static Object EnumParseDefault(Type t, string s) { try diff --git a/XenModel/XenAPI/Host.cs b/XenModel/XenAPI/Host.cs index 30e21fa2c..4aab41d68 100644 --- a/XenModel/XenAPI/Host.cs +++ b/XenModel/XenAPI/Host.cs @@ -483,6 +483,15 @@ namespace XenAPI Helper.AreEqual2(this._features, other._features); } + internal static List ProxyArrayToObjectList(Proxy_Host[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Host(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Host server) { if (opaqueRef == null) @@ -1814,7 +1823,7 @@ namespace XenAPI /// The opaque_ref of the given host public static List get_data_sources(Session session, string _host) { - return Helper.Proxy_Data_sourceArrayToData_sourceList(session.proxy.host_get_data_sources(session.uuid, _host ?? "").parse()); + return Data_source.ProxyArrayToObjectList(session.proxy.host_get_data_sources(session.uuid, _host ?? "").parse()); } /// diff --git a/XenModel/XenAPI/Host_cpu.cs b/XenModel/XenAPI/Host_cpu.cs index 673b7d3aa..b54cfed2b 100644 --- a/XenModel/XenAPI/Host_cpu.cs +++ b/XenModel/XenAPI/Host_cpu.cs @@ -180,6 +180,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_Host_cpu[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Host_cpu(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Host_cpu server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Host_crashdump.cs b/XenModel/XenAPI/Host_crashdump.cs index 344593c29..97c44bf7f 100644 --- a/XenModel/XenAPI/Host_crashdump.cs +++ b/XenModel/XenAPI/Host_crashdump.cs @@ -124,6 +124,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_Host_crashdump[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Host_crashdump(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Host_crashdump server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Host_metrics.cs b/XenModel/XenAPI/Host_metrics.cs index 24e8ad67b..390a99c9a 100644 --- a/XenModel/XenAPI/Host_metrics.cs +++ b/XenModel/XenAPI/Host_metrics.cs @@ -131,6 +131,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_Host_metrics[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Host_metrics(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Host_metrics server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Host_patch.cs b/XenModel/XenAPI/Host_patch.cs index 92b0efe88..a1db010fc 100644 --- a/XenModel/XenAPI/Host_patch.cs +++ b/XenModel/XenAPI/Host_patch.cs @@ -159,6 +159,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_Host_patch[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Host_patch(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Host_patch server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/LVHD.cs b/XenModel/XenAPI/LVHD.cs index 7621701a7..aa890b6ae 100644 --- a/XenModel/XenAPI/LVHD.cs +++ b/XenModel/XenAPI/LVHD.cs @@ -96,6 +96,15 @@ namespace XenAPI return Helper.AreEqual2(this._uuid, other._uuid); } + internal static List ProxyArrayToObjectList(Proxy_LVHD[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new LVHD(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, LVHD server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Maps.cs b/XenModel/XenAPI/Maps.cs index d6e893ae4..409ac320e 100644 --- a/XenModel/XenAPI/Maps.cs +++ b/XenModel/XenAPI/Maps.cs @@ -931,6 +931,53 @@ namespace XenAPI return result; } + internal static Dictionary, XenRef> + convert_from_proxy_XenRefVGPU_XenRefGPU_group(Object o) + { + Hashtable table = (Hashtable)o; + Dictionary, XenRef> result = new Dictionary, XenRef>(); + if (table != null) + { + foreach (string key in table.Keys) + { + try + { + XenRef k = XenRef.Create(key); + XenRef v = table[key] == null ? null : XenRef.Create(table[key]); + result[k] = v; + } + catch + { + continue; + } + } + } + return result; + } + + internal static Hashtable + convert_to_proxy_XenRefVGPU_XenRefGPU_group(Dictionary, XenRef> table) + { + CookComputing.XmlRpc.XmlRpcStruct result = new CookComputing.XmlRpc.XmlRpcStruct(); + if (table != null) + { + foreach (XenRef key in table.Keys) + { + try + { + string k = key ?? ""; + string v = table[key] ?? ""; + result[k] = v; + } + catch + { + continue; + } + } + } + return result; + } + internal static Dictionary, long> convert_from_proxy_XenRefVGPU_type_long(Object o) { diff --git a/XenModel/XenAPI/Message.cs b/XenModel/XenAPI/Message.cs index cf89b9d67..904e8eae5 100644 --- a/XenModel/XenAPI/Message.cs +++ b/XenModel/XenAPI/Message.cs @@ -300,6 +300,15 @@ namespace XenAPI Helper.AreEqual2(this._body, other._body); } + internal static List ProxyArrayToObjectList(Proxy_Message[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Message(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Message server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Network.cs b/XenModel/XenAPI/Network.cs index d97d1764a..c1d43d608 100644 --- a/XenModel/XenAPI/Network.cs +++ b/XenModel/XenAPI/Network.cs @@ -203,6 +203,15 @@ namespace XenAPI Helper.AreEqual2(this._purpose, other._purpose); } + internal static List ProxyArrayToObjectList(Proxy_Network[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Network(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Network server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/PBD.cs b/XenModel/XenAPI/PBD.cs index 68651152b..62ffd764c 100644 --- a/XenModel/XenAPI/PBD.cs +++ b/XenModel/XenAPI/PBD.cs @@ -131,6 +131,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_PBD[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new PBD(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, PBD server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/PCI.cs b/XenModel/XenAPI/PCI.cs index b18541e93..6456559bd 100644 --- a/XenModel/XenAPI/PCI.cs +++ b/XenModel/XenAPI/PCI.cs @@ -159,6 +159,15 @@ namespace XenAPI Helper.AreEqual2(this._subsystem_device_name, other._subsystem_device_name); } + internal static List ProxyArrayToObjectList(Proxy_PCI[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new PCI(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, PCI server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/PGPU.cs b/XenModel/XenAPI/PGPU.cs index 22bd0a438..f9afac1d6 100644 --- a/XenModel/XenAPI/PGPU.cs +++ b/XenModel/XenAPI/PGPU.cs @@ -56,7 +56,8 @@ namespace XenAPI List> resident_VGPUs, Dictionary, long> supported_VGPU_max_capacities, pgpu_dom0_access dom0_access, - bool is_system_display_device) + bool is_system_display_device, + Dictionary compatibility_metadata) { this.uuid = uuid; this.PCI = PCI; @@ -69,6 +70,7 @@ namespace XenAPI this.supported_VGPU_max_capacities = supported_VGPU_max_capacities; this.dom0_access = dom0_access; this.is_system_display_device = is_system_display_device; + this.compatibility_metadata = compatibility_metadata; } /// @@ -93,6 +95,7 @@ namespace XenAPI supported_VGPU_max_capacities = update.supported_VGPU_max_capacities; dom0_access = update.dom0_access; is_system_display_device = update.is_system_display_device; + compatibility_metadata = update.compatibility_metadata; } internal void UpdateFromProxy(Proxy_PGPU proxy) @@ -108,6 +111,7 @@ namespace XenAPI supported_VGPU_max_capacities = proxy.supported_VGPU_max_capacities == null ? null : Maps.convert_from_proxy_XenRefVGPU_type_long(proxy.supported_VGPU_max_capacities); dom0_access = proxy.dom0_access == null ? (pgpu_dom0_access) 0 : (pgpu_dom0_access)Helper.EnumParseDefault(typeof(pgpu_dom0_access), (string)proxy.dom0_access); is_system_display_device = (bool)proxy.is_system_display_device; + compatibility_metadata = proxy.compatibility_metadata == null ? null : Maps.convert_from_proxy_string_string(proxy.compatibility_metadata); } public Proxy_PGPU ToProxy() @@ -124,6 +128,7 @@ namespace XenAPI result_.supported_VGPU_max_capacities = Maps.convert_to_proxy_XenRefVGPU_type_long(supported_VGPU_max_capacities); result_.dom0_access = pgpu_dom0_access_helper.ToString(dom0_access); result_.is_system_display_device = is_system_display_device; + result_.compatibility_metadata = Maps.convert_to_proxy_string_string(compatibility_metadata); return result_; } @@ -144,6 +149,7 @@ namespace XenAPI supported_VGPU_max_capacities = Maps.convert_from_proxy_XenRefVGPU_type_long(Marshalling.ParseHashTable(table, "supported_VGPU_max_capacities")); dom0_access = (pgpu_dom0_access)Helper.EnumParseDefault(typeof(pgpu_dom0_access), Marshalling.ParseString(table, "dom0_access")); is_system_display_device = Marshalling.ParseBool(table, "is_system_display_device"); + compatibility_metadata = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "compatibility_metadata")); } public bool DeepEquals(PGPU other) @@ -163,7 +169,17 @@ namespace XenAPI Helper.AreEqual2(this._resident_VGPUs, other._resident_VGPUs) && Helper.AreEqual2(this._supported_VGPU_max_capacities, other._supported_VGPU_max_capacities) && Helper.AreEqual2(this._dom0_access, other._dom0_access) && - Helper.AreEqual2(this._is_system_display_device, other._is_system_display_device); + Helper.AreEqual2(this._is_system_display_device, other._is_system_display_device) && + Helper.AreEqual2(this._compatibility_metadata, other._compatibility_metadata); + } + + internal static List ProxyArrayToObjectList(Proxy_PGPU[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new PGPU(item)); + + return result; } public override string SaveChanges(Session session, string opaqueRef, PGPU server) @@ -330,6 +346,17 @@ namespace XenAPI return (bool)session.proxy.pgpu_get_is_system_display_device(session.uuid, _pgpu ?? "").parse(); } + /// + /// Get the compatibility_metadata field of the given PGPU. + /// First published in Unreleased. + /// + /// The session + /// The opaque_ref of the given pgpu + public static Dictionary get_compatibility_metadata(Session session, string _pgpu) + { + return Maps.convert_from_proxy_string_string(session.proxy.pgpu_get_compatibility_metadata(session.uuid, _pgpu ?? "").parse()); + } + /// /// Set the other_config field of the given PGPU. /// First published in XenServer 6.0. @@ -754,5 +781,24 @@ namespace XenAPI } } private bool _is_system_display_device; + + /// + /// PGPU metadata to determine whether a VGPU can migrate between two PGPUs + /// First published in Unreleased. + /// + public virtual Dictionary compatibility_metadata + { + get { return _compatibility_metadata; } + set + { + if (!Helper.AreEqual(value, _compatibility_metadata)) + { + _compatibility_metadata = value; + Changed = true; + NotifyPropertyChanged("compatibility_metadata"); + } + } + } + private Dictionary _compatibility_metadata; } } diff --git a/XenModel/XenAPI/PIF.cs b/XenModel/XenAPI/PIF.cs index 748a3c577..8fc510a1a 100644 --- a/XenModel/XenAPI/PIF.cs +++ b/XenModel/XenAPI/PIF.cs @@ -313,6 +313,15 @@ namespace XenAPI Helper.AreEqual2(this._igmp_snooping_status, other._igmp_snooping_status); } + internal static List ProxyArrayToObjectList(Proxy_PIF[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new PIF(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, PIF server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/PIF_metrics.cs b/XenModel/XenAPI/PIF_metrics.cs index 2873c8a32..3523930c4 100644 --- a/XenModel/XenAPI/PIF_metrics.cs +++ b/XenModel/XenAPI/PIF_metrics.cs @@ -180,6 +180,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_PIF_metrics[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new PIF_metrics(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, PIF_metrics server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/PUSB.cs b/XenModel/XenAPI/PUSB.cs index b2175db63..16f7d3113 100644 --- a/XenModel/XenAPI/PUSB.cs +++ b/XenModel/XenAPI/PUSB.cs @@ -180,6 +180,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_PUSB[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new PUSB(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, PUSB server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/PVS_cache_storage.cs b/XenModel/XenAPI/PVS_cache_storage.cs index 2e4aef64a..b1e6e07d0 100644 --- a/XenModel/XenAPI/PVS_cache_storage.cs +++ b/XenModel/XenAPI/PVS_cache_storage.cs @@ -131,6 +131,15 @@ namespace XenAPI Helper.AreEqual2(this._VDI, other._VDI); } + internal static List ProxyArrayToObjectList(Proxy_PVS_cache_storage[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new PVS_cache_storage(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, PVS_cache_storage server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/PVS_proxy.cs b/XenModel/XenAPI/PVS_proxy.cs index c983f274c..14fe39f9f 100644 --- a/XenModel/XenAPI/PVS_proxy.cs +++ b/XenModel/XenAPI/PVS_proxy.cs @@ -124,6 +124,15 @@ namespace XenAPI Helper.AreEqual2(this._status, other._status); } + internal static List ProxyArrayToObjectList(Proxy_PVS_proxy[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new PVS_proxy(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, PVS_proxy server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/PVS_server.cs b/XenModel/XenAPI/PVS_server.cs index 21fb8d46d..0da83d0bf 100644 --- a/XenModel/XenAPI/PVS_server.cs +++ b/XenModel/XenAPI/PVS_server.cs @@ -124,6 +124,15 @@ namespace XenAPI Helper.AreEqual2(this._site, other._site); } + internal static List ProxyArrayToObjectList(Proxy_PVS_server[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new PVS_server(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, PVS_server server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/PVS_site.cs b/XenModel/XenAPI/PVS_site.cs index 844b63f83..81d9a2db0 100644 --- a/XenModel/XenAPI/PVS_site.cs +++ b/XenModel/XenAPI/PVS_site.cs @@ -138,6 +138,15 @@ namespace XenAPI Helper.AreEqual2(this._proxies, other._proxies); } + internal static List ProxyArrayToObjectList(Proxy_PVS_site[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new PVS_site(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, PVS_site server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Pool.cs b/XenModel/XenAPI/Pool.cs index f95d5475b..fdcaaf425 100644 --- a/XenModel/XenAPI/Pool.cs +++ b/XenModel/XenAPI/Pool.cs @@ -343,6 +343,15 @@ namespace XenAPI Helper.AreEqual2(this._igmp_snooping_enabled, other._igmp_snooping_enabled); } + internal static List ProxyArrayToObjectList(Proxy_Pool[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Pool(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Pool server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Pool_patch.cs b/XenModel/XenAPI/Pool_patch.cs index ed9c17acc..5744a370d 100644 --- a/XenModel/XenAPI/Pool_patch.cs +++ b/XenModel/XenAPI/Pool_patch.cs @@ -159,6 +159,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_Pool_patch[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Pool_patch(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Pool_patch server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Pool_update.cs b/XenModel/XenAPI/Pool_update.cs index bc7e85f5d..5f8efd64b 100644 --- a/XenModel/XenAPI/Pool_update.cs +++ b/XenModel/XenAPI/Pool_update.cs @@ -166,6 +166,15 @@ namespace XenAPI Helper.AreEqual2(this._enforce_homogeneity, other._enforce_homogeneity); } + internal static List ProxyArrayToObjectList(Proxy_Pool_update[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Pool_update(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Pool_update server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Proxy.cs b/XenModel/XenAPI/Proxy.cs index 0cefb57ae..dae78760c 100644 --- a/XenModel/XenAPI/Proxy.cs +++ b/XenModel/XenAPI/Proxy.cs @@ -2164,6 +2164,14 @@ namespace XenAPI Response async_vm_migrate_send(string session, string _vm, Object _dest, bool _live, Object _vdi_map, Object _vif_map, Object _options); + [XmlRpcMethod("VM.migrate_send")] + Response + vm_migrate_send(string session, string _vm, Object _dest, bool _live, Object _vdi_map, Object _vif_map, Object _options, Object _vgpu_map); + + [XmlRpcMethod("Async.VM.migrate_send")] + Response + async_vm_migrate_send(string session, string _vm, Object _dest, bool _live, Object _vdi_map, Object _vif_map, Object _options, Object _vgpu_map); + [XmlRpcMethod("VM.assert_can_migrate")] Response vm_assert_can_migrate(string session, string _vm, Object _dest, bool _live, Object _vdi_map, Object _vif_map, Object _options); @@ -2172,6 +2180,14 @@ namespace XenAPI Response async_vm_assert_can_migrate(string session, string _vm, Object _dest, bool _live, Object _vdi_map, Object _vif_map, Object _options); + [XmlRpcMethod("VM.assert_can_migrate")] + Response + vm_assert_can_migrate(string session, string _vm, Object _dest, bool _live, Object _vdi_map, Object _vif_map, Object _options, Object _vgpu_map); + + [XmlRpcMethod("Async.VM.assert_can_migrate")] + Response + async_vm_assert_can_migrate(string session, string _vm, Object _dest, bool _live, Object _vdi_map, Object _vif_map, Object _options, Object _vgpu_map); + [XmlRpcMethod("VM.get_boot_record")] Response vm_get_boot_record(string session, string _vm); @@ -6968,6 +6984,10 @@ namespace XenAPI Response pgpu_get_is_system_display_device(string session, string _pgpu); + [XmlRpcMethod("PGPU.get_compatibility_metadata")] + Response + pgpu_get_compatibility_metadata(string session, string _pgpu); + [XmlRpcMethod("PGPU.set_other_config")] Response pgpu_set_other_config(string session, string _pgpu, Object _other_config); @@ -7192,6 +7212,10 @@ namespace XenAPI Response vgpu_get_resident_on(string session, string _vgpu); + [XmlRpcMethod("VGPU.get_scheduled_to_be_resident_on")] + Response + vgpu_get_scheduled_to_be_resident_on(string session, string _vgpu); + [XmlRpcMethod("VGPU.set_other_config")] Response vgpu_set_other_config(string session, string _vgpu, Object _other_config); @@ -8743,6 +8767,7 @@ namespace XenAPI public Object supported_VGPU_max_capacities; public string dom0_access; public bool is_system_display_device; + public Object compatibility_metadata; } [XmlRpcMissingMapping(MappingAction.Ignore)] @@ -8771,6 +8796,7 @@ namespace XenAPI public Object other_config; public string type; public string resident_on; + public string scheduled_to_be_resident_on; } [XmlRpcMissingMapping(MappingAction.Ignore)] diff --git a/XenModel/XenAPI/Role.cs b/XenModel/XenAPI/Role.cs index b8c4a1139..c28bb5e27 100644 --- a/XenModel/XenAPI/Role.cs +++ b/XenModel/XenAPI/Role.cs @@ -117,6 +117,15 @@ namespace XenAPI Helper.AreEqual2(this._subroles, other._subroles); } + internal static List ProxyArrayToObjectList(Proxy_Role[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Role(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Role server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/SDN_controller.cs b/XenModel/XenAPI/SDN_controller.cs index 308952d6e..7d135ed46 100644 --- a/XenModel/XenAPI/SDN_controller.cs +++ b/XenModel/XenAPI/SDN_controller.cs @@ -117,6 +117,15 @@ namespace XenAPI Helper.AreEqual2(this._port, other._port); } + internal static List ProxyArrayToObjectList(Proxy_SDN_controller[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new SDN_controller(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, SDN_controller server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/SM.cs b/XenModel/XenAPI/SM.cs index 1e6b3e08e..4043f2f16 100644 --- a/XenModel/XenAPI/SM.cs +++ b/XenModel/XenAPI/SM.cs @@ -187,6 +187,15 @@ namespace XenAPI Helper.AreEqual2(this._required_cluster_stack, other._required_cluster_stack); } + internal static List ProxyArrayToObjectList(Proxy_SM[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new SM(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, SM server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/SR.cs b/XenModel/XenAPI/SR.cs index bf1230b4f..32bc996e6 100644 --- a/XenModel/XenAPI/SR.cs +++ b/XenModel/XenAPI/SR.cs @@ -238,6 +238,15 @@ namespace XenAPI Helper.AreEqual2(this._is_tools_sr, other._is_tools_sr); } + internal static List ProxyArrayToObjectList(Proxy_SR[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new SR(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, SR server) { if (opaqueRef == null) @@ -1251,7 +1260,7 @@ namespace XenAPI /// The opaque_ref of the given sr public static List get_data_sources(Session session, string _sr) { - return Helper.Proxy_Data_sourceArrayToData_sourceList(session.proxy.sr_get_data_sources(session.uuid, _sr ?? "").parse()); + return Data_source.ProxyArrayToObjectList(session.proxy.sr_get_data_sources(session.uuid, _sr ?? "").parse()); } /// diff --git a/XenModel/XenAPI/Secret.cs b/XenModel/XenAPI/Secret.cs index 17fd7e133..433798e86 100644 --- a/XenModel/XenAPI/Secret.cs +++ b/XenModel/XenAPI/Secret.cs @@ -110,6 +110,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_Secret[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Secret(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Secret server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Subject.cs b/XenModel/XenAPI/Subject.cs index 06bd13f20..a556bc674 100644 --- a/XenModel/XenAPI/Subject.cs +++ b/XenModel/XenAPI/Subject.cs @@ -117,6 +117,15 @@ namespace XenAPI Helper.AreEqual2(this._roles, other._roles); } + internal static List ProxyArrayToObjectList(Proxy_Subject[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Subject(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Subject server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Task.cs b/XenModel/XenAPI/Task.cs index 777620750..1b08a11fe 100644 --- a/XenModel/XenAPI/Task.cs +++ b/XenModel/XenAPI/Task.cs @@ -210,6 +210,15 @@ namespace XenAPI Helper.AreEqual2(this._backtrace, other._backtrace); } + internal static List ProxyArrayToObjectList(Proxy_Task[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Task(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Task server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Tunnel.cs b/XenModel/XenAPI/Tunnel.cs index c0058e914..8087e1850 100644 --- a/XenModel/XenAPI/Tunnel.cs +++ b/XenModel/XenAPI/Tunnel.cs @@ -124,6 +124,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_Tunnel[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Tunnel(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Tunnel server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/USB_group.cs b/XenModel/XenAPI/USB_group.cs index cb3ffad64..3e4de6b0c 100644 --- a/XenModel/XenAPI/USB_group.cs +++ b/XenModel/XenAPI/USB_group.cs @@ -131,6 +131,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_USB_group[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new USB_group(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, USB_group server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/User.cs b/XenModel/XenAPI/User.cs index 154b43e9c..d3ed68da7 100644 --- a/XenModel/XenAPI/User.cs +++ b/XenModel/XenAPI/User.cs @@ -117,6 +117,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_User[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new User(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, User server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VBD.cs b/XenModel/XenAPI/VBD.cs index 8697bb7ee..d40abd61a 100644 --- a/XenModel/XenAPI/VBD.cs +++ b/XenModel/XenAPI/VBD.cs @@ -245,6 +245,15 @@ namespace XenAPI Helper.AreEqual2(this._metrics, other._metrics); } + internal static List ProxyArrayToObjectList(Proxy_VBD[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VBD(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VBD server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VBD_metrics.cs b/XenModel/XenAPI/VBD_metrics.cs index d8513eb3c..154c12814 100644 --- a/XenModel/XenAPI/VBD_metrics.cs +++ b/XenModel/XenAPI/VBD_metrics.cs @@ -124,6 +124,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_VBD_metrics[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VBD_metrics(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VBD_metrics server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VDI.cs b/XenModel/XenAPI/VDI.cs index 1c3ae5977..930af9979 100644 --- a/XenModel/XenAPI/VDI.cs +++ b/XenModel/XenAPI/VDI.cs @@ -315,6 +315,15 @@ namespace XenAPI Helper.AreEqual2(this._cbt_enabled, other._cbt_enabled); } + internal static List ProxyArrayToObjectList(Proxy_VDI[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VDI(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VDI server) { if (opaqueRef == null) @@ -1794,7 +1803,7 @@ namespace XenAPI /// The opaque_ref of the given vdi public static List get_nbd_info(Session session, string _vdi) { - return Helper.Proxy_Vdi_nbd_server_infoArrayToVdi_nbd_server_infoList(session.proxy.vdi_get_nbd_info(session.uuid, _vdi ?? "").parse()); + return Vdi_nbd_server_info.ProxyArrayToObjectList(session.proxy.vdi_get_nbd_info(session.uuid, _vdi ?? "").parse()); } /// diff --git a/XenModel/XenAPI/VGPU.cs b/XenModel/XenAPI/VGPU.cs index ba95314aa..0c450de24 100644 --- a/XenModel/XenAPI/VGPU.cs +++ b/XenModel/XenAPI/VGPU.cs @@ -53,7 +53,8 @@ namespace XenAPI bool currently_attached, Dictionary other_config, XenRef type, - XenRef resident_on) + XenRef resident_on, + XenRef scheduled_to_be_resident_on) { this.uuid = uuid; this.VM = VM; @@ -63,6 +64,7 @@ namespace XenAPI this.other_config = other_config; this.type = type; this.resident_on = resident_on; + this.scheduled_to_be_resident_on = scheduled_to_be_resident_on; } /// @@ -84,6 +86,7 @@ namespace XenAPI other_config = update.other_config; type = update.type; resident_on = update.resident_on; + scheduled_to_be_resident_on = update.scheduled_to_be_resident_on; } internal void UpdateFromProxy(Proxy_VGPU proxy) @@ -96,6 +99,7 @@ namespace XenAPI other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); type = proxy.type == null ? null : XenRef.Create(proxy.type); resident_on = proxy.resident_on == null ? null : XenRef.Create(proxy.resident_on); + scheduled_to_be_resident_on = proxy.scheduled_to_be_resident_on == null ? null : XenRef.Create(proxy.scheduled_to_be_resident_on); } public Proxy_VGPU ToProxy() @@ -109,6 +113,7 @@ namespace XenAPI result_.other_config = Maps.convert_to_proxy_string_string(other_config); result_.type = type ?? ""; result_.resident_on = resident_on ?? ""; + result_.scheduled_to_be_resident_on = scheduled_to_be_resident_on ?? ""; return result_; } @@ -126,6 +131,7 @@ namespace XenAPI other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config")); type = Marshalling.ParseRef(table, "type"); resident_on = Marshalling.ParseRef(table, "resident_on"); + scheduled_to_be_resident_on = Marshalling.ParseRef(table, "scheduled_to_be_resident_on"); } public bool DeepEquals(VGPU other) @@ -142,7 +148,17 @@ namespace XenAPI Helper.AreEqual2(this._currently_attached, other._currently_attached) && Helper.AreEqual2(this._other_config, other._other_config) && Helper.AreEqual2(this._type, other._type) && - Helper.AreEqual2(this._resident_on, other._resident_on); + Helper.AreEqual2(this._resident_on, other._resident_on) && + Helper.AreEqual2(this._scheduled_to_be_resident_on, other._scheduled_to_be_resident_on); + } + + internal static List ProxyArrayToObjectList(Proxy_VGPU[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VGPU(item)); + + return result; } public override string SaveChanges(Session session, string opaqueRef, VGPU server) @@ -272,6 +288,17 @@ namespace XenAPI return XenRef.Create(session.proxy.vgpu_get_resident_on(session.uuid, _vgpu ?? "").parse()); } + /// + /// Get the scheduled_to_be_resident_on field of the given VGPU. + /// First published in XenServer 7.0. + /// + /// The session + /// The opaque_ref of the given vgpu + public static XenRef get_scheduled_to_be_resident_on(Session session, string _vgpu) + { + return XenRef.Create(session.proxy.vgpu_get_scheduled_to_be_resident_on(session.uuid, _vgpu ?? "").parse()); + } + /// /// Set the other_config field of the given VGPU. /// First published in XenServer 6.0. @@ -554,5 +581,24 @@ namespace XenAPI } } private XenRef _resident_on; + + /// + /// The PGPU on which this VGPU is scheduled to run + /// First published in XenServer 7.0. + /// + public virtual XenRef scheduled_to_be_resident_on + { + get { return _scheduled_to_be_resident_on; } + set + { + if (!Helper.AreEqual(value, _scheduled_to_be_resident_on)) + { + _scheduled_to_be_resident_on = value; + Changed = true; + NotifyPropertyChanged("scheduled_to_be_resident_on"); + } + } + } + private XenRef _scheduled_to_be_resident_on; } } diff --git a/XenModel/XenAPI/VGPU_type.cs b/XenModel/XenAPI/VGPU_type.cs index fd5547a78..e84f2404e 100644 --- a/XenModel/XenAPI/VGPU_type.cs +++ b/XenModel/XenAPI/VGPU_type.cs @@ -194,6 +194,15 @@ namespace XenAPI Helper.AreEqual2(this._experimental, other._experimental); } + internal static List ProxyArrayToObjectList(Proxy_VGPU_type[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VGPU_type(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VGPU_type server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VIF.cs b/XenModel/XenAPI/VIF.cs index 07a18bdb0..ce718f5a3 100644 --- a/XenModel/XenAPI/VIF.cs +++ b/XenModel/XenAPI/VIF.cs @@ -280,6 +280,15 @@ namespace XenAPI Helper.AreEqual2(this._ipv6_gateway, other._ipv6_gateway); } + internal static List ProxyArrayToObjectList(Proxy_VIF[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VIF(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VIF server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VIF_metrics.cs b/XenModel/XenAPI/VIF_metrics.cs index 15722dde6..359647ce3 100644 --- a/XenModel/XenAPI/VIF_metrics.cs +++ b/XenModel/XenAPI/VIF_metrics.cs @@ -124,6 +124,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_VIF_metrics[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VIF_metrics(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VIF_metrics server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VLAN.cs b/XenModel/XenAPI/VLAN.cs index b2538355d..fc1554917 100644 --- a/XenModel/XenAPI/VLAN.cs +++ b/XenModel/XenAPI/VLAN.cs @@ -124,6 +124,15 @@ namespace XenAPI Helper.AreEqual2(this._other_config, other._other_config); } + internal static List ProxyArrayToObjectList(Proxy_VLAN[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VLAN(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VLAN server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VM.cs b/XenModel/XenAPI/VM.cs index aa3604887..3c5921cf9 100644 --- a/XenModel/XenAPI/VM.cs +++ b/XenModel/XenAPI/VM.cs @@ -672,6 +672,15 @@ namespace XenAPI Helper.AreEqual2(this._reference_label, other._reference_label); } + internal static List ProxyArrayToObjectList(Proxy_VM[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VM(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VM server) { if (opaqueRef == null) @@ -3337,6 +3346,40 @@ namespace XenAPI return XenRef.Create(session.proxy.async_vm_migrate_send(session.uuid, _vm ?? "", Maps.convert_to_proxy_string_string(_dest), _live, Maps.convert_to_proxy_XenRefVDI_XenRefSR(_vdi_map), Maps.convert_to_proxy_XenRefVIF_XenRefNetwork(_vif_map), Maps.convert_to_proxy_string_string(_options)).parse()); } + /// + /// Migrate the VM to another host. This can only be called when the specified VM is in the Running state. + /// First published in XenServer 6.1. + /// + /// The session + /// The opaque_ref of the given vm + /// The result of a Host.migrate_receive call. + /// Live migration + /// Map of source VDI to destination SR + /// Map of source VIF to destination network + /// Other parameters + /// Map of source vGPU to destination GPU group First published in Unreleased. + public static XenRef migrate_send(Session session, string _vm, Dictionary _dest, bool _live, Dictionary, XenRef> _vdi_map, Dictionary, XenRef> _vif_map, Dictionary _options, Dictionary, XenRef> _vgpu_map) + { + return XenRef.Create(session.proxy.vm_migrate_send(session.uuid, _vm ?? "", Maps.convert_to_proxy_string_string(_dest), _live, Maps.convert_to_proxy_XenRefVDI_XenRefSR(_vdi_map), Maps.convert_to_proxy_XenRefVIF_XenRefNetwork(_vif_map), Maps.convert_to_proxy_string_string(_options), Maps.convert_to_proxy_XenRefVGPU_XenRefGPU_group(_vgpu_map)).parse()); + } + + /// + /// Migrate the VM to another host. This can only be called when the specified VM is in the Running state. + /// First published in XenServer 6.1. + /// + /// The session + /// The opaque_ref of the given vm + /// The result of a Host.migrate_receive call. + /// Live migration + /// Map of source VDI to destination SR + /// Map of source VIF to destination network + /// Other parameters + /// Map of source vGPU to destination GPU group First published in Unreleased. + public static XenRef async_migrate_send(Session session, string _vm, Dictionary _dest, bool _live, Dictionary, XenRef> _vdi_map, Dictionary, XenRef> _vif_map, Dictionary _options, Dictionary, XenRef> _vgpu_map) + { + return XenRef.Create(session.proxy.async_vm_migrate_send(session.uuid, _vm ?? "", Maps.convert_to_proxy_string_string(_dest), _live, Maps.convert_to_proxy_XenRefVDI_XenRefSR(_vdi_map), Maps.convert_to_proxy_XenRefVIF_XenRefNetwork(_vif_map), Maps.convert_to_proxy_string_string(_options), Maps.convert_to_proxy_XenRefVGPU_XenRefGPU_group(_vgpu_map)).parse()); + } + /// /// Assert whether a VM can be migrated to the specified destination. /// First published in XenServer 6.1. @@ -3370,11 +3413,47 @@ namespace XenAPI } /// - /// Returns a record describing the VM's dynamic state, initialised when the VM boots and updated to reflect runtime configuration changes e.g. CPU hotplug - /// First published in XenServer 4.0. + /// Assert whether a VM can be migrated to the specified destination. + /// First published in XenServer 6.1. /// /// The session /// The opaque_ref of the given vm + /// The result of a VM.migrate_receive call. + /// Live migration + /// Map of source VDI to destination SR + /// Map of source VIF to destination network + /// Other parameters + /// Map of source vGPU to destination GPU group First published in Unreleased. + public static void assert_can_migrate(Session session, string _vm, Dictionary _dest, bool _live, Dictionary, XenRef> _vdi_map, Dictionary, XenRef> _vif_map, Dictionary _options, Dictionary, XenRef> _vgpu_map) + { + session.proxy.vm_assert_can_migrate(session.uuid, _vm ?? "", Maps.convert_to_proxy_string_string(_dest), _live, Maps.convert_to_proxy_XenRefVDI_XenRefSR(_vdi_map), Maps.convert_to_proxy_XenRefVIF_XenRefNetwork(_vif_map), Maps.convert_to_proxy_string_string(_options), Maps.convert_to_proxy_XenRefVGPU_XenRefGPU_group(_vgpu_map)).parse(); + } + + /// + /// Assert whether a VM can be migrated to the specified destination. + /// First published in XenServer 6.1. + /// + /// The session + /// The opaque_ref of the given vm + /// The result of a VM.migrate_receive call. + /// Live migration + /// Map of source VDI to destination SR + /// Map of source VIF to destination network + /// Other parameters + /// Map of source vGPU to destination GPU group First published in Unreleased. + public static XenRef async_assert_can_migrate(Session session, string _vm, Dictionary _dest, bool _live, Dictionary, XenRef> _vdi_map, Dictionary, XenRef> _vif_map, Dictionary _options, Dictionary, XenRef> _vgpu_map) + { + return XenRef.Create(session.proxy.async_vm_assert_can_migrate(session.uuid, _vm ?? "", Maps.convert_to_proxy_string_string(_dest), _live, Maps.convert_to_proxy_XenRefVDI_XenRefSR(_vdi_map), Maps.convert_to_proxy_XenRefVIF_XenRefNetwork(_vif_map), Maps.convert_to_proxy_string_string(_options), Maps.convert_to_proxy_XenRefVGPU_XenRefGPU_group(_vgpu_map)).parse()); + } + + /// + /// Returns a record describing the VM's dynamic state, initialised when the VM boots and updated to reflect runtime configuration changes e.g. CPU hotplug + /// First published in XenServer 4.0. + /// Deprecated since Unreleased. + /// + /// The session + /// The opaque_ref of the given vm + [Deprecated("Unreleased")] public static VM get_boot_record(Session session, string _vm) { return new VM((Proxy_VM)session.proxy.vm_get_boot_record(session.uuid, _vm ?? "").parse()); @@ -3388,7 +3467,7 @@ namespace XenAPI /// The opaque_ref of the given vm public static List get_data_sources(Session session, string _vm) { - return Helper.Proxy_Data_sourceArrayToData_sourceList(session.proxy.vm_get_data_sources(session.uuid, _vm ?? "").parse()); + return Data_source.ProxyArrayToObjectList(session.proxy.vm_get_data_sources(session.uuid, _vm ?? "").parse()); } /// diff --git a/XenModel/XenAPI/VMPP.cs b/XenModel/XenAPI/VMPP.cs index 4bfc95cd6..b0446aaca 100644 --- a/XenModel/XenAPI/VMPP.cs +++ b/XenModel/XenAPI/VMPP.cs @@ -229,6 +229,15 @@ namespace XenAPI Helper.AreEqual2(this._recent_alerts, other._recent_alerts); } + internal static List ProxyArrayToObjectList(Proxy_VMPP[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VMPP(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VMPP server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VMSS.cs b/XenModel/XenAPI/VMSS.cs index 1e4adb33d..9d247443e 100644 --- a/XenModel/XenAPI/VMSS.cs +++ b/XenModel/XenAPI/VMSS.cs @@ -159,6 +159,15 @@ namespace XenAPI Helper.AreEqual2(this._VMs, other._VMs); } + internal static List ProxyArrayToObjectList(Proxy_VMSS[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VMSS(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VMSS server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VM_appliance.cs b/XenModel/XenAPI/VM_appliance.cs index 47130641d..7134a48d1 100644 --- a/XenModel/XenAPI/VM_appliance.cs +++ b/XenModel/XenAPI/VM_appliance.cs @@ -133,6 +133,15 @@ namespace XenAPI Helper.AreEqual2(this._VMs, other._VMs); } + internal static List ProxyArrayToObjectList(Proxy_VM_appliance[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VM_appliance(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VM_appliance server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VM_guest_metrics.cs b/XenModel/XenAPI/VM_guest_metrics.cs index 19b881001..fa1814453 100644 --- a/XenModel/XenAPI/VM_guest_metrics.cs +++ b/XenModel/XenAPI/VM_guest_metrics.cs @@ -187,6 +187,15 @@ namespace XenAPI Helper.AreEqual2(this._PV_drivers_detected, other._PV_drivers_detected); } + internal static List ProxyArrayToObjectList(Proxy_VM_guest_metrics[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VM_guest_metrics(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VM_guest_metrics server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VM_metrics.cs b/XenModel/XenAPI/VM_metrics.cs index df1da511a..4cb1976ab 100644 --- a/XenModel/XenAPI/VM_metrics.cs +++ b/XenModel/XenAPI/VM_metrics.cs @@ -194,6 +194,15 @@ namespace XenAPI Helper.AreEqual2(this._nomigrate, other._nomigrate); } + internal static List ProxyArrayToObjectList(Proxy_VM_metrics[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VM_metrics(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VM_metrics server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VTPM.cs b/XenModel/XenAPI/VTPM.cs index 969f08e29..25611c7b4 100644 --- a/XenModel/XenAPI/VTPM.cs +++ b/XenModel/XenAPI/VTPM.cs @@ -110,6 +110,15 @@ namespace XenAPI Helper.AreEqual2(this._backend, other._backend); } + internal static List ProxyArrayToObjectList(Proxy_VTPM[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VTPM(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VTPM server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/VUSB.cs b/XenModel/XenAPI/VUSB.cs index 45a975b2c..489dad105 100644 --- a/XenModel/XenAPI/VUSB.cs +++ b/XenModel/XenAPI/VUSB.cs @@ -140,6 +140,15 @@ namespace XenAPI Helper.AreEqual2(this._currently_attached, other._currently_attached); } + internal static List ProxyArrayToObjectList(Proxy_VUSB[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new VUSB(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, VUSB server) { if (opaqueRef == null) diff --git a/XenModel/XenAPI/Vdi_nbd_server_info.cs b/XenModel/XenAPI/Vdi_nbd_server_info.cs index f13e05525..1ed1009d5 100755 --- a/XenModel/XenAPI/Vdi_nbd_server_info.cs +++ b/XenModel/XenAPI/Vdi_nbd_server_info.cs @@ -124,6 +124,15 @@ namespace XenAPI Helper.AreEqual2(this._subject, other._subject); } + internal static List ProxyArrayToObjectList(Proxy_Vdi_nbd_server_info[] input) + { + var result = new List(); + foreach (var item in input) + result.Add(new Vdi_nbd_server_info(item)); + + return result; + } + public override string SaveChanges(Session session, string opaqueRef, Vdi_nbd_server_info server) { if (opaqueRef == null) @@ -209,7 +218,7 @@ namespace XenAPI private string _cert; /// - /// For convenience, this redundant field holds a subject of the certificate. + /// For convenience, this redundant field holds a DNS (hostname) subject of the certificate. This can be a wildcard, but only for a certificate that has a wildcard subject and no concrete hostname subjects. /// public virtual string subject {