CP-6083: Updated XenModel with latest C# bindings.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2013-09-18 09:43:49 +01:00
parent 355fa30243
commit fb1f44e67b
14 changed files with 1367 additions and 514 deletions

View File

@ -72,13 +72,14 @@ namespace XenAdmin.Network
private readonly ChangeableDictionary<XenRef<VBD_metrics>, VBD_metrics> _vbd_metrics = new ChangeableDictionary<XenRef<VBD_metrics>, VBD_metrics>();
private readonly ChangeableDictionary<XenRef<VDI>, VDI> _vdi = new ChangeableDictionary<XenRef<VDI>, VDI>();
private readonly ChangeableDictionary<XenRef<VGPU>, VGPU> _vgpu = new ChangeableDictionary<XenRef<VGPU>, VGPU>();
private readonly ChangeableDictionary<XenRef<VGPU_type>, VGPU_type> _vgpu_types = new ChangeableDictionary<XenRef<VGPU_type>, VGPU_type>();
private readonly ChangeableDictionary<XenRef<VIF>, VIF> _vif = new ChangeableDictionary<XenRef<VIF>, VIF>();
private readonly ChangeableDictionary<XenRef<VIF_metrics>, VIF_metrics> _vif_metrics = new ChangeableDictionary<XenRef<VIF_metrics>, VIF_metrics>();
private readonly ChangeableDictionary<XenRef<VLAN>, VLAN> _vlan = new ChangeableDictionary<XenRef<VLAN>, VLAN>();
private readonly ChangeableDictionary<XenRef<VM>, VM> _vm = new ChangeableDictionary<XenRef<VM>, VM>();
private readonly ChangeableDictionary<XenRef<VM_metrics>, VM_metrics> _vm_metrics = new ChangeableDictionary<XenRef<VM_metrics>, VM_metrics>();
private readonly ChangeableDictionary<XenRef<VM_guest_metrics>, VM_guest_metrics> _vm_guest_metrics = new ChangeableDictionary<XenRef<VM_guest_metrics>, VM_guest_metrics>();
private readonly ChangeableDictionary<XenRef<VMPP>,VMPP> _vmmp=new ChangeableDictionary<XenRef<VMPP>, VMPP>();
private readonly ChangeableDictionary<XenRef<VMPP>, VMPP> _vmmp = new ChangeableDictionary<XenRef<VMPP>, VMPP>();
private readonly ChangeableDictionary<XenRef<VM_appliance>, VM_appliance> _vm_appliance = new ChangeableDictionary<XenRef<VM_appliance>, VM_appliance>();
private readonly ChangeableDictionary<XenRef<Crashdump>, Crashdump> _crashdump = new ChangeableDictionary<XenRef<Crashdump>, Crashdump>();
@ -99,22 +100,19 @@ namespace XenAdmin.Network
}
public Bond[] Bonds
{
get
{
return contents(_bond);
}
get { return contents(_bond); }
}
public VMPP[] VMPPs
{
get { return contents((_vmmp)); }
get { return contents(_vmmp); }
}
public VM_appliance[] VM_appliances
{
get { return contents((_vm_appliance)); }
get { return contents(_vm_appliance); }
}
public Folder[] Folders
@ -129,10 +127,7 @@ namespace XenAdmin.Network
public Host[] Hosts
{
get
{
return contents(_host);
}
get { return contents(_host); }
}
public int HostCount
@ -140,129 +135,76 @@ namespace XenAdmin.Network
get { return _host.Count; }
}
public Host_cpu[] Host_cpus
{
get { return contents(_host_cpu); }
}
public XenAPI.Message[] Messages
{
get
{
return contents(_message);
}
get { return contents(_message); }
}
public XenAPI.Network[] Networks
{
get
{
return contents(_network);
}
get { return contents(_network); }
}
public PBD[] PBDs
{
get
{
return contents(_pbd);
}
get { return contents(_pbd); }
}
public PGPU[] PGPUs
{
get
{
return contents(_pgpu);
}
get { return contents(_pgpu); }
}
public PIF[] PIFs
{
get
{
return contents(_pif);
}
get { return contents(_pif); }
}
public Pool[] Pools
{
get
{
return contents(_pool);
}
get { return contents(_pool); }
}
public Pool_patch[] Pool_patches
{
get
{
return contents(_pool_patch);
}
get { return contents(_pool_patch); }
}
public Role[] Roles
{
get
{
return contents(_role);
}
get { return contents(_role); }
}
public SM[] SMs
{
get
{
return contents(_sm);
}
get { return contents(_sm); }
}
public SR[] SRs
{
get
{
return contents(_sr);
}
get { return contents(_sr); }
}
public Subject[] Subjects
{
get { return contents(_subject); }
}
public Tunnel[] Tunnels
{
get { return contents(_tunnel); }
}
public VBD[] VBDs
{
get { return contents(_vbd); }
}
public VDI[] VDIs
{
get { return contents(_vdi); }
@ -270,31 +212,23 @@ namespace XenAdmin.Network
public VGPU[] VGPUs
{
get
{
return contents(_vgpu);
}
get { return contents(_vgpu); }
}
public VGPU_type[] VGPU_types
{
get { return contents(_vgpu_types); } }
public VIF[] VIFs
{
get
{
return contents(_vif);
}
get { return contents(_vif); }
}
public VM[] VMs
{
get
{
return contents(_vm);
}
get { return contents(_vm); }
}
private static T[] contents<T>(ChangeableDictionary<XenRef<T>, T> d) where T : XenObject<T>
{
@ -311,9 +245,6 @@ namespace XenAdmin.Network
}
}
/// <summary>
/// Returns the collection for the given type, or null if no such dictionary is present.
/// </summary>

View File

