From c1dc88a20386fa9256f6308c484f09c5416310ae Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Wed, 13 Nov 2019 13:14:32 +0000 Subject: [PATCH] Update API bindings Signed-off-by: Mihaela Stoica --- XenModel/XenAPI/Bond.cs | 45 ++++- .../XenAPI/FriendlyErrorNames.Designer.cs | 44 +++-- XenModel/XenAPI/FriendlyErrorNames.resx | 156 +++++++++--------- XenModel/XenAPI/JsonRpcClient.cs | 14 ++ XenModel/XenAPI/Proxy.cs | 10 ++ XenModel/XenAPI/VGPU.cs | 46 +++++- XenModel/XenAPI/vgpu_type_implementation.cs | 6 + XenModel/XenAPI/vmss_type.cs | 2 +- 8 files changed, 230 insertions(+), 93 deletions(-) diff --git a/XenModel/XenAPI/Bond.cs b/XenModel/XenAPI/Bond.cs index d5af45f24..14a224190 100644 --- a/XenModel/XenAPI/Bond.cs +++ b/XenModel/XenAPI/Bond.cs @@ -58,7 +58,8 @@ namespace XenAPI XenRef primary_slave, bond_mode mode, Dictionary properties, - long links_up) + long links_up, + bool auto_update_mac) { this.uuid = uuid; this.master = master; @@ -68,6 +69,7 @@ namespace XenAPI this.mode = mode; this.properties = properties; this.links_up = links_up; + this.auto_update_mac = auto_update_mac; } /// @@ -107,6 +109,7 @@ namespace XenAPI mode = update.mode; properties = update.properties; links_up = update.links_up; + auto_update_mac = update.auto_update_mac; } internal void UpdateFrom(Proxy_Bond proxy) @@ -119,6 +122,7 @@ namespace XenAPI mode = proxy.mode == null ? (bond_mode) 0 : (bond_mode)Helper.EnumParseDefault(typeof(bond_mode), (string)proxy.mode); properties = proxy.properties == null ? null : Maps.convert_from_proxy_string_string(proxy.properties); links_up = proxy.links_up == null ? 0 : long.Parse(proxy.links_up); + auto_update_mac = (bool)proxy.auto_update_mac; } public Proxy_Bond ToProxy() @@ -132,6 +136,7 @@ namespace XenAPI result_.mode = bond_mode_helper.ToString(mode); result_.properties = Maps.convert_to_proxy_string_string(properties); result_.links_up = links_up.ToString(); + result_.auto_update_mac = auto_update_mac; return result_; } @@ -159,6 +164,8 @@ namespace XenAPI properties = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "properties")); if (table.ContainsKey("links_up")) links_up = Marshalling.ParseLong(table, "links_up"); + if (table.ContainsKey("auto_update_mac")) + auto_update_mac = Marshalling.ParseBool(table, "auto_update_mac"); } public bool DeepEquals(Bond other) @@ -175,7 +182,8 @@ namespace XenAPI Helper.AreEqual2(this._primary_slave, other._primary_slave) && Helper.AreEqual2(this._mode, other._mode) && Helper.AreEqual2(this._properties, other._properties) && - Helper.AreEqual2(this._links_up, other._links_up); + Helper.AreEqual2(this._links_up, other._links_up) && + Helper.AreEqual2(this._auto_update_mac, other._auto_update_mac); } internal static List ProxyArrayToObjectList(Proxy_Bond[] input) @@ -344,6 +352,20 @@ namespace XenAPI return long.Parse(session.proxy.bond_get_links_up(session.opaque_ref, _bond ?? "").parse()); } + /// + /// Get the auto_update_mac field of the given Bond. + /// First published in Unreleased. + /// + /// The session + /// The opaque_ref of the given bond + public static bool get_auto_update_mac(Session session, string _bond) + { + if (session.JsonRpcClient != null) + return session.JsonRpcClient.bond_get_auto_update_mac(session.opaque_ref, _bond); + else + return (bool)session.proxy.bond_get_auto_update_mac(session.opaque_ref, _bond ?? "").parse(); + } + /// /// Set the other_config field of the given Bond. /// First published in XenServer 4.1. @@ -761,5 +783,24 @@ namespace XenAPI } } private long _links_up = 0; + + /// + /// true if the MAC was taken from the primary slave when the bond was created, and false if the client specified the MAC + /// First published in Unreleased. + /// + public virtual bool auto_update_mac + { + get { return _auto_update_mac; } + set + { + if (!Helper.AreEqual(value, _auto_update_mac)) + { + _auto_update_mac = value; + Changed = true; + NotifyPropertyChanged("auto_update_mac"); + } + } + } + private bool _auto_update_mac = true; } } diff --git a/XenModel/XenAPI/FriendlyErrorNames.Designer.cs b/XenModel/XenAPI/FriendlyErrorNames.Designer.cs index c65647e20..6cf92b7b1 100755 --- a/XenModel/XenAPI/FriendlyErrorNames.Designer.cs +++ b/XenModel/XenAPI/FriendlyErrorNames.Designer.cs @@ -2184,15 +2184,6 @@ 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. /// @@ -3009,7 +3000,7 @@ namespace XenAPI { } /// - /// Looks up a localized string similar to The SM plugin did not respond to a query.. + /// Looks up a localized string similar to The SM plug-in did not respond to a query.. /// public static string SM_PLUGIN_COMMUNICATION_FAILURE { get { @@ -3683,6 +3674,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to Gave up on leaf coalesce after leaf grew bigger than before snapshot taken. + /// + public static string SR_BACKEND_FAILURE_204 { + get { + return ResourceManager.GetString("SR_BACKEND_FAILURE_204", resourceCulture); + } + } + /// /// Looks up a localized string similar to The device configuration request is missing the Location parameter. /// @@ -5573,6 +5573,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to The guest driver does not support VGPU migration.. + /// + public static string VGPU_GUEST_DRIVER_LIMIT { + get { + return ResourceManager.GetString("VGPU_GUEST_DRIVER_LIMIT", resourceCulture); + } + } + /// /// Looks up a localized string similar to Cannot create a virtual GPU that is incompatible with the existing types on the VM.. /// @@ -5709,7 +5718,7 @@ namespace XenAPI { } /// - /// Looks up a localized string similar to There is a minimal interval required between consecutive plugin calls made on the same VM, please wait before retry.. + /// Looks up a localized string similar to There is a minimal interval required between consecutive plug-in calls made on the same VM, please wait before retry.. /// public static string VM_CALL_PLUGIN_RATE_LIMIT { get { @@ -6482,6 +6491,15 @@ namespace XenAPI { } } + /// + /// Looks up a localized string similar to The current version of Xen or its control libraries is incompatible with the Toolstack.. + /// + public static string XEN_INCOMPATIBLE { + get { + return ResourceManager.GetString("XEN_INCOMPATIBLE", resourceCulture); + } + } + /// /// Looks up a localized string similar to Some volumes to be snapshot could not be added to the VSS snapshot set. /// @@ -6555,7 +6573,7 @@ namespace XenAPI { } /// - /// Looks up a localized string similar to The requested plugin could not be found.. + /// Looks up a localized string similar to The requested plug-in could not be found.. /// public static string XENAPI_MISSING_PLUGIN { get { @@ -6564,7 +6582,7 @@ namespace XenAPI { } /// - /// Looks up a localized string similar to There was a failure communicating with the plugin.. + /// Looks up a localized string similar to There was a failure communicating with the plug-in.. /// public static string XENAPI_PLUGIN_FAILURE { get { diff --git a/XenModel/XenAPI/FriendlyErrorNames.resx b/XenModel/XenAPI/FriendlyErrorNames.resx index 39b3a0979..54833fe68 100755 --- a/XenModel/XenAPI/FriendlyErrorNames.resx +++ b/XenModel/XenAPI/FriendlyErrorNames.resx @@ -1,17 +1,17 @@ - + --> @@ -112,13 +112,13 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - An activation key can only be applied when the edition is set to 'free'. + An activation key can only be applied when the edition is set to 'free'. The specified IP address violates the VIF locking configuration. @@ -343,7 +343,7 @@ The operation could not be performed because the VBD was not connected to the VM. - All VBDs of type 'disk' must be read/write for HVM guests + All VBDs of type 'disk' must be read/write for HVM guests An internal error generated by the domain builder. @@ -367,7 +367,7 @@ Some events have been lost from the queue and cannot be retrieved. - The event.from token could not be parsed. Valid values include: '', and a value returned from a previous event.from call. + The event.from token could not be parsed. Valid values include: '', and a value returned from a previous event.from call. The server failed to parse your event subscription. Valid values include: *, class-name, class-name/object-reference. @@ -451,7 +451,7 @@ This server cannot join the pool because the pool has HA enabled but this server has HA disabled. - Server cannot rejoin pool because it should have fenced (it is not in the master's partition) + Server cannot rejoin pool because it should have fenced (it is not in the master's partition) HA can only be enabled for 2 servers or more. Note that 2 servers requires a pre-configured quorum tiebreak script. @@ -553,7 +553,7 @@ The server is still booting. - The master says the server is not known to it. Perhaps the server was deleted from the master's database? + The master says the server is not known to it. Perhaps the server was deleted from the master's database? The specified VBD device is not recognized: please use a non-negative integer @@ -625,7 +625,7 @@ The uploaded update package is invalid. - The value '{1}' is invalid for field '{0}'. + The value '{1}' is invalid for field '{0}'. Cannot create a VLAN or tunnel on top of a tunnel access PIF - use the underlying transport PIF instead. @@ -649,7 +649,7 @@ The connection to the joining server failed - There was an error connecting to the server. the service contacted didn't reply properly. + There was an error connecting to the server. the service contacted didn't reply properly. This operation is not allowed with your current license @@ -664,7 +664,7 @@ This server cannot join a pool because its license does not support pooling - HA cannot be enabled because this server's license does not allow it + HA cannot be enabled because this server's license does not allow it Your license has expired @@ -685,7 +685,7 @@ A VDI with the specified location already exists within the SR - The MAC address specified doesn't exist on this server. + The MAC address specified doesn't exist on this server. The MAC address specified is not valid. @@ -694,7 +694,7 @@ The MAC address specified still exists on this server. - INTERNAL ERROR: Attempted to set '{0}'.'{1}':'{3}'='{2}', but the key '{3}' was already present in map '{1}'. + INTERNAL ERROR: Attempted to set '{0}'.'{1}':'{3}'='{2}', but the key '{3}' was already present in map '{1}'. The dynamic memory range does not satisfy the following constraint. @@ -825,9 +825,6 @@ There is not enough space to upload the update - - The passthrough_enabled must be true before passthrough usb to vm. - The update {0} has already been applied @@ -910,7 +907,7 @@ PIF has no network configuration - PIF has no IPv6 configuration (mode currently set to 'none') + PIF has no IPv6 configuration (mode currently set to 'none') The primary address types are not compatible @@ -994,7 +991,7 @@ Failed to enable external authentication, the supplied credentials were invalid. - The external authentication configuration of the server joining the pool must match the pool's own external authentication configuration. + The external authentication configuration of the server joining the pool must match the pool's own external authentication configuration. The host joining the pool must not have any bonds. @@ -1080,7 +1077,7 @@ Authorized Roles: {1} The restore could not be performed because the restore script failed. Your backup file may be corrupt. See the logs for more information. - The restore could not be performed because the server's current management interface is not in the backup. The interfaces mentioned in the backup are: + The restore could not be performed because the server's current management interface is not in the backup. The interfaces mentioned in the backup are: The restore could not be performed because a network interface is missing @@ -1104,7 +1101,7 @@ Authorized Roles: {1} The management interface on a slave cannot be disabled because the slave would enter emergency mode. - The SM plugin did not respond to a query. + The SM plug-in did not respond to a query. Attaching this SR failed. @@ -1266,7 +1263,7 @@ Authorized Roles: {1} Invalid snap-reserver-percentage value, must be an integer indicating the amount of space, as a percentage of the VDI size, to reserve for snapshots. - Invalid snap-depletion value, must be one of 'delete-oldest' or 'volume-offline' + Invalid snap-depletion value, must be one of 'delete-oldest' or 'volume-offline' Volume out of space, probably due to insufficient snapshot reserve allocation. @@ -1293,7 +1290,7 @@ Authorized Roles: {1} Invalid SNMP response received for a CLI command - Volume metadata stored in the 'Description' field is invalid, this field contains encoded data and is not user editable + Volume metadata stored in the 'Description' field is invalid, this field contains encoded data and is not user editable Invalid EOF response received for a CLI command @@ -1328,6 +1325,9 @@ Authorized Roles: {1} An active FIST point was reached that causes the process to exit abnormally + + Gave up on leaf coalesce after leaf grew bigger than before snapshot taken + The device configuration request is missing the Location parameter @@ -1353,7 +1353,7 @@ Authorized Roles: {1} Given SMB version is not allowed. Choose either 1.0 or 3.0 - Require "-o" along with xe-mount-isosr + Require "-o" along with xe-mount-isosr The specified VDI is currently in use @@ -1434,7 +1434,7 @@ Authorized Roles: {1} The VDI failed to be introduced to the database - The CSLG software doesn't seem to be installed + The CSLG software doesn't seem to be installed Failed to create multiple sub-pools from parent pool @@ -1707,7 +1707,7 @@ Authorized Roles: {1} The SR operation cannot be performed because a device underlying the SR is in use by the server. - You attempted to migrate a VDI to or from an SR that doesn't support migration + You attempted to migrate a VDI to or from an SR that doesn't support migration The SR is full. Requested size {0} exceeds the maximum size {1} @@ -1722,7 +1722,7 @@ Authorized Roles: {1} The SR {0} is still connected to a server by a PBD. It cannot be destroyed. - The SR could not be destroyed because the 'indestructible' flag was set on it. + The SR could not be destroyed because the 'indestructible' flag was set on it. The SR is currently being used as a local cache SR. @@ -1755,7 +1755,7 @@ Authorized Roles: {1} The operation could not proceed because necessary VDIs were already locked at the storage level. - The remote system's SSL certificate failed to verify against our certificate library. + The remote system's SSL certificate failed to verify against our certificate library. Subject already exists. @@ -1896,7 +1896,7 @@ Authorized Roles: {1} The requested operation is not allowed for VDIs with CBT enabled or VMs having such VDIs, and CBT is enabled for the specified VDI. - The VDI could not be opened for metadata recovery as it contains the current pool's metadata. + The VDI could not be opened for metadata recovery as it contains the current pool's metadata. The VDI copy action has failed @@ -1938,13 +1938,13 @@ Authorized Roles: {1} This operation cannot be performed because the system does not manage this VDI - The VDI is not stored using a sparse format. It is not possible to query and manipulate only the changed blocks (or 'block differences' or 'disk deltas') between two VDIs. Please select a VDI which uses a sparse-aware technology such as VHD. + The VDI is not stored using a sparse format. It is not possible to query and manipulate only the changed blocks (or 'block differences' or 'disk deltas') between two VDIs. Please select a VDI which uses a sparse-aware technology such as VHD. The requested operation is not allowed because the specified VDI does not have changed block tracking metadata. - This operation is not permitted on VDIs in the 'on-boot=reset' mode, or on VMs having such VDIs. + This operation is not permitted on VDIs in the 'on-boot=reset' mode, or on VMs having such VDIs. The operation required write access but VDI {0} is read-only @@ -1958,6 +1958,9 @@ Authorized Roles: {1} The VGPU is not compatible with any PGPU in the destination. + + The guest driver does not support VGPU migration. + Cannot create a virtual GPU that is incompatible with the existing types on the VM. @@ -1965,10 +1968,10 @@ Authorized Roles: {1} The VM cannot start because all GPUs are fully used or are running other types of virtual GPU - Virtual GPU type is not one of the GPU's enabled types. + Virtual GPU type is not one of the GPU's enabled types. - Virtual GPU type is not one of the GPU's supported types. + Virtual GPU type is not one of the GPU's supported types. You have reached the maximum number of virtual network interfaces allowed for this virtual machine. @@ -2007,16 +2010,16 @@ Authorized Roles: {1} This VM is assigned to a snapshot schedule. - You attempted to start a VM that's attached to more than one VDI with a timeoffset marked as reset-on-boot. + You attempted to start a VM that's attached to more than one VDI with a timeoffset marked as reset-on-boot. - You attempted an operation on a VM that needed it to be in state '{1}' but was in state '{2}'. + You attempted an operation on a VM that needed it to be in state '{1}' but was in state '{2}'. The BIOS strings for this VM have already been set and cannot be changed. - There is a minimal interval required between consecutive plugin calls made on the same VM, please wait before retry. + There is a minimal interval required between consecutive plug-in calls made on the same VM, please wait before retry. You cannot delete the specified default template. @@ -2034,10 +2037,10 @@ Authorized Roles: {1} The specified VM has a duplicate VBD device and cannot be started. - VM didn't acknowledge the need to shut down. + VM didn't acknowledge the need to shut down. - VM didn't acknowledge the need to suspend. + VM didn't acknowledge the need to suspend. The VM unexpectedly halted @@ -2070,7 +2073,7 @@ Authorized Roles: {1} Cannot migrate a VM to a destination host which is older than the source host. - The VM's Virtual Hardware Platform version is incompatible with this host. + The VM's Virtual Hardware Platform version is incompatible with this host. HVM is required for this operation @@ -2151,13 +2154,13 @@ Authorized Roles: {1} The VM unexpectedly rebooted - You attempted to run a VM on a host which doesn't have a GPU available in the GPU group needed by the VM. The VM has a virtual GPU attached to this GPU group. + You attempted to run a VM on a host which doesn't have a GPU available in the GPU group needed by the VM. The VM has a virtual GPU attached to this GPU group. GPU not available - You attempted to run a VM on a host which doesn't have I/O virtualization (IOMMU/VT-d) enabled, which is needed by the VM. + You attempted to run a VM on a host which doesn't have I/O virtualization (IOMMU/VT-d) enabled, which is needed by the VM. This VM needs a network that cannot be seen from that server @@ -2208,7 +2211,7 @@ Authorized Roles: {1} The VM cannot be imported unforced because it is either the same version or an older version of an existing VM. - You attempted an operation on VM {0} that was judged to be unsafe by the server. This can happen if the VM would run on a CPU that has a potentially incompatible set of feature flags to those the VM requires. If you want to override this warning then use the 'force' option. + You attempted an operation on VM {0} that was judged to be unsafe by the server. This can happen if the VM would run on a CPU that has a potentially incompatible set of feature flags to those the VM requires. If you want to override this warning then use the 'force' option. WLB rejected our configured authentication details. @@ -2226,10 +2229,10 @@ Authorized Roles: {1} WLB reported an internal error. - WLB rejected the server's request as malformed. + WLB rejected the server's request as malformed. - The WLB server said something that the server wasn't expecting or didn't understand. + The WLB server said something that the server wasn't expecting or didn't understand. No WLB connection is configured. @@ -2247,10 +2250,10 @@ Authorized Roles: {1} WLB reported that the server rejected its configured authentication details. - WLB reported that the server refused to let it connect (even though we're connecting perfectly fine in the other direction). + WLB reported that the server refused to let it connect (even though we're connecting perfectly fine in the other direction). - WLB reported that the server said something to it that WLB wasn't expecting or didn't understand. + WLB reported that the server said something to it that WLB wasn't expecting or didn't understand. WLB reported that communication with the server timed out. @@ -2262,10 +2265,13 @@ Authorized Roles: {1} 3rd party xapi hook failed - The requested plugin could not be found. + The requested plug-in could not be found. - There was a failure communicating with the plugin. + There was a failure communicating with the plug-in. + + + The current version of Xen or its control libraries is incompatible with the Toolstack. Some volumes to be snapshot could not be added to the VSS snapshot set @@ -2297,4 +2303,4 @@ Authorized Roles: {1} The server failed to unmarshal the XMLRPC message; it was expecting one element and received something else. - \ No newline at end of file + \ No newline at end of file diff --git a/XenModel/XenAPI/JsonRpcClient.cs b/XenModel/XenAPI/JsonRpcClient.cs index 82deb77fe..504d42bc4 100755 --- a/XenModel/XenAPI/JsonRpcClient.cs +++ b/XenModel/XenAPI/JsonRpcClient.cs @@ -8894,6 +8894,13 @@ namespace XenAPI return Rpc("Bond.get_links_up", new JArray(session, _bond ?? ""), serializer); } + public bool bond_get_auto_update_mac(string session, string _bond) + { + var converters = new List {}; + var serializer = CreateSerializer(converters); + return Rpc("Bond.get_auto_update_mac", new JArray(session, _bond ?? ""), serializer); + } + public void bond_set_other_config(string session, string _bond, Dictionary _other_config) { var converters = new List {new StringStringMapConverter()}; @@ -12787,6 +12794,13 @@ namespace XenAPI return Rpc("VGPU.get_extra_args", new JArray(session, _vgpu ?? ""), serializer); } + public XenRef vgpu_get_pci(string session, string _vgpu) + { + var converters = new List {new XenRefConverter()}; + var serializer = CreateSerializer(converters); + return Rpc>("VGPU.get_PCI", new JArray(session, _vgpu ?? ""), serializer); + } + public void vgpu_set_other_config(string session, string _vgpu, Dictionary _other_config) { var converters = new List {new StringStringMapConverter()}; diff --git a/XenModel/XenAPI/Proxy.cs b/XenModel/XenAPI/Proxy.cs index 076f1b581..121170a5e 100755 --- a/XenModel/XenAPI/Proxy.cs +++ b/XenModel/XenAPI/Proxy.cs @@ -5102,6 +5102,10 @@ namespace XenAPI Response bond_get_links_up(string session, string _bond); + [XmlRpcMethod("Bond.get_auto_update_mac")] + Response + bond_get_auto_update_mac(string session, string _bond); + [XmlRpcMethod("Bond.set_other_config")] Response bond_set_other_config(string session, string _bond, Object _other_config); @@ -7327,6 +7331,10 @@ namespace XenAPI Response vgpu_get_extra_args(string session, string _vgpu); + [XmlRpcMethod("VGPU.get_PCI")] + Response + vgpu_get_pci(string session, string _vgpu); + [XmlRpcMethod("VGPU.set_other_config")] Response vgpu_set_other_config(string session, string _vgpu, Object _other_config); @@ -8866,6 +8874,7 @@ namespace XenAPI public string mode; public Object properties; public string links_up; + public bool auto_update_mac; } [XmlRpcMissingMapping(MappingAction.Ignore)] @@ -9198,6 +9207,7 @@ namespace XenAPI public string scheduled_to_be_resident_on; public Object compatibility_metadata; public string extra_args; + public string PCI; } [XmlRpcMissingMapping(MappingAction.Ignore)] diff --git a/XenModel/XenAPI/VGPU.cs b/XenModel/XenAPI/VGPU.cs index 9236d1edd..ddf5479db 100644 --- a/XenModel/XenAPI/VGPU.cs +++ b/XenModel/XenAPI/VGPU.cs @@ -61,7 +61,8 @@ namespace XenAPI XenRef resident_on, XenRef scheduled_to_be_resident_on, Dictionary compatibility_metadata, - string extra_args) + string extra_args, + XenRef PCI) { this.uuid = uuid; this.VM = VM; @@ -74,6 +75,7 @@ namespace XenAPI this.scheduled_to_be_resident_on = scheduled_to_be_resident_on; this.compatibility_metadata = compatibility_metadata; this.extra_args = extra_args; + this.PCI = PCI; } /// @@ -116,6 +118,7 @@ namespace XenAPI scheduled_to_be_resident_on = update.scheduled_to_be_resident_on; compatibility_metadata = update.compatibility_metadata; extra_args = update.extra_args; + PCI = update.PCI; } internal void UpdateFrom(Proxy_VGPU proxy) @@ -131,6 +134,7 @@ namespace XenAPI scheduled_to_be_resident_on = proxy.scheduled_to_be_resident_on == null ? null : XenRef.Create(proxy.scheduled_to_be_resident_on); compatibility_metadata = proxy.compatibility_metadata == null ? null : Maps.convert_from_proxy_string_string(proxy.compatibility_metadata); extra_args = proxy.extra_args == null ? null : proxy.extra_args; + PCI = proxy.PCI == null ? null : XenRef.Create(proxy.PCI); } public Proxy_VGPU ToProxy() @@ -147,6 +151,7 @@ namespace XenAPI result_.scheduled_to_be_resident_on = scheduled_to_be_resident_on ?? ""; result_.compatibility_metadata = Maps.convert_to_proxy_string_string(compatibility_metadata); result_.extra_args = extra_args ?? ""; + result_.PCI = PCI ?? ""; return result_; } @@ -180,6 +185,8 @@ namespace XenAPI compatibility_metadata = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "compatibility_metadata")); if (table.ContainsKey("extra_args")) extra_args = Marshalling.ParseString(table, "extra_args"); + if (table.ContainsKey("PCI")) + PCI = Marshalling.ParseRef(table, "PCI"); } public bool DeepEquals(VGPU other) @@ -199,7 +206,8 @@ namespace XenAPI Helper.AreEqual2(this._resident_on, other._resident_on) && Helper.AreEqual2(this._scheduled_to_be_resident_on, other._scheduled_to_be_resident_on) && Helper.AreEqual2(this._compatibility_metadata, other._compatibility_metadata) && - Helper.AreEqual2(this._extra_args, other._extra_args); + Helper.AreEqual2(this._extra_args, other._extra_args) && + Helper.AreEqual2(this._PCI, other._PCI); } internal static List ProxyArrayToObjectList(Proxy_VGPU[] input) @@ -414,6 +422,20 @@ namespace XenAPI return session.proxy.vgpu_get_extra_args(session.opaque_ref, _vgpu ?? "").parse(); } + /// + /// Get the PCI field of the given VGPU. + /// First published in Unreleased. + /// + /// The session + /// The opaque_ref of the given vgpu + public static XenRef get_PCI(Session session, string _vgpu) + { + if (session.JsonRpcClient != null) + return session.JsonRpcClient.vgpu_get_pci(session.opaque_ref, _vgpu); + else + return XenRef.Create(session.proxy.vgpu_get_pci(session.opaque_ref, _vgpu ?? "").parse()); + } + /// /// Set the other_config field of the given VGPU. /// First published in XenServer 6.0. @@ -808,5 +830,25 @@ namespace XenAPI } } private string _extra_args = ""; + + /// + /// Device passed trough to VM, either as full device or SR-IOV virtual function + /// First published in Unreleased. + /// + [JsonConverter(typeof(XenRefConverter))] + public virtual XenRef PCI + { + get { return _PCI; } + set + { + if (!Helper.AreEqual(value, _PCI)) + { + _PCI = value; + Changed = true; + NotifyPropertyChanged("PCI"); + } + } + } + private XenRef _PCI = new XenRef("OpaqueRef:NULL"); } } diff --git a/XenModel/XenAPI/vgpu_type_implementation.cs b/XenModel/XenAPI/vgpu_type_implementation.cs index 84d32d46f..30d588c37 100644 --- a/XenModel/XenAPI/vgpu_type_implementation.cs +++ b/XenModel/XenAPI/vgpu_type_implementation.cs @@ -45,6 +45,10 @@ namespace XenAPI /// nvidia, /// + /// vGPU using NVIDIA hardware with SR-IOV + /// + nvidia_sriov, + /// /// vGPU using Intel GVT-g /// gvt_g, @@ -73,6 +77,8 @@ namespace XenAPI return "passthrough"; case vgpu_type_implementation.nvidia: return "nvidia"; + case vgpu_type_implementation.nvidia_sriov: + return "nvidia_sriov"; case vgpu_type_implementation.gvt_g: return "gvt_g"; case vgpu_type_implementation.mxgpu: diff --git a/XenModel/XenAPI/vmss_type.cs b/XenModel/XenAPI/vmss_type.cs index ea1450310..c096fc1ba 100644 --- a/XenModel/XenAPI/vmss_type.cs +++ b/XenModel/XenAPI/vmss_type.cs @@ -45,7 +45,7 @@ namespace XenAPI /// checkpoint, /// - /// The snapshot is a VSS + /// Support for VSS has been removed. /// snapshot_with_quiesce, unknown