mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Merge pull request #1064 from MihaelaStoica/CP-16921
CP-16921: Update XenCenter bindings
This commit is contained in:
commit
1ac350164c
@ -861,6 +861,18 @@
|
|||||||
<data name="PROVISION_ONLY_ALLOWED_ON_TEMPLATE" xml:space="preserve">
|
<data name="PROVISION_ONLY_ALLOWED_ON_TEMPLATE" xml:space="preserve">
|
||||||
<value>The provision call can only be invoked on templates, not regular VMs.</value>
|
<value>The provision call can only be invoked on templates, not regular VMs.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="PVS_FARM_CONTAINS_RUNNING_PROXIES" xml:space="preserve">
|
||||||
|
<value>The PVS farm contains running proxies.</value>
|
||||||
|
</data>
|
||||||
|
<data name="PVS_FARM_CONTAINS_SERVERS" xml:space="preserve">
|
||||||
|
<value>The PVS farm contains servers and cannot be forgotten.</value>
|
||||||
|
</data>
|
||||||
|
<data name="PVS_FARM_SR_ALREADY_ADDED" xml:space="preserve">
|
||||||
|
<value>Trying to add a cache SR that is already associated with the farm</value>
|
||||||
|
</data>
|
||||||
|
<data name="PVS_FARM_SR_IS_IN_USE" xml:space="preserve">
|
||||||
|
<value>The SR is in use by the farm and cannot be removed.</value>
|
||||||
|
</data>
|
||||||
<data name="RBAC_PERMISSION_DENIED" xml:space="preserve">
|
<data name="RBAC_PERMISSION_DENIED" xml:space="preserve">
|
||||||
<value>Your current role is not authorized to perform this action.
|
<value>Your current role is not authorized to perform this action.
|
||||||
Action: {0}</value>
|
Action: {0}</value>
|
||||||
@ -1322,9 +1334,6 @@ Authorized Roles: {1}</value>
|
|||||||
<data name="SR_BACKEND_FAILURE_456" xml:space="preserve">
|
<data name="SR_BACKEND_FAILURE_456" xml:space="preserve">
|
||||||
<value>Unable to attach empty optical drive to VM.</value>
|
<value>Unable to attach empty optical drive to VM.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SR_BACKEND_FAILURE_457" xml:space="preserve">
|
|
||||||
<value>Not enough space to enable LVHD thin provisioning.</value>
|
|
||||||
</data>
|
|
||||||
<data name="SR_BACKEND_FAILURE_46" xml:space="preserve">
|
<data name="SR_BACKEND_FAILURE_46" xml:space="preserve">
|
||||||
<value>The VDI is not available</value>
|
<value>The VDI is not available</value>
|
||||||
</data>
|
</data>
|
||||||
@ -1517,6 +1526,9 @@ Authorized Roles: {1}</value>
|
|||||||
<data name="SR_NOT_EMPTY" xml:space="preserve">
|
<data name="SR_NOT_EMPTY" xml:space="preserve">
|
||||||
<value>The SR operation cannot be performed because the SR is not empty.</value>
|
<value>The SR operation cannot be performed because the SR is not empty.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SR_NOT_IN_PVS_FARM" xml:space="preserve">
|
||||||
|
<value>The SR is not associated with the farm.</value>
|
||||||
|
</data>
|
||||||
<data name="SR_NOT_SHARABLE" xml:space="preserve">
|
<data name="SR_NOT_SHARABLE" xml:space="preserve">
|
||||||
<value>SR is not sharable</value>
|
<value>SR is not sharable</value>
|
||||||
</data>
|
</data>
|
||||||
|
452
XenModel/XenAPI/PVS_farm.cs
Normal file
452
XenModel/XenAPI/PVS_farm.cs
Normal file
@ -0,0 +1,452 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// machines serving blocks of data for provisioning VMs
|
||||||
|
/// </summary>
|
||||||
|
public partial class PVS_farm : XenObject<PVS_farm>
|
||||||
|
{
|
||||||
|
public PVS_farm()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public PVS_farm(string uuid,
|
||||||
|
string name,
|
||||||
|
List<XenRef<SR>> cache_storage,
|
||||||
|
List<XenRef<PVS_server>> servers,
|
||||||
|
List<XenRef<PVS_proxy>> proxies)
|
||||||
|
{
|
||||||
|
this.uuid = uuid;
|
||||||
|
this.name = name;
|
||||||
|
this.cache_storage = cache_storage;
|
||||||
|
this.servers = servers;
|
||||||
|
this.proxies = proxies;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new PVS_farm from a Proxy_PVS_farm.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="proxy"></param>
|
||||||
|
public PVS_farm(Proxy_PVS_farm proxy)
|
||||||
|
{
|
||||||
|
this.UpdateFromProxy(proxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateFrom(PVS_farm update)
|
||||||
|
{
|
||||||
|
uuid = update.uuid;
|
||||||
|
name = update.name;
|
||||||
|
cache_storage = update.cache_storage;
|
||||||
|
servers = update.servers;
|
||||||
|
proxies = update.proxies;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void UpdateFromProxy(Proxy_PVS_farm proxy)
|
||||||
|
{
|
||||||
|
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||||
|
name = proxy.name == null ? null : (string)proxy.name;
|
||||||
|
cache_storage = proxy.cache_storage == null ? null : XenRef<SR>.Create(proxy.cache_storage);
|
||||||
|
servers = proxy.servers == null ? null : XenRef<PVS_server>.Create(proxy.servers);
|
||||||
|
proxies = proxy.proxies == null ? null : XenRef<PVS_proxy>.Create(proxy.proxies);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Proxy_PVS_farm ToProxy()
|
||||||
|
{
|
||||||
|
Proxy_PVS_farm result_ = new Proxy_PVS_farm();
|
||||||
|
result_.uuid = (uuid != null) ? uuid : "";
|
||||||
|
result_.name = (name != null) ? name : "";
|
||||||
|
result_.cache_storage = (cache_storage != null) ? Helper.RefListToStringArray(cache_storage) : new string[] {};
|
||||||
|
result_.servers = (servers != null) ? Helper.RefListToStringArray(servers) : new string[] {};
|
||||||
|
result_.proxies = (proxies != null) ? Helper.RefListToStringArray(proxies) : new string[] {};
|
||||||
|
return result_;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new PVS_farm from a Hashtable.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="table"></param>
|
||||||
|
public PVS_farm(Hashtable table)
|
||||||
|
{
|
||||||
|
uuid = Marshalling.ParseString(table, "uuid");
|
||||||
|
name = Marshalling.ParseString(table, "name");
|
||||||
|
cache_storage = Marshalling.ParseSetRef<SR>(table, "cache_storage");
|
||||||
|
servers = Marshalling.ParseSetRef<PVS_server>(table, "servers");
|
||||||
|
proxies = Marshalling.ParseSetRef<PVS_proxy>(table, "proxies");
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool DeepEquals(PVS_farm other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, other))
|
||||||
|
return false;
|
||||||
|
if (ReferenceEquals(this, other))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return Helper.AreEqual2(this._uuid, other._uuid) &&
|
||||||
|
Helper.AreEqual2(this._name, other._name) &&
|
||||||
|
Helper.AreEqual2(this._cache_storage, other._cache_storage) &&
|
||||||
|
Helper.AreEqual2(this._servers, other._servers) &&
|
||||||
|
Helper.AreEqual2(this._proxies, other._proxies);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string SaveChanges(Session session, string opaqueRef, PVS_farm server)
|
||||||
|
{
|
||||||
|
if (opaqueRef == null)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Debug.Assert(false, "Cannot create instances of this type on the server");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual2(_name, server._name))
|
||||||
|
{
|
||||||
|
PVS_farm.set_name(session, opaqueRef, _name);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Get a record containing the current state of the given PVS_farm.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
public static PVS_farm get_record(Session session, string _pvs_farm)
|
||||||
|
{
|
||||||
|
return new PVS_farm((Proxy_PVS_farm)session.proxy.pvs_farm_get_record(session.uuid, (_pvs_farm != null) ? _pvs_farm : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a reference to the PVS_farm instance with the specified UUID.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_uuid">UUID of object to return</param>
|
||||||
|
public static XenRef<PVS_farm> get_by_uuid(Session session, string _uuid)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_farm>.Create(session.proxy.pvs_farm_get_by_uuid(session.uuid, (_uuid != null) ? _uuid : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the uuid field of the given PVS_farm.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
public static string get_uuid(Session session, string _pvs_farm)
|
||||||
|
{
|
||||||
|
return (string)session.proxy.pvs_farm_get_uuid(session.uuid, (_pvs_farm != null) ? _pvs_farm : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the name field of the given PVS_farm.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
public static string get_name(Session session, string _pvs_farm)
|
||||||
|
{
|
||||||
|
return (string)session.proxy.pvs_farm_get_name(session.uuid, (_pvs_farm != null) ? _pvs_farm : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the cache_storage field of the given PVS_farm.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
public static List<XenRef<SR>> get_cache_storage(Session session, string _pvs_farm)
|
||||||
|
{
|
||||||
|
return XenRef<SR>.Create(session.proxy.pvs_farm_get_cache_storage(session.uuid, (_pvs_farm != null) ? _pvs_farm : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the servers field of the given PVS_farm.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
public static List<XenRef<PVS_server>> get_servers(Session session, string _pvs_farm)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_server>.Create(session.proxy.pvs_farm_get_servers(session.uuid, (_pvs_farm != null) ? _pvs_farm : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the proxies field of the given PVS_farm.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
public static List<XenRef<PVS_proxy>> get_proxies(Session session, string _pvs_farm)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_proxy>.Create(session.proxy.pvs_farm_get_proxies(session.uuid, (_pvs_farm != null) ? _pvs_farm : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Introduce new PVS farm
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_name">name of the PVS farm</param>
|
||||||
|
public static XenRef<PVS_farm> introduce(Session session, string _name)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_farm>.Create(session.proxy.pvs_farm_introduce(session.uuid, (_name != null) ? _name : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Introduce new PVS farm
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_name">name of the PVS farm</param>
|
||||||
|
public static XenRef<Task> async_introduce(Session session, string _name)
|
||||||
|
{
|
||||||
|
return XenRef<Task>.Create(session.proxy.async_pvs_farm_introduce(session.uuid, (_name != null) ? _name : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Remove a farm's meta data
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
public static void forget(Session session, string _pvs_farm)
|
||||||
|
{
|
||||||
|
session.proxy.pvs_farm_forget(session.uuid, (_pvs_farm != null) ? _pvs_farm : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Remove a farm's meta data
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
public static XenRef<Task> async_forget(Session session, string _pvs_farm)
|
||||||
|
{
|
||||||
|
return XenRef<Task>.Create(session.proxy.async_pvs_farm_forget(session.uuid, (_pvs_farm != null) ? _pvs_farm : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update the name of the PVS farm
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
/// <param name="_value">name to be used</param>
|
||||||
|
public static void set_name(Session session, string _pvs_farm, string _value)
|
||||||
|
{
|
||||||
|
session.proxy.pvs_farm_set_name(session.uuid, (_pvs_farm != null) ? _pvs_farm : "", (_value != null) ? _value : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update the name of the PVS farm
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
/// <param name="_value">name to be used</param>
|
||||||
|
public static XenRef<Task> async_set_name(Session session, string _pvs_farm, string _value)
|
||||||
|
{
|
||||||
|
return XenRef<Task>.Create(session.proxy.async_pvs_farm_set_name(session.uuid, (_pvs_farm != null) ? _pvs_farm : "", (_value != null) ? _value : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add a cache SR for the proxies on the farm
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
/// <param name="_value">SR to be used</param>
|
||||||
|
public static void add_cache_storage(Session session, string _pvs_farm, string _value)
|
||||||
|
{
|
||||||
|
session.proxy.pvs_farm_add_cache_storage(session.uuid, (_pvs_farm != null) ? _pvs_farm : "", (_value != null) ? _value : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add a cache SR for the proxies on the farm
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
/// <param name="_value">SR to be used</param>
|
||||||
|
public static XenRef<Task> async_add_cache_storage(Session session, string _pvs_farm, string _value)
|
||||||
|
{
|
||||||
|
return XenRef<Task>.Create(session.proxy.async_pvs_farm_add_cache_storage(session.uuid, (_pvs_farm != null) ? _pvs_farm : "", (_value != null) ? _value : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Remove a cache SR for the proxies on the farm
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
/// <param name="_value">SR to be removed</param>
|
||||||
|
public static void remove_cache_storage(Session session, string _pvs_farm, string _value)
|
||||||
|
{
|
||||||
|
session.proxy.pvs_farm_remove_cache_storage(session.uuid, (_pvs_farm != null) ? _pvs_farm : "", (_value != null) ? _value : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Remove a cache SR for the proxies on the farm
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_farm">The opaque_ref of the given pvs_farm</param>
|
||||||
|
/// <param name="_value">SR to be removed</param>
|
||||||
|
public static XenRef<Task> async_remove_cache_storage(Session session, string _pvs_farm, string _value)
|
||||||
|
{
|
||||||
|
return XenRef<Task>.Create(session.proxy.async_pvs_farm_remove_cache_storage(session.uuid, (_pvs_farm != null) ? _pvs_farm : "", (_value != null) ? _value : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Return a list of all the PVS_farms known to the system.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
public static List<XenRef<PVS_farm>> get_all(Session session)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_farm>.Create(session.proxy.pvs_farm_get_all(session.uuid).parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get all the PVS_farm Records at once, in a single XML RPC call
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
public static Dictionary<XenRef<PVS_farm>, PVS_farm> get_all_records(Session session)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_farm>.Create<Proxy_PVS_farm>(session.proxy.pvs_farm_get_all_records(session.uuid).parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unique identifier/object reference
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual string uuid
|
||||||
|
{
|
||||||
|
get { return _uuid; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _uuid))
|
||||||
|
{
|
||||||
|
_uuid = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("uuid");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string _uuid;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Name of the PVS farm. Must match name configured in PVS
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual string name
|
||||||
|
{
|
||||||
|
get { return _name; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _name))
|
||||||
|
{
|
||||||
|
_name = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("name");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string _name;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The SR used by PVS proxy for the cache
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual List<XenRef<SR>> cache_storage
|
||||||
|
{
|
||||||
|
get { return _cache_storage; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _cache_storage))
|
||||||
|
{
|
||||||
|
_cache_storage = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("cache_storage");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private List<XenRef<SR>> _cache_storage;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The set of PVS servers in the farm
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual List<XenRef<PVS_server>> servers
|
||||||
|
{
|
||||||
|
get { return _servers; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _servers))
|
||||||
|
{
|
||||||
|
_servers = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("servers");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private List<XenRef<PVS_server>> _servers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The set of proxies associated with the farm
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual List<XenRef<PVS_proxy>> proxies
|
||||||
|
{
|
||||||
|
get { return _proxies; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _proxies))
|
||||||
|
{
|
||||||
|
_proxies = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("proxies");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private List<XenRef<PVS_proxy>> _proxies;
|
||||||
|
}
|
||||||
|
}
|
445
XenModel/XenAPI/PVS_proxy.cs
Normal file
445
XenModel/XenAPI/PVS_proxy.cs
Normal file
@ -0,0 +1,445 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// a proxy connects a VM/VIF with a PVS farm
|
||||||
|
/// </summary>
|
||||||
|
public partial class PVS_proxy : XenObject<PVS_proxy>
|
||||||
|
{
|
||||||
|
public PVS_proxy()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public PVS_proxy(string uuid,
|
||||||
|
XenRef<PVS_farm> farm,
|
||||||
|
XenRef<VIF> VIF,
|
||||||
|
bool prepopulate,
|
||||||
|
bool currently_attached,
|
||||||
|
XenRef<SR> cache_SR)
|
||||||
|
{
|
||||||
|
this.uuid = uuid;
|
||||||
|
this.farm = farm;
|
||||||
|
this.VIF = VIF;
|
||||||
|
this.prepopulate = prepopulate;
|
||||||
|
this.currently_attached = currently_attached;
|
||||||
|
this.cache_SR = cache_SR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new PVS_proxy from a Proxy_PVS_proxy.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="proxy"></param>
|
||||||
|
public PVS_proxy(Proxy_PVS_proxy proxy)
|
||||||
|
{
|
||||||
|
this.UpdateFromProxy(proxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateFrom(PVS_proxy update)
|
||||||
|
{
|
||||||
|
uuid = update.uuid;
|
||||||
|
farm = update.farm;
|
||||||
|
VIF = update.VIF;
|
||||||
|
prepopulate = update.prepopulate;
|
||||||
|
currently_attached = update.currently_attached;
|
||||||
|
cache_SR = update.cache_SR;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void UpdateFromProxy(Proxy_PVS_proxy proxy)
|
||||||
|
{
|
||||||
|
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||||
|
farm = proxy.farm == null ? null : XenRef<PVS_farm>.Create(proxy.farm);
|
||||||
|
VIF = proxy.VIF == null ? null : XenRef<VIF>.Create(proxy.VIF);
|
||||||
|
prepopulate = (bool)proxy.prepopulate;
|
||||||
|
currently_attached = (bool)proxy.currently_attached;
|
||||||
|
cache_SR = proxy.cache_SR == null ? null : XenRef<SR>.Create(proxy.cache_SR);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Proxy_PVS_proxy ToProxy()
|
||||||
|
{
|
||||||
|
Proxy_PVS_proxy result_ = new Proxy_PVS_proxy();
|
||||||
|
result_.uuid = (uuid != null) ? uuid : "";
|
||||||
|
result_.farm = (farm != null) ? farm : "";
|
||||||
|
result_.VIF = (VIF != null) ? VIF : "";
|
||||||
|
result_.prepopulate = prepopulate;
|
||||||
|
result_.currently_attached = currently_attached;
|
||||||
|
result_.cache_SR = (cache_SR != null) ? cache_SR : "";
|
||||||
|
return result_;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new PVS_proxy from a Hashtable.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="table"></param>
|
||||||
|
public PVS_proxy(Hashtable table)
|
||||||
|
{
|
||||||
|
uuid = Marshalling.ParseString(table, "uuid");
|
||||||
|
farm = Marshalling.ParseRef<PVS_farm>(table, "farm");
|
||||||
|
VIF = Marshalling.ParseRef<VIF>(table, "VIF");
|
||||||
|
prepopulate = Marshalling.ParseBool(table, "prepopulate");
|
||||||
|
currently_attached = Marshalling.ParseBool(table, "currently_attached");
|
||||||
|
cache_SR = Marshalling.ParseRef<SR>(table, "cache_SR");
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool DeepEquals(PVS_proxy other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, other))
|
||||||
|
return false;
|
||||||
|
if (ReferenceEquals(this, other))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return Helper.AreEqual2(this._uuid, other._uuid) &&
|
||||||
|
Helper.AreEqual2(this._farm, other._farm) &&
|
||||||
|
Helper.AreEqual2(this._VIF, other._VIF) &&
|
||||||
|
Helper.AreEqual2(this._prepopulate, other._prepopulate) &&
|
||||||
|
Helper.AreEqual2(this._currently_attached, other._currently_attached) &&
|
||||||
|
Helper.AreEqual2(this._cache_SR, other._cache_SR);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string SaveChanges(Session session, string opaqueRef, PVS_proxy server)
|
||||||
|
{
|
||||||
|
if (opaqueRef == null)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Debug.Assert(false, "Cannot create instances of this type on the server");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual2(_prepopulate, server._prepopulate))
|
||||||
|
{
|
||||||
|
PVS_proxy.set_prepopulate(session, opaqueRef, _prepopulate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Get a record containing the current state of the given PVS_proxy.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
public static PVS_proxy get_record(Session session, string _pvs_proxy)
|
||||||
|
{
|
||||||
|
return new PVS_proxy((Proxy_PVS_proxy)session.proxy.pvs_proxy_get_record(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a reference to the PVS_proxy instance with the specified UUID.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_uuid">UUID of object to return</param>
|
||||||
|
public static XenRef<PVS_proxy> get_by_uuid(Session session, string _uuid)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_proxy>.Create(session.proxy.pvs_proxy_get_by_uuid(session.uuid, (_uuid != null) ? _uuid : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the uuid field of the given PVS_proxy.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
public static string get_uuid(Session session, string _pvs_proxy)
|
||||||
|
{
|
||||||
|
return (string)session.proxy.pvs_proxy_get_uuid(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the farm field of the given PVS_proxy.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
public static XenRef<PVS_farm> get_farm(Session session, string _pvs_proxy)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_farm>.Create(session.proxy.pvs_proxy_get_farm(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the VIF field of the given PVS_proxy.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
public static XenRef<VIF> get_VIF(Session session, string _pvs_proxy)
|
||||||
|
{
|
||||||
|
return XenRef<VIF>.Create(session.proxy.pvs_proxy_get_vif(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the prepopulate field of the given PVS_proxy.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
public static bool get_prepopulate(Session session, string _pvs_proxy)
|
||||||
|
{
|
||||||
|
return (bool)session.proxy.pvs_proxy_get_prepopulate(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the currently_attached field of the given PVS_proxy.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
public static bool get_currently_attached(Session session, string _pvs_proxy)
|
||||||
|
{
|
||||||
|
return (bool)session.proxy.pvs_proxy_get_currently_attached(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the cache_SR field of the given PVS_proxy.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
public static XenRef<SR> get_cache_SR(Session session, string _pvs_proxy)
|
||||||
|
{
|
||||||
|
return XenRef<SR>.Create(session.proxy.pvs_proxy_get_cache_sr(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Configure a VM/VIF to use a PVS proxy
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_farm">PVS farm that we proxy for</param>
|
||||||
|
/// <param name="_vif">VIF for the VM that needs to be proxied</param>
|
||||||
|
/// <param name="_prepopulate">if true, prefetch whole disk for VM</param>
|
||||||
|
public static XenRef<PVS_proxy> create(Session session, string _farm, string _vif, bool _prepopulate)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_proxy>.Create(session.proxy.pvs_proxy_create(session.uuid, (_farm != null) ? _farm : "", (_vif != null) ? _vif : "", _prepopulate).parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Configure a VM/VIF to use a PVS proxy
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_farm">PVS farm that we proxy for</param>
|
||||||
|
/// <param name="_vif">VIF for the VM that needs to be proxied</param>
|
||||||
|
/// <param name="_prepopulate">if true, prefetch whole disk for VM</param>
|
||||||
|
public static XenRef<Task> async_create(Session session, string _farm, string _vif, bool _prepopulate)
|
||||||
|
{
|
||||||
|
return XenRef<Task>.Create(session.proxy.async_pvs_proxy_create(session.uuid, (_farm != null) ? _farm : "", (_vif != null) ? _vif : "", _prepopulate).parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// remove (or switch off) a PVS proxy for this VM
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
public static void destroy(Session session, string _pvs_proxy)
|
||||||
|
{
|
||||||
|
session.proxy.pvs_proxy_destroy(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// remove (or switch off) a PVS proxy for this VM
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
public static XenRef<Task> async_destroy(Session session, string _pvs_proxy)
|
||||||
|
{
|
||||||
|
return XenRef<Task>.Create(session.proxy.async_pvs_proxy_destroy(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// change the value of the prepopulate field
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
/// <param name="_value">set to this value</param>
|
||||||
|
public static void set_prepopulate(Session session, string _pvs_proxy, bool _value)
|
||||||
|
{
|
||||||
|
session.proxy.pvs_proxy_set_prepopulate(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "", _value).parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// change the value of the prepopulate field
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_proxy">The opaque_ref of the given pvs_proxy</param>
|
||||||
|
/// <param name="_value">set to this value</param>
|
||||||
|
public static XenRef<Task> async_set_prepopulate(Session session, string _pvs_proxy, bool _value)
|
||||||
|
{
|
||||||
|
return XenRef<Task>.Create(session.proxy.async_pvs_proxy_set_prepopulate(session.uuid, (_pvs_proxy != null) ? _pvs_proxy : "", _value).parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Return a list of all the PVS_proxys known to the system.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
public static List<XenRef<PVS_proxy>> get_all(Session session)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_proxy>.Create(session.proxy.pvs_proxy_get_all(session.uuid).parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get all the PVS_proxy Records at once, in a single XML RPC call
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
public static Dictionary<XenRef<PVS_proxy>, PVS_proxy> get_all_records(Session session)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_proxy>.Create<Proxy_PVS_proxy>(session.proxy.pvs_proxy_get_all_records(session.uuid).parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unique identifier/object reference
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual string uuid
|
||||||
|
{
|
||||||
|
get { return _uuid; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _uuid))
|
||||||
|
{
|
||||||
|
_uuid = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("uuid");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string _uuid;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PVS farm this proxy is part of
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual XenRef<PVS_farm> farm
|
||||||
|
{
|
||||||
|
get { return _farm; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _farm))
|
||||||
|
{
|
||||||
|
_farm = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("farm");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private XenRef<PVS_farm> _farm;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VIF of the VM using the proxy
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual XenRef<VIF> VIF
|
||||||
|
{
|
||||||
|
get { return _VIF; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _VIF))
|
||||||
|
{
|
||||||
|
_VIF = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("VIF");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private XenRef<VIF> _VIF;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// true = proxy prefetches whole disk for the VM
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual bool prepopulate
|
||||||
|
{
|
||||||
|
get { return _prepopulate; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _prepopulate))
|
||||||
|
{
|
||||||
|
_prepopulate = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("prepopulate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private bool _prepopulate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// true = VM is currently proxied
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual bool currently_attached
|
||||||
|
{
|
||||||
|
get { return _currently_attached; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _currently_attached))
|
||||||
|
{
|
||||||
|
_currently_attached = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("currently_attached");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private bool _currently_attached;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SR used by this proxy
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual XenRef<SR> cache_SR
|
||||||
|
{
|
||||||
|
get { return _cache_SR; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _cache_SR))
|
||||||
|
{
|
||||||
|
_cache_SR = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("cache_SR");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private XenRef<SR> _cache_SR;
|
||||||
|
}
|
||||||
|
}
|
381
XenModel/XenAPI/PVS_server.cs
Normal file
381
XenModel/XenAPI/PVS_server.cs
Normal file
@ -0,0 +1,381 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// individual machine serving provisioning (block) data
|
||||||
|
/// </summary>
|
||||||
|
public partial class PVS_server : XenObject<PVS_server>
|
||||||
|
{
|
||||||
|
public PVS_server()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public PVS_server(string uuid,
|
||||||
|
string[] addresses,
|
||||||
|
long first_port,
|
||||||
|
long last_port,
|
||||||
|
XenRef<PVS_farm> farm)
|
||||||
|
{
|
||||||
|
this.uuid = uuid;
|
||||||
|
this.addresses = addresses;
|
||||||
|
this.first_port = first_port;
|
||||||
|
this.last_port = last_port;
|
||||||
|
this.farm = farm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new PVS_server from a Proxy_PVS_server.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="proxy"></param>
|
||||||
|
public PVS_server(Proxy_PVS_server proxy)
|
||||||
|
{
|
||||||
|
this.UpdateFromProxy(proxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateFrom(PVS_server update)
|
||||||
|
{
|
||||||
|
uuid = update.uuid;
|
||||||
|
addresses = update.addresses;
|
||||||
|
first_port = update.first_port;
|
||||||
|
last_port = update.last_port;
|
||||||
|
farm = update.farm;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void UpdateFromProxy(Proxy_PVS_server proxy)
|
||||||
|
{
|
||||||
|
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||||
|
addresses = proxy.addresses == null ? new string[] {} : (string [])proxy.addresses;
|
||||||
|
first_port = proxy.first_port == null ? 0 : long.Parse((string)proxy.first_port);
|
||||||
|
last_port = proxy.last_port == null ? 0 : long.Parse((string)proxy.last_port);
|
||||||
|
farm = proxy.farm == null ? null : XenRef<PVS_farm>.Create(proxy.farm);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Proxy_PVS_server ToProxy()
|
||||||
|
{
|
||||||
|
Proxy_PVS_server result_ = new Proxy_PVS_server();
|
||||||
|
result_.uuid = (uuid != null) ? uuid : "";
|
||||||
|
result_.addresses = addresses;
|
||||||
|
result_.first_port = first_port.ToString();
|
||||||
|
result_.last_port = last_port.ToString();
|
||||||
|
result_.farm = (farm != null) ? farm : "";
|
||||||
|
return result_;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new PVS_server from a Hashtable.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="table"></param>
|
||||||
|
public PVS_server(Hashtable table)
|
||||||
|
{
|
||||||
|
uuid = Marshalling.ParseString(table, "uuid");
|
||||||
|
addresses = Marshalling.ParseStringArray(table, "addresses");
|
||||||
|
first_port = Marshalling.ParseLong(table, "first_port");
|
||||||
|
last_port = Marshalling.ParseLong(table, "last_port");
|
||||||
|
farm = Marshalling.ParseRef<PVS_farm>(table, "farm");
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool DeepEquals(PVS_server other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, other))
|
||||||
|
return false;
|
||||||
|
if (ReferenceEquals(this, other))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return Helper.AreEqual2(this._uuid, other._uuid) &&
|
||||||
|
Helper.AreEqual2(this._addresses, other._addresses) &&
|
||||||
|
Helper.AreEqual2(this._first_port, other._first_port) &&
|
||||||
|
Helper.AreEqual2(this._last_port, other._last_port) &&
|
||||||
|
Helper.AreEqual2(this._farm, other._farm);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string SaveChanges(Session session, string opaqueRef, PVS_server 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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Get a record containing the current state of the given PVS_server.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_server">The opaque_ref of the given pvs_server</param>
|
||||||
|
public static PVS_server get_record(Session session, string _pvs_server)
|
||||||
|
{
|
||||||
|
return new PVS_server((Proxy_PVS_server)session.proxy.pvs_server_get_record(session.uuid, (_pvs_server != null) ? _pvs_server : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a reference to the PVS_server instance with the specified UUID.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_uuid">UUID of object to return</param>
|
||||||
|
public static XenRef<PVS_server> get_by_uuid(Session session, string _uuid)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_server>.Create(session.proxy.pvs_server_get_by_uuid(session.uuid, (_uuid != null) ? _uuid : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the uuid field of the given PVS_server.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_server">The opaque_ref of the given pvs_server</param>
|
||||||
|
public static string get_uuid(Session session, string _pvs_server)
|
||||||
|
{
|
||||||
|
return (string)session.proxy.pvs_server_get_uuid(session.uuid, (_pvs_server != null) ? _pvs_server : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the addresses field of the given PVS_server.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_server">The opaque_ref of the given pvs_server</param>
|
||||||
|
public static string[] get_addresses(Session session, string _pvs_server)
|
||||||
|
{
|
||||||
|
return (string [])session.proxy.pvs_server_get_addresses(session.uuid, (_pvs_server != null) ? _pvs_server : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the first_port field of the given PVS_server.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_server">The opaque_ref of the given pvs_server</param>
|
||||||
|
public static long get_first_port(Session session, string _pvs_server)
|
||||||
|
{
|
||||||
|
return long.Parse((string)session.proxy.pvs_server_get_first_port(session.uuid, (_pvs_server != null) ? _pvs_server : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the last_port field of the given PVS_server.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_server">The opaque_ref of the given pvs_server</param>
|
||||||
|
public static long get_last_port(Session session, string _pvs_server)
|
||||||
|
{
|
||||||
|
return long.Parse((string)session.proxy.pvs_server_get_last_port(session.uuid, (_pvs_server != null) ? _pvs_server : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the farm field of the given PVS_server.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_server">The opaque_ref of the given pvs_server</param>
|
||||||
|
public static XenRef<PVS_farm> get_farm(Session session, string _pvs_server)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_farm>.Create(session.proxy.pvs_server_get_farm(session.uuid, (_pvs_server != null) ? _pvs_server : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// introduce new PVS server
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_addresses">IPv4 addresses of the server</param>
|
||||||
|
/// <param name="_first_port">first UDP port accepted by this server</param>
|
||||||
|
/// <param name="_last_port">last UDP port accepted by this server</param>
|
||||||
|
/// <param name="_farm">PVS farm this server is a part of</param>
|
||||||
|
public static XenRef<PVS_server> introduce(Session session, string[] _addresses, long _first_port, long _last_port, string _farm)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_server>.Create(session.proxy.pvs_server_introduce(session.uuid, _addresses, _first_port.ToString(), _last_port.ToString(), (_farm != null) ? _farm : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// introduce new PVS server
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_addresses">IPv4 addresses of the server</param>
|
||||||
|
/// <param name="_first_port">first UDP port accepted by this server</param>
|
||||||
|
/// <param name="_last_port">last UDP port accepted by this server</param>
|
||||||
|
/// <param name="_farm">PVS farm this server is a part of</param>
|
||||||
|
public static XenRef<Task> async_introduce(Session session, string[] _addresses, long _first_port, long _last_port, string _farm)
|
||||||
|
{
|
||||||
|
return XenRef<Task>.Create(session.proxy.async_pvs_server_introduce(session.uuid, _addresses, _first_port.ToString(), _last_port.ToString(), (_farm != null) ? _farm : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// forget a PVS server
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_server">The opaque_ref of the given pvs_server</param>
|
||||||
|
public static void forget(Session session, string _pvs_server)
|
||||||
|
{
|
||||||
|
session.proxy.pvs_server_forget(session.uuid, (_pvs_server != null) ? _pvs_server : "").parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// forget a PVS server
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
/// <param name="_pvs_server">The opaque_ref of the given pvs_server</param>
|
||||||
|
public static XenRef<Task> async_forget(Session session, string _pvs_server)
|
||||||
|
{
|
||||||
|
return XenRef<Task>.Create(session.proxy.async_pvs_server_forget(session.uuid, (_pvs_server != null) ? _pvs_server : "").parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Return a list of all the PVS_servers known to the system.
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
public static List<XenRef<PVS_server>> get_all(Session session)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_server>.Create(session.proxy.pvs_server_get_all(session.uuid).parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get all the PVS_server Records at once, in a single XML RPC call
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="session">The session</param>
|
||||||
|
public static Dictionary<XenRef<PVS_server>, PVS_server> get_all_records(Session session)
|
||||||
|
{
|
||||||
|
return XenRef<PVS_server>.Create<Proxy_PVS_server>(session.proxy.pvs_server_get_all_records(session.uuid).parse());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unique identifier/object reference
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual string uuid
|
||||||
|
{
|
||||||
|
get { return _uuid; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _uuid))
|
||||||
|
{
|
||||||
|
_uuid = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("uuid");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string _uuid;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IPv4 addresses of this server
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual string[] addresses
|
||||||
|
{
|
||||||
|
get { return _addresses; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _addresses))
|
||||||
|
{
|
||||||
|
_addresses = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("addresses");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string[] _addresses;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// First UDP port accepted by this server
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual long first_port
|
||||||
|
{
|
||||||
|
get { return _first_port; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _first_port))
|
||||||
|
{
|
||||||
|
_first_port = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("first_port");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private long _first_port;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Last UDP port accepted by this server
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual long last_port
|
||||||
|
{
|
||||||
|
get { return _last_port; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _last_port))
|
||||||
|
{
|
||||||
|
_last_port = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("last_port");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private long _last_port;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PVS farm this server is part of
|
||||||
|
/// Experimental. First published in .
|
||||||
|
/// </summary>
|
||||||
|
public virtual XenRef<PVS_farm> farm
|
||||||
|
{
|
||||||
|
get { return _farm; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!Helper.AreEqual(value, _farm))
|
||||||
|
{
|
||||||
|
_farm = value;
|
||||||
|
Changed = true;
|
||||||
|
NotifyPropertyChanged("farm");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private XenRef<PVS_farm> _farm;
|
||||||
|
}
|
||||||
|
}
|
@ -6863,6 +6863,198 @@ namespace XenAPI
|
|||||||
[XmlRpcMethod("VGPU_type.get_all_records")]
|
[XmlRpcMethod("VGPU_type.get_all_records")]
|
||||||
Response<Object>
|
Response<Object>
|
||||||
vgpu_type_get_all_records(string session);
|
vgpu_type_get_all_records(string session);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.get_record")]
|
||||||
|
Response<Proxy_PVS_farm>
|
||||||
|
pvs_farm_get_record(string session, string _pvs_farm);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.get_by_uuid")]
|
||||||
|
Response<string>
|
||||||
|
pvs_farm_get_by_uuid(string session, string _uuid);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.get_uuid")]
|
||||||
|
Response<string>
|
||||||
|
pvs_farm_get_uuid(string session, string _pvs_farm);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.get_name")]
|
||||||
|
Response<string>
|
||||||
|
pvs_farm_get_name(string session, string _pvs_farm);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.get_cache_storage")]
|
||||||
|
Response<string []>
|
||||||
|
pvs_farm_get_cache_storage(string session, string _pvs_farm);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.get_servers")]
|
||||||
|
Response<string []>
|
||||||
|
pvs_farm_get_servers(string session, string _pvs_farm);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.get_proxies")]
|
||||||
|
Response<string []>
|
||||||
|
pvs_farm_get_proxies(string session, string _pvs_farm);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.introduce")]
|
||||||
|
Response<string>
|
||||||
|
pvs_farm_introduce(string session, string _name);
|
||||||
|
|
||||||
|
[XmlRpcMethod("Async.PVS_farm.introduce")]
|
||||||
|
Response<string>
|
||||||
|
async_pvs_farm_introduce(string session, string _name);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.forget")]
|
||||||
|
Response<string>
|
||||||
|
pvs_farm_forget(string session, string _pvs_farm);
|
||||||
|
|
||||||
|
[XmlRpcMethod("Async.PVS_farm.forget")]
|
||||||
|
Response<string>
|
||||||
|
async_pvs_farm_forget(string session, string _pvs_farm);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.set_name")]
|
||||||
|
Response<string>
|
||||||
|
pvs_farm_set_name(string session, string _pvs_farm, string _value);
|
||||||
|
|
||||||
|
[XmlRpcMethod("Async.PVS_farm.set_name")]
|
||||||
|
Response<string>
|
||||||
|
async_pvs_farm_set_name(string session, string _pvs_farm, string _value);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.add_cache_storage")]
|
||||||
|
Response<string>
|
||||||
|
pvs_farm_add_cache_storage(string session, string _pvs_farm, string _value);
|
||||||
|
|
||||||
|
[XmlRpcMethod("Async.PVS_farm.add_cache_storage")]
|
||||||
|
Response<string>
|
||||||
|
async_pvs_farm_add_cache_storage(string session, string _pvs_farm, string _value);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.remove_cache_storage")]
|
||||||
|
Response<string>
|
||||||
|
pvs_farm_remove_cache_storage(string session, string _pvs_farm, string _value);
|
||||||
|
|
||||||
|
[XmlRpcMethod("Async.PVS_farm.remove_cache_storage")]
|
||||||
|
Response<string>
|
||||||
|
async_pvs_farm_remove_cache_storage(string session, string _pvs_farm, string _value);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.get_all")]
|
||||||
|
Response<string []>
|
||||||
|
pvs_farm_get_all(string session);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_farm.get_all_records")]
|
||||||
|
Response<Object>
|
||||||
|
pvs_farm_get_all_records(string session);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.get_record")]
|
||||||
|
Response<Proxy_PVS_server>
|
||||||
|
pvs_server_get_record(string session, string _pvs_server);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.get_by_uuid")]
|
||||||
|
Response<string>
|
||||||
|
pvs_server_get_by_uuid(string session, string _uuid);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.get_uuid")]
|
||||||
|
Response<string>
|
||||||
|
pvs_server_get_uuid(string session, string _pvs_server);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.get_addresses")]
|
||||||
|
Response<string []>
|
||||||
|
pvs_server_get_addresses(string session, string _pvs_server);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.get_first_port")]
|
||||||
|
Response<string>
|
||||||
|
pvs_server_get_first_port(string session, string _pvs_server);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.get_last_port")]
|
||||||
|
Response<string>
|
||||||
|
pvs_server_get_last_port(string session, string _pvs_server);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.get_farm")]
|
||||||
|
Response<string>
|
||||||
|
pvs_server_get_farm(string session, string _pvs_server);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.introduce")]
|
||||||
|
Response<string>
|
||||||
|
pvs_server_introduce(string session, string [] _addresses, string _first_port, string _last_port, string _farm);
|
||||||
|
|
||||||
|
[XmlRpcMethod("Async.PVS_server.introduce")]
|
||||||
|
Response<string>
|
||||||
|
async_pvs_server_introduce(string session, string [] _addresses, string _first_port, string _last_port, string _farm);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.forget")]
|
||||||
|
Response<string>
|
||||||
|
pvs_server_forget(string session, string _pvs_server);
|
||||||
|
|
||||||
|
[XmlRpcMethod("Async.PVS_server.forget")]
|
||||||
|
Response<string>
|
||||||
|
async_pvs_server_forget(string session, string _pvs_server);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.get_all")]
|
||||||
|
Response<string []>
|
||||||
|
pvs_server_get_all(string session);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_server.get_all_records")]
|
||||||
|
Response<Object>
|
||||||
|
pvs_server_get_all_records(string session);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.get_record")]
|
||||||
|
Response<Proxy_PVS_proxy>
|
||||||
|
pvs_proxy_get_record(string session, string _pvs_proxy);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.get_by_uuid")]
|
||||||
|
Response<string>
|
||||||
|
pvs_proxy_get_by_uuid(string session, string _uuid);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.get_uuid")]
|
||||||
|
Response<string>
|
||||||
|
pvs_proxy_get_uuid(string session, string _pvs_proxy);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.get_farm")]
|
||||||
|
Response<string>
|
||||||
|
pvs_proxy_get_farm(string session, string _pvs_proxy);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.get_VIF")]
|
||||||
|
Response<string>
|
||||||
|
pvs_proxy_get_vif(string session, string _pvs_proxy);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.get_prepopulate")]
|
||||||
|
Response<bool>
|
||||||
|
pvs_proxy_get_prepopulate(string session, string _pvs_proxy);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.get_currently_attached")]
|
||||||
|
Response<bool>
|
||||||
|
pvs_proxy_get_currently_attached(string session, string _pvs_proxy);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.get_cache_SR")]
|
||||||
|
Response<string>
|
||||||
|
pvs_proxy_get_cache_sr(string session, string _pvs_proxy);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.create")]
|
||||||
|
Response<string>
|
||||||
|
pvs_proxy_create(string session, string _farm, string _vif, bool _prepopulate);
|
||||||
|
|
||||||
|
[XmlRpcMethod("Async.PVS_proxy.create")]
|
||||||
|
Response<string>
|
||||||
|
async_pvs_proxy_create(string session, string _farm, string _vif, bool _prepopulate);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.destroy")]
|
||||||
|
Response<string>
|
||||||
|
pvs_proxy_destroy(string session, string _pvs_proxy);
|
||||||
|
|
||||||
|
[XmlRpcMethod("Async.PVS_proxy.destroy")]
|
||||||
|
Response<string>
|
||||||
|
async_pvs_proxy_destroy(string session, string _pvs_proxy);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.set_prepopulate")]
|
||||||
|
Response<string>
|
||||||
|
pvs_proxy_set_prepopulate(string session, string _pvs_proxy, bool _value);
|
||||||
|
|
||||||
|
[XmlRpcMethod("Async.PVS_proxy.set_prepopulate")]
|
||||||
|
Response<string>
|
||||||
|
async_pvs_proxy_set_prepopulate(string session, string _pvs_proxy, bool _value);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.get_all")]
|
||||||
|
Response<string []>
|
||||||
|
pvs_proxy_get_all(string session);
|
||||||
|
|
||||||
|
[XmlRpcMethod("PVS_proxy.get_all_records")]
|
||||||
|
Response<Object>
|
||||||
|
pvs_proxy_get_all_records(string session);
|
||||||
}
|
}
|
||||||
|
|
||||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||||
@ -7698,4 +7890,35 @@ namespace XenAPI
|
|||||||
public bool experimental;
|
public bool experimental;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||||
|
public class Proxy_PVS_farm
|
||||||
|
{
|
||||||
|
public string uuid;
|
||||||
|
public string name;
|
||||||
|
public string [] cache_storage;
|
||||||
|
public string [] servers;
|
||||||
|
public string [] proxies;
|
||||||
|
}
|
||||||
|
|
||||||
|
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||||
|
public class Proxy_PVS_server
|
||||||
|
{
|
||||||
|
public string uuid;
|
||||||
|
public string [] addresses;
|
||||||
|
public string first_port;
|
||||||
|
public string last_port;
|
||||||
|
public string farm;
|
||||||
|
}
|
||||||
|
|
||||||
|
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||||
|
public class Proxy_PVS_proxy
|
||||||
|
{
|
||||||
|
public string uuid;
|
||||||
|
public string farm;
|
||||||
|
public string VIF;
|
||||||
|
public bool prepopulate;
|
||||||
|
public bool currently_attached;
|
||||||
|
public string cache_SR;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,11 @@ namespace XenAPI
|
|||||||
new Relation("subtasks", "task", "subtask_of"),
|
new Relation("subtasks", "task", "subtask_of"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
relations.Add(typeof(Proxy_PVS_farm), new Relation[] {
|
||||||
|
new Relation("proxies", "PVS_proxy", "farm"),
|
||||||
|
new Relation("servers", "PVS_server", "farm"),
|
||||||
|
});
|
||||||
|
|
||||||
relations.Add(typeof(Proxy_PGPU), new Relation[] {
|
relations.Add(typeof(Proxy_PGPU), new Relation[] {
|
||||||
new Relation("resident_VGPUs", "VGPU", "resident_on"),
|
new Relation("resident_VGPUs", "VGPU", "resident_on"),
|
||||||
});
|
});
|
||||||
|
@ -37,7 +37,7 @@ namespace XenAPI
|
|||||||
{
|
{
|
||||||
public enum vdi_type
|
public enum vdi_type
|
||||||
{
|
{
|
||||||
system, user, ephemeral, suspend, crashdump, ha_statefile, metadata, redo_log, rrd, unknown
|
system, user, ephemeral, suspend, crashdump, ha_statefile, metadata, redo_log, rrd, pvs_cache, unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class vdi_type_helper
|
public static class vdi_type_helper
|
||||||
@ -64,6 +64,8 @@ namespace XenAPI
|
|||||||
return "redo_log";
|
return "redo_log";
|
||||||
case vdi_type.rrd:
|
case vdi_type.rrd:
|
||||||
return "rrd";
|
return "rrd";
|
||||||
|
case vdi_type.pvs_cache:
|
||||||
|
return "pvs_cache";
|
||||||
default:
|
default:
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user