@ -74,6 +74,7 @@ namespace XenAdmin.Network
VBD[] VBDs { get; }
VDI[] VDIs { get; }
VGPU[] VGPUs { get; }
VGPU_type[] VGPU_types { get; }
VIF[] VIFs { get; }
VMPP[] VMPPs { get; }
VM_appliance[] VM_appliances { get; }

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.5466
// Runtime Version:2.0.50727.5472
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -645,6 +645,15 @@ namespace XenAPI {
}
}
/// <summary>
/// Looks up a localized string similar to The GPU group does not contain any PGPUs..
/// </summary>
public static string GPU_GROUP_CONTAINS_NO_PGPUS {
get {
return ResourceManager.GetString("GPU_GROUP_CONTAINS_NO_PGPUS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The GPU group contains active PGPUs and cannot be deleted..
/// </summary>
@ -1824,6 +1833,33 @@ namespace XenAPI {
}
}
/// <summary>
/// Looks up a localized string similar to This PGPU is currently in use by running VMs..
/// </summary>
public static string PGPU_IN_USE_BY_VM {
get {
return ResourceManager.GetString("PGPU_IN_USE_BY_VM", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to There is insufficient capacity on this PGPU to run the VGPU..
/// </summary>
public static string PGPU_INSUFFICIENT_CAPACITY_FOR_VGPU {
get {
return ResourceManager.GetString("PGPU_INSUFFICIENT_CAPACITY_FOR_VGPU", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PGPU type not compatible with destination group..
/// </summary>
public static string PGPU_NOT_COMPATIBLE_WITH_GPU_GROUP {
get {
return ResourceManager.GetString("PGPU_NOT_COMPATIBLE_WITH_GPU_GROUP", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You cannot create a bond of an interface which is a member of an existing bond..
/// </summary>
@ -4313,6 +4349,33 @@ namespace XenAPI {
}
}
/// <summary>
/// Looks up a localized string similar to VGPU type is not compatible with one or more of the VGPU types currently running on this PGPU.
/// </summary>
public static string VGPU_TYPE_NOT_COMPATIBLE_WITH_RUNNING_TYPE {
get {
return ResourceManager.GetString("VGPU_TYPE_NOT_COMPATIBLE_WITH_RUNNING_TYPE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to VGPU type is not one of the PGPU&apos;s enabled types..
/// </summary>
public static string VGPU_TYPE_NOT_ENABLED {
get {
return ResourceManager.GetString("VGPU_TYPE_NOT_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to VGPU type is not one of the PGPU&apos;s supported types..
/// </summary>
public static string VGPU_TYPE_NOT_SUPPORTED {
get {
return ResourceManager.GetString("VGPU_TYPE_NOT_SUPPORTED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Network has active VIFs.
/// </summary>
@ -4475,6 +4538,15 @@ namespace XenAPI {
}
}
/// <summary>
/// Looks up a localized string similar to This operation could not be performed, because the VM has one or more virtual GPUs..
/// </summary>
public static string VM_HAS_VGPU {
get {
return ResourceManager.GetString("VM_HAS_VGPU", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to This VM operation cannot be performed on an older-versioned host during an upgrade..
/// </summary>
@ -4691,6 +4763,15 @@ namespace XenAPI {
}
}
/// <summary>
/// Looks up a localized string similar to You attempted to run a VM on a host on which the vGPU required by the VM cannot be allocated on any pGPUs in the GPU_group needed by the VM..
/// </summary>
public static string VM_REQUIRES_VGPU {
get {
return ResourceManager.GetString("VM_REQUIRES_VGPU", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An error occurred while reverting the specified virtual machine to the specified snapshot.
/// </summary>

View File

@ -312,6 +312,9 @@
<data name="FIELD_TYPE_ERROR" xml:space="preserve">
<value>One of the fields you supplied was of the wrong type.</value>
</data>
<data name="GPU_GROUP_CONTAINS_NO_PGPUS" xml:space="preserve">
<value>The GPU group does not contain any PGPUs.</value>
</data>
<data name="GPU_GROUP_CONTAINS_PGPU" xml:space="preserve">
<value>The GPU group contains active PGPUs and cannot be deleted.</value>
</data>
@ -705,6 +708,15 @@
<data name="PERMISSION_DENIED" xml:space="preserve">
<value>Caller not allowed to perform this operation.</value>
</data>
<data name="PGPU_INSUFFICIENT_CAPACITY_FOR_VGPU" xml:space="preserve">
<value>There is insufficient capacity on this PGPU to run the VGPU.</value>
</data>
<data name="PGPU_IN_USE_BY_VM" xml:space="preserve">
<value>This PGPU is currently in use by running VMs.</value>
</data>
<data name="PGPU_NOT_COMPATIBLE_WITH_GPU_GROUP" xml:space="preserve">
<value>PGPU type not compatible with destination group.</value>
</data>
<data name="PIF_ALREADY_BONDED" xml:space="preserve">
<value>You cannot create a bond of an interface which is a member of an existing bond.</value>
</data>
@ -1538,6 +1550,15 @@ Authorized Roles: {1}</value>
<data name="VDI_READONLY" xml:space="preserve">
<value>The operation required write access but VDI {0} is read-only</value>
</data>
<data name="VGPU_TYPE_NOT_COMPATIBLE_WITH_RUNNING_TYPE" xml:space="preserve">
<value>VGPU type is not compatible with one or more of the VGPU types currently running on this PGPU</value>
</data>
<data name="VGPU_TYPE_NOT_ENABLED" xml:space="preserve">
<value>VGPU type is not one of the PGPU's enabled types.</value>
</data>
<data name="VGPU_TYPE_NOT_SUPPORTED" xml:space="preserve">
<value>VGPU type is not one of the PGPU's supported types.</value>
</data>
<data name="VIFS_MAX_ALLOWED" xml:space="preserve">
<value>You have reached the maximum number of virtual network interfaces allowed for this virtual machine.</value>
</data>
@ -1601,6 +1622,9 @@ Authorized Roles: {1}</value>
<data name="VM_HAS_TOO_MANY_SNAPSHOTS" xml:space="preserve">
<value>You attempted to migrate a VM with more than one snapshot.</value>
</data>
<data name="VM_HAS_VGPU" xml:space="preserve">
<value>This operation could not be performed, because the VM has one or more virtual GPUs.</value>
</data>
<data name="VM_HOST_INCOMPATIBLE_VERSION" xml:space="preserve">
<value>This VM operation cannot be performed on an older-versioned host during an upgrade.</value>
</data>
@ -1673,6 +1697,9 @@ Authorized Roles: {1}</value>
<data name="VM_REQUIRES_VDI" xml:space="preserve">
<value>VM cannot be started because it requires a VDI which cannot be attached</value>
</data>
<data name="VM_REQUIRES_VGPU" xml:space="preserve">
<value>You attempted to run a VM on a host on which the vGPU required by the VM cannot be allocated on any pGPUs in the GPU_group needed by the VM.</value>
</data>
<data name="VM_REVERT_FAILED" xml:space="preserve">
<value>An error occurred while reverting the specified virtual machine to the specified snapshot</value>
</data>

View File

@ -50,7 +50,8 @@ namespace XenAPI
List<XenRef<PGPU>> PGPUs,
List<XenRef<VGPU>> VGPUs,
string[] GPU_types,
Dictionary<string, string> other_config)
Dictionary<string, string> other_config,
allocation_algorithm allocation_algorithm)
{
this.uuid = uuid;
this.name_label = name_label;
@ -59,6 +60,7 @@ namespace XenAPI
this.VGPUs = VGPUs;
this.GPU_types = GPU_types;
this.other_config = other_config;
this.allocation_algorithm = allocation_algorithm;
}
/// <summary>
@ -79,6 +81,7 @@ namespace XenAPI
VGPUs = update.VGPUs;
GPU_types = update.GPU_types;
other_config = update.other_config;
allocation_algorithm = update.allocation_algorithm;
}
internal void UpdateFromProxy(Proxy_GPU_group proxy)
@ -90,6 +93,7 @@ namespace XenAPI
VGPUs = proxy.VGPUs == null ? null : XenRef<VGPU>.Create(proxy.VGPUs);
GPU_types = proxy.GPU_types == null ? new string[] {} : (string [])proxy.GPU_types;
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
allocation_algorithm = proxy.allocation_algorithm == null ? (allocation_algorithm) 0 : (allocation_algorithm)Helper.EnumParseDefault(typeof(allocation_algorithm), (string)proxy.allocation_algorithm);
}
public Proxy_GPU_group ToProxy()
@ -102,6 +106,7 @@ namespace XenAPI
result_.VGPUs = (VGPUs != null) ? Helper.RefListToStringArray(VGPUs) : new string[] {};
result_.GPU_types = GPU_types;
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
result_.allocation_algorithm = allocation_algorithm_helper.ToString(allocation_algorithm);
return result_;
}
@ -118,6 +123,7 @@ namespace XenAPI
VGPUs = Marshalling.ParseSetRef<VGPU>(table, "VGPUs");
GPU_types = Marshalling.ParseStringArray(table, "GPU_types");
other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
allocation_algorithm = (allocation_algorithm)Helper.EnumParseDefault(typeof(allocation_algorithm), Marshalling.ParseString(table, "allocation_algorithm"));
}
public bool DeepEquals(GPU_group other)
@ -133,7 +139,8 @@ namespace XenAPI
Helper.AreEqual2(this._PGPUs, other._PGPUs) &&
Helper.AreEqual2(this._VGPUs, other._VGPUs) &&
Helper.AreEqual2(this._GPU_types, other._GPU_types) &&
Helper.AreEqual2(this._other_config, other._other_config);
Helper.AreEqual2(this._other_config, other._other_config) &&
Helper.AreEqual2(this._allocation_algorithm, other._allocation_algorithm);
}
public override string SaveChanges(Session session, string opaqueRef, GPU_group server)
@ -157,6 +164,10 @@ namespace XenAPI
{
GPU_group.set_other_config(session, opaqueRef, _other_config);
}
if (!Helper.AreEqual2(_allocation_algorithm, server._allocation_algorithm))
{
GPU_group.set_allocation_algorithm(session, opaqueRef, _allocation_algorithm);
}
return null;
}
@ -212,6 +223,11 @@ namespace XenAPI
return Maps.convert_from_proxy_string_string(session.proxy.gpu_group_get_other_config(session.uuid, (_gpu_group != null) ? _gpu_group : "").parse());
}
public static allocation_algorithm get_allocation_algorithm(Session session, string _gpu_group)
{
return (allocation_algorithm)Helper.EnumParseDefault(typeof(allocation_algorithm), (string)session.proxy.gpu_group_get_allocation_algorithm(session.uuid, (_gpu_group != null) ? _gpu_group : "").parse());
}
public static void set_name_label(Session session, string _gpu_group, string _label)
{
session.proxy.gpu_group_set_name_label(session.uuid, (_gpu_group != null) ? _gpu_group : "", (_label != null) ? _label : "").parse();
@ -237,6 +253,61 @@ namespace XenAPI
session.proxy.gpu_group_remove_from_other_config(session.uuid, (_gpu_group != null) ? _gpu_group : "", (_key != null) ? _key : "").parse();
}
public static void set_allocation_algorithm(Session session, string _gpu_group, allocation_algorithm _allocation_algorithm)
{
session.proxy.gpu_group_set_allocation_algorithm(session.uuid, (_gpu_group != null) ? _gpu_group : "", allocation_algorithm_helper.ToString(_allocation_algorithm)).parse();
}
public static XenRef<GPU_group> create(Session session, string _name_label, string _name_description, Dictionary<string, string> _other_config)
{
return XenRef<GPU_group>.Create(session.proxy.gpu_group_create(session.uuid, (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", Maps.convert_to_proxy_string_string(_other_config)).parse());
}
public static XenRef<Task> async_create(Session session, string _name_label, string _name_description, Dictionary<string, string> _other_config)
{
return XenRef<Task>.Create(session.proxy.async_gpu_group_create(session.uuid, (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", Maps.convert_to_proxy_string_string(_other_config)).parse());
}
public static void destroy(Session session, string _self)
{
session.proxy.gpu_group_destroy(session.uuid, (_self != null) ? _self : "").parse();
}
public static XenRef<Task> async_destroy(Session session, string _self)
{
return XenRef<Task>.Create(session.proxy.async_gpu_group_destroy(session.uuid, (_self != null) ? _self : "").parse());
}
public static List<XenRef<VGPU_type>> get_enabled_VGPU_types(Session session, string _self)
{
return XenRef<VGPU_type>.Create(session.proxy.gpu_group_get_enabled_vgpu_types(session.uuid, (_self != null) ? _self : "").parse());
}
public static XenRef<Task> async_get_enabled_VGPU_types(Session session, string _self)
{
return XenRef<Task>.Create(session.proxy.async_gpu_group_get_enabled_vgpu_types(session.uuid, (_self != null) ? _self : "").parse());
}
public static List<XenRef<VGPU_type>> get_supported_VGPU_types(Session session, string _self)
{
return XenRef<VGPU_type>.Create(session.proxy.gpu_group_get_supported_vgpu_types(session.uuid, (_self != null) ? _self : "").parse());
}
public static XenRef<Task> async_get_supported_VGPU_types(Session session, string _self)
{
return XenRef<Task>.Create(session.proxy.async_gpu_group_get_supported_vgpu_types(session.uuid, (_self != null) ? _self : "").parse());
}
public static long get_remaining_capacity(Session session, string _self, string _vgpu_type)
{
return long.Parse((string)session.proxy.gpu_group_get_remaining_capacity(session.uuid, (_self != null) ? _self : "", (_vgpu_type != null) ? _vgpu_type : "").parse());
}
public static XenRef<Task> async_get_remaining_capacity(Session session, string _self, string _vgpu_type)
{
return XenRef<Task>.Create(session.proxy.async_gpu_group_get_remaining_capacity(session.uuid, (_self != null) ? _self : "", (_vgpu_type != null) ? _vgpu_type : "").parse());
}
public static List<XenRef<GPU_group>> get_all(Session session)
{
return XenRef<GPU_group>.Create(session.proxy.gpu_group_get_all(session.uuid).parse());
@ -289,6 +360,12 @@ namespace XenAPI
set { if (!Helper.AreEqual(value, _other_config)) { _other_config = value; Changed = true; NotifyPropertyChanged("other_config"); } }
}
private allocation_algorithm _allocation_algorithm;
public virtual allocation_algorithm allocation_algorithm {
get { return _allocation_algorithm; }
set { if (!Helper.AreEqual(value, _allocation_algorithm)) { _allocation_algorithm = value; Changed = true; NotifyPropertyChanged("allocation_algorithm"); } }
}
}
}

View File

@ -1,407 +1,435 @@
/*
* 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
* 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;
using System.Collections;
using System.Collections.Generic;
using CookComputing.XmlRpc;
namespace XenAPI
{
public partial interface Proxy : IXmlRpcProxy
{
#region pre-6.2 compatibility
[XmlRpcMethod("session.login_with_password")]
Response<string>
session_login_with_password(string _uname, string _pwd, string _version);
[XmlRpcMethod("host.apply_edition")]
Response<string>
host_apply_edition(string session, string _host, string _edition);
#endregion
#region pre-6.1 compatibility
[XmlRpcMethod("Bond.create")]
Response<string>
bond_create(string session, string _network, string[] _members, string _mac, string _mode);
[XmlRpcMethod("Async.Bond.create")]
Response<string>
async_bond_create(string session, string _network, string[] _members, string _mac, string _mode);
[XmlRpcMethod("pool.create_new_blob")]
Response<string>
pool_create_new_blob(string session, string _pool, string _name, string _mime_type);
[XmlRpcMethod("Async.pool.create_new_blob")]
Response<string>
async_pool_create_new_blob(string session, string _pool, string _name, string _mime_type);
[XmlRpcMethod("VM.create_new_blob")]
Response<string>
vm_create_new_blob(string session, string _vm, string _name, string _mime_type);
[XmlRpcMethod("Async.VM.create_new_blob")]
Response<string>
async_vm_create_new_blob(string session, string _vm, string _name, string _mime_type);
[XmlRpcMethod("host.create_new_blob")]
Response<string>
host_create_new_blob(string session, string _host, string _name, string _mime_type);
[XmlRpcMethod("Async.host.create_new_blob")]
Response<string>
async_host_create_new_blob(string session, string _host, string _name, string _mime_type);
[XmlRpcMethod("network.create_new_blob")]
Response<string>
network_create_new_blob(string session, string _network, string _name, string _mime_type);
[XmlRpcMethod("Async.network.create_new_blob")]
Response<string>
async_network_create_new_blob(string session, string _network, string _name, string _mime_type);
[XmlRpcMethod("PIF.db_introduce")]
Response<string>
pif_db_introduce(string session, string _device, string _network, string _host, string _mac, string _mtu, string _vlan, bool _physical, string _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Object _other_config, bool _disallow_unplug);
[XmlRpcMethod("Async.PIF.db_introduce")]
Response<string>
async_pif_db_introduce(string session, string _device, string _network, string _host, string _mac, string _mtu, string _vlan, bool _physical, string _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Object _other_config, bool _disallow_unplug);
[XmlRpcMethod("SR.create_new_blob")]
Response<string>
sr_create_new_blob(string session, string _sr, string _name, string _mime_type);
[XmlRpcMethod("Async.SR.create_new_blob")]
Response<string>
async_sr_create_new_blob(string session, string _sr, string _name, string _mime_type);
[XmlRpcMethod("VDI.introduce")]
Response<string>
vdi_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config);
[XmlRpcMethod("Async.VDI.introduce")]
Response<string>
async_vdi_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config);
[XmlRpcMethod("VDI.db_introduce")]
Response<string>
vdi_db_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config);
[XmlRpcMethod("Async.VDI.db_introduce")]
Response<string>
async_vdi_db_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config);
[XmlRpcMethod("blob.create")]
Response<string>
blob_create(string session, string _mime_type);
#endregion
#region pre-6.0 compatibility
[XmlRpcMethod("Bond.create")]
Response<string>
bond_create(string session, string _network, string[] _members, string _mac);
[XmlRpcMethod("Async.Bond.create")]
Response<string>
async_bond_create(string session, string _network, string[] _members, string _mac);
#endregion
}
public partial class Blob
{
/// <summary>
/// Backward compatibility for Blob.create in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create(Session session, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.blob_create(session.uuid, (_mime_type != null) ? _mime_type : "").parse());
}
}
public partial class Bond
{
// Backward compatibility for Bond.create in XenServer 5.x.
public static XenRef<Bond> create(Session session, string _network, List<XenRef<PIF>> _members, string _mac)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_9))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.0 or newer.");
return XenRef<Bond>.Create(session.proxy.bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "").parse());
}
public static XenRef<Task> async_create(Session session, string _network, List<XenRef<PIF>> _members, string _mac)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_9))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.0 or newer.");
return XenRef<Task>.Create(session.proxy.async_bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "").parse());
}
// Backward compatibility for Bond.create in XenServer 6.0.
public static XenRef<Bond> create(Session session, string _network, List<XenRef<PIF>> _members, string _mac, bond_mode _mode)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Bond>.Create(session.proxy.bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "", bond_mode_helper.ToString(_mode)).parse());
}
public static XenRef<Task> async_create(Session session, string _network, List<XenRef<PIF>> _members, string _mac, bond_mode _mode)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "", bond_mode_helper.ToString(_mode)).parse());
}
}
public partial class Host
{
/// <summary>
/// Backward compatibility for Host.create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create_new_blob(Session session, string _host, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.host_create_new_blob(session.uuid, (_host != null) ? _host : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for Host.async_create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_create_new_blob(Session session, string _host, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_host_create_new_blob(session.uuid, (_host != null) ? _host : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for Host.apply_edition in XenServer 6.1.
/// </summary>
public static void apply_edition(Session session, string _host, string _edition)
{
if (Helper.APIVersionMeets(session, API_Version.API_2_0))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.2 or newer.");
session.proxy.host_apply_edition(session.uuid, (_host != null) ? _host : "", (_edition != null) ? _edition : "").parse();
}
}
public partial class Network
{
/// <summary>
/// Backward compatibility for Network.create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create_new_blob(Session session, string _network, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.network_create_new_blob(session.uuid, (_network != null) ? _network : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for Network.async_create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_create_new_blob(Session session, string _network, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_network_create_new_blob(session.uuid, (_network != null) ? _network : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
}
public partial class PIF
{
/// <summary>
/// Backward compatibility for PIF.db_introduce in XenServer 6.0.
/// </summary>
public static XenRef<PIF> db_introduce(Session session, string _device, string _network, string _host, string _mac, long _mtu, long _vlan, bool _physical, ip_configuration_mode _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Dictionary<string, string> _other_config, bool _disallow_unplug)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<PIF>.Create(session.proxy.pif_db_introduce(session.uuid, (_device != null) ? _device : "", (_network != null) ? _network : "", (_host != null) ? _host : "", (_mac != null) ? _mac : "", _mtu.ToString(), _vlan.ToString(), _physical, ip_configuration_mode_helper.ToString(_ip_configuration_mode), (_ip != null) ? _ip : "", (_netmask != null) ? _netmask : "", (_gateway != null) ? _gateway : "", (_dns != null) ? _dns : "", (_bond_slave_of != null) ? _bond_slave_of : "", (_vlan_master_of != null) ? _vlan_master_of : "", _management, Maps.convert_to_proxy_string_string(_other_config), _disallow_unplug).parse());
}
/// <summary>
/// Backward compatibility for PIF.async_db_introduce in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_db_introduce(Session session, string _device, string _network, string _host, string _mac, long _mtu, long _vlan, bool _physical, ip_configuration_mode _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Dictionary<string, string> _other_config, bool _disallow_unplug)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_pif_db_introduce(session.uuid, (_device != null) ? _device : "", (_network != null) ? _network : "", (_host != null) ? _host : "", (_mac != null) ? _mac : "", _mtu.ToString(), _vlan.ToString(), _physical, ip_configuration_mode_helper.ToString(_ip_configuration_mode), (_ip != null) ? _ip : "", (_netmask != null) ? _netmask : "", (_gateway != null) ? _gateway : "", (_dns != null) ? _dns : "", (_bond_slave_of != null) ? _bond_slave_of : "", (_vlan_master_of != null) ? _vlan_master_of : "", _management, Maps.convert_to_proxy_string_string(_other_config), _disallow_unplug).parse());
}
}
public partial class Pool : XenObject<Pool>
{
/// <summary>
/// Backward compatibility for Pool.create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create_new_blob(Session session, string _pool, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.pool_create_new_blob(session.uuid, (_pool != null) ? _pool : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for Pool.async_create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_create_new_blob(Session session, string _pool, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_pool_create_new_blob(session.uuid, (_pool != null) ? _pool : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
}
public partial class SR
{
/// <summary>
/// Backward compatibility for SR.create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create_new_blob(Session session, string _sr, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.sr_create_new_blob(session.uuid, (_sr != null) ? _sr : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for SR.async_create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_create_new_blob(Session session, string _sr, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_sr_create_new_blob(session.uuid, (_sr != null) ? _sr : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
}
public partial class VDI
{
/// <summary>
/// Backward compatibility for VDI.introduce in XenServer 6.0.
/// </summary>
public static XenRef<VDI> introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary<string, string> _other_config, string _location, Dictionary<string, string> _xenstore_data, Dictionary<string, string> _sm_config)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<VDI>.Create(session.proxy.vdi_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse());
}
/// <summary>
/// Backward compatibility for VDI.async_introduce in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary<string, string> _other_config, string _location, Dictionary<string, string> _xenstore_data, Dictionary<string, string> _sm_config)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_vdi_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse());
}
/// <summary>
/// Backward compatibility for VDI.db_introduce in XenServer 6.0.
/// </summary>
public static XenRef<VDI> db_introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary<string, string> _other_config, string _location, Dictionary<string, string> _xenstore_data, Dictionary<string, string> _sm_config)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<VDI>.Create(session.proxy.vdi_db_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse());
}
/// <summary>
/// Backward compatibility for VDI.async_db_introduce in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_db_introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary<string, string> _other_config, string _location, Dictionary<string, string> _xenstore_data, Dictionary<string, string> _sm_config)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_vdi_db_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse());
}
}
public partial class VM
{
/// <summary>
/// Backward compatibility for VM.create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create_new_blob(Session session, string _vm, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.vm_create_new_blob(session.uuid, (_vm != null) ? _vm : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for VM.async_create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_create_new_blob(Session session, string _vm, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_vm_create_new_blob(session.uuid, (_vm != null) ? _vm : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
}
}
/*
* 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
* 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;
using System.Collections;
using System.Collections.Generic;
using CookComputing.XmlRpc;
namespace XenAPI
{
public partial interface Proxy : IXmlRpcProxy
{
#region pre-7.0 compatibility
[XmlRpcMethod("VGPU.create")]
Response<string>
vgpu_create(string session, string _vm, string _gpu_group, string _device, Object _other_config);
[XmlRpcMethod("Async.VGPU.create")]
Response<string>
async_vgpu_create(string session, string _vm, string _gpu_group, string _device, Object _other_config);
#endregion
#region pre-6.2 compatibility
[XmlRpcMethod("session.login_with_password")]
Response<string>
session_login_with_password(string _uname, string _pwd, string _version);
[XmlRpcMethod("host.apply_edition")]
Response<string>
host_apply_edition(string session, string _host, string _edition);
#endregion
#region pre-6.1 compatibility
[XmlRpcMethod("Bond.create")]
Response<string>
bond_create(string session, string _network, string[] _members, string _mac, string _mode);
[XmlRpcMethod("Async.Bond.create")]
Response<string>
async_bond_create(string session, string _network, string[] _members, string _mac, string _mode);
[XmlRpcMethod("pool.create_new_blob")]
Response<string>
pool_create_new_blob(string session, string _pool, string _name, string _mime_type);
[XmlRpcMethod("Async.pool.create_new_blob")]
Response<string>
async_pool_create_new_blob(string session, string _pool, string _name, string _mime_type);
[XmlRpcMethod("VM.create_new_blob")]
Response<string>
vm_create_new_blob(string session, string _vm, string _name, string _mime_type);
[XmlRpcMethod("Async.VM.create_new_blob")]
Response<string>
async_vm_create_new_blob(string session, string _vm, string _name, string _mime_type);
[XmlRpcMethod("host.create_new_blob")]
Response<string>
host_create_new_blob(string session, string _host, string _name, string _mime_type);
[XmlRpcMethod("Async.host.create_new_blob")]
Response<string>
async_host_create_new_blob(string session, string _host, string _name, string _mime_type);
[XmlRpcMethod("network.create_new_blob")]
Response<string>
network_create_new_blob(string session, string _network, string _name, string _mime_type);
[XmlRpcMethod("Async.network.create_new_blob")]
Response<string>
async_network_create_new_blob(string session, string _network, string _name, string _mime_type);
[XmlRpcMethod("PIF.db_introduce")]
Response<string>
pif_db_introduce(string session, string _device, string _network, string _host, string _mac, string _mtu, string _vlan, bool _physical, string _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Object _other_config, bool _disallow_unplug);
[XmlRpcMethod("Async.PIF.db_introduce")]
Response<string>
async_pif_db_introduce(string session, string _device, string _network, string _host, string _mac, string _mtu, string _vlan, bool _physical, string _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Object _other_config, bool _disallow_unplug);
[XmlRpcMethod("SR.create_new_blob")]
Response<string>
sr_create_new_blob(string session, string _sr, string _name, string _mime_type);
[XmlRpcMethod("Async.SR.create_new_blob")]
Response<string>
async_sr_create_new_blob(string session, string _sr, string _name, string _mime_type);
[XmlRpcMethod("VDI.introduce")]
Response<string>
vdi_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config);
[XmlRpcMethod("Async.VDI.introduce")]
Response<string>
async_vdi_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config);
[XmlRpcMethod("VDI.db_introduce")]
Response<string>
vdi_db_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config);
[XmlRpcMethod("Async.VDI.db_introduce")]
Response<string>
async_vdi_db_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config);
[XmlRpcMethod("blob.create")]
Response<string>
blob_create(string session, string _mime_type);
#endregion
#region pre-6.0 compatibility
[XmlRpcMethod("Bond.create")]
Response<string>
bond_create(string session, string _network, string[] _members, string _mac);
[XmlRpcMethod("Async.Bond.create")]
Response<string>
async_bond_create(string session, string _network, string[] _members, string _mac);
#endregion
}
public partial class VGPU
{
// Backward compatibility for VGPU.create in XenServer 6.x.
public static XenRef<VGPU> create(Session session, string _vm, string _gpu_group, string _device, Dictionary<string, string> _other_config)
{
return XenRef<VGPU>.Create(session.proxy.vgpu_create(session.uuid, (_vm != null) ? _vm : "", (_gpu_group != null) ? _gpu_group : "", (_device != null) ? _device : "", Maps.convert_to_proxy_string_string(_other_config)).parse());
}
public static XenRef<Task> async_create(Session session, string _vm, string _gpu_group, string _device, Dictionary<string, string> _other_config)
{
return XenRef<Task>.Create(session.proxy.async_vgpu_create(session.uuid, (_vm != null) ? _vm : "", (_gpu_group != null) ? _gpu_group : "", (_device != null) ? _device : "", Maps.convert_to_proxy_string_string(_other_config)).parse());
}
}
public partial class Blob
{
/// <summary>
/// Backward compatibility for Blob.create in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create(Session session, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.blob_create(session.uuid, (_mime_type != null) ? _mime_type : "").parse());
}
}
public partial class Bond
{
// Backward compatibility for Bond.create in XenServer 5.x.
public static XenRef<Bond> create(Session session, string _network, List<XenRef<PIF>> _members, string _mac)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_9))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.0 or newer.");
return XenRef<Bond>.Create(session.proxy.bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "").parse());
}
public static XenRef<Task> async_create(Session session, string _network, List<XenRef<PIF>> _members, string _mac)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_9))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.0 or newer.");
return XenRef<Task>.Create(session.proxy.async_bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "").parse());
}
// Backward compatibility for Bond.create in XenServer 6.0.
public static XenRef<Bond> create(Session session, string _network, List<XenRef<PIF>> _members, string _mac, bond_mode _mode)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Bond>.Create(session.proxy.bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "", bond_mode_helper.ToString(_mode)).parse());
}
public static XenRef<Task> async_create(Session session, string _network, List<XenRef<PIF>> _members, string _mac, bond_mode _mode)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "", bond_mode_helper.ToString(_mode)).parse());
}
}
public partial class Host
{
/// <summary>
/// Backward compatibility for Host.create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create_new_blob(Session session, string _host, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.host_create_new_blob(session.uuid, (_host != null) ? _host : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for Host.async_create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_create_new_blob(Session session, string _host, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_host_create_new_blob(session.uuid, (_host != null) ? _host : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for Host.apply_edition in XenServer 6.1.
/// </summary>
public static void apply_edition(Session session, string _host, string _edition)
{
if (Helper.APIVersionMeets(session, API_Version.API_2_0))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.2 or newer.");
session.proxy.host_apply_edition(session.uuid, (_host != null) ? _host : "", (_edition != null) ? _edition : "").parse();
}
}
public partial class Network
{
/// <summary>
/// Backward compatibility for Network.create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create_new_blob(Session session, string _network, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.network_create_new_blob(session.uuid, (_network != null) ? _network : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for Network.async_create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_create_new_blob(Session session, string _network, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_network_create_new_blob(session.uuid, (_network != null) ? _network : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
}
public partial class PIF
{
/// <summary>
/// Backward compatibility for PIF.db_introduce in XenServer 6.0.
/// </summary>
public static XenRef<PIF> db_introduce(Session session, string _device, string _network, string _host, string _mac, long _mtu, long _vlan, bool _physical, ip_configuration_mode _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Dictionary<string, string> _other_config, bool _disallow_unplug)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<PIF>.Create(session.proxy.pif_db_introduce(session.uuid, (_device != null) ? _device : "", (_network != null) ? _network : "", (_host != null) ? _host : "", (_mac != null) ? _mac : "", _mtu.ToString(), _vlan.ToString(), _physical, ip_configuration_mode_helper.ToString(_ip_configuration_mode), (_ip != null) ? _ip : "", (_netmask != null) ? _netmask : "", (_gateway != null) ? _gateway : "", (_dns != null) ? _dns : "", (_bond_slave_of != null) ? _bond_slave_of : "", (_vlan_master_of != null) ? _vlan_master_of : "", _management, Maps.convert_to_proxy_string_string(_other_config), _disallow_unplug).parse());
}
/// <summary>
/// Backward compatibility for PIF.async_db_introduce in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_db_introduce(Session session, string _device, string _network, string _host, string _mac, long _mtu, long _vlan, bool _physical, ip_configuration_mode _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Dictionary<string, string> _other_config, bool _disallow_unplug)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_pif_db_introduce(session.uuid, (_device != null) ? _device : "", (_network != null) ? _network : "", (_host != null) ? _host : "", (_mac != null) ? _mac : "", _mtu.ToString(), _vlan.ToString(), _physical, ip_configuration_mode_helper.ToString(_ip_configuration_mode), (_ip != null) ? _ip : "", (_netmask != null) ? _netmask : "", (_gateway != null) ? _gateway : "", (_dns != null) ? _dns : "", (_bond_slave_of != null) ? _bond_slave_of : "", (_vlan_master_of != null) ? _vlan_master_of : "", _management, Maps.convert_to_proxy_string_string(_other_config), _disallow_unplug).parse());
}
}
public partial class Pool : XenObject<Pool>
{
/// <summary>
/// Backward compatibility for Pool.create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create_new_blob(Session session, string _pool, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.pool_create_new_blob(session.uuid, (_pool != null) ? _pool : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for Pool.async_create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_create_new_blob(Session session, string _pool, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_pool_create_new_blob(session.uuid, (_pool != null) ? _pool : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
}
public partial class SR
{
/// <summary>
/// Backward compatibility for SR.create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create_new_blob(Session session, string _sr, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.sr_create_new_blob(session.uuid, (_sr != null) ? _sr : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for SR.async_create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_create_new_blob(Session session, string _sr, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_sr_create_new_blob(session.uuid, (_sr != null) ? _sr : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
}
public partial class VDI
{
/// <summary>
/// Backward compatibility for VDI.introduce in XenServer 6.0.
/// </summary>
public static XenRef<VDI> introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary<string, string> _other_config, string _location, Dictionary<string, string> _xenstore_data, Dictionary<string, string> _sm_config)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<VDI>.Create(session.proxy.vdi_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse());
}
/// <summary>
/// Backward compatibility for VDI.async_introduce in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary<string, string> _other_config, string _location, Dictionary<string, string> _xenstore_data, Dictionary<string, string> _sm_config)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_vdi_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse());
}
/// <summary>
/// Backward compatibility for VDI.db_introduce in XenServer 6.0.
/// </summary>
public static XenRef<VDI> db_introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary<string, string> _other_config, string _location, Dictionary<string, string> _xenstore_data, Dictionary<string, string> _sm_config)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<VDI>.Create(session.proxy.vdi_db_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse());
}
/// <summary>
/// Backward compatibility for VDI.async_db_introduce in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_db_introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary<string, string> _other_config, string _location, Dictionary<string, string> _xenstore_data, Dictionary<string, string> _sm_config)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_vdi_db_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse());
}
}
public partial class VM
{
/// <summary>
/// Backward compatibility for VM.create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Blob> create_new_blob(Session session, string _vm, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Blob>.Create(session.proxy.vm_create_new_blob(session.uuid, (_vm != null) ? _vm : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
/// <summary>
/// Backward compatibility for VM.async_create_new_blob in XenServer 6.0.
/// </summary>
public static XenRef<Task> async_create_new_blob(Session session, string _vm, string _name, string _mime_type)
{
if (Helper.APIVersionMeets(session, API_Version.API_1_10))
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
return XenRef<Task>.Create(session.proxy.async_vm_create_new_blob(session.uuid, (_vm != null) ? _vm : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
}
}
}

View File

@ -48,13 +48,19 @@ namespace XenAPI
XenRef<PCI> PCI,
XenRef<GPU_group> GPU_group,
XenRef<Host> host,
Dictionary<string, string> other_config)
Dictionary<string, string> other_config,
List<XenRef<VGPU_type>> supported_VGPU_types,
List<XenRef<VGPU_type>> enabled_VGPU_types,
List<XenRef<VGPU>> resident_VGPUs)
{
this.uuid = uuid;
this.PCI = PCI;
this.GPU_group = GPU_group;
this.host = host;
this.other_config = other_config;
this.supported_VGPU_types = supported_VGPU_types;
this.enabled_VGPU_types = enabled_VGPU_types;
this.resident_VGPUs = resident_VGPUs;
}
/// <summary>
@ -73,6 +79,9 @@ namespace XenAPI
GPU_group = update.GPU_group;
host = update.host;
other_config = update.other_config;
supported_VGPU_types = update.supported_VGPU_types;
enabled_VGPU_types = update.enabled_VGPU_types;
resident_VGPUs = update.resident_VGPUs;
}
internal void UpdateFromProxy(Proxy_PGPU proxy)
@ -82,6 +91,9 @@ namespace XenAPI
GPU_group = proxy.GPU_group == null ? null : XenRef<GPU_group>.Create(proxy.GPU_group);
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
supported_VGPU_types = proxy.supported_VGPU_types == null ? null : XenRef<VGPU_type>.Create(proxy.supported_VGPU_types);
enabled_VGPU_types = proxy.enabled_VGPU_types == null ? null : XenRef<VGPU_type>.Create(proxy.enabled_VGPU_types);
resident_VGPUs = proxy.resident_VGPUs == null ? null : XenRef<VGPU>.Create(proxy.resident_VGPUs);
}
public Proxy_PGPU ToProxy()
@ -92,6 +104,9 @@ namespace XenAPI
result_.GPU_group = (GPU_group != null) ? GPU_group : "";
result_.host = (host != null) ? host : "";
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
result_.supported_VGPU_types = (supported_VGPU_types != null) ? Helper.RefListToStringArray(supported_VGPU_types) : new string[] {};
result_.enabled_VGPU_types = (enabled_VGPU_types != null) ? Helper.RefListToStringArray(enabled_VGPU_types) : new string[] {};
result_.resident_VGPUs = (resident_VGPUs != null) ? Helper.RefListToStringArray(resident_VGPUs) : new string[] {};
return result_;
}
@ -106,6 +121,9 @@ namespace XenAPI
GPU_group = Marshalling.ParseRef<GPU_group>(table, "GPU_group");
host = Marshalling.ParseRef<Host>(table, "host");
other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
supported_VGPU_types = Marshalling.ParseSetRef<VGPU_type>(table, "supported_VGPU_types");
enabled_VGPU_types = Marshalling.ParseSetRef<VGPU_type>(table, "enabled_VGPU_types");
resident_VGPUs = Marshalling.ParseSetRef<VGPU>(table, "resident_VGPUs");
}
public bool DeepEquals(PGPU other)
@ -119,7 +137,10 @@ namespace XenAPI
Helper.AreEqual2(this._PCI, other._PCI) &&
Helper.AreEqual2(this._GPU_group, other._GPU_group) &&
Helper.AreEqual2(this._host, other._host) &&
Helper.AreEqual2(this._other_config, other._other_config);
Helper.AreEqual2(this._other_config, other._other_config) &&
Helper.AreEqual2(this._supported_VGPU_types, other._supported_VGPU_types) &&
Helper.AreEqual2(this._enabled_VGPU_types, other._enabled_VGPU_types) &&
Helper.AreEqual2(this._resident_VGPUs, other._resident_VGPUs);
}
public override string SaveChanges(Session session, string opaqueRef, PGPU server)
@ -135,6 +156,10 @@ namespace XenAPI
{
PGPU.set_other_config(session, opaqueRef, _other_config);
}
if (!Helper.AreEqual2(_GPU_group, server._GPU_group))
{
PGPU.set_GPU_group(session, opaqueRef, _GPU_group);
}
return null;
}
@ -175,6 +200,21 @@ namespace XenAPI
return Maps.convert_from_proxy_string_string(session.proxy.pgpu_get_other_config(session.uuid, (_pgpu != null) ? _pgpu : "").parse());
}
public static List<XenRef<VGPU_type>> get_supported_VGPU_types(Session session, string _pgpu)
{
return XenRef<VGPU_type>.Create(session.proxy.pgpu_get_supported_vgpu_types(session.uuid, (_pgpu != null) ? _pgpu : "").parse());
}
public static List<XenRef<VGPU_type>> get_enabled_VGPU_types(Session session, string _pgpu)
{
return XenRef<VGPU_type>.Create(session.proxy.pgpu_get_enabled_vgpu_types(session.uuid, (_pgpu != null) ? _pgpu : "").parse());
}
public static List<XenRef<VGPU>> get_resident_VGPUs(Session session, string _pgpu)
{
return XenRef<VGPU>.Create(session.proxy.pgpu_get_resident_vgpus(session.uuid, (_pgpu != null) ? _pgpu : "").parse());
}
public static void set_other_config(Session session, string _pgpu, Dictionary<string, string> _other_config)
{
session.proxy.pgpu_set_other_config(session.uuid, (_pgpu != null) ? _pgpu : "", Maps.convert_to_proxy_string_string(_other_config)).parse();
@ -190,6 +230,56 @@ namespace XenAPI
session.proxy.pgpu_remove_from_other_config(session.uuid, (_pgpu != null) ? _pgpu : "", (_key != null) ? _key : "").parse();
}
public static void add_enabled_VGPU_types(Session session, string _self, string _value)
{
session.proxy.pgpu_add_enabled_vgpu_types(session.uuid, (_self != null) ? _self : "", (_value != null) ? _value : "").parse();
}
public static XenRef<Task> async_add_enabled_VGPU_types(Session session, string _self, string _value)
{
return XenRef<Task>.Create(session.proxy.async_pgpu_add_enabled_vgpu_types(session.uuid, (_self != null) ? _self : "", (_value != null) ? _value : "").parse());
}
public static void remove_enabled_VGPU_types(Session session, string _self, string _value)
{
session.proxy.pgpu_remove_enabled_vgpu_types(session.uuid, (_self != null) ? _self : "", (_value != null) ? _value : "").parse();
}
public static XenRef<Task> async_remove_enabled_VGPU_types(Session session, string _self, string _value)
{
return XenRef<Task>.Create(session.proxy.async_pgpu_remove_enabled_vgpu_types(session.uuid, (_self != null) ? _self : "", (_value != null) ? _value : "").parse());
}
public static void set_enabled_VGPU_types(Session session, string _self, List<XenRef<VGPU_type>> _value)
{
session.proxy.pgpu_set_enabled_vgpu_types(session.uuid, (_self != null) ? _self : "", (_value != null) ? Helper.RefListToStringArray(_value) : new string[] {}).parse();
}
public static XenRef<Task> async_set_enabled_VGPU_types(Session session, string _self, List<XenRef<VGPU_type>> _value)
{
return XenRef<Task>.Create(session.proxy.async_pgpu_set_enabled_vgpu_types(session.uuid, (_self != null) ? _self : "", (_value != null) ? Helper.RefListToStringArray(_value) : new string[] {}).parse());
}
public static void set_GPU_group(Session session, string _self, string _value)
{
session.proxy.pgpu_set_gpu_group(session.uuid, (_self != null) ? _self : "", (_value != null) ? _value : "").parse();
}
public static XenRef<Task> async_set_GPU_group(Session session, string _self, string _value)
{
return XenRef<Task>.Create(session.proxy.async_pgpu_set_gpu_group(session.uuid, (_self != null) ? _self : "", (_value != null) ? _value : "").parse());
}
public static long get_remaining_capacity(Session session, string _self, string _vgpu_type)
{
return long.Parse((string)session.proxy.pgpu_get_remaining_capacity(session.uuid, (_self != null) ? _self : "", (_vgpu_type != null) ? _vgpu_type : "").parse());
}
public static XenRef<Task> async_get_remaining_capacity(Session session, string _self, string _vgpu_type)
{
return XenRef<Task>.Create(session.proxy.async_pgpu_get_remaining_capacity(session.uuid, (_self != null) ? _self : "", (_vgpu_type != null) ? _vgpu_type : "").parse());
}
public static List<XenRef<PGPU>> get_all(Session session)
{
return XenRef<PGPU>.Create(session.proxy.pgpu_get_all(session.uuid).parse());
@ -230,6 +320,24 @@ namespace XenAPI
set { if (!Helper.AreEqual(value, _other_config)) { _other_config = value; Changed = true; NotifyPropertyChanged("other_config"); } }
}
private List<XenRef<VGPU_type>> _supported_VGPU_types;
public virtual List<XenRef<VGPU_type>> supported_VGPU_types {
get { return _supported_VGPU_types; }
set { if (!Helper.AreEqual(value, _supported_VGPU_types)) { _supported_VGPU_types = value; Changed = true; NotifyPropertyChanged("supported_VGPU_types"); } }
}
private List<XenRef<VGPU_type>> _enabled_VGPU_types;
public virtual List<XenRef<VGPU_type>> enabled_VGPU_types {
get { return _enabled_VGPU_types; }
set { if (!Helper.AreEqual(value, _enabled_VGPU_types)) { _enabled_VGPU_types = value; Changed = true; NotifyPropertyChanged("enabled_VGPU_types"); } }
}
private List<XenRef<VGPU>> _resident_VGPUs;
public virtual List<XenRef<VGPU>> resident_VGPUs {
get { return _resident_VGPUs; }
set { if (!Helper.AreEqual(value, _resident_VGPUs)) { _resident_VGPUs = value; Changed = true; NotifyPropertyChanged("resident_VGPUs"); } }
}
}
}

View File

@ -7501,6 +7501,21 @@ namespace XenAPI
pgpu_get_other_config(string session, string _pgpu);
[XmlRpcMethod("PGPU.get_supported_VGPU_types")]
Response<string []>
pgpu_get_supported_vgpu_types(string session, string _pgpu);
[XmlRpcMethod("PGPU.get_enabled_VGPU_types")]
Response<string []>
pgpu_get_enabled_vgpu_types(string session, string _pgpu);
[XmlRpcMethod("PGPU.get_resident_VGPUs")]
Response<string []>
pgpu_get_resident_vgpus(string session, string _pgpu);
[XmlRpcMethod("PGPU.set_other_config")]
Response<string>
pgpu_set_other_config(string session, string _pgpu, Object _other_config);
@ -7516,6 +7531,56 @@ namespace XenAPI
pgpu_remove_from_other_config(string session, string _pgpu, string _key);
[XmlRpcMethod("PGPU.add_enabled_VGPU_types")]
Response<string>
pgpu_add_enabled_vgpu_types(string session, string _self, string _value);
[XmlRpcMethod("Async.PGPU.add_enabled_VGPU_types")]
Response<string>
async_pgpu_add_enabled_vgpu_types(string session, string _self, string _value);
[XmlRpcMethod("PGPU.remove_enabled_VGPU_types")]
Response<string>
pgpu_remove_enabled_vgpu_types(string session, string _self, string _value);
[XmlRpcMethod("Async.PGPU.remove_enabled_VGPU_types")]
Response<string>
async_pgpu_remove_enabled_vgpu_types(string session, string _self, string _value);
[XmlRpcMethod("PGPU.set_enabled_VGPU_types")]
Response<string>
pgpu_set_enabled_vgpu_types(string session, string _self, string [] _value);
[XmlRpcMethod("Async.PGPU.set_enabled_VGPU_types")]
Response<string>
async_pgpu_set_enabled_vgpu_types(string session, string _self, string [] _value);
[XmlRpcMethod("PGPU.set_GPU_group")]
Response<string>
pgpu_set_gpu_group(string session, string _self, string _value);
[XmlRpcMethod("Async.PGPU.set_GPU_group")]
Response<string>
async_pgpu_set_gpu_group(string session, string _self, string _value);
[XmlRpcMethod("PGPU.get_remaining_capacity")]
Response<string>
pgpu_get_remaining_capacity(string session, string _self, string _vgpu_type);
[XmlRpcMethod("Async.PGPU.get_remaining_capacity")]
Response<string>
async_pgpu_get_remaining_capacity(string session, string _self, string _vgpu_type);
[XmlRpcMethod("PGPU.get_all")]
Response<string []>
pgpu_get_all(string session);
@ -7576,6 +7641,11 @@ namespace XenAPI
gpu_group_get_other_config(string session, string _gpu_group);
[XmlRpcMethod("GPU_group.get_allocation_algorithm")]
Response<string>
gpu_group_get_allocation_algorithm(string session, string _gpu_group);
[XmlRpcMethod("GPU_group.set_name_label")]
Response<string>
gpu_group_set_name_label(string session, string _gpu_group, string _label);
@ -7601,6 +7671,61 @@ namespace XenAPI
gpu_group_remove_from_other_config(string session, string _gpu_group, string _key);
[XmlRpcMethod("GPU_group.set_allocation_algorithm")]
Response<string>
gpu_group_set_allocation_algorithm(string session, string _gpu_group, string _allocation_algorithm);
[XmlRpcMethod("GPU_group.create")]
Response<string>
gpu_group_create(string session, string _name_label, string _name_description, Object _other_config);
[XmlRpcMethod("Async.GPU_group.create")]
Response<string>
async_gpu_group_create(string session, string _name_label, string _name_description, Object _other_config);
[XmlRpcMethod("GPU_group.destroy")]
Response<string>
gpu_group_destroy(string session, string _self);
[XmlRpcMethod("Async.GPU_group.destroy")]
Response<string>
async_gpu_group_destroy(string session, string _self);
[XmlRpcMethod("GPU_group.get_enabled_VGPU_types")]
Response<string []>
gpu_group_get_enabled_vgpu_types(string session, string _self);
[XmlRpcMethod("Async.GPU_group.get_enabled_VGPU_types")]
Response<string>
async_gpu_group_get_enabled_vgpu_types(string session, string _self);
[XmlRpcMethod("GPU_group.get_supported_VGPU_types")]
Response<string []>
gpu_group_get_supported_vgpu_types(string session, string _self);
[XmlRpcMethod("Async.GPU_group.get_supported_VGPU_types")]
Response<string>
async_gpu_group_get_supported_vgpu_types(string session, string _self);
[XmlRpcMethod("GPU_group.get_remaining_capacity")]
Response<string>
gpu_group_get_remaining_capacity(string session, string _self, string _vgpu_type);
[XmlRpcMethod("Async.GPU_group.get_remaining_capacity")]
Response<string>
async_gpu_group_get_remaining_capacity(string session, string _self, string _vgpu_type);
[XmlRpcMethod("GPU_group.get_all")]
Response<string []>
gpu_group_get_all(string session);
@ -7651,6 +7776,16 @@ namespace XenAPI
vgpu_get_other_config(string session, string _vgpu);
[XmlRpcMethod("VGPU.get_type")]
Response<string>
vgpu_get_type(string session, string _vgpu);
[XmlRpcMethod("VGPU.get_resident_on")]
Response<string>
vgpu_get_resident_on(string session, string _vgpu);
[XmlRpcMethod("VGPU.set_other_config")]
Response<string>
vgpu_set_other_config(string session, string _vgpu, Object _other_config);
@ -7668,12 +7803,12 @@ namespace XenAPI
[XmlRpcMethod("VGPU.create")]
Response<string>
vgpu_create(string session, string _vm, string _gpu_group, string _device, Object _other_config);
vgpu_create(string session, string _vm, string _gpu_group, string _device, Object _other_config, string _type);
[XmlRpcMethod("Async.VGPU.create")]
Response<string>
async_vgpu_create(string session, string _vm, string _gpu_group, string _device, Object _other_config);
async_vgpu_create(string session, string _vm, string _gpu_group, string _device, Object _other_config, string _type);
[XmlRpcMethod("VGPU.destroy")]
@ -7695,6 +7830,66 @@ namespace XenAPI
Response<Object>
vgpu_get_all_records(string session);
[XmlRpcMethod("VGPU_type.get_record")]
Response<Proxy_VGPU_type>
vgpu_type_get_record(string session, string _vgpu_type);
[XmlRpcMethod("VGPU_type.get_by_uuid")]
Response<string>
vgpu_type_get_by_uuid(string session, string _uuid);
[XmlRpcMethod("VGPU_type.get_uuid")]
Response<string>
vgpu_type_get_uuid(string session, string _vgpu_type);
[XmlRpcMethod("VGPU_type.get_vendor_name")]
Response<string>
vgpu_type_get_vendor_name(string session, string _vgpu_type);
[XmlRpcMethod("VGPU_type.get_model_name")]
Response<string>
vgpu_type_get_model_name(string session, string _vgpu_type);
[XmlRpcMethod("VGPU_type.get_framebuffer_size")]
Response<string>
vgpu_type_get_framebuffer_size(string session, string _vgpu_type);
[XmlRpcMethod("VGPU_type.get_max_heads")]
Response<string>
vgpu_type_get_max_heads(string session, string _vgpu_type);
[XmlRpcMethod("VGPU_type.get_supported_on_PGPUs")]
Response<string []>
vgpu_type_get_supported_on_pgpus(string session, string _vgpu_type);
[XmlRpcMethod("VGPU_type.get_enabled_on_PGPUs")]
Response<string []>
vgpu_type_get_enabled_on_pgpus(string session, string _vgpu_type);
[XmlRpcMethod("VGPU_type.get_VGPUs")]
Response<string []>
vgpu_type_get_vgpus(string session, string _vgpu_type);
[XmlRpcMethod("VGPU_type.get_all")]
Response<string []>
vgpu_type_get_all(string session);
[XmlRpcMethod("VGPU_type.get_all_records")]
Response<Object>
vgpu_type_get_all_records(string session);
}
[XmlRpcMissingMapping(MappingAction.Ignore)]
@ -8435,6 +8630,9 @@ namespace XenAPI
public string GPU_group;
public string host;
public Object other_config;
public string [] supported_VGPU_types;
public string [] enabled_VGPU_types;
public string [] resident_VGPUs;
}
[XmlRpcMissingMapping(MappingAction.Ignore)]
@ -8447,6 +8645,7 @@ namespace XenAPI
public string [] VGPUs;
public string [] GPU_types;
public Object other_config;
public string allocation_algorithm;
}
[XmlRpcMissingMapping(MappingAction.Ignore)]
@ -8458,6 +8657,21 @@ namespace XenAPI
public string device;
public bool currently_attached;
public Object other_config;
public string type;
public string resident_on;
}
[XmlRpcMissingMapping(MappingAction.Ignore)]
public class Proxy_VGPU_type
{
public string uuid;
public string vendor_name;
public string model_name;
public string framebuffer_size;
public string max_heads;
public string [] supported_on_PGPUs;
public string [] enabled_on_PGPUs;
public string [] VGPUs;
}
}

View File

@ -107,6 +107,16 @@ namespace XenAPI
new Relation("metadata_VDIs", "VDI", "metadata_of_pool"),
});
relations.Add(typeof(Proxy_PGPU), new Relation[] {
new Relation("resident_VGPUs", "VGPU", "resident_on"),
});
relations.Add(typeof(Proxy_VGPU_type), new Relation[] {
new Relation("enabled_on_PGPUs", "PGPU", "enabled_VGPU_types"),
new Relation("supported_on_PGPUs", "PGPU", "supported_VGPU_types"),
new Relation("VGPUs", "VGPU", "type"),
});
relations.Add(typeof(Proxy_PIF), new Relation[] {
new Relation("tunnel_transport_PIF_of", "tunnel", "transport_PIF"),
new Relation("tunnel_access_PIF_of", "tunnel", "access_PIF"),

View File

@ -49,7 +49,9 @@ namespace XenAPI
XenRef<GPU_group> GPU_group,
string device,
bool currently_attached,
Dictionary<string, string> other_config)
Dictionary<string, string> other_config,
XenRef<VGPU_type> type,
XenRef<PGPU> resident_on)
{
this.uuid = uuid;
this.VM = VM;
@ -57,6 +59,8 @@ namespace XenAPI
this.device = device;
this.currently_attached = currently_attached;
this.other_config = other_config;
this.type = type;
this.resident_on = resident_on;
}
/// <summary>
@ -76,6 +80,8 @@ namespace XenAPI
device = update.device;
currently_attached = update.currently_attached;
other_config = update.other_config;
type = update.type;
resident_on = update.resident_on;
}
internal void UpdateFromProxy(Proxy_VGPU proxy)
@ -86,6 +92,8 @@ namespace XenAPI
device = proxy.device == null ? null : (string)proxy.device;
currently_attached = (bool)proxy.currently_attached;
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
type = proxy.type == null ? null : XenRef<VGPU_type>.Create(proxy.type);
resident_on = proxy.resident_on == null ? null : XenRef<PGPU>.Create(proxy.resident_on);
}
public Proxy_VGPU ToProxy()
@ -97,6 +105,8 @@ namespace XenAPI
result_.device = (device != null) ? device : "";
result_.currently_attached = currently_attached;
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
result_.type = (type != null) ? type : "";
result_.resident_on = (resident_on != null) ? resident_on : "";
return result_;
}
@ -112,6 +122,8 @@ namespace XenAPI
device = Marshalling.ParseString(table, "device");
currently_attached = Marshalling.ParseBool(table, "currently_attached");
other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
type = Marshalling.ParseRef<VGPU_type>(table, "type");
resident_on = Marshalling.ParseRef<PGPU>(table, "resident_on");
}
public bool DeepEquals(VGPU other)
@ -126,7 +138,9 @@ namespace XenAPI
Helper.AreEqual2(this._GPU_group, other._GPU_group) &&
Helper.AreEqual2(this._device, other._device) &&
Helper.AreEqual2(this._currently_attached, other._currently_attached) &&
Helper.AreEqual2(this._other_config, other._other_config);
Helper.AreEqual2(this._other_config, other._other_config) &&
Helper.AreEqual2(this._type, other._type) &&
Helper.AreEqual2(this._resident_on, other._resident_on);
}
public override string SaveChanges(Session session, string opaqueRef, VGPU server)
@ -187,6 +201,16 @@ namespace XenAPI
return Maps.convert_from_proxy_string_string(session.proxy.vgpu_get_other_config(session.uuid, (_vgpu != null) ? _vgpu : "").parse());
}
public static XenRef<VGPU_type> get_type(Session session, string _vgpu)
{
return XenRef<VGPU_type>.Create(session.proxy.vgpu_get_type(session.uuid, (_vgpu != null) ? _vgpu : "").parse());
}
public static XenRef<PGPU> get_resident_on(Session session, string _vgpu)
{
return XenRef<PGPU>.Create(session.proxy.vgpu_get_resident_on(session.uuid, (_vgpu != null) ? _vgpu : "").parse());
}
public static void set_other_config(Session session, string _vgpu, Dictionary<string, string> _other_config)
{
session.proxy.vgpu_set_other_config(session.uuid, (_vgpu != null) ? _vgpu : "", Maps.convert_to_proxy_string_string(_other_config)).parse();
@ -202,14 +226,14 @@ namespace XenAPI
session.proxy.vgpu_remove_from_other_config(session.uuid, (_vgpu != null) ? _vgpu : "", (_key != null) ? _key : "").parse();
}
public static XenRef<VGPU> create(Session session, string _vm, string _gpu_group, string _device, Dictionary<string, string> _other_config)
public static XenRef<VGPU> create(Session session, string _vm, string _gpu_group, string _device, Dictionary<string, string> _other_config, string _type)
{
return XenRef<VGPU>.Create(session.proxy.vgpu_create(session.uuid, (_vm != null) ? _vm : "", (_gpu_group != null) ? _gpu_group : "", (_device != null) ? _device : "", Maps.convert_to_proxy_string_string(_other_config)).parse());
return XenRef<VGPU>.Create(session.proxy.vgpu_create(session.uuid, (_vm != null) ? _vm : "", (_gpu_group != null) ? _gpu_group : "", (_device != null) ? _device : "", Maps.convert_to_proxy_string_string(_other_config), (_type != null) ? _type : "").parse());
}
public static XenRef<Task> async_create(Session session, string _vm, string _gpu_group, string _device, Dictionary<string, string> _other_config)
public static XenRef<Task> async_create(Session session, string _vm, string _gpu_group, string _device, Dictionary<string, string> _other_config, string _type)
{
return XenRef<Task>.Create(session.proxy.async_vgpu_create(session.uuid, (_vm != null) ? _vm : "", (_gpu_group != null) ? _gpu_group : "", (_device != null) ? _device : "", Maps.convert_to_proxy_string_string(_other_config)).parse());
return XenRef<Task>.Create(session.proxy.async_vgpu_create(session.uuid, (_vm != null) ? _vm : "", (_gpu_group != null) ? _gpu_group : "", (_device != null) ? _device : "", Maps.convert_to_proxy_string_string(_other_config), (_type != null) ? _type : "").parse());
}
public static void destroy(Session session, string _self)
@ -268,6 +292,18 @@ namespace XenAPI
set { if (!Helper.AreEqual(value, _other_config)) { _other_config = value; Changed = true; NotifyPropertyChanged("other_config"); } }
}
private XenRef<VGPU_type> _type;
public virtual XenRef<VGPU_type> type {
get { return _type; }
set { if (!Helper.AreEqual(value, _type)) { _type = value; Changed = true; NotifyPropertyChanged("type"); } }
}
private XenRef<PGPU> _resident_on;
public virtual XenRef<PGPU> resident_on {
get { return _resident_on; }
set { if (!Helper.AreEqual(value, _resident_on)) { _resident_on = value; Changed = true; NotifyPropertyChanged("resident_on"); } }
}
}
}

View File

@ -0,0 +1,268 @@
/*
* 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
* 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;
using System.Collections;
using System.Collections.Generic;
using CookComputing.XmlRpc;
namespace XenAPI
{
public partial class VGPU_type : XenObject<VGPU_type>
{
public VGPU_type()
{
}
public VGPU_type(string uuid,
string vendor_name,
string model_name,
long framebuffer_size,
long max_heads,
List<XenRef<PGPU>> supported_on_PGPUs,
List<XenRef<PGPU>> enabled_on_PGPUs,
List<XenRef<VGPU>> VGPUs)
{
this.uuid = uuid;
this.vendor_name = vendor_name;
this.model_name = model_name;
this.framebuffer_size = framebuffer_size;
this.max_heads = max_heads;
this.supported_on_PGPUs = supported_on_PGPUs;
this.enabled_on_PGPUs = enabled_on_PGPUs;
this.VGPUs = VGPUs;
}
/// <summary>
/// Creates a new VGPU_type from a Proxy_VGPU_type.
/// </summary>
/// <param name="proxy"></param>
public VGPU_type(Proxy_VGPU_type proxy)
{
this.UpdateFromProxy(proxy);
}
public override void UpdateFrom(VGPU_type update)
{
uuid = update.uuid;
vendor_name = update.vendor_name;
model_name = update.model_name;
framebuffer_size = update.framebuffer_size;
max_heads = update.max_heads;
supported_on_PGPUs = update.supported_on_PGPUs;
enabled_on_PGPUs = update.enabled_on_PGPUs;
VGPUs = update.VGPUs;
}
internal void UpdateFromProxy(Proxy_VGPU_type proxy)
{
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name;
model_name = proxy.model_name == null ? null : (string)proxy.model_name;
framebuffer_size = proxy.framebuffer_size == null ? 0 : long.Parse((string)proxy.framebuffer_size);
max_heads = proxy.max_heads == null ? 0 : long.Parse((string)proxy.max_heads);
supported_on_PGPUs = proxy.supported_on_PGPUs == null ? null : XenRef<PGPU>.Create(proxy.supported_on_PGPUs);
enabled_on_PGPUs = proxy.enabled_on_PGPUs == null ? null : XenRef<PGPU>.Create(proxy.enabled_on_PGPUs);
VGPUs = proxy.VGPUs == null ? null : XenRef<VGPU>.Create(proxy.VGPUs);
}
public Proxy_VGPU_type ToProxy()
{
Proxy_VGPU_type result_ = new Proxy_VGPU_type();
result_.uuid = (uuid != null) ? uuid : "";
result_.vendor_name = (vendor_name != null) ? vendor_name : "";
result_.model_name = (model_name != null) ? model_name : "";
result_.framebuffer_size = framebuffer_size.ToString();
result_.max_heads = max_heads.ToString();
result_.supported_on_PGPUs = (supported_on_PGPUs != null) ? Helper.RefListToStringArray(supported_on_PGPUs) : new string[] {};
result_.enabled_on_PGPUs = (enabled_on_PGPUs != null) ? Helper.RefListToStringArray(enabled_on_PGPUs) : new string[] {};
result_.VGPUs = (VGPUs != null) ? Helper.RefListToStringArray(VGPUs) : new string[] {};
return result_;
}
/// <summary>
/// Creates a new VGPU_type from a Hashtable.
/// </summary>
/// <param name="table"></param>
public VGPU_type(Hashtable table)
{
uuid = Marshalling.ParseString(table, "uuid");
vendor_name = Marshalling.ParseString(table, "vendor_name");
model_name = Marshalling.ParseString(table, "model_name");
framebuffer_size = Marshalling.ParseLong(table, "framebuffer_size");
max_heads = Marshalling.ParseLong(table, "max_heads");
supported_on_PGPUs = Marshalling.ParseSetRef<PGPU>(table, "supported_on_PGPUs");
enabled_on_PGPUs = Marshalling.ParseSetRef<PGPU>(table, "enabled_on_PGPUs");
VGPUs = Marshalling.ParseSetRef<VGPU>(table, "VGPUs");
}
public bool DeepEquals(VGPU_type other)
{
if (ReferenceEquals(null, other))
return false;
if (ReferenceEquals(this, other))
return true;
return Helper.AreEqual2(this._uuid, other._uuid) &&
Helper.AreEqual2(this._vendor_name, other._vendor_name) &&
Helper.AreEqual2(this._model_name, other._model_name) &&
Helper.AreEqual2(this._framebuffer_size, other._framebuffer_size) &&
Helper.AreEqual2(this._max_heads, other._max_heads) &&
Helper.AreEqual2(this._supported_on_PGPUs, other._supported_on_PGPUs) &&
Helper.AreEqual2(this._enabled_on_PGPUs, other._enabled_on_PGPUs) &&
Helper.AreEqual2(this._VGPUs, other._VGPUs);
}
public override string SaveChanges(Session session, string opaqueRef, VGPU_type server)
{
if (opaqueRef == null)
{
System.Diagnostics.Debug.Assert(false, "Cannot create instances of this type on the server");
return "";
}
else
{
throw new InvalidOperationException("This type has no read/write properties");
}
}
public static VGPU_type get_record(Session session, string _vgpu_type)
{
return new VGPU_type((Proxy_VGPU_type)session.proxy.vgpu_type_get_record(session.uuid, (_vgpu_type != null) ? _vgpu_type : "").parse());
}
public static XenRef<VGPU_type> get_by_uuid(Session session, string _uuid)
{
return XenRef<VGPU_type>.Create(session.proxy.vgpu_type_get_by_uuid(session.uuid, (_uuid != null) ? _uuid : "").parse());
}
public static string get_uuid(Session session, string _vgpu_type)
{
return (string)session.proxy.vgpu_type_get_uuid(session.uuid, (_vgpu_type != null) ? _vgpu_type : "").parse();
}
public static string get_vendor_name(Session session, string _vgpu_type)
{
return (string)session.proxy.vgpu_type_get_vendor_name(session.uuid, (_vgpu_type != null) ? _vgpu_type : "").parse();
}
public static string get_model_name(Session session, string _vgpu_type)
{
return (string)session.proxy.vgpu_type_get_model_name(session.uuid, (_vgpu_type != null) ? _vgpu_type : "").parse();
}
public static long get_framebuffer_size(Session session, string _vgpu_type)
{
return long.Parse((string)session.proxy.vgpu_type_get_framebuffer_size(session.uuid, (_vgpu_type != null) ? _vgpu_type : "").parse());
}
public static long get_max_heads(Session session, string _vgpu_type)
{
return long.Parse((string)session.proxy.vgpu_type_get_max_heads(session.uuid, (_vgpu_type != null) ? _vgpu_type : "").parse());
}
public static List<XenRef<PGPU>> get_supported_on_PGPUs(Session session, string _vgpu_type)
{
return XenRef<PGPU>.Create(session.proxy.vgpu_type_get_supported_on_pgpus(session.uuid, (_vgpu_type != null) ? _vgpu_type : "").parse());
}
public static List<XenRef<PGPU>> get_enabled_on_PGPUs(Session session, string _vgpu_type)
{
return XenRef<PGPU>.Create(session.proxy.vgpu_type_get_enabled_on_pgpus(session.uuid, (_vgpu_type != null) ? _vgpu_type : "").parse());
}
public static List<XenRef<VGPU>> get_VGPUs(Session session, string _vgpu_type)
{
return XenRef<VGPU>.Create(session.proxy.vgpu_type_get_vgpus(session.uuid, (_vgpu_type != null) ? _vgpu_type : "").parse());
}
public static List<XenRef<VGPU_type>> get_all(Session session)
{
return XenRef<VGPU_type>.Create(session.proxy.vgpu_type_get_all(session.uuid).parse());
}
public static Dictionary<XenRef<VGPU_type>, VGPU_type> get_all_records(Session session)
{
return XenRef<VGPU_type>.Create<Proxy_VGPU_type>(session.proxy.vgpu_type_get_all_records(session.uuid).parse());
}
private string _uuid;
public virtual string uuid {
get { return _uuid; }
set { if (!Helper.AreEqual(value, _uuid)) { _uuid = value; Changed = true; NotifyPropertyChanged("uuid"); } }
}
private string _vendor_name;
public virtual string vendor_name {
get { return _vendor_name; }
set { if (!Helper.AreEqual(value, _vendor_name)) { _vendor_name = value; Changed = true; NotifyPropertyChanged("vendor_name"); } }
}
private string _model_name;
public virtual string model_name {
get { return _model_name; }
set { if (!Helper.AreEqual(value, _model_name)) { _model_name = value; Changed = true; NotifyPropertyChanged("model_name"); } }
}
private long _framebuffer_size;
public virtual long framebuffer_size {
get { return _framebuffer_size; }
set { if (!Helper.AreEqual(value, _framebuffer_size)) { _framebuffer_size = value; Changed = true; NotifyPropertyChanged("framebuffer_size"); } }
}
private long _max_heads;
public virtual long max_heads {
get { return _max_heads; }
set { if (!Helper.AreEqual(value, _max_heads)) { _max_heads = value; Changed = true; NotifyPropertyChanged("max_heads"); } }
}
private List<XenRef<PGPU>> _supported_on_PGPUs;
public virtual List<XenRef<PGPU>> supported_on_PGPUs {
get { return _supported_on_PGPUs; }
set { if (!Helper.AreEqual(value, _supported_on_PGPUs)) { _supported_on_PGPUs = value; Changed = true; NotifyPropertyChanged("supported_on_PGPUs"); } }
}
private List<XenRef<PGPU>> _enabled_on_PGPUs;
public virtual List<XenRef<PGPU>> enabled_on_PGPUs {
get { return _enabled_on_PGPUs; }
set { if (!Helper.AreEqual(value, _enabled_on_PGPUs)) { _enabled_on_PGPUs = value; Changed = true; NotifyPropertyChanged("enabled_on_PGPUs"); } }
}
private List<XenRef<VGPU>> _VGPUs;
public virtual List<XenRef<VGPU>> VGPUs {
get { return _VGPUs; }
set { if (!Helper.AreEqual(value, _VGPUs)) { _VGPUs = value; Changed = true; NotifyPropertyChanged("VGPUs"); } }
}
}
}

View File

@ -300,6 +300,12 @@ namespace XenAPI
Download_VGPU(session, list);
}
if (session.APIVersion >= API_Version.API_2_0)
{
// Download Augusta-only objects
Download_VGPU_type(session, list);
}
foreach (ObjectChange o in list)
{
changes.Enqueue(o);
@ -571,5 +577,12 @@ namespace XenAPI
foreach (KeyValuePair<XenRef<VGPU>, VGPU> entry in records)
changes.Add(new ObjectChange(typeof(VGPU), entry.Key.opaque_ref, entry.Value));
}
private static void Download_VGPU_type(Session session, List<ObjectChange> changes)
{
Dictionary<XenRef<VGPU_type>, VGPU_type> records = VGPU_type.get_all_records(session);
foreach (KeyValuePair<XenRef<VGPU_type>, VGPU_type> entry in records)
changes.Add(new ObjectChange(typeof(VGPU_type), entry.Key.opaque_ref, entry.Value));
}
}
}

View File

@ -0,0 +1,57 @@
/*
* 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
* 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;
using System.Collections.Generic;
namespace XenAPI
{
public enum allocation_algorithm
{
breadth_first, depth_first, unknown
}
public static class allocation_algorithm_helper
{
public static string ToString(allocation_algorithm x)
{
switch (x)
{
case allocation_algorithm.breadth_first:
return "breadth_first";
case allocation_algorithm.depth_first:
return "depth_first";
default:
return "unknown";
}
}
}
}

View File

@ -298,6 +298,7 @@
<Compile Include="XenAPI-Extensions\GPU_group.cs" />
<Compile Include="XenAPI-Extensions\VM_appliance.cs" />
<Compile Include="XenAPI-Extensions\vm_power_state.cs" />
<Compile Include="XenAPI\allocation_algorithm.cs" />
<Compile Include="XenAPI\bond_mode.cs" />
<Compile Include="XenAPI\DR_task.cs" />
<Compile Include="XenAPI\GPU_group.cs" />
@ -308,6 +309,7 @@
<Compile Include="XenAPI\PGPU.cs" />
<Compile Include="XenAPI\primary_address_type.cs" />
<Compile Include="XenAPI\VGPU.cs" />
<Compile Include="XenAPI\VGPU_type.cs" />
<Compile Include="XenAPI\vif_locking_mode.cs" />
<Compile Include="XenAPI\VM_appliance.cs" />
<Compile Include="XenAPI\vm_appliance_operation.cs" />