mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
CP-17099: Updated bindings to include new Sr.probe_ext call.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
eaef678ca4
commit
f1e1146a55
@ -56,8 +56,9 @@ namespace XenAPI
|
||||
API_2_6 = 17, //XenServer 7.1 (ely)
|
||||
API_2_7 = 18, //XenServer 7.2 (falcon)
|
||||
API_2_8 = 19, //XenServer 7.3 (inverness)
|
||||
API_2_10 = 20, //Unreleased (kolkata)
|
||||
LATEST = 20,
|
||||
API_2_9 = 20, //XenServer 7.4 (jura)
|
||||
API_2_10 = 21, //Unreleased (kolkata)
|
||||
LATEST = 21,
|
||||
UNKNOWN = 99
|
||||
}
|
||||
|
||||
@ -105,6 +106,8 @@ namespace XenAPI
|
||||
return "2.7";
|
||||
case API_Version.API_2_8:
|
||||
return "2.8";
|
||||
case API_Version.API_2_9:
|
||||
return "2.9";
|
||||
case API_Version.API_2_10:
|
||||
return "2.10";
|
||||
default:
|
||||
|
@ -140,7 +140,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.auth_get_subject_identifier(session.opaque_ref, _subject_name);
|
||||
else
|
||||
return (string)session.proxy.auth_get_subject_identifier(session.opaque_ref, _subject_name ?? "").parse();
|
||||
return session.proxy.auth_get_subject_identifier(session.opaque_ref, _subject_name ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -93,13 +93,13 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Blob proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
size = proxy.size == null ? 0 : long.Parse((string)proxy.size);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
size = proxy.size == null ? 0 : long.Parse(proxy.size);
|
||||
pubblic = (bool)proxy.pubblic;
|
||||
last_updated = proxy.last_updated;
|
||||
mime_type = proxy.mime_type == null ? null : (string)proxy.mime_type;
|
||||
mime_type = proxy.mime_type == null ? null : proxy.mime_type;
|
||||
}
|
||||
|
||||
public Proxy_Blob ToProxy()
|
||||
@ -249,7 +249,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.blob_get_uuid(session.opaque_ref, _blob);
|
||||
else
|
||||
return (string)session.proxy.blob_get_uuid(session.opaque_ref, _blob ?? "").parse();
|
||||
return session.proxy.blob_get_uuid(session.opaque_ref, _blob ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -263,7 +263,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.blob_get_name_label(session.opaque_ref, _blob);
|
||||
else
|
||||
return (string)session.proxy.blob_get_name_label(session.opaque_ref, _blob ?? "").parse();
|
||||
return session.proxy.blob_get_name_label(session.opaque_ref, _blob ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -277,7 +277,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.blob_get_name_description(session.opaque_ref, _blob);
|
||||
else
|
||||
return (string)session.proxy.blob_get_name_description(session.opaque_ref, _blob ?? "").parse();
|
||||
return session.proxy.blob_get_name_description(session.opaque_ref, _blob ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -291,7 +291,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.blob_get_size(session.opaque_ref, _blob);
|
||||
else
|
||||
return long.Parse((string)session.proxy.blob_get_size(session.opaque_ref, _blob ?? "").parse());
|
||||
return long.Parse(session.proxy.blob_get_size(session.opaque_ref, _blob ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -333,7 +333,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.blob_get_mime_type(session.opaque_ref, _blob);
|
||||
else
|
||||
return (string)session.proxy.blob_get_mime_type(session.opaque_ref, _blob ?? "").parse();
|
||||
return session.proxy.blob_get_mime_type(session.opaque_ref, _blob ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -96,14 +96,14 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Bond proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
master = proxy.master == null ? null : XenRef<PIF>.Create(proxy.master);
|
||||
slaves = proxy.slaves == null ? null : XenRef<PIF>.Create(proxy.slaves);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
primary_slave = proxy.primary_slave == null ? null : XenRef<PIF>.Create(proxy.primary_slave);
|
||||
mode = proxy.mode == null ? (bond_mode) 0 : (bond_mode)Helper.EnumParseDefault(typeof(bond_mode), (string)proxy.mode);
|
||||
properties = proxy.properties == null ? null : Maps.convert_from_proxy_string_string(proxy.properties);
|
||||
links_up = proxy.links_up == null ? 0 : long.Parse((string)proxy.links_up);
|
||||
links_up = proxy.links_up == null ? 0 : long.Parse(proxy.links_up);
|
||||
}
|
||||
|
||||
public Proxy_Bond ToProxy()
|
||||
@ -111,7 +111,7 @@ namespace XenAPI
|
||||
Proxy_Bond result_ = new Proxy_Bond();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.master = master ?? "";
|
||||
result_.slaves = (slaves != null) ? Helper.RefListToStringArray(slaves) : new string[] {};
|
||||
result_.slaves = slaves == null ? new string[] {} : Helper.RefListToStringArray(slaves);
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.primary_slave = primary_slave ?? "";
|
||||
result_.mode = bond_mode_helper.ToString(mode);
|
||||
@ -239,7 +239,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.bond_get_uuid(session.opaque_ref, _bond);
|
||||
else
|
||||
return (string)session.proxy.bond_get_uuid(session.opaque_ref, _bond ?? "").parse();
|
||||
return session.proxy.bond_get_uuid(session.opaque_ref, _bond ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -337,7 +337,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.bond_get_links_up(session.opaque_ref, _bond);
|
||||
else
|
||||
return long.Parse((string)session.proxy.bond_get_links_up(session.opaque_ref, _bond ?? "").parse());
|
||||
return long.Parse(session.proxy.bond_get_links_up(session.opaque_ref, _bond ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -399,7 +399,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.bond_create(session.opaque_ref, _network, _members, _mac);
|
||||
else
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "").parse());
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -415,7 +415,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_bond_create(session.opaque_ref, _network, _members, _mac);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "").parse());
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -432,7 +432,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.bond_create(session.opaque_ref, _network, _members, _mac, _mode);
|
||||
else
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "", bond_mode_helper.ToString(_mode)).parse());
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "", bond_mode_helper.ToString(_mode)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -449,7 +449,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_bond_create(session.opaque_ref, _network, _members, _mac, _mode);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "", bond_mode_helper.ToString(_mode)).parse());
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "", bond_mode_helper.ToString(_mode)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -467,7 +467,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.bond_create(session.opaque_ref, _network, _members, _mac, _mode, _properties);
|
||||
else
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "", bond_mode_helper.ToString(_mode), Maps.convert_to_proxy_string_string(_properties)).parse());
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "", bond_mode_helper.ToString(_mode), Maps.convert_to_proxy_string_string(_properties)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -485,7 +485,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_bond_create(session.opaque_ref, _network, _members, _mac, _mode, _properties);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "", bond_mode_helper.ToString(_mode), Maps.convert_to_proxy_string_string(_properties)).parse());
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "", bond_mode_helper.ToString(_mode), Maps.convert_to_proxy_string_string(_properties)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -42,7 +42,6 @@ namespace XenAPI
|
||||
{
|
||||
/// <summary>
|
||||
/// Cluster-wide Cluster metadata
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
public partial class Cluster : XenObject<Cluster>
|
||||
{
|
||||
@ -86,6 +85,10 @@ namespace XenAPI
|
||||
this.UpdateFromProxy(proxy);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates each field of this instance with the value of
|
||||
/// the corresponding field of a given Cluster.
|
||||
/// </summary>
|
||||
public override void UpdateFrom(Cluster update)
|
||||
{
|
||||
uuid = update.uuid;
|
||||
@ -104,16 +107,16 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Cluster proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
cluster_hosts = proxy.cluster_hosts == null ? null : XenRef<Cluster_host>.Create(proxy.cluster_hosts);
|
||||
network = proxy.network == null ? null : XenRef<Network>.Create(proxy.network);
|
||||
cluster_token = proxy.cluster_token == null ? null : (string)proxy.cluster_token;
|
||||
cluster_stack = proxy.cluster_stack == null ? null : (string)proxy.cluster_stack;
|
||||
cluster_token = proxy.cluster_token == null ? null : proxy.cluster_token;
|
||||
cluster_stack = proxy.cluster_stack == null ? null : proxy.cluster_stack;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<cluster_operation>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_cluster_operation(proxy.current_operations);
|
||||
pool_auto_join = (bool)proxy.pool_auto_join;
|
||||
token_timeout = proxy.token_timeout == null ? 0 : long.Parse((string)proxy.token_timeout);
|
||||
token_timeout_coefficient = proxy.token_timeout_coefficient == null ? 0 : long.Parse((string)proxy.token_timeout_coefficient);
|
||||
token_timeout = proxy.token_timeout == null ? 0 : long.Parse(proxy.token_timeout);
|
||||
token_timeout_coefficient = proxy.token_timeout_coefficient == null ? 0 : long.Parse(proxy.token_timeout_coefficient);
|
||||
cluster_config = proxy.cluster_config == null ? null : Maps.convert_from_proxy_string_string(proxy.cluster_config);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -122,11 +125,11 @@ namespace XenAPI
|
||||
{
|
||||
Proxy_Cluster result_ = new Proxy_Cluster();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.cluster_hosts = (cluster_hosts != null) ? Helper.RefListToStringArray(cluster_hosts) : new string[] {};
|
||||
result_.cluster_hosts = cluster_hosts == null ? new string[] {} : Helper.RefListToStringArray(cluster_hosts);
|
||||
result_.network = network ?? "";
|
||||
result_.cluster_token = cluster_token ?? "";
|
||||
result_.cluster_stack = cluster_stack ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_cluster_operation(current_operations);
|
||||
result_.pool_auto_join = pool_auto_join;
|
||||
result_.token_timeout = token_timeout.ToString();
|
||||
@ -138,22 +141,47 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Cluster from a Hashtable.
|
||||
/// Note that the fields not contained in the Hashtable
|
||||
/// will be created with their default values.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public Cluster(Hashtable table)
|
||||
public Cluster(Hashtable table) : this()
|
||||
{
|
||||
uuid = Marshalling.ParseString(table, "uuid");
|
||||
cluster_hosts = Marshalling.ParseSetRef<Cluster_host>(table, "cluster_hosts");
|
||||
network = Marshalling.ParseRef<Network>(table, "network");
|
||||
cluster_token = Marshalling.ParseString(table, "cluster_token");
|
||||
cluster_stack = Marshalling.ParseString(table, "cluster_stack");
|
||||
allowed_operations = Helper.StringArrayToEnumList<cluster_operation>(Marshalling.ParseStringArray(table, "allowed_operations"));
|
||||
current_operations = Maps.convert_from_proxy_string_cluster_operation(Marshalling.ParseHashTable(table, "current_operations"));
|
||||
pool_auto_join = Marshalling.ParseBool(table, "pool_auto_join");
|
||||
token_timeout = Marshalling.ParseLong(table, "token_timeout");
|
||||
token_timeout_coefficient = Marshalling.ParseLong(table, "token_timeout_coefficient");
|
||||
cluster_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "cluster_config"));
|
||||
other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
|
||||
UpdateFrom(table);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a Hashtable with field-value pairs, it updates the fields of this Cluster
|
||||
/// with the values listed in the Hashtable. Note that only the fields contained
|
||||
/// in the Hashtable will be updated and the rest will remain the same.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public void UpdateFrom(Hashtable table)
|
||||
{
|
||||
if (table.ContainsKey("uuid"))
|
||||
uuid = Marshalling.ParseString(table, "uuid");
|
||||
if (table.ContainsKey("cluster_hosts"))
|
||||
cluster_hosts = Marshalling.ParseSetRef<Cluster_host>(table, "cluster_hosts");
|
||||
if (table.ContainsKey("network"))
|
||||
network = Marshalling.ParseRef<Network>(table, "network");
|
||||
if (table.ContainsKey("cluster_token"))
|
||||
cluster_token = Marshalling.ParseString(table, "cluster_token");
|
||||
if (table.ContainsKey("cluster_stack"))
|
||||
cluster_stack = Marshalling.ParseString(table, "cluster_stack");
|
||||
if (table.ContainsKey("allowed_operations"))
|
||||
allowed_operations = Helper.StringArrayToEnumList<cluster_operation>(Marshalling.ParseStringArray(table, "allowed_operations"));
|
||||
if (table.ContainsKey("current_operations"))
|
||||
current_operations = Maps.convert_from_proxy_string_cluster_operation(Marshalling.ParseHashTable(table, "current_operations"));
|
||||
if (table.ContainsKey("pool_auto_join"))
|
||||
pool_auto_join = Marshalling.ParseBool(table, "pool_auto_join");
|
||||
if (table.ContainsKey("token_timeout"))
|
||||
token_timeout = Marshalling.ParseLong(table, "token_timeout");
|
||||
if (table.ContainsKey("token_timeout_coefficient"))
|
||||
token_timeout_coefficient = Marshalling.ParseLong(table, "token_timeout_coefficient");
|
||||
if (table.ContainsKey("cluster_config"))
|
||||
cluster_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "cluster_config"));
|
||||
if (table.ContainsKey("other_config"))
|
||||
other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
|
||||
}
|
||||
|
||||
public bool DeepEquals(Cluster other, bool ignoreCurrentOperations)
|
||||
@ -207,7 +235,7 @@ namespace XenAPI
|
||||
}
|
||||
/// <summary>
|
||||
/// Get a record containing the current state of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -221,7 +249,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get a reference to the Cluster instance with the specified UUID.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_uuid">UUID of object to return</param>
|
||||
@ -235,7 +263,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the uuid field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -244,12 +272,12 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_get_uuid(session.opaque_ref, _cluster);
|
||||
else
|
||||
return (string)session.proxy.cluster_get_uuid(session.opaque_ref, _cluster ?? "").parse();
|
||||
return session.proxy.cluster_get_uuid(session.opaque_ref, _cluster ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the cluster_hosts field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -263,7 +291,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the network field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -277,7 +305,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the cluster_token field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -286,12 +314,12 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_get_cluster_token(session.opaque_ref, _cluster);
|
||||
else
|
||||
return (string)session.proxy.cluster_get_cluster_token(session.opaque_ref, _cluster ?? "").parse();
|
||||
return session.proxy.cluster_get_cluster_token(session.opaque_ref, _cluster ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the cluster_stack field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -300,12 +328,11 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_get_cluster_stack(session.opaque_ref, _cluster);
|
||||
else
|
||||
return (string)session.proxy.cluster_get_cluster_stack(session.opaque_ref, _cluster ?? "").parse();
|
||||
return session.proxy.cluster_get_cluster_stack(session.opaque_ref, _cluster ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the allowed_operations field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -319,7 +346,6 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the current_operations field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -333,7 +359,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the pool_auto_join field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -347,7 +373,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the token_timeout field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -356,12 +382,12 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_get_token_timeout(session.opaque_ref, _cluster);
|
||||
else
|
||||
return long.Parse((string)session.proxy.cluster_get_token_timeout(session.opaque_ref, _cluster ?? "").parse());
|
||||
return long.Parse(session.proxy.cluster_get_token_timeout(session.opaque_ref, _cluster ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the token_timeout_coefficient field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -370,12 +396,12 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_get_token_timeout_coefficient(session.opaque_ref, _cluster);
|
||||
else
|
||||
return long.Parse((string)session.proxy.cluster_get_token_timeout_coefficient(session.opaque_ref, _cluster ?? "").parse());
|
||||
return long.Parse(session.proxy.cluster_get_token_timeout_coefficient(session.opaque_ref, _cluster ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the cluster_config field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -389,7 +415,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the other_config field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -403,7 +429,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Set the other_config field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -418,7 +444,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Add the given key-value pair to the other_config field of the given Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -434,7 +460,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Remove the given key and its corresponding value from the other_config field of the given Cluster. If the key is not in that Map, then do nothing.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -449,7 +475,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Creates a Cluster object and one Cluster_host object as its first member
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_network">the single network on which corosync carries out its inter-host communications</param>
|
||||
@ -467,7 +493,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Creates a Cluster object and one Cluster_host object as its first member
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_network">the single network on which corosync carries out its inter-host communications</param>
|
||||
@ -485,7 +511,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Destroys a Cluster object and the one remaining Cluster_host member
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -499,7 +525,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Destroys a Cluster object and the one remaining Cluster_host member
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -513,7 +539,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to create a Cluster from the entire pool
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_network">the single network on which corosync carries out its inter-host communications</param>
|
||||
@ -530,7 +556,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to create a Cluster from the entire pool
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_network">the single network on which corosync carries out its inter-host communications</param>
|
||||
@ -547,7 +573,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to force destroy the Cluster_host objects, and then destroy the Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -561,7 +587,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to force destroy the Cluster_host objects, and then destroy the Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -575,7 +601,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to destroy the Cluster_host objects for all hosts in the pool and then destroy the Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -589,7 +615,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to destroy the Cluster_host objects for all hosts in the pool and then destroy the Cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -603,7 +629,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Resynchronise the cluster_host objects across the pool. Creates them where they need creating and then plugs them
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -617,7 +643,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Resynchronise the cluster_host objects across the pool. Creates them where they need creating and then plugs them
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">The opaque_ref of the given cluster</param>
|
||||
@ -631,7 +657,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Return a list of all the Clusters known to the system.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
public static List<XenRef<Cluster>> get_all(Session session)
|
||||
@ -644,7 +670,6 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get all the Cluster Records at once, in a single XML RPC call
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
public static Dictionary<XenRef<Cluster>, Cluster> get_all_records(Session session)
|
||||
@ -657,6 +682,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Unique identifier/object reference
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
public virtual string uuid
|
||||
{
|
||||
@ -675,6 +701,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// A list of the cluster_host objects associated with the Cluster
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(XenRefListConverter<Cluster_host>))]
|
||||
public virtual List<XenRef<Cluster_host>> cluster_hosts
|
||||
@ -694,6 +721,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the single network on which corosync carries out its inter-host communications
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(XenRefConverter<Network>))]
|
||||
public virtual XenRef<Network> network
|
||||
@ -713,6 +741,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// The secret key used by xapi-clusterd when it talks to itself on other hosts
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
public virtual string cluster_token
|
||||
{
|
||||
@ -731,6 +760,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Simply the string 'corosync'. No other cluster stacks are currently supported
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
public virtual string cluster_stack
|
||||
{
|
||||
@ -785,6 +815,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// True if xapi is automatically joining new pool members to the cluster. This will be `true` in the first release
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
public virtual bool pool_auto_join
|
||||
{
|
||||
@ -803,6 +834,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// The corosync token timeout in ms
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
public virtual long token_timeout
|
||||
{
|
||||
@ -821,6 +853,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// The corosync token timeout coefficient in ms
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
public virtual long token_timeout_coefficient
|
||||
{
|
||||
@ -839,7 +872,9 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Contains read-only settings for the cluster, such as timeouts and other options. It can only be set at cluster create time
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringStringMapConverter))]
|
||||
public virtual Dictionary<string, string> cluster_config
|
||||
{
|
||||
get { return _cluster_config; }
|
||||
@ -857,7 +892,9 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Additional configuration
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringStringMapConverter))]
|
||||
public virtual Dictionary<string, string> other_config
|
||||
{
|
||||
get { return _other_config; }
|
||||
|
@ -42,7 +42,6 @@ namespace XenAPI
|
||||
{
|
||||
/// <summary>
|
||||
/// Cluster member metadata
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
public partial class Cluster_host : XenObject<Cluster_host>
|
||||
{
|
||||
@ -76,6 +75,10 @@ namespace XenAPI
|
||||
this.UpdateFromProxy(proxy);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates each field of this instance with the value of
|
||||
/// the corresponding field of a given Cluster_host.
|
||||
/// </summary>
|
||||
public override void UpdateFrom(Cluster_host update)
|
||||
{
|
||||
uuid = update.uuid;
|
||||
@ -89,7 +92,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Cluster_host proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
cluster = proxy.cluster == null ? null : XenRef<Cluster>.Create(proxy.cluster);
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
enabled = (bool)proxy.enabled;
|
||||
@ -105,7 +108,7 @@ namespace XenAPI
|
||||
result_.cluster = cluster ?? "";
|
||||
result_.host = host ?? "";
|
||||
result_.enabled = enabled;
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_cluster_host_operation(current_operations);
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
return result_;
|
||||
@ -113,17 +116,37 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Cluster_host from a Hashtable.
|
||||
/// Note that the fields not contained in the Hashtable
|
||||
/// will be created with their default values.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public Cluster_host(Hashtable table)
|
||||
public Cluster_host(Hashtable table) : this()
|
||||
{
|
||||
uuid = Marshalling.ParseString(table, "uuid");
|
||||
cluster = Marshalling.ParseRef<Cluster>(table, "cluster");
|
||||
host = Marshalling.ParseRef<Host>(table, "host");
|
||||
enabled = Marshalling.ParseBool(table, "enabled");
|
||||
allowed_operations = Helper.StringArrayToEnumList<cluster_host_operation>(Marshalling.ParseStringArray(table, "allowed_operations"));
|
||||
current_operations = Maps.convert_from_proxy_string_cluster_host_operation(Marshalling.ParseHashTable(table, "current_operations"));
|
||||
other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
|
||||
UpdateFrom(table);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a Hashtable with field-value pairs, it updates the fields of this Cluster_host
|
||||
/// with the values listed in the Hashtable. Note that only the fields contained
|
||||
/// in the Hashtable will be updated and the rest will remain the same.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public void UpdateFrom(Hashtable table)
|
||||
{
|
||||
if (table.ContainsKey("uuid"))
|
||||
uuid = Marshalling.ParseString(table, "uuid");
|
||||
if (table.ContainsKey("cluster"))
|
||||
cluster = Marshalling.ParseRef<Cluster>(table, "cluster");
|
||||
if (table.ContainsKey("host"))
|
||||
host = Marshalling.ParseRef<Host>(table, "host");
|
||||
if (table.ContainsKey("enabled"))
|
||||
enabled = Marshalling.ParseBool(table, "enabled");
|
||||
if (table.ContainsKey("allowed_operations"))
|
||||
allowed_operations = Helper.StringArrayToEnumList<cluster_host_operation>(Marshalling.ParseStringArray(table, "allowed_operations"));
|
||||
if (table.ContainsKey("current_operations"))
|
||||
current_operations = Maps.convert_from_proxy_string_cluster_host_operation(Marshalling.ParseHashTable(table, "current_operations"));
|
||||
if (table.ContainsKey("other_config"))
|
||||
other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
|
||||
}
|
||||
|
||||
public bool DeepEquals(Cluster_host other, bool ignoreCurrentOperations)
|
||||
@ -167,7 +190,7 @@ namespace XenAPI
|
||||
}
|
||||
/// <summary>
|
||||
/// Get a record containing the current state of the given Cluster_host.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -181,7 +204,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get a reference to the Cluster_host instance with the specified UUID.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_uuid">UUID of object to return</param>
|
||||
@ -195,7 +218,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the uuid field of the given Cluster_host.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -204,12 +227,12 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_host_get_uuid(session.opaque_ref, _cluster_host);
|
||||
else
|
||||
return (string)session.proxy.cluster_host_get_uuid(session.opaque_ref, _cluster_host ?? "").parse();
|
||||
return session.proxy.cluster_host_get_uuid(session.opaque_ref, _cluster_host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the cluster field of the given Cluster_host.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -223,7 +246,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the host field of the given Cluster_host.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -237,7 +260,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the enabled field of the given Cluster_host.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -251,7 +274,6 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the allowed_operations field of the given Cluster_host.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -265,7 +287,6 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the current_operations field of the given Cluster_host.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -279,7 +300,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the other_config field of the given Cluster_host.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -293,7 +314,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Add a new host to an existing cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">Cluster to join</param>
|
||||
@ -308,7 +329,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Add a new host to an existing cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster">Cluster to join</param>
|
||||
@ -323,7 +344,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Remove a host from an existing cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -337,7 +358,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Remove a host from an existing cluster.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -351,7 +372,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Enable cluster membership for a disabled cluster host.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -365,7 +386,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Enable cluster membership for a disabled cluster host.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -379,7 +400,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Remove a host from an existing cluster forcefully.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -393,7 +414,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Remove a host from an existing cluster forcefully.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -407,7 +428,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Disable cluster membership for an enabled cluster host.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -421,7 +442,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Disable cluster membership for an enabled cluster host.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_cluster_host">The opaque_ref of the given cluster_host</param>
|
||||
@ -435,7 +456,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Return a list of all the Cluster_hosts known to the system.
|
||||
/// First published in Unreleased.
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
public static List<XenRef<Cluster_host>> get_all(Session session)
|
||||
@ -448,7 +469,6 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get all the Cluster_host Records at once, in a single XML RPC call
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
public static Dictionary<XenRef<Cluster_host>, Cluster_host> get_all_records(Session session)
|
||||
@ -461,6 +481,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Unique identifier/object reference
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
public virtual string uuid
|
||||
{
|
||||
@ -479,6 +500,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the Cluster object
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(XenRefConverter<Cluster>))]
|
||||
public virtual XenRef<Cluster> cluster
|
||||
@ -498,6 +520,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the Host object
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(XenRefConverter<Host>))]
|
||||
public virtual XenRef<Host> host
|
||||
@ -517,6 +540,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Whether the cluster host believes that clustering should be enabled on this host
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
public virtual bool enabled
|
||||
{
|
||||
@ -571,7 +595,9 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Additional configuration
|
||||
/// Experimental. First published in Unreleased.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringStringMapConverter))]
|
||||
public virtual Dictionary<string, string> other_config
|
||||
{
|
||||
get { return _other_config; }
|
||||
|
@ -87,9 +87,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Console proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
protocol = proxy.protocol == null ? (console_protocol) 0 : (console_protocol)Helper.EnumParseDefault(typeof(console_protocol), (string)proxy.protocol);
|
||||
location = proxy.location == null ? null : (string)proxy.location;
|
||||
location = proxy.location == null ? null : proxy.location;
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -271,7 +271,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.console_get_uuid(session.opaque_ref, _console);
|
||||
else
|
||||
return (string)session.proxy.console_get_uuid(session.opaque_ref, _console ?? "").parse();
|
||||
return session.proxy.console_get_uuid(session.opaque_ref, _console ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -299,7 +299,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.console_get_location(session.opaque_ref, _console);
|
||||
else
|
||||
return (string)session.proxy.console_get_location(session.opaque_ref, _console ?? "").parse();
|
||||
return session.proxy.console_get_location(session.opaque_ref, _console ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -55,7 +55,7 @@ namespace XenAPI
|
||||
{
|
||||
JToken jToken = JToken.Load(reader);
|
||||
var str = jToken.ToObject<string>();
|
||||
return new XenRef<T>(str);
|
||||
return string.IsNullOrEmpty(str) ? null : new XenRef<T>(str);
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
@ -392,7 +392,20 @@ namespace XenAPI
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
JToken jToken = JToken.Load(reader);
|
||||
return DateTime.ParseExact(jToken.ToString(), DateFormats, CultureInfo.InvariantCulture, DateTimeStyles.None);
|
||||
var str = jToken.ToObject<string>();
|
||||
|
||||
try
|
||||
{
|
||||
return DateTime.ParseExact(str, DateFormats, CultureInfo.InvariantCulture, DateTimeStyles.None);
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
return DateTime.MinValue;
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
return DateTime.MinValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -402,7 +415,7 @@ namespace XenAPI
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
JToken jToken = JToken.Load(reader);
|
||||
return Helper.EnumParseDefault(objectType, jToken.ToString());
|
||||
return Helper.EnumParseDefault(objectType, jToken.ToObject<string>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Crashdump proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
VDI = proxy.VDI == null ? null : XenRef<VDI>.Create(proxy.VDI);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
@ -211,7 +211,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.crashdump_get_uuid(session.opaque_ref, _crashdump);
|
||||
else
|
||||
return (string)session.proxy.crashdump_get_uuid(session.opaque_ref, _crashdump ?? "").parse();
|
||||
return session.proxy.crashdump_get_uuid(session.opaque_ref, _crashdump ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -78,7 +78,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_DR_task proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
introduced_SRs = proxy.introduced_SRs == null ? null : XenRef<SR>.Create(proxy.introduced_SRs);
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ namespace XenAPI
|
||||
{
|
||||
Proxy_DR_task result_ = new Proxy_DR_task();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.introduced_SRs = (introduced_SRs != null) ? Helper.RefListToStringArray(introduced_SRs) : new string[] {};
|
||||
result_.introduced_SRs = introduced_SRs == null ? new string[] {} : Helper.RefListToStringArray(introduced_SRs);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.dr_task_get_uuid(session.opaque_ref, _dr_task);
|
||||
else
|
||||
return (string)session.proxy.dr_task_get_uuid(session.opaque_ref, _dr_task ?? "").parse();
|
||||
return session.proxy.dr_task_get_uuid(session.opaque_ref, _dr_task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -96,11 +96,11 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Data_source proxy)
|
||||
{
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
enabled = (bool)proxy.enabled;
|
||||
standard = (bool)proxy.standard;
|
||||
units = proxy.units == null ? null : (string)proxy.units;
|
||||
units = proxy.units == null ? null : proxy.units;
|
||||
min = Convert.ToDouble(proxy.min);
|
||||
max = Convert.ToDouble(proxy.max);
|
||||
value = Convert.ToDouble(proxy.value);
|
||||
|
@ -93,12 +93,12 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Feature proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
enabled = (bool)proxy.enabled;
|
||||
experimental = (bool)proxy.experimental;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.feature_get_uuid(session.opaque_ref, _feature);
|
||||
else
|
||||
return (string)session.proxy.feature_get_uuid(session.opaque_ref, _feature ?? "").parse();
|
||||
return session.proxy.feature_get_uuid(session.opaque_ref, _feature ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -254,7 +254,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.feature_get_name_label(session.opaque_ref, _feature);
|
||||
else
|
||||
return (string)session.proxy.feature_get_name_label(session.opaque_ref, _feature ?? "").parse();
|
||||
return session.proxy.feature_get_name_label(session.opaque_ref, _feature ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -268,7 +268,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.feature_get_name_description(session.opaque_ref, _feature);
|
||||
else
|
||||
return (string)session.proxy.feature_get_name_description(session.opaque_ref, _feature ?? "").parse();
|
||||
return session.proxy.feature_get_name_description(session.opaque_ref, _feature ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -310,7 +310,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.feature_get_version(session.opaque_ref, _feature);
|
||||
else
|
||||
return (string)session.proxy.feature_get_version(session.opaque_ref, _feature ?? "").parse();
|
||||
return session.proxy.feature_get_version(session.opaque_ref, _feature ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,9 +102,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_GPU_group proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
PGPUs = proxy.PGPUs == null ? null : XenRef<PGPU>.Create(proxy.PGPUs);
|
||||
VGPUs = proxy.VGPUs == null ? null : XenRef<VGPU>.Create(proxy.VGPUs);
|
||||
GPU_types = proxy.GPU_types == null ? new string[] {} : (string [])proxy.GPU_types;
|
||||
@ -120,13 +120,13 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.PGPUs = (PGPUs != null) ? Helper.RefListToStringArray(PGPUs) : new string[] {};
|
||||
result_.VGPUs = (VGPUs != null) ? Helper.RefListToStringArray(VGPUs) : new string[] {};
|
||||
result_.PGPUs = PGPUs == null ? new string[] {} : Helper.RefListToStringArray(PGPUs);
|
||||
result_.VGPUs = VGPUs == null ? new string[] {} : Helper.RefListToStringArray(VGPUs);
|
||||
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);
|
||||
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_.supported_VGPU_types = supported_VGPU_types == null ? new string[] {} : Helper.RefListToStringArray(supported_VGPU_types);
|
||||
result_.enabled_VGPU_types = enabled_VGPU_types == null ? new string[] {} : Helper.RefListToStringArray(enabled_VGPU_types);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.gpu_group_get_uuid(session.opaque_ref, _gpu_group);
|
||||
else
|
||||
return (string)session.proxy.gpu_group_get_uuid(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
return session.proxy.gpu_group_get_uuid(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -295,7 +295,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.gpu_group_get_name_label(session.opaque_ref, _gpu_group);
|
||||
else
|
||||
return (string)session.proxy.gpu_group_get_name_label(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
return session.proxy.gpu_group_get_name_label(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -309,7 +309,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.gpu_group_get_name_description(session.opaque_ref, _gpu_group);
|
||||
else
|
||||
return (string)session.proxy.gpu_group_get_name_description(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
return session.proxy.gpu_group_get_name_description(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -573,7 +573,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.gpu_group_get_remaining_capacity(session.opaque_ref, _gpu_group, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.gpu_group_get_remaining_capacity(session.opaque_ref, _gpu_group ?? "", _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.gpu_group_get_remaining_capacity(session.opaque_ref, _gpu_group ?? "", _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -105,7 +105,9 @@ namespace XenAPI
|
||||
long[] virtual_hardware_platform_versions,
|
||||
XenRef<VM> control_domain,
|
||||
List<XenRef<Pool_update>> updates_requiring_reboot,
|
||||
List<XenRef<Feature>> features)
|
||||
List<XenRef<Feature>> features,
|
||||
string iscsi_iqn,
|
||||
bool multipathing)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.name_label = name_label;
|
||||
@ -163,6 +165,8 @@ namespace XenAPI
|
||||
this.control_domain = control_domain;
|
||||
this.updates_requiring_reboot = updates_requiring_reboot;
|
||||
this.features = features;
|
||||
this.iscsi_iqn = iscsi_iqn;
|
||||
this.multipathing = multipathing;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -236,26 +240,28 @@ namespace XenAPI
|
||||
control_domain = update.control_domain;
|
||||
updates_requiring_reboot = update.updates_requiring_reboot;
|
||||
features = update.features;
|
||||
iscsi_iqn = update.iscsi_iqn;
|
||||
multipathing = update.multipathing;
|
||||
}
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
memory_overhead = proxy.memory_overhead == null ? 0 : long.Parse((string)proxy.memory_overhead);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
memory_overhead = proxy.memory_overhead == null ? 0 : long.Parse(proxy.memory_overhead);
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<host_allowed_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_host_allowed_operations(proxy.current_operations);
|
||||
API_version_major = proxy.API_version_major == null ? 0 : long.Parse((string)proxy.API_version_major);
|
||||
API_version_minor = proxy.API_version_minor == null ? 0 : long.Parse((string)proxy.API_version_minor);
|
||||
API_version_vendor = proxy.API_version_vendor == null ? null : (string)proxy.API_version_vendor;
|
||||
API_version_major = proxy.API_version_major == null ? 0 : long.Parse(proxy.API_version_major);
|
||||
API_version_minor = proxy.API_version_minor == null ? 0 : long.Parse(proxy.API_version_minor);
|
||||
API_version_vendor = proxy.API_version_vendor == null ? null : proxy.API_version_vendor;
|
||||
API_version_vendor_implementation = proxy.API_version_vendor_implementation == null ? null : Maps.convert_from_proxy_string_string(proxy.API_version_vendor_implementation);
|
||||
enabled = (bool)proxy.enabled;
|
||||
software_version = proxy.software_version == null ? null : Maps.convert_from_proxy_string_string(proxy.software_version);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
capabilities = proxy.capabilities == null ? new string[] {} : (string [])proxy.capabilities;
|
||||
cpu_configuration = proxy.cpu_configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.cpu_configuration);
|
||||
sched_policy = proxy.sched_policy == null ? null : (string)proxy.sched_policy;
|
||||
sched_policy = proxy.sched_policy == null ? null : proxy.sched_policy;
|
||||
supported_bootloaders = proxy.supported_bootloaders == null ? new string[] {} : (string [])proxy.supported_bootloaders;
|
||||
resident_VMs = proxy.resident_VMs == null ? null : XenRef<VM>.Create(proxy.resident_VMs);
|
||||
logging = proxy.logging == null ? null : Maps.convert_from_proxy_string_string(proxy.logging);
|
||||
@ -268,21 +274,21 @@ namespace XenAPI
|
||||
PBDs = proxy.PBDs == null ? null : XenRef<PBD>.Create(proxy.PBDs);
|
||||
host_CPUs = proxy.host_CPUs == null ? null : XenRef<Host_cpu>.Create(proxy.host_CPUs);
|
||||
cpu_info = proxy.cpu_info == null ? null : Maps.convert_from_proxy_string_string(proxy.cpu_info);
|
||||
hostname = proxy.hostname == null ? null : (string)proxy.hostname;
|
||||
address = proxy.address == null ? null : (string)proxy.address;
|
||||
hostname = proxy.hostname == null ? null : proxy.hostname;
|
||||
address = proxy.address == null ? null : proxy.address;
|
||||
metrics = proxy.metrics == null ? null : XenRef<Host_metrics>.Create(proxy.metrics);
|
||||
license_params = proxy.license_params == null ? null : Maps.convert_from_proxy_string_string(proxy.license_params);
|
||||
ha_statefiles = proxy.ha_statefiles == null ? new string[] {} : (string [])proxy.ha_statefiles;
|
||||
ha_network_peers = proxy.ha_network_peers == null ? new string[] {} : (string [])proxy.ha_network_peers;
|
||||
blobs = proxy.blobs == null ? null : Maps.convert_from_proxy_string_XenRefBlob(proxy.blobs);
|
||||
tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags;
|
||||
external_auth_type = proxy.external_auth_type == null ? null : (string)proxy.external_auth_type;
|
||||
external_auth_service_name = proxy.external_auth_service_name == null ? null : (string)proxy.external_auth_service_name;
|
||||
external_auth_type = proxy.external_auth_type == null ? null : proxy.external_auth_type;
|
||||
external_auth_service_name = proxy.external_auth_service_name == null ? null : proxy.external_auth_service_name;
|
||||
external_auth_configuration = proxy.external_auth_configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.external_auth_configuration);
|
||||
edition = proxy.edition == null ? null : (string)proxy.edition;
|
||||
edition = proxy.edition == null ? null : proxy.edition;
|
||||
license_server = proxy.license_server == null ? null : Maps.convert_from_proxy_string_string(proxy.license_server);
|
||||
bios_strings = proxy.bios_strings == null ? null : Maps.convert_from_proxy_string_string(proxy.bios_strings);
|
||||
power_on_mode = proxy.power_on_mode == null ? null : (string)proxy.power_on_mode;
|
||||
power_on_mode = proxy.power_on_mode == null ? null : proxy.power_on_mode;
|
||||
power_on_config = proxy.power_on_config == null ? null : Maps.convert_from_proxy_string_string(proxy.power_on_config);
|
||||
local_cache_sr = proxy.local_cache_sr == null ? null : XenRef<SR>.Create(proxy.local_cache_sr);
|
||||
chipset_info = proxy.chipset_info == null ? null : Maps.convert_from_proxy_string_string(proxy.chipset_info);
|
||||
@ -296,6 +302,8 @@ namespace XenAPI
|
||||
control_domain = proxy.control_domain == null ? null : XenRef<VM>.Create(proxy.control_domain);
|
||||
updates_requiring_reboot = proxy.updates_requiring_reboot == null ? null : XenRef<Pool_update>.Create(proxy.updates_requiring_reboot);
|
||||
features = proxy.features == null ? null : XenRef<Feature>.Create(proxy.features);
|
||||
iscsi_iqn = proxy.iscsi_iqn == null ? null : proxy.iscsi_iqn;
|
||||
multipathing = (bool)proxy.multipathing;
|
||||
}
|
||||
|
||||
public Proxy_Host ToProxy()
|
||||
@ -305,7 +313,7 @@ namespace XenAPI
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.memory_overhead = memory_overhead.ToString();
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_host_allowed_operations(current_operations);
|
||||
result_.API_version_major = API_version_major.ToString();
|
||||
result_.API_version_minor = API_version_minor.ToString();
|
||||
@ -318,16 +326,16 @@ namespace XenAPI
|
||||
result_.cpu_configuration = Maps.convert_to_proxy_string_string(cpu_configuration);
|
||||
result_.sched_policy = sched_policy ?? "";
|
||||
result_.supported_bootloaders = supported_bootloaders;
|
||||
result_.resident_VMs = (resident_VMs != null) ? Helper.RefListToStringArray(resident_VMs) : new string[] {};
|
||||
result_.resident_VMs = resident_VMs == null ? new string[] {} : Helper.RefListToStringArray(resident_VMs);
|
||||
result_.logging = Maps.convert_to_proxy_string_string(logging);
|
||||
result_.PIFs = (PIFs != null) ? Helper.RefListToStringArray(PIFs) : new string[] {};
|
||||
result_.PIFs = PIFs == null ? new string[] {} : Helper.RefListToStringArray(PIFs);
|
||||
result_.suspend_image_sr = suspend_image_sr ?? "";
|
||||
result_.crash_dump_sr = crash_dump_sr ?? "";
|
||||
result_.crashdumps = (crashdumps != null) ? Helper.RefListToStringArray(crashdumps) : new string[] {};
|
||||
result_.patches = (patches != null) ? Helper.RefListToStringArray(patches) : new string[] {};
|
||||
result_.updates = (updates != null) ? Helper.RefListToStringArray(updates) : new string[] {};
|
||||
result_.PBDs = (PBDs != null) ? Helper.RefListToStringArray(PBDs) : new string[] {};
|
||||
result_.host_CPUs = (host_CPUs != null) ? Helper.RefListToStringArray(host_CPUs) : new string[] {};
|
||||
result_.crashdumps = crashdumps == null ? new string[] {} : Helper.RefListToStringArray(crashdumps);
|
||||
result_.patches = patches == null ? new string[] {} : Helper.RefListToStringArray(patches);
|
||||
result_.updates = updates == null ? new string[] {} : Helper.RefListToStringArray(updates);
|
||||
result_.PBDs = PBDs == null ? new string[] {} : Helper.RefListToStringArray(PBDs);
|
||||
result_.host_CPUs = host_CPUs == null ? new string[] {} : Helper.RefListToStringArray(host_CPUs);
|
||||
result_.cpu_info = Maps.convert_to_proxy_string_string(cpu_info);
|
||||
result_.hostname = hostname ?? "";
|
||||
result_.address = address ?? "";
|
||||
@ -347,16 +355,18 @@ namespace XenAPI
|
||||
result_.power_on_config = Maps.convert_to_proxy_string_string(power_on_config);
|
||||
result_.local_cache_sr = local_cache_sr ?? "";
|
||||
result_.chipset_info = Maps.convert_to_proxy_string_string(chipset_info);
|
||||
result_.PCIs = (PCIs != null) ? Helper.RefListToStringArray(PCIs) : new string[] {};
|
||||
result_.PGPUs = (PGPUs != null) ? Helper.RefListToStringArray(PGPUs) : new string[] {};
|
||||
result_.PUSBs = (PUSBs != null) ? Helper.RefListToStringArray(PUSBs) : new string[] {};
|
||||
result_.PCIs = PCIs == null ? new string[] {} : Helper.RefListToStringArray(PCIs);
|
||||
result_.PGPUs = PGPUs == null ? new string[] {} : Helper.RefListToStringArray(PGPUs);
|
||||
result_.PUSBs = PUSBs == null ? new string[] {} : Helper.RefListToStringArray(PUSBs);
|
||||
result_.ssl_legacy = ssl_legacy;
|
||||
result_.guest_VCPUs_params = Maps.convert_to_proxy_string_string(guest_VCPUs_params);
|
||||
result_.display = host_display_helper.ToString(display);
|
||||
result_.virtual_hardware_platform_versions = (virtual_hardware_platform_versions != null) ? Helper.LongArrayToStringArray(virtual_hardware_platform_versions) : new string[] {};
|
||||
result_.virtual_hardware_platform_versions = virtual_hardware_platform_versions == null ? new string[] {} : Helper.LongArrayToStringArray(virtual_hardware_platform_versions);
|
||||
result_.control_domain = control_domain ?? "";
|
||||
result_.updates_requiring_reboot = (updates_requiring_reboot != null) ? Helper.RefListToStringArray(updates_requiring_reboot) : new string[] {};
|
||||
result_.features = (features != null) ? Helper.RefListToStringArray(features) : new string[] {};
|
||||
result_.updates_requiring_reboot = updates_requiring_reboot == null ? new string[] {} : Helper.RefListToStringArray(updates_requiring_reboot);
|
||||
result_.features = features == null ? new string[] {} : Helper.RefListToStringArray(features);
|
||||
result_.iscsi_iqn = iscsi_iqn ?? "";
|
||||
result_.multipathing = multipathing;
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -491,6 +501,10 @@ namespace XenAPI
|
||||
updates_requiring_reboot = Marshalling.ParseSetRef<Pool_update>(table, "updates_requiring_reboot");
|
||||
if (table.ContainsKey("features"))
|
||||
features = Marshalling.ParseSetRef<Feature>(table, "features");
|
||||
if (table.ContainsKey("iscsi_iqn"))
|
||||
iscsi_iqn = Marshalling.ParseString(table, "iscsi_iqn");
|
||||
if (table.ContainsKey("multipathing"))
|
||||
multipathing = Marshalling.ParseBool(table, "multipathing");
|
||||
}
|
||||
|
||||
public bool DeepEquals(Host other, bool ignoreCurrentOperations)
|
||||
@ -557,7 +571,9 @@ namespace XenAPI
|
||||
Helper.AreEqual2(this._virtual_hardware_platform_versions, other._virtual_hardware_platform_versions) &&
|
||||
Helper.AreEqual2(this._control_domain, other._control_domain) &&
|
||||
Helper.AreEqual2(this._updates_requiring_reboot, other._updates_requiring_reboot) &&
|
||||
Helper.AreEqual2(this._features, other._features);
|
||||
Helper.AreEqual2(this._features, other._features) &&
|
||||
Helper.AreEqual2(this._iscsi_iqn, other._iscsi_iqn) &&
|
||||
Helper.AreEqual2(this._multipathing, other._multipathing);
|
||||
}
|
||||
|
||||
internal static List<Host> ProxyArrayToObjectList(Proxy_Host[] input)
|
||||
@ -630,6 +646,14 @@ namespace XenAPI
|
||||
{
|
||||
Host.set_ssl_legacy(session, opaqueRef, _ssl_legacy);
|
||||
}
|
||||
if (!Helper.AreEqual2(_iscsi_iqn, server._iscsi_iqn))
|
||||
{
|
||||
Host.set_iscsi_iqn(session, opaqueRef, _iscsi_iqn);
|
||||
}
|
||||
if (!Helper.AreEqual2(_multipathing, server._multipathing))
|
||||
{
|
||||
Host.set_multipathing(session, opaqueRef, _multipathing);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@ -687,7 +711,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_uuid(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_uuid(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_uuid(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -701,7 +725,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_name_label(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_name_label(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_name_label(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -715,7 +739,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_name_description(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_name_description(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_name_description(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -729,7 +753,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_memory_overhead(session.opaque_ref, _host);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_get_memory_overhead(session.opaque_ref, _host ?? "").parse());
|
||||
return long.Parse(session.proxy.host_get_memory_overhead(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -771,7 +795,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_api_version_major(session.opaque_ref, _host);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_get_api_version_major(session.opaque_ref, _host ?? "").parse());
|
||||
return long.Parse(session.proxy.host_get_api_version_major(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -785,7 +809,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_api_version_minor(session.opaque_ref, _host);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_get_api_version_minor(session.opaque_ref, _host ?? "").parse());
|
||||
return long.Parse(session.proxy.host_get_api_version_minor(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -799,7 +823,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_api_version_vendor(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_api_version_vendor(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_api_version_vendor(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -897,7 +921,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_sched_policy(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_sched_policy(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_sched_policy(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1081,7 +1105,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_hostname(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_hostname(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_hostname(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1095,7 +1119,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_address(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_address(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_address(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1193,7 +1217,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_external_auth_type(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_external_auth_type(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_external_auth_type(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1207,7 +1231,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_external_auth_service_name(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_external_auth_service_name(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_external_auth_service_name(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1235,7 +1259,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_edition(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_edition(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_edition(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1277,7 +1301,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_power_on_mode(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_power_on_mode(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_power_on_mode(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1462,6 +1486,34 @@ namespace XenAPI
|
||||
return XenRef<Feature>.Create(session.proxy.host_get_features(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the iscsi_iqn field of the given host.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The opaque_ref of the given host</param>
|
||||
public static string get_iscsi_iqn(Session session, string _host)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_iscsi_iqn(session.opaque_ref, _host);
|
||||
else
|
||||
return session.proxy.host_get_iscsi_iqn(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the multipathing field of the given host.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The opaque_ref of the given host</param>
|
||||
public static bool get_multipathing(Session session, string _host)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_multipathing(session.opaque_ref, _host);
|
||||
else
|
||||
return (bool)session.proxy.host_get_multipathing(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the name/label field of the given host.
|
||||
/// First published in XenServer 4.0.
|
||||
@ -1919,7 +1971,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_dmesg(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_dmesg(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_dmesg(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1947,7 +1999,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_dmesg_clear(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_dmesg_clear(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_dmesg_clear(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1975,7 +2027,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_log(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_log(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_log(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2522,7 +2574,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_system_status_capabilities(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_system_status_capabilities(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_system_status_capabilities(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2592,7 +2644,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_compute_free_memory(session.opaque_ref, _host);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_compute_free_memory(session.opaque_ref, _host ?? "").parse());
|
||||
return long.Parse(session.proxy.host_compute_free_memory(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2620,7 +2672,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_compute_memory_overhead(session.opaque_ref, _host);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_compute_memory_overhead(session.opaque_ref, _host ?? "").parse());
|
||||
return long.Parse(session.proxy.host_compute_memory_overhead(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2746,7 +2798,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_call_plugin(session.opaque_ref, _host, _plugin, _fn, _args);
|
||||
else
|
||||
return (string)session.proxy.host_call_plugin(session.opaque_ref, _host ?? "", _plugin ?? "", _fn ?? "", Maps.convert_to_proxy_string_string(_args)).parse();
|
||||
return session.proxy.host_call_plugin(session.opaque_ref, _host ?? "", _plugin ?? "", _fn ?? "", Maps.convert_to_proxy_string_string(_args)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2808,7 +2860,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_call_extension(session.opaque_ref, _host, _call);
|
||||
else
|
||||
return (string)session.proxy.host_call_extension(session.opaque_ref, _host ?? "", _call ?? "").parse();
|
||||
return session.proxy.host_call_extension(session.opaque_ref, _host ?? "", _call ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2910,7 +2962,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_server_certificate(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_server_certificate(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_server_certificate(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -3226,6 +3278,66 @@ namespace XenAPI
|
||||
return XenRef<Task>.Create(session.proxy.async_host_set_ssl_legacy(session.opaque_ref, _host ?? "", _value).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the initiator IQN for the host
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The opaque_ref of the given host</param>
|
||||
/// <param name="_value">The value to which the IQN should be set</param>
|
||||
public static void set_iscsi_iqn(Session session, string _host, string _value)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.host_set_iscsi_iqn(session.opaque_ref, _host, _value);
|
||||
else
|
||||
session.proxy.host_set_iscsi_iqn(session.opaque_ref, _host ?? "", _value ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the initiator IQN for the host
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The opaque_ref of the given host</param>
|
||||
/// <param name="_value">The value to which the IQN should be set</param>
|
||||
public static XenRef<Task> async_set_iscsi_iqn(Session session, string _host, string _value)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_host_set_iscsi_iqn(session.opaque_ref, _host, _value);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_host_set_iscsi_iqn(session.opaque_ref, _host ?? "", _value ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies whether multipathing is enabled
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The opaque_ref of the given host</param>
|
||||
/// <param name="_value">Whether multipathing should be enabled</param>
|
||||
public static void set_multipathing(Session session, string _host, bool _value)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.host_set_multipathing(session.opaque_ref, _host, _value);
|
||||
else
|
||||
session.proxy.host_set_multipathing(session.opaque_ref, _host ?? "", _value).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies whether multipathing is enabled
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The opaque_ref of the given host</param>
|
||||
/// <param name="_value">Whether multipathing should be enabled</param>
|
||||
public static XenRef<Task> async_set_multipathing(Session session, string _host, bool _value)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_host_set_multipathing(session.opaque_ref, _host, _value);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_host_set_multipathing(session.opaque_ref, _host ?? "", _value).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return a list of all the hosts known to the system.
|
||||
/// First published in XenServer 4.0.
|
||||
@ -4317,5 +4429,43 @@ namespace XenAPI
|
||||
}
|
||||
}
|
||||
private List<XenRef<Feature>> _features = new List<XenRef<Feature>>() {};
|
||||
|
||||
/// <summary>
|
||||
/// The initiator IQN for the host
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
public virtual string iscsi_iqn
|
||||
{
|
||||
get { return _iscsi_iqn; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _iscsi_iqn))
|
||||
{
|
||||
_iscsi_iqn = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("iscsi_iqn");
|
||||
}
|
||||
}
|
||||
}
|
||||
private string _iscsi_iqn = "";
|
||||
|
||||
/// <summary>
|
||||
/// Specifies whether multipathing is enabled
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
public virtual bool multipathing
|
||||
{
|
||||
get { return _multipathing; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _multipathing))
|
||||
{
|
||||
_multipathing = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("multipathing");
|
||||
}
|
||||
}
|
||||
}
|
||||
private bool _multipathing = false;
|
||||
}
|
||||
}
|
||||
|
@ -111,17 +111,17 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host_cpu proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
number = proxy.number == null ? 0 : long.Parse((string)proxy.number);
|
||||
vendor = proxy.vendor == null ? null : (string)proxy.vendor;
|
||||
speed = proxy.speed == null ? 0 : long.Parse((string)proxy.speed);
|
||||
modelname = proxy.modelname == null ? null : (string)proxy.modelname;
|
||||
family = proxy.family == null ? 0 : long.Parse((string)proxy.family);
|
||||
model = proxy.model == null ? 0 : long.Parse((string)proxy.model);
|
||||
stepping = proxy.stepping == null ? null : (string)proxy.stepping;
|
||||
flags = proxy.flags == null ? null : (string)proxy.flags;
|
||||
features = proxy.features == null ? null : (string)proxy.features;
|
||||
number = proxy.number == null ? 0 : long.Parse(proxy.number);
|
||||
vendor = proxy.vendor == null ? null : proxy.vendor;
|
||||
speed = proxy.speed == null ? 0 : long.Parse(proxy.speed);
|
||||
modelname = proxy.modelname == null ? null : proxy.modelname;
|
||||
family = proxy.family == null ? 0 : long.Parse(proxy.family);
|
||||
model = proxy.model == null ? 0 : long.Parse(proxy.model);
|
||||
stepping = proxy.stepping == null ? null : proxy.stepping;
|
||||
flags = proxy.flags == null ? null : proxy.flags;
|
||||
features = proxy.features == null ? null : proxy.features;
|
||||
utilisation = Convert.ToDouble(proxy.utilisation);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -283,7 +283,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_uuid(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_uuid(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_uuid(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -311,7 +311,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_number(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_cpu_get_number(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
return long.Parse(session.proxy.host_cpu_get_number(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -325,7 +325,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_vendor(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_vendor(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_vendor(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -339,7 +339,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_speed(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_cpu_get_speed(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
return long.Parse(session.proxy.host_cpu_get_speed(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -353,7 +353,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_modelname(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_modelname(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_modelname(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -367,7 +367,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_family(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_cpu_get_family(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
return long.Parse(session.proxy.host_cpu_get_family(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -381,7 +381,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_model(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_cpu_get_model(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
return long.Parse(session.proxy.host_cpu_get_model(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -395,7 +395,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_stepping(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_stepping(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_stepping(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -409,7 +409,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_flags(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_flags(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_flags(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -423,7 +423,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_features(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_features(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_features(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,10 +87,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host_crashdump proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
timestamp = proxy.timestamp;
|
||||
size = proxy.size == null ? 0 : long.Parse((string)proxy.size);
|
||||
size = proxy.size == null ? 0 : long.Parse(proxy.size);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_crashdump_get_uuid(session.opaque_ref, _host_crashdump);
|
||||
else
|
||||
return (string)session.proxy.host_crashdump_get_uuid(session.opaque_ref, _host_crashdump ?? "").parse();
|
||||
return session.proxy.host_crashdump_get_uuid(session.opaque_ref, _host_crashdump ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -257,7 +257,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_crashdump_get_size(session.opaque_ref, _host_crashdump);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_crashdump_get_size(session.opaque_ref, _host_crashdump ?? "").parse());
|
||||
return long.Parse(session.proxy.host_crashdump_get_size(session.opaque_ref, _host_crashdump ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -90,9 +90,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
memory_total = proxy.memory_total == null ? 0 : long.Parse((string)proxy.memory_total);
|
||||
memory_free = proxy.memory_free == null ? 0 : long.Parse((string)proxy.memory_free);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
memory_total = proxy.memory_total == null ? 0 : long.Parse(proxy.memory_total);
|
||||
memory_free = proxy.memory_free == null ? 0 : long.Parse(proxy.memory_free);
|
||||
live = (bool)proxy.live;
|
||||
last_updated = proxy.last_updated;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
@ -223,7 +223,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_metrics_get_uuid(session.opaque_ref, _host_metrics);
|
||||
else
|
||||
return (string)session.proxy.host_metrics_get_uuid(session.opaque_ref, _host_metrics ?? "").parse();
|
||||
return session.proxy.host_metrics_get_uuid(session.opaque_ref, _host_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -237,7 +237,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_metrics_get_memory_total(session.opaque_ref, _host_metrics);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_metrics_get_memory_total(session.opaque_ref, _host_metrics ?? "").parse());
|
||||
return long.Parse(session.proxy.host_metrics_get_memory_total(session.opaque_ref, _host_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -253,7 +253,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_metrics_get_memory_free(session.opaque_ref, _host_metrics);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_metrics_get_memory_free(session.opaque_ref, _host_metrics ?? "").parse());
|
||||
return long.Parse(session.proxy.host_metrics_get_memory_free(session.opaque_ref, _host_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,14 +102,14 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host_patch proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
applied = (bool)proxy.applied;
|
||||
timestamp_applied = proxy.timestamp_applied;
|
||||
size = proxy.size == null ? 0 : long.Parse((string)proxy.size);
|
||||
size = proxy.size == null ? 0 : long.Parse(proxy.size);
|
||||
pool_patch = proxy.pool_patch == null ? null : XenRef<Pool_patch>.Create(proxy.pool_patch);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -275,7 +275,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_get_uuid(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return (string)session.proxy.host_patch_get_uuid(session.opaque_ref, _host_patch ?? "").parse();
|
||||
return session.proxy.host_patch_get_uuid(session.opaque_ref, _host_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -289,7 +289,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_get_name_label(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return (string)session.proxy.host_patch_get_name_label(session.opaque_ref, _host_patch ?? "").parse();
|
||||
return session.proxy.host_patch_get_name_label(session.opaque_ref, _host_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -303,7 +303,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_get_name_description(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return (string)session.proxy.host_patch_get_name_description(session.opaque_ref, _host_patch ?? "").parse();
|
||||
return session.proxy.host_patch_get_name_description(session.opaque_ref, _host_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -317,7 +317,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_get_version(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return (string)session.proxy.host_patch_get_version(session.opaque_ref, _host_patch ?? "").parse();
|
||||
return session.proxy.host_patch_get_version(session.opaque_ref, _host_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -373,7 +373,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_get_size(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_patch_get_size(session.opaque_ref, _host_patch ?? "").parse());
|
||||
return long.Parse(session.proxy.host_patch_get_size(session.opaque_ref, _host_patch ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -495,7 +495,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_apply(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return (string)session.proxy.host_patch_apply(session.opaque_ref, _host_patch ?? "").parse();
|
||||
return session.proxy.host_patch_apply(session.opaque_ref, _host_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -114,7 +114,7 @@ namespace XenAPI
|
||||
|
||||
internal abstract class JsonResponse<T>
|
||||
{
|
||||
[JsonProperty("id", Required = Required.AllowNull )] public int Id = 0;
|
||||
[JsonProperty("id", Required = Required.AllowNull)] public int Id = 0;
|
||||
|
||||
[JsonProperty("result", Required = Required.Default)] public T Result = default(T);
|
||||
|
||||
@ -126,7 +126,7 @@ namespace XenAPI
|
||||
|
||||
internal class JsonResponseV1<T> : JsonResponse<T>
|
||||
{
|
||||
[JsonProperty("error", Required = Required.AllowNull)] public object Error = null;
|
||||
[JsonProperty("error", Required = Required.AllowNull)] public JToken Error = null;
|
||||
}
|
||||
|
||||
internal class JsonResponseV2<T> : JsonResponse<T>
|
||||
@ -211,8 +211,9 @@ namespace XenAPI
|
||||
// for performance reasons it's preferable to deserialize directly
|
||||
// from the Stream rather than allocating strings inbetween
|
||||
// therefore the latter will be done only in DEBUG mode
|
||||
|
||||
#if DEBUG
|
||||
var settings = new JsonSerializerSettings {Formatting = Formatting.Indented, Converters = serializer.Converters};
|
||||
var settings = CreateSettings(serializer.Converters);
|
||||
#endif
|
||||
|
||||
using (var str = webRequest.GetRequestStream())
|
||||
@ -267,12 +268,35 @@ namespace XenAPI
|
||||
var res1 = (JsonResponseV1<T>)serializer.Deserialize(responseReader, typeof(JsonResponseV1<T>));
|
||||
#endif
|
||||
if (res1.Error != null)
|
||||
throw new Failure(res1.Error as string[]);
|
||||
{
|
||||
var errorArray = res1.Error.ToObject<string[]>();
|
||||
if (errorArray != null)
|
||||
throw new Failure(errorArray);
|
||||
}
|
||||
return res1.Result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private JsonSerializerSettings CreateSettings(IList<JsonConverter> converters)
|
||||
{
|
||||
return new JsonSerializerSettings
|
||||
{
|
||||
#if DEBUG
|
||||
Formatting = Formatting.Indented,
|
||||
#endif
|
||||
Converters = converters,
|
||||
DateParseHandling = DateParseHandling.None,
|
||||
NullValueHandling = NullValueHandling.Ignore
|
||||
};
|
||||
}
|
||||
|
||||
private JsonSerializer CreateSerializer(IList<JsonConverter> converters)
|
||||
{
|
||||
var settings = CreateSettings(converters);
|
||||
return JsonSerializer.Create(settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -75,7 +75,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_LVHD proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
}
|
||||
|
||||
public Proxy_LVHD ToProxy()
|
||||
@ -178,7 +178,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.lvhd_get_uuid(session.opaque_ref, _lvhd);
|
||||
else
|
||||
return (string)session.proxy.lvhd_get_uuid(session.opaque_ref, _lvhd ?? "").parse();
|
||||
return session.proxy.lvhd_get_uuid(session.opaque_ref, _lvhd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -195,7 +195,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.lvhd_enable_thin_provisioning(session.opaque_ref, _host, _sr, _initial_allocation, _allocation_quantum);
|
||||
else
|
||||
return (string)session.proxy.lvhd_enable_thin_provisioning(session.opaque_ref, _host ?? "", _sr ?? "", _initial_allocation.ToString(), _allocation_quantum.ToString()).parse();
|
||||
return session.proxy.lvhd_enable_thin_provisioning(session.opaque_ref, _host ?? "", _sr ?? "", _initial_allocation.ToString(), _allocation_quantum.ToString()).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -255,13 +255,13 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Message proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name = proxy.name == null ? null : (string)proxy.name;
|
||||
priority = proxy.priority == null ? 0 : long.Parse((string)proxy.priority);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name = proxy.name == null ? null : proxy.name;
|
||||
priority = proxy.priority == null ? 0 : long.Parse(proxy.priority);
|
||||
cls = proxy.cls == null ? (cls) 0 : (cls)Helper.EnumParseDefault(typeof(cls), (string)proxy.cls);
|
||||
obj_uuid = proxy.obj_uuid == null ? null : (string)proxy.obj_uuid;
|
||||
obj_uuid = proxy.obj_uuid == null ? null : proxy.obj_uuid;
|
||||
timestamp = proxy.timestamp;
|
||||
body = proxy.body == null ? null : (string)proxy.body;
|
||||
body = proxy.body == null ? null : proxy.body;
|
||||
}
|
||||
|
||||
public Proxy_Message ToProxy()
|
||||
|
@ -120,16 +120,16 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Network proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<network_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_network_operations(proxy.current_operations);
|
||||
VIFs = proxy.VIFs == null ? null : XenRef<VIF>.Create(proxy.VIFs);
|
||||
PIFs = proxy.PIFs == null ? null : XenRef<PIF>.Create(proxy.PIFs);
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse((string)proxy.MTU);
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse(proxy.MTU);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
bridge = proxy.bridge == null ? null : (string)proxy.bridge;
|
||||
bridge = proxy.bridge == null ? null : proxy.bridge;
|
||||
managed = (bool)proxy.managed;
|
||||
blobs = proxy.blobs == null ? null : Maps.convert_from_proxy_string_XenRefBlob(proxy.blobs);
|
||||
tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags;
|
||||
@ -144,10 +144,10 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_network_operations(current_operations);
|
||||
result_.VIFs = (VIFs != null) ? Helper.RefListToStringArray(VIFs) : new string[] {};
|
||||
result_.PIFs = (PIFs != null) ? Helper.RefListToStringArray(PIFs) : new string[] {};
|
||||
result_.VIFs = VIFs == null ? new string[] {} : Helper.RefListToStringArray(VIFs);
|
||||
result_.PIFs = PIFs == null ? new string[] {} : Helper.RefListToStringArray(PIFs);
|
||||
result_.MTU = MTU.ToString();
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.bridge = bridge ?? "";
|
||||
@ -156,7 +156,7 @@ namespace XenAPI
|
||||
result_.tags = tags;
|
||||
result_.default_locking_mode = network_default_locking_mode_helper.ToString(default_locking_mode);
|
||||
result_.assigned_ips = Maps.convert_to_proxy_XenRefVIF_string(assigned_ips);
|
||||
result_.purpose = (purpose != null) ? Helper.ObjectListToStringArray(purpose) : new string[] {};
|
||||
result_.purpose = purpose == null ? new string[] {} : Helper.ObjectListToStringArray(purpose);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.network_get_uuid(session.opaque_ref, _network);
|
||||
else
|
||||
return (string)session.proxy.network_get_uuid(session.opaque_ref, _network ?? "").parse();
|
||||
return session.proxy.network_get_uuid(session.opaque_ref, _network ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -405,7 +405,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.network_get_name_label(session.opaque_ref, _network);
|
||||
else
|
||||
return (string)session.proxy.network_get_name_label(session.opaque_ref, _network ?? "").parse();
|
||||
return session.proxy.network_get_name_label(session.opaque_ref, _network ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -419,7 +419,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.network_get_name_description(session.opaque_ref, _network);
|
||||
else
|
||||
return (string)session.proxy.network_get_name_description(session.opaque_ref, _network ?? "").parse();
|
||||
return session.proxy.network_get_name_description(session.opaque_ref, _network ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -489,7 +489,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.network_get_mtu(session.opaque_ref, _network);
|
||||
else
|
||||
return long.Parse((string)session.proxy.network_get_mtu(session.opaque_ref, _network ?? "").parse());
|
||||
return long.Parse(session.proxy.network_get_mtu(session.opaque_ref, _network ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -517,7 +517,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.network_get_bridge(session.opaque_ref, _network);
|
||||
else
|
||||
return (string)session.proxy.network_get_bridge(session.opaque_ref, _network ?? "").parse();
|
||||
return session.proxy.network_get_bridge(session.opaque_ref, _network ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -90,7 +90,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PBD proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
SR = proxy.SR == null ? null : XenRef<SR>.Create(proxy.SR);
|
||||
device_config = proxy.device_config == null ? null : Maps.convert_from_proxy_string_string(proxy.device_config);
|
||||
@ -283,7 +283,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pbd_get_uuid(session.opaque_ref, _pbd);
|
||||
else
|
||||
return (string)session.proxy.pbd_get_uuid(session.opaque_ref, _pbd ?? "").parse();
|
||||
return session.proxy.pbd_get_uuid(session.opaque_ref, _pbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,16 +102,16 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PCI proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
class_name = proxy.class_name == null ? null : (string)proxy.class_name;
|
||||
vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name;
|
||||
device_name = proxy.device_name == null ? null : (string)proxy.device_name;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
class_name = proxy.class_name == null ? null : proxy.class_name;
|
||||
vendor_name = proxy.vendor_name == null ? null : proxy.vendor_name;
|
||||
device_name = proxy.device_name == null ? null : proxy.device_name;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
pci_id = proxy.pci_id == null ? null : (string)proxy.pci_id;
|
||||
pci_id = proxy.pci_id == null ? null : proxy.pci_id;
|
||||
dependencies = proxy.dependencies == null ? null : XenRef<PCI>.Create(proxy.dependencies);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
subsystem_vendor_name = proxy.subsystem_vendor_name == null ? null : (string)proxy.subsystem_vendor_name;
|
||||
subsystem_device_name = proxy.subsystem_device_name == null ? null : (string)proxy.subsystem_device_name;
|
||||
subsystem_vendor_name = proxy.subsystem_vendor_name == null ? null : proxy.subsystem_vendor_name;
|
||||
subsystem_device_name = proxy.subsystem_device_name == null ? null : proxy.subsystem_device_name;
|
||||
}
|
||||
|
||||
public Proxy_PCI ToProxy()
|
||||
@ -123,7 +123,7 @@ namespace XenAPI
|
||||
result_.device_name = device_name ?? "";
|
||||
result_.host = host ?? "";
|
||||
result_.pci_id = pci_id ?? "";
|
||||
result_.dependencies = (dependencies != null) ? Helper.RefListToStringArray(dependencies) : new string[] {};
|
||||
result_.dependencies = dependencies == null ? new string[] {} : Helper.RefListToStringArray(dependencies);
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.subsystem_vendor_name = subsystem_vendor_name ?? "";
|
||||
result_.subsystem_device_name = subsystem_device_name ?? "";
|
||||
@ -255,7 +255,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_uuid(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_uuid(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_uuid(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -269,7 +269,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_class_name(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_class_name(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_class_name(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -283,7 +283,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_vendor_name(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_vendor_name(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_vendor_name(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -297,7 +297,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_device_name(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_device_name(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_device_name(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -325,7 +325,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_pci_id(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_pci_id(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_pci_id(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -367,7 +367,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_subsystem_vendor_name(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_subsystem_vendor_name(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_subsystem_vendor_name(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -381,7 +381,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_subsystem_device_name(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_subsystem_device_name(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_subsystem_device_name(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,7 +108,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PGPU proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
PCI = proxy.PCI == null ? null : XenRef<PCI>.Create(proxy.PCI);
|
||||
GPU_group = proxy.GPU_group == null ? null : XenRef<GPU_group>.Create(proxy.GPU_group);
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
@ -130,9 +130,9 @@ namespace XenAPI
|
||||
result_.GPU_group = GPU_group ?? "";
|
||||
result_.host = 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[] {};
|
||||
result_.supported_VGPU_types = supported_VGPU_types == null ? new string[] {} : Helper.RefListToStringArray(supported_VGPU_types);
|
||||
result_.enabled_VGPU_types = enabled_VGPU_types == null ? new string[] {} : Helper.RefListToStringArray(enabled_VGPU_types);
|
||||
result_.resident_VGPUs = resident_VGPUs == null ? new string[] {} : Helper.RefListToStringArray(resident_VGPUs);
|
||||
result_.supported_VGPU_max_capacities = Maps.convert_to_proxy_XenRefVGPU_type_long(supported_VGPU_max_capacities);
|
||||
result_.dom0_access = pgpu_dom0_access_helper.ToString(dom0_access);
|
||||
result_.is_system_display_device = is_system_display_device;
|
||||
@ -275,7 +275,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pgpu_get_uuid(session.opaque_ref, _pgpu);
|
||||
else
|
||||
return (string)session.proxy.pgpu_get_uuid(session.opaque_ref, _pgpu ?? "").parse();
|
||||
return session.proxy.pgpu_get_uuid(session.opaque_ref, _pgpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -550,7 +550,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu, _value);
|
||||
else
|
||||
session.proxy.pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu ?? "", (_value != null) ? Helper.RefListToStringArray(_value) : new string[] {}).parse();
|
||||
session.proxy.pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu ?? "", _value == null ? new string[] {} : Helper.RefListToStringArray(_value)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -565,7 +565,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu, _value);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu ?? "", (_value != null) ? Helper.RefListToStringArray(_value) : new string[] {}).parse());
|
||||
return XenRef<Task>.Create(session.proxy.async_pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu ?? "", _value == null ? new string[] {} : Helper.RefListToStringArray(_value)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -610,7 +610,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pgpu_get_remaining_capacity(session.opaque_ref, _pgpu, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pgpu_get_remaining_capacity(session.opaque_ref, _pgpu ?? "", _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.pgpu_get_remaining_capacity(session.opaque_ref, _pgpu ?? "", _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -168,21 +168,21 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PIF proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
device = proxy.device == null ? null : (string)proxy.device;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
device = proxy.device == null ? null : proxy.device;
|
||||
network = proxy.network == null ? null : XenRef<Network>.Create(proxy.network);
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
MAC = proxy.MAC == null ? null : (string)proxy.MAC;
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse((string)proxy.MTU);
|
||||
VLAN = proxy.VLAN == null ? 0 : long.Parse((string)proxy.VLAN);
|
||||
MAC = proxy.MAC == null ? null : proxy.MAC;
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse(proxy.MTU);
|
||||
VLAN = proxy.VLAN == null ? 0 : long.Parse(proxy.VLAN);
|
||||
metrics = proxy.metrics == null ? null : XenRef<PIF_metrics>.Create(proxy.metrics);
|
||||
physical = (bool)proxy.physical;
|
||||
currently_attached = (bool)proxy.currently_attached;
|
||||
ip_configuration_mode = proxy.ip_configuration_mode == null ? (ip_configuration_mode) 0 : (ip_configuration_mode)Helper.EnumParseDefault(typeof(ip_configuration_mode), (string)proxy.ip_configuration_mode);
|
||||
IP = proxy.IP == null ? null : (string)proxy.IP;
|
||||
netmask = proxy.netmask == null ? null : (string)proxy.netmask;
|
||||
gateway = proxy.gateway == null ? null : (string)proxy.gateway;
|
||||
DNS = proxy.DNS == null ? null : (string)proxy.DNS;
|
||||
IP = proxy.IP == null ? null : proxy.IP;
|
||||
netmask = proxy.netmask == null ? null : proxy.netmask;
|
||||
gateway = proxy.gateway == null ? null : proxy.gateway;
|
||||
DNS = proxy.DNS == null ? null : proxy.DNS;
|
||||
bond_slave_of = proxy.bond_slave_of == null ? null : XenRef<Bond>.Create(proxy.bond_slave_of);
|
||||
bond_master_of = proxy.bond_master_of == null ? null : XenRef<Bond>.Create(proxy.bond_master_of);
|
||||
VLAN_master_of = proxy.VLAN_master_of == null ? null : XenRef<VLAN>.Create(proxy.VLAN_master_of);
|
||||
@ -194,7 +194,7 @@ namespace XenAPI
|
||||
tunnel_transport_PIF_of = proxy.tunnel_transport_PIF_of == null ? null : XenRef<Tunnel>.Create(proxy.tunnel_transport_PIF_of);
|
||||
ipv6_configuration_mode = proxy.ipv6_configuration_mode == null ? (ipv6_configuration_mode) 0 : (ipv6_configuration_mode)Helper.EnumParseDefault(typeof(ipv6_configuration_mode), (string)proxy.ipv6_configuration_mode);
|
||||
IPv6 = proxy.IPv6 == null ? new string[] {} : (string [])proxy.IPv6;
|
||||
ipv6_gateway = proxy.ipv6_gateway == null ? null : (string)proxy.ipv6_gateway;
|
||||
ipv6_gateway = proxy.ipv6_gateway == null ? null : proxy.ipv6_gateway;
|
||||
primary_address_type = proxy.primary_address_type == null ? (primary_address_type) 0 : (primary_address_type)Helper.EnumParseDefault(typeof(primary_address_type), (string)proxy.primary_address_type);
|
||||
managed = (bool)proxy.managed;
|
||||
properties = proxy.properties == null ? null : Maps.convert_from_proxy_string_string(proxy.properties);
|
||||
@ -221,14 +221,14 @@ namespace XenAPI
|
||||
result_.gateway = gateway ?? "";
|
||||
result_.DNS = DNS ?? "";
|
||||
result_.bond_slave_of = bond_slave_of ?? "";
|
||||
result_.bond_master_of = (bond_master_of != null) ? Helper.RefListToStringArray(bond_master_of) : new string[] {};
|
||||
result_.bond_master_of = bond_master_of == null ? new string[] {} : Helper.RefListToStringArray(bond_master_of);
|
||||
result_.VLAN_master_of = VLAN_master_of ?? "";
|
||||
result_.VLAN_slave_of = (VLAN_slave_of != null) ? Helper.RefListToStringArray(VLAN_slave_of) : new string[] {};
|
||||
result_.VLAN_slave_of = VLAN_slave_of == null ? new string[] {} : Helper.RefListToStringArray(VLAN_slave_of);
|
||||
result_.management = management;
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.disallow_unplug = disallow_unplug;
|
||||
result_.tunnel_access_PIF_of = (tunnel_access_PIF_of != null) ? Helper.RefListToStringArray(tunnel_access_PIF_of) : new string[] {};
|
||||
result_.tunnel_transport_PIF_of = (tunnel_transport_PIF_of != null) ? Helper.RefListToStringArray(tunnel_transport_PIF_of) : new string[] {};
|
||||
result_.tunnel_access_PIF_of = tunnel_access_PIF_of == null ? new string[] {} : Helper.RefListToStringArray(tunnel_access_PIF_of);
|
||||
result_.tunnel_transport_PIF_of = tunnel_transport_PIF_of == null ? new string[] {} : Helper.RefListToStringArray(tunnel_transport_PIF_of);
|
||||
result_.ipv6_configuration_mode = ipv6_configuration_mode_helper.ToString(ipv6_configuration_mode);
|
||||
result_.IPv6 = IPv6;
|
||||
result_.ipv6_gateway = ipv6_gateway ?? "";
|
||||
@ -435,7 +435,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_uuid(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_uuid(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_uuid(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -449,7 +449,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_device(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_device(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_device(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -491,7 +491,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_mac(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_mac(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_mac(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -505,7 +505,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_mtu(session.opaque_ref, _pif);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pif_get_mtu(session.opaque_ref, _pif ?? "").parse());
|
||||
return long.Parse(session.proxy.pif_get_mtu(session.opaque_ref, _pif ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -519,7 +519,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_vlan(session.opaque_ref, _pif);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pif_get_vlan(session.opaque_ref, _pif ?? "").parse());
|
||||
return long.Parse(session.proxy.pif_get_vlan(session.opaque_ref, _pif ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -589,7 +589,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_ip(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_ip(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_ip(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -603,7 +603,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_netmask(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_netmask(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_netmask(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -617,7 +617,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_gateway(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_gateway(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_gateway(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -631,7 +631,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_dns(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_dns(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_dns(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -799,7 +799,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_ipv6_gateway(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_ipv6_gateway(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_ipv6_gateway(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -111,17 +111,17 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PIF_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
io_read_kbs = Convert.ToDouble(proxy.io_read_kbs);
|
||||
io_write_kbs = Convert.ToDouble(proxy.io_write_kbs);
|
||||
carrier = (bool)proxy.carrier;
|
||||
vendor_id = proxy.vendor_id == null ? null : (string)proxy.vendor_id;
|
||||
vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name;
|
||||
device_id = proxy.device_id == null ? null : (string)proxy.device_id;
|
||||
device_name = proxy.device_name == null ? null : (string)proxy.device_name;
|
||||
speed = proxy.speed == null ? 0 : long.Parse((string)proxy.speed);
|
||||
vendor_id = proxy.vendor_id == null ? null : proxy.vendor_id;
|
||||
vendor_name = proxy.vendor_name == null ? null : proxy.vendor_name;
|
||||
device_id = proxy.device_id == null ? null : proxy.device_id;
|
||||
device_name = proxy.device_name == null ? null : proxy.device_name;
|
||||
speed = proxy.speed == null ? 0 : long.Parse(proxy.speed);
|
||||
duplex = (bool)proxy.duplex;
|
||||
pci_bus_path = proxy.pci_bus_path == null ? null : (string)proxy.pci_bus_path;
|
||||
pci_bus_path = proxy.pci_bus_path == null ? null : proxy.pci_bus_path;
|
||||
last_updated = proxy.last_updated;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -279,7 +279,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_uuid(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_uuid(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_uuid(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -335,7 +335,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_vendor_id(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_vendor_id(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_vendor_id(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -349,7 +349,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_vendor_name(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_vendor_name(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_vendor_name(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -363,7 +363,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_device_id(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_device_id(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_device_id(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -377,7 +377,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_device_name(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_device_name(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_device_name(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -391,7 +391,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_speed(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pif_metrics_get_speed(session.opaque_ref, _pif_metrics ?? "").parse());
|
||||
return long.Parse(session.proxy.pif_metrics_get_speed(session.opaque_ref, _pif_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -419,7 +419,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_pci_bus_path(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_pci_bus_path(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_pci_bus_path(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -111,17 +111,17 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PUSB proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
USB_group = proxy.USB_group == null ? null : XenRef<USB_group>.Create(proxy.USB_group);
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
path = proxy.path == null ? null : (string)proxy.path;
|
||||
vendor_id = proxy.vendor_id == null ? null : (string)proxy.vendor_id;
|
||||
vendor_desc = proxy.vendor_desc == null ? null : (string)proxy.vendor_desc;
|
||||
product_id = proxy.product_id == null ? null : (string)proxy.product_id;
|
||||
product_desc = proxy.product_desc == null ? null : (string)proxy.product_desc;
|
||||
serial = proxy.serial == null ? null : (string)proxy.serial;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
description = proxy.description == null ? null : (string)proxy.description;
|
||||
path = proxy.path == null ? null : proxy.path;
|
||||
vendor_id = proxy.vendor_id == null ? null : proxy.vendor_id;
|
||||
vendor_desc = proxy.vendor_desc == null ? null : proxy.vendor_desc;
|
||||
product_id = proxy.product_id == null ? null : proxy.product_id;
|
||||
product_desc = proxy.product_desc == null ? null : proxy.product_desc;
|
||||
serial = proxy.serial == null ? null : proxy.serial;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
description = proxy.description == null ? null : proxy.description;
|
||||
passthrough_enabled = (bool)proxy.passthrough_enabled;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -279,7 +279,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_uuid(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_uuid(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_uuid(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -321,7 +321,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_path(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_path(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_path(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -335,7 +335,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_vendor_id(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_vendor_id(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_vendor_id(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -349,7 +349,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_vendor_desc(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_vendor_desc(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_vendor_desc(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -363,7 +363,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_product_id(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_product_id(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_product_id(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -377,7 +377,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_product_desc(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_product_desc(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_product_desc(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -391,7 +391,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_serial(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_serial(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_serial(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -405,7 +405,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_version(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_version(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_version(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -419,7 +419,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_description(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_description(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_description(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -90,11 +90,11 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PVS_cache_storage proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
SR = proxy.SR == null ? null : XenRef<SR>.Create(proxy.SR);
|
||||
site = proxy.site == null ? null : XenRef<PVS_site>.Create(proxy.site);
|
||||
size = proxy.size == null ? 0 : long.Parse((string)proxy.size);
|
||||
size = proxy.size == null ? 0 : long.Parse(proxy.size);
|
||||
VDI = proxy.VDI == null ? null : XenRef<VDI>.Create(proxy.VDI);
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_cache_storage_get_uuid(session.opaque_ref, _pvs_cache_storage);
|
||||
else
|
||||
return (string)session.proxy.pvs_cache_storage_get_uuid(session.opaque_ref, _pvs_cache_storage ?? "").parse();
|
||||
return session.proxy.pvs_cache_storage_get_uuid(session.opaque_ref, _pvs_cache_storage ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -330,7 +330,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_cache_storage_get_size(session.opaque_ref, _pvs_cache_storage);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pvs_cache_storage_get_size(session.opaque_ref, _pvs_cache_storage ?? "").parse());
|
||||
return long.Parse(session.proxy.pvs_cache_storage_get_size(session.opaque_ref, _pvs_cache_storage ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,7 +87,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PVS_proxy proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
site = proxy.site == null ? null : XenRef<PVS_site>.Create(proxy.site);
|
||||
VIF = proxy.VIF == null ? null : XenRef<VIF>.Create(proxy.VIF);
|
||||
currently_attached = (bool)proxy.currently_attached;
|
||||
@ -210,7 +210,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_proxy_get_uuid(session.opaque_ref, _pvs_proxy);
|
||||
else
|
||||
return (string)session.proxy.pvs_proxy_get_uuid(session.opaque_ref, _pvs_proxy ?? "").parse();
|
||||
return session.proxy.pvs_proxy_get_uuid(session.opaque_ref, _pvs_proxy ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,10 +87,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PVS_server proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : 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);
|
||||
first_port = proxy.first_port == null ? 0 : long.Parse(proxy.first_port);
|
||||
last_port = proxy.last_port == null ? 0 : long.Parse(proxy.last_port);
|
||||
site = proxy.site == null ? null : XenRef<PVS_site>.Create(proxy.site);
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_server_get_uuid(session.opaque_ref, _pvs_server);
|
||||
else
|
||||
return (string)session.proxy.pvs_server_get_uuid(session.opaque_ref, _pvs_server ?? "").parse();
|
||||
return session.proxy.pvs_server_get_uuid(session.opaque_ref, _pvs_server ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -238,7 +238,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_server_get_first_port(session.opaque_ref, _pvs_server);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pvs_server_get_first_port(session.opaque_ref, _pvs_server ?? "").parse());
|
||||
return long.Parse(session.proxy.pvs_server_get_first_port(session.opaque_ref, _pvs_server ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -252,7 +252,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_server_get_last_port(session.opaque_ref, _pvs_server);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pvs_server_get_last_port(session.opaque_ref, _pvs_server ?? "").parse());
|
||||
return long.Parse(session.proxy.pvs_server_get_last_port(session.opaque_ref, _pvs_server ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -93,10 +93,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PVS_site proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
PVS_uuid = proxy.PVS_uuid == null ? null : (string)proxy.PVS_uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
PVS_uuid = proxy.PVS_uuid == null ? null : proxy.PVS_uuid;
|
||||
cache_storage = proxy.cache_storage == null ? null : XenRef<PVS_cache_storage>.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);
|
||||
@ -109,9 +109,9 @@ namespace XenAPI
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.PVS_uuid = PVS_uuid ?? "";
|
||||
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[] {};
|
||||
result_.cache_storage = cache_storage == null ? new string[] {} : Helper.RefListToStringArray(cache_storage);
|
||||
result_.servers = servers == null ? new string[] {} : Helper.RefListToStringArray(servers);
|
||||
result_.proxies = proxies == null ? new string[] {} : Helper.RefListToStringArray(proxies);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -253,7 +253,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_site_get_uuid(session.opaque_ref, _pvs_site);
|
||||
else
|
||||
return (string)session.proxy.pvs_site_get_uuid(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
return session.proxy.pvs_site_get_uuid(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -267,7 +267,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_site_get_name_label(session.opaque_ref, _pvs_site);
|
||||
else
|
||||
return (string)session.proxy.pvs_site_get_name_label(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
return session.proxy.pvs_site_get_name_label(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -281,7 +281,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_site_get_name_description(session.opaque_ref, _pvs_site);
|
||||
else
|
||||
return (string)session.proxy.pvs_site_get_name_description(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
return session.proxy.pvs_site_get_name_description(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -295,7 +295,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_site_get_pvs_uuid(session.opaque_ref, _pvs_site);
|
||||
else
|
||||
return (string)session.proxy.pvs_site_get_pvs_uuid(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
return session.proxy.pvs_site_get_pvs_uuid(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -180,9 +180,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Pool proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
master = proxy.master == null ? null : XenRef<Host>.Create(proxy.master);
|
||||
default_SR = proxy.default_SR == null ? null : XenRef<SR>.Create(proxy.default_SR);
|
||||
suspend_image_SR = proxy.suspend_image_SR == null ? null : XenRef<SR>.Create(proxy.suspend_image_SR);
|
||||
@ -191,24 +191,24 @@ namespace XenAPI
|
||||
ha_enabled = (bool)proxy.ha_enabled;
|
||||
ha_configuration = proxy.ha_configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.ha_configuration);
|
||||
ha_statefiles = proxy.ha_statefiles == null ? new string[] {} : (string [])proxy.ha_statefiles;
|
||||
ha_host_failures_to_tolerate = proxy.ha_host_failures_to_tolerate == null ? 0 : long.Parse((string)proxy.ha_host_failures_to_tolerate);
|
||||
ha_plan_exists_for = proxy.ha_plan_exists_for == null ? 0 : long.Parse((string)proxy.ha_plan_exists_for);
|
||||
ha_host_failures_to_tolerate = proxy.ha_host_failures_to_tolerate == null ? 0 : long.Parse(proxy.ha_host_failures_to_tolerate);
|
||||
ha_plan_exists_for = proxy.ha_plan_exists_for == null ? 0 : long.Parse(proxy.ha_plan_exists_for);
|
||||
ha_allow_overcommit = (bool)proxy.ha_allow_overcommit;
|
||||
ha_overcommitted = (bool)proxy.ha_overcommitted;
|
||||
blobs = proxy.blobs == null ? null : Maps.convert_from_proxy_string_XenRefBlob(proxy.blobs);
|
||||
tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags;
|
||||
gui_config = proxy.gui_config == null ? null : Maps.convert_from_proxy_string_string(proxy.gui_config);
|
||||
health_check_config = proxy.health_check_config == null ? null : Maps.convert_from_proxy_string_string(proxy.health_check_config);
|
||||
wlb_url = proxy.wlb_url == null ? null : (string)proxy.wlb_url;
|
||||
wlb_username = proxy.wlb_username == null ? null : (string)proxy.wlb_username;
|
||||
wlb_url = proxy.wlb_url == null ? null : proxy.wlb_url;
|
||||
wlb_username = proxy.wlb_username == null ? null : proxy.wlb_username;
|
||||
wlb_enabled = (bool)proxy.wlb_enabled;
|
||||
wlb_verify_cert = (bool)proxy.wlb_verify_cert;
|
||||
redo_log_enabled = (bool)proxy.redo_log_enabled;
|
||||
redo_log_vdi = proxy.redo_log_vdi == null ? null : XenRef<VDI>.Create(proxy.redo_log_vdi);
|
||||
vswitch_controller = proxy.vswitch_controller == null ? null : (string)proxy.vswitch_controller;
|
||||
vswitch_controller = proxy.vswitch_controller == null ? null : proxy.vswitch_controller;
|
||||
restrictions = proxy.restrictions == null ? null : Maps.convert_from_proxy_string_string(proxy.restrictions);
|
||||
metadata_VDIs = proxy.metadata_VDIs == null ? null : XenRef<VDI>.Create(proxy.metadata_VDIs);
|
||||
ha_cluster_stack = proxy.ha_cluster_stack == null ? null : (string)proxy.ha_cluster_stack;
|
||||
ha_cluster_stack = proxy.ha_cluster_stack == null ? null : proxy.ha_cluster_stack;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<pool_allowed_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_pool_allowed_operations(proxy.current_operations);
|
||||
guest_agent_config = proxy.guest_agent_config == null ? null : Maps.convert_from_proxy_string_string(proxy.guest_agent_config);
|
||||
@ -248,9 +248,9 @@ namespace XenAPI
|
||||
result_.redo_log_vdi = redo_log_vdi ?? "";
|
||||
result_.vswitch_controller = vswitch_controller ?? "";
|
||||
result_.restrictions = Maps.convert_to_proxy_string_string(restrictions);
|
||||
result_.metadata_VDIs = (metadata_VDIs != null) ? Helper.RefListToStringArray(metadata_VDIs) : new string[] {};
|
||||
result_.metadata_VDIs = metadata_VDIs == null ? new string[] {} : Helper.RefListToStringArray(metadata_VDIs);
|
||||
result_.ha_cluster_stack = ha_cluster_stack ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_pool_allowed_operations(current_operations);
|
||||
result_.guest_agent_config = Maps.convert_to_proxy_string_string(guest_agent_config);
|
||||
result_.cpu_info = Maps.convert_to_proxy_string_string(cpu_info);
|
||||
@ -517,7 +517,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_uuid(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_uuid(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_uuid(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -531,7 +531,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_name_label(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_name_label(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_name_label(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -545,7 +545,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_name_description(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_name_description(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_name_description(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -671,7 +671,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_ha_host_failures_to_tolerate(session.opaque_ref, _pool);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_get_ha_host_failures_to_tolerate(session.opaque_ref, _pool ?? "").parse());
|
||||
return long.Parse(session.proxy.pool_get_ha_host_failures_to_tolerate(session.opaque_ref, _pool ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -685,7 +685,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_ha_plan_exists_for(session.opaque_ref, _pool);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_get_ha_plan_exists_for(session.opaque_ref, _pool ?? "").parse());
|
||||
return long.Parse(session.proxy.pool_get_ha_plan_exists_for(session.opaque_ref, _pool ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -783,7 +783,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_wlb_url(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_wlb_url(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_wlb_url(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -797,7 +797,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_wlb_username(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_wlb_username(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_wlb_username(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -869,7 +869,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_vswitch_controller(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_vswitch_controller(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_vswitch_controller(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -911,7 +911,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_ha_cluster_stack(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_ha_cluster_stack(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_ha_cluster_stack(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1594,7 +1594,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.pool_enable_ha(session.opaque_ref, _heartbeat_srs, _configuration);
|
||||
else
|
||||
session.proxy.pool_enable_ha(session.opaque_ref, (_heartbeat_srs != null) ? Helper.RefListToStringArray(_heartbeat_srs) : new string[] {}, Maps.convert_to_proxy_string_string(_configuration)).parse();
|
||||
session.proxy.pool_enable_ha(session.opaque_ref, _heartbeat_srs == null ? new string[] {} : Helper.RefListToStringArray(_heartbeat_srs), Maps.convert_to_proxy_string_string(_configuration)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1609,7 +1609,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_pool_enable_ha(session.opaque_ref, _heartbeat_srs, _configuration);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_enable_ha(session.opaque_ref, (_heartbeat_srs != null) ? Helper.RefListToStringArray(_heartbeat_srs) : new string[] {}, Maps.convert_to_proxy_string_string(_configuration)).parse());
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_enable_ha(session.opaque_ref, _heartbeat_srs == null ? new string[] {} : Helper.RefListToStringArray(_heartbeat_srs), Maps.convert_to_proxy_string_string(_configuration)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1730,7 +1730,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_ha_compute_max_host_failures_to_tolerate(session.opaque_ref);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_ha_compute_max_host_failures_to_tolerate(session.opaque_ref).parse());
|
||||
return long.Parse(session.proxy.pool_ha_compute_max_host_failures_to_tolerate(session.opaque_ref).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1744,7 +1744,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_ha_compute_hypothetical_max_host_failures_to_tolerate(session.opaque_ref, _configuration);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_ha_compute_hypothetical_max_host_failures_to_tolerate(session.opaque_ref, Maps.convert_to_proxy_XenRefVM_string(_configuration)).parse());
|
||||
return long.Parse(session.proxy.pool_ha_compute_hypothetical_max_host_failures_to_tolerate(session.opaque_ref, Maps.convert_to_proxy_XenRefVM_string(_configuration)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1759,7 +1759,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_ha_compute_vm_failover_plan(session.opaque_ref, _failed_hosts, _failed_vms);
|
||||
else
|
||||
return Maps.convert_from_proxy_XenRefVM_Dictionary_string_string(session.proxy.pool_ha_compute_vm_failover_plan(session.opaque_ref, (_failed_hosts != null) ? Helper.RefListToStringArray(_failed_hosts) : new string[] {}, (_failed_vms != null) ? Helper.RefListToStringArray(_failed_vms) : new string[] {}).parse());
|
||||
return Maps.convert_from_proxy_XenRefVM_Dictionary_string_string(session.proxy.pool_ha_compute_vm_failover_plan(session.opaque_ref, _failed_hosts == null ? new string[] {} : Helper.RefListToStringArray(_failed_hosts), _failed_vms == null ? new string[] {} : Helper.RefListToStringArray(_failed_vms)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2059,7 +2059,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_send_test_post(session.opaque_ref, _host, _port, _body);
|
||||
else
|
||||
return (string)session.proxy.pool_send_test_post(session.opaque_ref, _host ?? "", _port.ToString(), _body ?? "").parse();
|
||||
return session.proxy.pool_send_test_post(session.opaque_ref, _host ?? "", _port.ToString(), _body ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2370,7 +2370,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_test_archive_target(session.opaque_ref, _pool, _config);
|
||||
else
|
||||
return (string)session.proxy.pool_test_archive_target(session.opaque_ref, _pool ?? "", Maps.convert_to_proxy_string_string(_config)).parse();
|
||||
return session.proxy.pool_test_archive_target(session.opaque_ref, _pool ?? "", Maps.convert_to_proxy_string_string(_config)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,11 +102,11 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Pool_patch proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
size = proxy.size == null ? 0 : long.Parse((string)proxy.size);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
size = proxy.size == null ? 0 : long.Parse(proxy.size);
|
||||
pool_applied = (bool)proxy.pool_applied;
|
||||
host_patches = proxy.host_patches == null ? null : XenRef<Host_patch>.Create(proxy.host_patches);
|
||||
after_apply_guidance = proxy.after_apply_guidance == null ? null : Helper.StringArrayToEnumList<after_apply_guidance>(proxy.after_apply_guidance);
|
||||
@ -123,8 +123,8 @@ namespace XenAPI
|
||||
result_.version = version ?? "";
|
||||
result_.size = size.ToString();
|
||||
result_.pool_applied = pool_applied;
|
||||
result_.host_patches = (host_patches != null) ? Helper.RefListToStringArray(host_patches) : new string[] {};
|
||||
result_.after_apply_guidance = (after_apply_guidance != null) ? Helper.ObjectListToStringArray(after_apply_guidance) : new string[] {};
|
||||
result_.host_patches = host_patches == null ? new string[] {} : Helper.RefListToStringArray(host_patches);
|
||||
result_.after_apply_guidance = after_apply_guidance == null ? new string[] {} : Helper.ObjectListToStringArray(after_apply_guidance);
|
||||
result_.pool_update = pool_update ?? "";
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
return result_;
|
||||
@ -275,7 +275,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_get_uuid(session.opaque_ref, _pool_patch);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_get_uuid(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
return session.proxy.pool_patch_get_uuid(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -289,7 +289,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_get_name_label(session.opaque_ref, _pool_patch);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_get_name_label(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
return session.proxy.pool_patch_get_name_label(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -303,7 +303,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_get_name_description(session.opaque_ref, _pool_patch);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_get_name_description(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
return session.proxy.pool_patch_get_name_description(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -317,7 +317,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_get_version(session.opaque_ref, _pool_patch);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_get_version(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
return session.proxy.pool_patch_get_version(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -331,7 +331,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_get_size(session.opaque_ref, _pool_patch);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_patch_get_size(session.opaque_ref, _pool_patch ?? "").parse());
|
||||
return long.Parse(session.proxy.pool_patch_get_size(session.opaque_ref, _pool_patch ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -464,7 +464,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_apply(session.opaque_ref, _pool_patch, _host);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_apply(session.opaque_ref, _pool_patch ?? "", _host ?? "").parse();
|
||||
return session.proxy.pool_patch_apply(session.opaque_ref, _pool_patch ?? "", _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -530,7 +530,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_precheck(session.opaque_ref, _pool_patch, _host);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_precheck(session.opaque_ref, _pool_patch ?? "", _host ?? "").parse();
|
||||
return session.proxy.pool_patch_precheck(session.opaque_ref, _pool_patch ?? "", _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -105,12 +105,12 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Pool_update proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
installation_size = proxy.installation_size == null ? 0 : long.Parse((string)proxy.installation_size);
|
||||
key = proxy.key == null ? null : (string)proxy.key;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
installation_size = proxy.installation_size == null ? 0 : long.Parse(proxy.installation_size);
|
||||
key = proxy.key == null ? null : proxy.key;
|
||||
after_apply_guidance = proxy.after_apply_guidance == null ? null : Helper.StringArrayToEnumList<update_after_apply_guidance>(proxy.after_apply_guidance);
|
||||
vdi = proxy.vdi == null ? null : XenRef<VDI>.Create(proxy.vdi);
|
||||
hosts = proxy.hosts == null ? null : XenRef<Host>.Create(proxy.hosts);
|
||||
@ -127,9 +127,9 @@ namespace XenAPI
|
||||
result_.version = version ?? "";
|
||||
result_.installation_size = installation_size.ToString();
|
||||
result_.key = key ?? "";
|
||||
result_.after_apply_guidance = (after_apply_guidance != null) ? Helper.ObjectListToStringArray(after_apply_guidance) : new string[] {};
|
||||
result_.after_apply_guidance = after_apply_guidance == null ? new string[] {} : Helper.ObjectListToStringArray(after_apply_guidance);
|
||||
result_.vdi = vdi ?? "";
|
||||
result_.hosts = (hosts != null) ? Helper.RefListToStringArray(hosts) : new string[] {};
|
||||
result_.hosts = hosts == null ? new string[] {} : Helper.RefListToStringArray(hosts);
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.enforce_homogeneity = enforce_homogeneity;
|
||||
return result_;
|
||||
@ -277,7 +277,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_uuid(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return (string)session.proxy.pool_update_get_uuid(session.opaque_ref, _pool_update ?? "").parse();
|
||||
return session.proxy.pool_update_get_uuid(session.opaque_ref, _pool_update ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -291,7 +291,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_name_label(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return (string)session.proxy.pool_update_get_name_label(session.opaque_ref, _pool_update ?? "").parse();
|
||||
return session.proxy.pool_update_get_name_label(session.opaque_ref, _pool_update ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -305,7 +305,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_name_description(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return (string)session.proxy.pool_update_get_name_description(session.opaque_ref, _pool_update ?? "").parse();
|
||||
return session.proxy.pool_update_get_name_description(session.opaque_ref, _pool_update ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -319,7 +319,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_version(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return (string)session.proxy.pool_update_get_version(session.opaque_ref, _pool_update ?? "").parse();
|
||||
return session.proxy.pool_update_get_version(session.opaque_ref, _pool_update ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -333,7 +333,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_installation_size(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_update_get_installation_size(session.opaque_ref, _pool_update ?? "").parse());
|
||||
return long.Parse(session.proxy.pool_update_get_installation_size(session.opaque_ref, _pool_update ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -347,7 +347,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_key(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return (string)session.proxy.pool_update_get_key(session.opaque_ref, _pool_update ?? "").parse();
|
||||
return session.proxy.pool_update_get_key(session.opaque_ref, _pool_update ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
240
XenModel/XenAPI/Probe_result.cs
Normal file
240
XenModel/XenAPI/Probe_result.cs
Normal file
@ -0,0 +1,240 @@
|
||||
/*
|
||||
* 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 System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
|
||||
namespace XenAPI
|
||||
{
|
||||
/// <summary>
|
||||
/// A set of properties that describe one result element of SR.probe. Result elements and properties can change dynamically based on changes to the the SR.probe input-parameters or the target.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
public partial class Probe_result : XenObject<Probe_result>
|
||||
{
|
||||
public Probe_result()
|
||||
{
|
||||
}
|
||||
|
||||
public Probe_result(Dictionary<string, string> configuration,
|
||||
bool complete,
|
||||
Sr_stat sr,
|
||||
Dictionary<string, string> extra_info)
|
||||
{
|
||||
this.configuration = configuration;
|
||||
this.complete = complete;
|
||||
this.sr = sr;
|
||||
this.extra_info = extra_info;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Probe_result from a Proxy_Probe_result.
|
||||
/// </summary>
|
||||
/// <param name="proxy"></param>
|
||||
public Probe_result(Proxy_Probe_result proxy)
|
||||
{
|
||||
this.UpdateFromProxy(proxy);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates each field of this instance with the value of
|
||||
/// the corresponding field of a given Probe_result.
|
||||
/// </summary>
|
||||
public override void UpdateFrom(Probe_result update)
|
||||
{
|
||||
configuration = update.configuration;
|
||||
complete = update.complete;
|
||||
sr = update.sr;
|
||||
extra_info = update.extra_info;
|
||||
}
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Probe_result proxy)
|
||||
{
|
||||
configuration = proxy.configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.configuration);
|
||||
complete = (bool)proxy.complete;
|
||||
sr = proxy.sr == null ? null : new Sr_stat((Proxy_Sr_stat)proxy.sr);
|
||||
extra_info = proxy.extra_info == null ? null : Maps.convert_from_proxy_string_string(proxy.extra_info);
|
||||
}
|
||||
|
||||
public Proxy_Probe_result ToProxy()
|
||||
{
|
||||
Proxy_Probe_result result_ = new Proxy_Probe_result();
|
||||
result_.configuration = Maps.convert_to_proxy_string_string(configuration);
|
||||
result_.complete = complete;
|
||||
result_.sr = sr == null ? null : sr.ToProxy();
|
||||
result_.extra_info = Maps.convert_to_proxy_string_string(extra_info);
|
||||
return result_;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Probe_result from a Hashtable.
|
||||
/// Note that the fields not contained in the Hashtable
|
||||
/// will be created with their default values.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public Probe_result(Hashtable table) : this()
|
||||
{
|
||||
UpdateFrom(table);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a Hashtable with field-value pairs, it updates the fields of this Probe_result
|
||||
/// with the values listed in the Hashtable. Note that only the fields contained
|
||||
/// in the Hashtable will be updated and the rest will remain the same.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public void UpdateFrom(Hashtable table)
|
||||
{
|
||||
if (table.ContainsKey("configuration"))
|
||||
configuration = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "configuration"));
|
||||
if (table.ContainsKey("complete"))
|
||||
complete = Marshalling.ParseBool(table, "complete");
|
||||
if (table.ContainsKey("sr"))
|
||||
sr = (Sr_stat)Marshalling.convertStruct(typeof(Sr_stat), Marshalling.ParseHashTable(table, "sr"));;
|
||||
if (table.ContainsKey("extra_info"))
|
||||
extra_info = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "extra_info"));
|
||||
}
|
||||
|
||||
public bool DeepEquals(Probe_result other)
|
||||
{
|
||||
if (ReferenceEquals(null, other))
|
||||
return false;
|
||||
if (ReferenceEquals(this, other))
|
||||
return true;
|
||||
|
||||
return Helper.AreEqual2(this._configuration, other._configuration) &&
|
||||
Helper.AreEqual2(this._complete, other._complete) &&
|
||||
Helper.AreEqual2(this._sr, other._sr) &&
|
||||
Helper.AreEqual2(this._extra_info, other._extra_info);
|
||||
}
|
||||
|
||||
internal static List<Probe_result> ProxyArrayToObjectList(Proxy_Probe_result[] input)
|
||||
{
|
||||
var result = new List<Probe_result>();
|
||||
foreach (var item in input)
|
||||
result.Add(new Probe_result(item));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override string SaveChanges(Session session, string opaqueRef, Probe_result 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>
|
||||
/// Plugin-specific configuration which describes where and how to locate the storage repository. This may include the physical block device name, a remote NFS server and path or an RBD storage pool.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringStringMapConverter))]
|
||||
public virtual Dictionary<string, string> configuration
|
||||
{
|
||||
get { return _configuration; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _configuration))
|
||||
{
|
||||
_configuration = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("configuration");
|
||||
}
|
||||
}
|
||||
}
|
||||
private Dictionary<string, string> _configuration = new Dictionary<string, string>() {};
|
||||
|
||||
/// <summary>
|
||||
/// True if this configuration is complete and can be used to call SR.create. False if it requires further iterative calls to SR.probe, to potentially narrow down on a configuration that can be used.
|
||||
/// </summary>
|
||||
public virtual bool complete
|
||||
{
|
||||
get { return _complete; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _complete))
|
||||
{
|
||||
_complete = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("complete");
|
||||
}
|
||||
}
|
||||
}
|
||||
private bool _complete;
|
||||
|
||||
/// <summary>
|
||||
/// Existing SR found for this configuration
|
||||
/// </summary>
|
||||
public virtual Sr_stat sr
|
||||
{
|
||||
get { return _sr; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _sr))
|
||||
{
|
||||
_sr = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("sr");
|
||||
}
|
||||
}
|
||||
}
|
||||
private Sr_stat _sr;
|
||||
|
||||
/// <summary>
|
||||
/// Additional plugin-specific information about this configuration, that might be of use for an API user. This can for example include the LUN or the WWPN.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringStringMapConverter))]
|
||||
public virtual Dictionary<string, string> extra_info
|
||||
{
|
||||
get { return _extra_info; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _extra_info))
|
||||
{
|
||||
_extra_info = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("extra_info");
|
||||
}
|
||||
}
|
||||
}
|
||||
private Dictionary<string, string> _extra_info = new Dictionary<string, string>() {};
|
||||
}
|
||||
}
|
@ -1680,6 +1680,10 @@ namespace XenAPI
|
||||
Response<string>
|
||||
vm_get_reference_label(string session, string _vm);
|
||||
|
||||
[XmlRpcMethod("VM.get_domain_type")]
|
||||
Response<string>
|
||||
vm_get_domain_type(string session, string _vm);
|
||||
|
||||
[XmlRpcMethod("VM.set_name_label")]
|
||||
Response<string>
|
||||
vm_set_name_label(string session, string _vm, string _label);
|
||||
@ -1744,10 +1748,6 @@ namespace XenAPI
|
||||
Response<string>
|
||||
vm_set_pv_legacy_args(string session, string _vm, string _legacy_args);
|
||||
|
||||
[XmlRpcMethod("VM.set_HVM_boot_policy")]
|
||||
Response<string>
|
||||
vm_set_hvm_boot_policy(string session, string _vm, string _boot_policy);
|
||||
|
||||
[XmlRpcMethod("VM.set_HVM_boot_params")]
|
||||
Response<string>
|
||||
vm_set_hvm_boot_params(string session, string _vm, Object _boot_params);
|
||||
@ -2412,6 +2412,14 @@ namespace XenAPI
|
||||
Response<string>
|
||||
async_vm_set_actions_after_crash(string session, string _vm, string _value);
|
||||
|
||||
[XmlRpcMethod("VM.set_domain_type")]
|
||||
Response<string>
|
||||
vm_set_domain_type(string session, string _vm, string _value);
|
||||
|
||||
[XmlRpcMethod("VM.set_HVM_boot_policy")]
|
||||
Response<string>
|
||||
vm_set_hvm_boot_policy(string session, string _vm, string _value);
|
||||
|
||||
[XmlRpcMethod("VM.get_all")]
|
||||
Response<string []>
|
||||
vm_get_all(string session);
|
||||
@ -2488,6 +2496,10 @@ namespace XenAPI
|
||||
Response<bool>
|
||||
vm_metrics_get_nomigrate(string session, string _vm_metrics);
|
||||
|
||||
[XmlRpcMethod("VM_metrics.get_current_domain_type")]
|
||||
Response<string>
|
||||
vm_metrics_get_current_domain_type(string session, string _vm_metrics);
|
||||
|
||||
[XmlRpcMethod("VM_metrics.set_other_config")]
|
||||
Response<string>
|
||||
vm_metrics_set_other_config(string session, string _vm_metrics, Object _other_config);
|
||||
@ -5484,6 +5496,14 @@ namespace XenAPI
|
||||
Response<string>
|
||||
async_sr_probe(string session, string _host, Object _device_config, string _type, Object _sm_config);
|
||||
|
||||
[XmlRpcMethod("SR.probe_ext")]
|
||||
Response<Proxy_Probe_result[]>
|
||||
sr_probe_ext(string session, string _host, Object _device_config, string _type, Object _sm_config);
|
||||
|
||||
[XmlRpcMethod("Async.SR.probe_ext")]
|
||||
Response<string>
|
||||
async_sr_probe_ext(string session, string _host, Object _device_config, string _type, Object _sm_config);
|
||||
|
||||
[XmlRpcMethod("SR.set_shared")]
|
||||
Response<string>
|
||||
sr_set_shared(string session, string _sr, bool _value);
|
||||
@ -5592,6 +5612,14 @@ namespace XenAPI
|
||||
Response<Object>
|
||||
sr_get_all_records(string session);
|
||||
|
||||
[XmlRpcMethod("sr_stat.get_all_records")]
|
||||
Response<Object>
|
||||
sr_stat_get_all_records(string session);
|
||||
|
||||
[XmlRpcMethod("probe_result.get_all_records")]
|
||||
Response<Object>
|
||||
probe_result_get_all_records(string session);
|
||||
|
||||
[XmlRpcMethod("LVHD.get_record")]
|
||||
Response<Proxy_LVHD>
|
||||
lvhd_get_record(string session, string _lvhd);
|
||||
@ -8400,6 +8428,7 @@ namespace XenAPI
|
||||
public bool has_vendor_device;
|
||||
public bool requires_reboot;
|
||||
public string reference_label;
|
||||
public string domain_type;
|
||||
}
|
||||
|
||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||
@ -8420,6 +8449,7 @@ namespace XenAPI
|
||||
public bool hvm;
|
||||
public bool nested_virt;
|
||||
public bool nomigrate;
|
||||
public string current_domain_type;
|
||||
}
|
||||
|
||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||
@ -8802,6 +8832,27 @@ namespace XenAPI
|
||||
public bool is_tools_sr;
|
||||
}
|
||||
|
||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||
public class Proxy_Sr_stat
|
||||
{
|
||||
public string uuid;
|
||||
public string name_label;
|
||||
public string name_description;
|
||||
public string free_space;
|
||||
public string total_space;
|
||||
public bool clustered;
|
||||
public string health;
|
||||
}
|
||||
|
||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||
public class Proxy_Probe_result
|
||||
{
|
||||
public Object configuration;
|
||||
public bool complete;
|
||||
public Proxy_Sr_stat sr;
|
||||
public Object extra_info;
|
||||
}
|
||||
|
||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||
public class Proxy_LVHD
|
||||
{
|
||||
|
@ -84,9 +84,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Role proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
subroles = proxy.subroles == null ? null : XenRef<Role>.Create(proxy.subroles);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.subroles = (subroles != null) ? Helper.RefListToStringArray(subroles) : new string[] {};
|
||||
result_.subroles = subroles == null ? new string[] {} : Helper.RefListToStringArray(subroles);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.role_get_uuid(session.opaque_ref, _role);
|
||||
else
|
||||
return (string)session.proxy.role_get_uuid(session.opaque_ref, _role ?? "").parse();
|
||||
return session.proxy.role_get_uuid(session.opaque_ref, _role ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -230,7 +230,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.role_get_name_label(session.opaque_ref, _role);
|
||||
else
|
||||
return (string)session.proxy.role_get_name_label(session.opaque_ref, _role ?? "").parse();
|
||||
return session.proxy.role_get_name_label(session.opaque_ref, _role ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -244,7 +244,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.role_get_name_description(session.opaque_ref, _role);
|
||||
else
|
||||
return (string)session.proxy.role_get_name_description(session.opaque_ref, _role ?? "").parse();
|
||||
return session.proxy.role_get_name_description(session.opaque_ref, _role ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -84,10 +84,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_SDN_controller proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
protocol = proxy.protocol == null ? (sdn_controller_protocol) 0 : (sdn_controller_protocol)Helper.EnumParseDefault(typeof(sdn_controller_protocol), (string)proxy.protocol);
|
||||
address = proxy.address == null ? null : (string)proxy.address;
|
||||
port = proxy.port == null ? 0 : long.Parse((string)proxy.port);
|
||||
address = proxy.address == null ? null : proxy.address;
|
||||
port = proxy.port == null ? 0 : long.Parse(proxy.port);
|
||||
}
|
||||
|
||||
public Proxy_SDN_controller ToProxy()
|
||||
@ -202,7 +202,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sdn_controller_get_uuid(session.opaque_ref, _sdn_controller);
|
||||
else
|
||||
return (string)session.proxy.sdn_controller_get_uuid(session.opaque_ref, _sdn_controller ?? "").parse();
|
||||
return session.proxy.sdn_controller_get_uuid(session.opaque_ref, _sdn_controller ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -230,7 +230,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sdn_controller_get_address(session.opaque_ref, _sdn_controller);
|
||||
else
|
||||
return (string)session.proxy.sdn_controller_get_address(session.opaque_ref, _sdn_controller ?? "").parse();
|
||||
return session.proxy.sdn_controller_get_address(session.opaque_ref, _sdn_controller ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -244,7 +244,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sdn_controller_get_port(session.opaque_ref, _sdn_controller);
|
||||
else
|
||||
return long.Parse((string)session.proxy.sdn_controller_get_port(session.opaque_ref, _sdn_controller ?? "").parse());
|
||||
return long.Parse(session.proxy.sdn_controller_get_port(session.opaque_ref, _sdn_controller ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -114,19 +114,19 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_SM proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
type = proxy.type == null ? null : (string)proxy.type;
|
||||
vendor = proxy.vendor == null ? null : (string)proxy.vendor;
|
||||
copyright = proxy.copyright == null ? null : (string)proxy.copyright;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
required_api_version = proxy.required_api_version == null ? null : (string)proxy.required_api_version;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
type = proxy.type == null ? null : proxy.type;
|
||||
vendor = proxy.vendor == null ? null : proxy.vendor;
|
||||
copyright = proxy.copyright == null ? null : proxy.copyright;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
required_api_version = proxy.required_api_version == null ? null : proxy.required_api_version;
|
||||
configuration = proxy.configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.configuration);
|
||||
capabilities = proxy.capabilities == null ? new string[] {} : (string [])proxy.capabilities;
|
||||
features = proxy.features == null ? null : Maps.convert_from_proxy_string_long(proxy.features);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
driver_filename = proxy.driver_filename == null ? null : (string)proxy.driver_filename;
|
||||
driver_filename = proxy.driver_filename == null ? null : proxy.driver_filename;
|
||||
required_cluster_stack = proxy.required_cluster_stack == null ? new string[] {} : (string [])proxy.required_cluster_stack;
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_uuid(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_uuid(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_uuid(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -315,7 +315,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_name_label(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_name_label(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_name_label(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -329,7 +329,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_name_description(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_name_description(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_name_description(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -343,7 +343,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_type(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_type(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_type(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -357,7 +357,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_vendor(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_vendor(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_vendor(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -371,7 +371,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_copyright(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_copyright(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_copyright(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -385,7 +385,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_version(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_version(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_version(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -399,7 +399,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_required_api_version(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_required_api_version(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_required_api_version(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -471,7 +471,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_driver_filename(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_driver_filename(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_driver_filename(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -135,18 +135,18 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_SR proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<storage_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_storage_operations(proxy.current_operations);
|
||||
VDIs = proxy.VDIs == null ? null : XenRef<VDI>.Create(proxy.VDIs);
|
||||
PBDs = proxy.PBDs == null ? null : XenRef<PBD>.Create(proxy.PBDs);
|
||||
virtual_allocation = proxy.virtual_allocation == null ? 0 : long.Parse((string)proxy.virtual_allocation);
|
||||
physical_utilisation = proxy.physical_utilisation == null ? 0 : long.Parse((string)proxy.physical_utilisation);
|
||||
physical_size = proxy.physical_size == null ? 0 : long.Parse((string)proxy.physical_size);
|
||||
type = proxy.type == null ? null : (string)proxy.type;
|
||||
content_type = proxy.content_type == null ? null : (string)proxy.content_type;
|
||||
virtual_allocation = proxy.virtual_allocation == null ? 0 : long.Parse(proxy.virtual_allocation);
|
||||
physical_utilisation = proxy.physical_utilisation == null ? 0 : long.Parse(proxy.physical_utilisation);
|
||||
physical_size = proxy.physical_size == null ? 0 : long.Parse(proxy.physical_size);
|
||||
type = proxy.type == null ? null : proxy.type;
|
||||
content_type = proxy.content_type == null ? null : proxy.content_type;
|
||||
shared = (bool)proxy.shared;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags;
|
||||
@ -164,10 +164,10 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_storage_operations(current_operations);
|
||||
result_.VDIs = (VDIs != null) ? Helper.RefListToStringArray(VDIs) : new string[] {};
|
||||
result_.PBDs = (PBDs != null) ? Helper.RefListToStringArray(PBDs) : new string[] {};
|
||||
result_.VDIs = VDIs == null ? new string[] {} : Helper.RefListToStringArray(VDIs);
|
||||
result_.PBDs = PBDs == null ? new string[] {} : Helper.RefListToStringArray(PBDs);
|
||||
result_.virtual_allocation = virtual_allocation.ToString();
|
||||
result_.physical_utilisation = physical_utilisation.ToString();
|
||||
result_.physical_size = physical_size.ToString();
|
||||
@ -379,7 +379,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_uuid(session.opaque_ref, _sr);
|
||||
else
|
||||
return (string)session.proxy.sr_get_uuid(session.opaque_ref, _sr ?? "").parse();
|
||||
return session.proxy.sr_get_uuid(session.opaque_ref, _sr ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -393,7 +393,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_name_label(session.opaque_ref, _sr);
|
||||
else
|
||||
return (string)session.proxy.sr_get_name_label(session.opaque_ref, _sr ?? "").parse();
|
||||
return session.proxy.sr_get_name_label(session.opaque_ref, _sr ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -407,7 +407,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_name_description(session.opaque_ref, _sr);
|
||||
else
|
||||
return (string)session.proxy.sr_get_name_description(session.opaque_ref, _sr ?? "").parse();
|
||||
return session.proxy.sr_get_name_description(session.opaque_ref, _sr ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -477,7 +477,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_virtual_allocation(session.opaque_ref, _sr);
|
||||
else
|
||||
return long.Parse((string)session.proxy.sr_get_virtual_allocation(session.opaque_ref, _sr ?? "").parse());
|
||||
return long.Parse(session.proxy.sr_get_virtual_allocation(session.opaque_ref, _sr ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -491,7 +491,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_physical_utilisation(session.opaque_ref, _sr);
|
||||
else
|
||||
return long.Parse((string)session.proxy.sr_get_physical_utilisation(session.opaque_ref, _sr ?? "").parse());
|
||||
return long.Parse(session.proxy.sr_get_physical_utilisation(session.opaque_ref, _sr ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -505,7 +505,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_physical_size(session.opaque_ref, _sr);
|
||||
else
|
||||
return long.Parse((string)session.proxy.sr_get_physical_size(session.opaque_ref, _sr ?? "").parse());
|
||||
return long.Parse(session.proxy.sr_get_physical_size(session.opaque_ref, _sr ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -519,7 +519,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_type(session.opaque_ref, _sr);
|
||||
else
|
||||
return (string)session.proxy.sr_get_type(session.opaque_ref, _sr ?? "").parse();
|
||||
return session.proxy.sr_get_type(session.opaque_ref, _sr ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -533,7 +533,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_content_type(session.opaque_ref, _sr);
|
||||
else
|
||||
return (string)session.proxy.sr_get_content_type(session.opaque_ref, _sr ?? "").parse();
|
||||
return session.proxy.sr_get_content_type(session.opaque_ref, _sr ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -982,7 +982,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_make(session.opaque_ref, _host, _device_config, _physical_size, _name_label, _name_description, _type, _content_type);
|
||||
else
|
||||
return (string)session.proxy.sr_make(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _physical_size.ToString(), _name_label ?? "", _name_description ?? "", _type ?? "", _content_type ?? "").parse();
|
||||
return session.proxy.sr_make(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _physical_size.ToString(), _name_label ?? "", _name_description ?? "", _type ?? "", _content_type ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1027,7 +1027,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_make(session.opaque_ref, _host, _device_config, _physical_size, _name_label, _name_description, _type, _content_type, _sm_config);
|
||||
else
|
||||
return (string)session.proxy.sr_make(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _physical_size.ToString(), _name_label ?? "", _name_description ?? "", _type ?? "", _content_type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse();
|
||||
return session.proxy.sr_make(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _physical_size.ToString(), _name_label ?? "", _name_description ?? "", _type ?? "", _content_type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1192,7 +1192,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_probe(session.opaque_ref, _host, _device_config, _type, _sm_config);
|
||||
else
|
||||
return (string)session.proxy.sr_probe(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse();
|
||||
return session.proxy.sr_probe(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1212,6 +1212,40 @@ namespace XenAPI
|
||||
return XenRef<Task>.Create(session.proxy.async_sr_probe(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The host to create/make the SR on</param>
|
||||
/// <param name="_device_config">The device config string that will be passed to backend SR driver</param>
|
||||
/// <param name="_type">The type of the SR; used to specify the SR backend driver to use</param>
|
||||
/// <param name="_sm_config">Storage backend specific configuration options</param>
|
||||
public static List<Probe_result> probe_ext(Session session, string _host, Dictionary<string, string> _device_config, string _type, Dictionary<string, string> _sm_config)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_probe_ext(session.opaque_ref, _host, _device_config, _type, _sm_config);
|
||||
else
|
||||
return Probe_result.ProxyArrayToObjectList(session.proxy.sr_probe_ext(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The host to create/make the SR on</param>
|
||||
/// <param name="_device_config">The device config string that will be passed to backend SR driver</param>
|
||||
/// <param name="_type">The type of the SR; used to specify the SR backend driver to use</param>
|
||||
/// <param name="_sm_config">Storage backend specific configuration options</param>
|
||||
public static XenRef<Task> async_probe_ext(Session session, string _host, Dictionary<string, string> _device_config, string _type, Dictionary<string, string> _sm_config)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_sr_probe_ext(session.opaque_ref, _host, _device_config, _type, _sm_config);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_sr_probe_ext(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the shared flag on the SR
|
||||
/// First published in XenServer 4.0.
|
||||
|
@ -81,8 +81,8 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Secret proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
value = proxy.value == null ? null : (string)proxy.value;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
value = proxy.value == null ? null : proxy.value;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.secret_get_uuid(session.opaque_ref, _secret);
|
||||
else
|
||||
return (string)session.proxy.secret_get_uuid(session.opaque_ref, _secret ?? "").parse();
|
||||
return session.proxy.secret_get_uuid(session.opaque_ref, _secret ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -273,7 +273,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.secret_get_value(session.opaque_ref, _secret);
|
||||
else
|
||||
return (string)session.proxy.secret_get_value(session.opaque_ref, _secret ?? "").parse();
|
||||
return session.proxy.secret_get_value(session.opaque_ref, _secret ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
317
XenModel/XenAPI/Sr_stat.cs
Normal file
317
XenModel/XenAPI/Sr_stat.cs
Normal file
@ -0,0 +1,317 @@
|
||||
/*
|
||||
* 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 System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
|
||||
namespace XenAPI
|
||||
{
|
||||
/// <summary>
|
||||
/// A set of high-level properties associated with an SR.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
public partial class Sr_stat : XenObject<Sr_stat>
|
||||
{
|
||||
public Sr_stat()
|
||||
{
|
||||
}
|
||||
|
||||
public Sr_stat(string uuid,
|
||||
string name_label,
|
||||
string name_description,
|
||||
long free_space,
|
||||
long total_space,
|
||||
bool clustered,
|
||||
sr_health health)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.name_label = name_label;
|
||||
this.name_description = name_description;
|
||||
this.free_space = free_space;
|
||||
this.total_space = total_space;
|
||||
this.clustered = clustered;
|
||||
this.health = health;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Sr_stat from a Proxy_Sr_stat.
|
||||
/// </summary>
|
||||
/// <param name="proxy"></param>
|
||||
public Sr_stat(Proxy_Sr_stat proxy)
|
||||
{
|
||||
this.UpdateFromProxy(proxy);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates each field of this instance with the value of
|
||||
/// the corresponding field of a given Sr_stat.
|
||||
/// </summary>
|
||||
public override void UpdateFrom(Sr_stat update)
|
||||
{
|
||||
uuid = update.uuid;
|
||||
name_label = update.name_label;
|
||||
name_description = update.name_description;
|
||||
free_space = update.free_space;
|
||||
total_space = update.total_space;
|
||||
clustered = update.clustered;
|
||||
health = update.health;
|
||||
}
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Sr_stat proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
free_space = proxy.free_space == null ? 0 : long.Parse(proxy.free_space);
|
||||
total_space = proxy.total_space == null ? 0 : long.Parse(proxy.total_space);
|
||||
clustered = (bool)proxy.clustered;
|
||||
health = proxy.health == null ? (sr_health) 0 : (sr_health)Helper.EnumParseDefault(typeof(sr_health), (string)proxy.health);
|
||||
}
|
||||
|
||||
public Proxy_Sr_stat ToProxy()
|
||||
{
|
||||
Proxy_Sr_stat result_ = new Proxy_Sr_stat();
|
||||
result_.uuid = uuid;
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.free_space = free_space.ToString();
|
||||
result_.total_space = total_space.ToString();
|
||||
result_.clustered = clustered;
|
||||
result_.health = sr_health_helper.ToString(health);
|
||||
return result_;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Sr_stat from a Hashtable.
|
||||
/// Note that the fields not contained in the Hashtable
|
||||
/// will be created with their default values.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public Sr_stat(Hashtable table) : this()
|
||||
{
|
||||
UpdateFrom(table);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a Hashtable with field-value pairs, it updates the fields of this Sr_stat
|
||||
/// with the values listed in the Hashtable. Note that only the fields contained
|
||||
/// in the Hashtable will be updated and the rest will remain the same.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public void UpdateFrom(Hashtable table)
|
||||
{
|
||||
if (table.ContainsKey("uuid"))
|
||||
uuid = Marshalling.ParseString(table, "uuid");
|
||||
if (table.ContainsKey("name_label"))
|
||||
name_label = Marshalling.ParseString(table, "name_label");
|
||||
if (table.ContainsKey("name_description"))
|
||||
name_description = Marshalling.ParseString(table, "name_description");
|
||||
if (table.ContainsKey("free_space"))
|
||||
free_space = Marshalling.ParseLong(table, "free_space");
|
||||
if (table.ContainsKey("total_space"))
|
||||
total_space = Marshalling.ParseLong(table, "total_space");
|
||||
if (table.ContainsKey("clustered"))
|
||||
clustered = Marshalling.ParseBool(table, "clustered");
|
||||
if (table.ContainsKey("health"))
|
||||
health = (sr_health)Helper.EnumParseDefault(typeof(sr_health), Marshalling.ParseString(table, "health"));
|
||||
}
|
||||
|
||||
public bool DeepEquals(Sr_stat other)
|
||||
{
|
||||
if (ReferenceEquals(null, other))
|
||||
return false;
|
||||
if (ReferenceEquals(this, other))
|
||||
return true;
|
||||
|
||||
return Helper.AreEqual2(this._uuid, other._uuid) &&
|
||||
Helper.AreEqual2(this._name_label, other._name_label) &&
|
||||
Helper.AreEqual2(this._name_description, other._name_description) &&
|
||||
Helper.AreEqual2(this._free_space, other._free_space) &&
|
||||
Helper.AreEqual2(this._total_space, other._total_space) &&
|
||||
Helper.AreEqual2(this._clustered, other._clustered) &&
|
||||
Helper.AreEqual2(this._health, other._health);
|
||||
}
|
||||
|
||||
internal static List<Sr_stat> ProxyArrayToObjectList(Proxy_Sr_stat[] input)
|
||||
{
|
||||
var result = new List<Sr_stat>();
|
||||
foreach (var item in input)
|
||||
result.Add(new Sr_stat(item));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override string SaveChanges(Session session, string opaqueRef, Sr_stat 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>
|
||||
/// Uuid that uniquely identifies this SR, if one is available.
|
||||
/// </summary>
|
||||
public virtual string uuid
|
||||
{
|
||||
get { return _uuid; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _uuid))
|
||||
{
|
||||
_uuid = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("uuid");
|
||||
}
|
||||
}
|
||||
}
|
||||
private string _uuid;
|
||||
|
||||
/// <summary>
|
||||
/// Short, human-readable label for the SR.
|
||||
/// </summary>
|
||||
public virtual string name_label
|
||||
{
|
||||
get { return _name_label; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _name_label))
|
||||
{
|
||||
_name_label = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("name_label");
|
||||
}
|
||||
}
|
||||
}
|
||||
private string _name_label = "";
|
||||
|
||||
/// <summary>
|
||||
/// Longer, human-readable description of the SR. Descriptions are generally only displayed by clients when the user is examining SRs in detail.
|
||||
/// </summary>
|
||||
public virtual string name_description
|
||||
{
|
||||
get { return _name_description; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _name_description))
|
||||
{
|
||||
_name_description = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("name_description");
|
||||
}
|
||||
}
|
||||
}
|
||||
private string _name_description = "";
|
||||
|
||||
/// <summary>
|
||||
/// Number of bytes free on the backing storage (in bytes)
|
||||
/// </summary>
|
||||
public virtual long free_space
|
||||
{
|
||||
get { return _free_space; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _free_space))
|
||||
{
|
||||
_free_space = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("free_space");
|
||||
}
|
||||
}
|
||||
}
|
||||
private long _free_space;
|
||||
|
||||
/// <summary>
|
||||
/// Total physical size of the backing storage (in bytes)
|
||||
/// </summary>
|
||||
public virtual long total_space
|
||||
{
|
||||
get { return _total_space; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _total_space))
|
||||
{
|
||||
_total_space = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("total_space");
|
||||
}
|
||||
}
|
||||
}
|
||||
private long _total_space;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the SR uses clustered local storage.
|
||||
/// </summary>
|
||||
public virtual bool clustered
|
||||
{
|
||||
get { return _clustered; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _clustered))
|
||||
{
|
||||
_clustered = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("clustered");
|
||||
}
|
||||
}
|
||||
}
|
||||
private bool _clustered;
|
||||
|
||||
/// <summary>
|
||||
/// The health status of the SR.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(sr_healthConverter))]
|
||||
public virtual sr_health health
|
||||
{
|
||||
get { return _health; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _health))
|
||||
{
|
||||
_health = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("health");
|
||||
}
|
||||
}
|
||||
}
|
||||
private sr_health _health;
|
||||
}
|
||||
}
|
@ -84,8 +84,8 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Subject proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
subject_identifier = proxy.subject_identifier == null ? null : (string)proxy.subject_identifier;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
subject_identifier = proxy.subject_identifier == null ? null : proxy.subject_identifier;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
roles = proxy.roles == null ? null : XenRef<Role>.Create(proxy.roles);
|
||||
}
|
||||
@ -96,7 +96,7 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.subject_identifier = subject_identifier ?? "";
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.roles = (roles != null) ? Helper.RefListToStringArray(roles) : new string[] {};
|
||||
result_.roles = roles == null ? new string[] {} : Helper.RefListToStringArray(roles);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -258,7 +258,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.subject_get_uuid(session.opaque_ref, _subject);
|
||||
else
|
||||
return (string)session.proxy.subject_get_uuid(session.opaque_ref, _subject ?? "").parse();
|
||||
return session.proxy.subject_get_uuid(session.opaque_ref, _subject ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -272,7 +272,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.subject_get_subject_identifier(session.opaque_ref, _subject);
|
||||
else
|
||||
return (string)session.proxy.subject_get_subject_identifier(session.opaque_ref, _subject ?? "").parse();
|
||||
return session.proxy.subject_get_subject_identifier(session.opaque_ref, _subject ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -123,9 +123,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Task proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<task_allowed_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_task_allowed_operations(proxy.current_operations);
|
||||
created = proxy.created;
|
||||
@ -133,13 +133,13 @@ namespace XenAPI
|
||||
status = proxy.status == null ? (task_status_type) 0 : (task_status_type)Helper.EnumParseDefault(typeof(task_status_type), (string)proxy.status);
|
||||
resident_on = proxy.resident_on == null ? null : XenRef<Host>.Create(proxy.resident_on);
|
||||
progress = Convert.ToDouble(proxy.progress);
|
||||
type = proxy.type == null ? null : (string)proxy.type;
|
||||
result = proxy.result == null ? null : (string)proxy.result;
|
||||
type = proxy.type == null ? null : proxy.type;
|
||||
result = proxy.result == null ? null : proxy.result;
|
||||
error_info = proxy.error_info == null ? new string[] {} : (string [])proxy.error_info;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
subtask_of = proxy.subtask_of == null ? null : XenRef<Task>.Create(proxy.subtask_of);
|
||||
subtasks = proxy.subtasks == null ? null : XenRef<Task>.Create(proxy.subtasks);
|
||||
backtrace = proxy.backtrace == null ? null : (string)proxy.backtrace;
|
||||
backtrace = proxy.backtrace == null ? null : proxy.backtrace;
|
||||
}
|
||||
|
||||
public Proxy_Task ToProxy()
|
||||
@ -148,7 +148,7 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_task_allowed_operations(current_operations);
|
||||
result_.created = created;
|
||||
result_.finished = finished;
|
||||
@ -160,7 +160,7 @@ namespace XenAPI
|
||||
result_.error_info = error_info;
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.subtask_of = subtask_of ?? "";
|
||||
result_.subtasks = (subtasks != null) ? Helper.RefListToStringArray(subtasks) : new string[] {};
|
||||
result_.subtasks = subtasks == null ? new string[] {} : Helper.RefListToStringArray(subtasks);
|
||||
result_.backtrace = backtrace ?? "";
|
||||
return result_;
|
||||
}
|
||||
@ -327,7 +327,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_uuid(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_uuid(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_uuid(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -341,7 +341,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_name_label(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_name_label(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_name_label(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -355,7 +355,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_name_description(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_name_description(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_name_description(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -467,7 +467,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_type(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_type(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_type(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -481,7 +481,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_result(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_result(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_result(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -551,7 +551,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_backtrace(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_backtrace(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_backtrace(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,7 +87,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Tunnel proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
access_PIF = proxy.access_PIF == null ? null : XenRef<PIF>.Create(proxy.access_PIF);
|
||||
transport_PIF = proxy.transport_PIF == null ? null : XenRef<PIF>.Create(proxy.transport_PIF);
|
||||
status = proxy.status == null ? null : Maps.convert_from_proxy_string_string(proxy.status);
|
||||
@ -219,7 +219,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.tunnel_get_uuid(session.opaque_ref, _tunnel);
|
||||
else
|
||||
return (string)session.proxy.tunnel_get_uuid(session.opaque_ref, _tunnel ?? "").parse();
|
||||
return session.proxy.tunnel_get_uuid(session.opaque_ref, _tunnel ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -90,9 +90,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_USB_group proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
PUSBs = proxy.PUSBs == null ? null : XenRef<PUSB>.Create(proxy.PUSBs);
|
||||
VUSBs = proxy.VUSBs == null ? null : XenRef<VUSB>.Create(proxy.VUSBs);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
@ -104,8 +104,8 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.PUSBs = (PUSBs != null) ? Helper.RefListToStringArray(PUSBs) : new string[] {};
|
||||
result_.VUSBs = (VUSBs != null) ? Helper.RefListToStringArray(VUSBs) : new string[] {};
|
||||
result_.PUSBs = PUSBs == null ? new string[] {} : Helper.RefListToStringArray(PUSBs);
|
||||
result_.VUSBs = VUSBs == null ? new string[] {} : Helper.RefListToStringArray(VUSBs);
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
return result_;
|
||||
}
|
||||
@ -245,7 +245,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.usb_group_get_uuid(session.opaque_ref, _usb_group);
|
||||
else
|
||||
return (string)session.proxy.usb_group_get_uuid(session.opaque_ref, _usb_group ?? "").parse();
|
||||
return session.proxy.usb_group_get_uuid(session.opaque_ref, _usb_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -259,7 +259,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.usb_group_get_name_label(session.opaque_ref, _usb_group);
|
||||
else
|
||||
return (string)session.proxy.usb_group_get_name_label(session.opaque_ref, _usb_group ?? "").parse();
|
||||
return session.proxy.usb_group_get_name_label(session.opaque_ref, _usb_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -273,7 +273,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.usb_group_get_name_description(session.opaque_ref, _usb_group);
|
||||
else
|
||||
return (string)session.proxy.usb_group_get_name_description(session.opaque_ref, _usb_group ?? "").parse();
|
||||
return session.proxy.usb_group_get_name_description(session.opaque_ref, _usb_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -84,9 +84,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_User proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
short_name = proxy.short_name == null ? null : (string)proxy.short_name;
|
||||
fullname = proxy.fullname == null ? null : (string)proxy.fullname;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
short_name = proxy.short_name == null ? null : proxy.short_name;
|
||||
fullname = proxy.fullname == null ? null : proxy.fullname;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.user_get_uuid(session.opaque_ref, _user);
|
||||
else
|
||||
return (string)session.proxy.user_get_uuid(session.opaque_ref, _user ?? "").parse();
|
||||
return session.proxy.user_get_uuid(session.opaque_ref, _user ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -293,7 +293,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.user_get_short_name(session.opaque_ref, _user);
|
||||
else
|
||||
return (string)session.proxy.user_get_short_name(session.opaque_ref, _user ?? "").parse();
|
||||
return session.proxy.user_get_short_name(session.opaque_ref, _user ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -307,7 +307,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.user_get_fullname(session.opaque_ref, _user);
|
||||
else
|
||||
return (string)session.proxy.user_get_fullname(session.opaque_ref, _user ?? "").parse();
|
||||
return session.proxy.user_get_fullname(session.opaque_ref, _user ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -138,13 +138,13 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VBD proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vbd_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vbd_operations(proxy.current_operations);
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
VDI = proxy.VDI == null ? null : XenRef<VDI>.Create(proxy.VDI);
|
||||
device = proxy.device == null ? null : (string)proxy.device;
|
||||
userdevice = proxy.userdevice == null ? null : (string)proxy.userdevice;
|
||||
device = proxy.device == null ? null : proxy.device;
|
||||
userdevice = proxy.userdevice == null ? null : proxy.userdevice;
|
||||
bootable = (bool)proxy.bootable;
|
||||
mode = proxy.mode == null ? (vbd_mode) 0 : (vbd_mode)Helper.EnumParseDefault(typeof(vbd_mode), (string)proxy.mode);
|
||||
type = proxy.type == null ? (vbd_type) 0 : (vbd_type)Helper.EnumParseDefault(typeof(vbd_type), (string)proxy.type);
|
||||
@ -153,10 +153,10 @@ namespace XenAPI
|
||||
empty = (bool)proxy.empty;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
currently_attached = (bool)proxy.currently_attached;
|
||||
status_code = proxy.status_code == null ? 0 : long.Parse((string)proxy.status_code);
|
||||
status_detail = proxy.status_detail == null ? null : (string)proxy.status_detail;
|
||||
status_code = proxy.status_code == null ? 0 : long.Parse(proxy.status_code);
|
||||
status_detail = proxy.status_detail == null ? null : proxy.status_detail;
|
||||
runtime_properties = proxy.runtime_properties == null ? null : Maps.convert_from_proxy_string_string(proxy.runtime_properties);
|
||||
qos_algorithm_type = proxy.qos_algorithm_type == null ? null : (string)proxy.qos_algorithm_type;
|
||||
qos_algorithm_type = proxy.qos_algorithm_type == null ? null : proxy.qos_algorithm_type;
|
||||
qos_algorithm_params = proxy.qos_algorithm_params == null ? null : Maps.convert_from_proxy_string_string(proxy.qos_algorithm_params);
|
||||
qos_supported_algorithms = proxy.qos_supported_algorithms == null ? new string[] {} : (string [])proxy.qos_supported_algorithms;
|
||||
metrics = proxy.metrics == null ? null : XenRef<VBD_metrics>.Create(proxy.metrics);
|
||||
@ -166,7 +166,7 @@ namespace XenAPI
|
||||
{
|
||||
Proxy_VBD result_ = new Proxy_VBD();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vbd_operations(current_operations);
|
||||
result_.VM = VM ?? "";
|
||||
result_.VDI = VDI ?? "";
|
||||
@ -437,7 +437,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_uuid(session.opaque_ref, _vbd);
|
||||
else
|
||||
return (string)session.proxy.vbd_get_uuid(session.opaque_ref, _vbd ?? "").parse();
|
||||
return session.proxy.vbd_get_uuid(session.opaque_ref, _vbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -507,7 +507,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_device(session.opaque_ref, _vbd);
|
||||
else
|
||||
return (string)session.proxy.vbd_get_device(session.opaque_ref, _vbd ?? "").parse();
|
||||
return session.proxy.vbd_get_device(session.opaque_ref, _vbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -521,7 +521,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_userdevice(session.opaque_ref, _vbd);
|
||||
else
|
||||
return (string)session.proxy.vbd_get_userdevice(session.opaque_ref, _vbd ?? "").parse();
|
||||
return session.proxy.vbd_get_userdevice(session.opaque_ref, _vbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -647,7 +647,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_status_code(session.opaque_ref, _vbd);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vbd_get_status_code(session.opaque_ref, _vbd ?? "").parse());
|
||||
return long.Parse(session.proxy.vbd_get_status_code(session.opaque_ref, _vbd ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -661,7 +661,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_status_detail(session.opaque_ref, _vbd);
|
||||
else
|
||||
return (string)session.proxy.vbd_get_status_detail(session.opaque_ref, _vbd ?? "").parse();
|
||||
return session.proxy.vbd_get_status_detail(session.opaque_ref, _vbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -689,7 +689,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_qos_algorithm_type(session.opaque_ref, _vbd);
|
||||
else
|
||||
return (string)session.proxy.vbd_get_qos_algorithm_type(session.opaque_ref, _vbd ?? "").parse();
|
||||
return session.proxy.vbd_get_qos_algorithm_type(session.opaque_ref, _vbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,7 +87,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VBD_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
io_read_kbs = Convert.ToDouble(proxy.io_read_kbs);
|
||||
io_write_kbs = Convert.ToDouble(proxy.io_write_kbs);
|
||||
last_updated = proxy.last_updated;
|
||||
@ -215,7 +215,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_metrics_get_uuid(session.opaque_ref, _vbd_metrics);
|
||||
else
|
||||
return (string)session.proxy.vbd_metrics_get_uuid(session.opaque_ref, _vbd_metrics ?? "").parse();
|
||||
return session.proxy.vbd_metrics_get_uuid(session.opaque_ref, _vbd_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -168,22 +168,22 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VDI proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vdi_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vdi_operations(proxy.current_operations);
|
||||
SR = proxy.SR == null ? null : XenRef<SR>.Create(proxy.SR);
|
||||
VBDs = proxy.VBDs == null ? null : XenRef<VBD>.Create(proxy.VBDs);
|
||||
crash_dumps = proxy.crash_dumps == null ? null : XenRef<Crashdump>.Create(proxy.crash_dumps);
|
||||
virtual_size = proxy.virtual_size == null ? 0 : long.Parse((string)proxy.virtual_size);
|
||||
physical_utilisation = proxy.physical_utilisation == null ? 0 : long.Parse((string)proxy.physical_utilisation);
|
||||
virtual_size = proxy.virtual_size == null ? 0 : long.Parse(proxy.virtual_size);
|
||||
physical_utilisation = proxy.physical_utilisation == null ? 0 : long.Parse(proxy.physical_utilisation);
|
||||
type = proxy.type == null ? (vdi_type) 0 : (vdi_type)Helper.EnumParseDefault(typeof(vdi_type), (string)proxy.type);
|
||||
sharable = (bool)proxy.sharable;
|
||||
read_only = (bool)proxy.read_only;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
storage_lock = (bool)proxy.storage_lock;
|
||||
location = proxy.location == null ? null : (string)proxy.location;
|
||||
location = proxy.location == null ? null : proxy.location;
|
||||
managed = (bool)proxy.managed;
|
||||
missing = (bool)proxy.missing;
|
||||
parent = proxy.parent == null ? null : XenRef<VDI>.Create(proxy.parent);
|
||||
@ -208,11 +208,11 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vdi_operations(current_operations);
|
||||
result_.SR = SR ?? "";
|
||||
result_.VBDs = (VBDs != null) ? Helper.RefListToStringArray(VBDs) : new string[] {};
|
||||
result_.crash_dumps = (crash_dumps != null) ? Helper.RefListToStringArray(crash_dumps) : new string[] {};
|
||||
result_.VBDs = VBDs == null ? new string[] {} : Helper.RefListToStringArray(VBDs);
|
||||
result_.crash_dumps = crash_dumps == null ? new string[] {} : Helper.RefListToStringArray(crash_dumps);
|
||||
result_.virtual_size = virtual_size.ToString();
|
||||
result_.physical_utilisation = physical_utilisation.ToString();
|
||||
result_.type = vdi_type_helper.ToString(type);
|
||||
@ -228,7 +228,7 @@ namespace XenAPI
|
||||
result_.sm_config = Maps.convert_to_proxy_string_string(sm_config);
|
||||
result_.is_a_snapshot = is_a_snapshot;
|
||||
result_.snapshot_of = snapshot_of ?? "";
|
||||
result_.snapshots = (snapshots != null) ? Helper.RefListToStringArray(snapshots) : new string[] {};
|
||||
result_.snapshots = snapshots == null ? new string[] {} : Helper.RefListToStringArray(snapshots);
|
||||
result_.snapshot_time = snapshot_time;
|
||||
result_.tags = tags;
|
||||
result_.allow_caching = allow_caching;
|
||||
@ -535,7 +535,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_uuid(session.opaque_ref, _vdi);
|
||||
else
|
||||
return (string)session.proxy.vdi_get_uuid(session.opaque_ref, _vdi ?? "").parse();
|
||||
return session.proxy.vdi_get_uuid(session.opaque_ref, _vdi ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -549,7 +549,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_name_label(session.opaque_ref, _vdi);
|
||||
else
|
||||
return (string)session.proxy.vdi_get_name_label(session.opaque_ref, _vdi ?? "").parse();
|
||||
return session.proxy.vdi_get_name_label(session.opaque_ref, _vdi ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -563,7 +563,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_name_description(session.opaque_ref, _vdi);
|
||||
else
|
||||
return (string)session.proxy.vdi_get_name_description(session.opaque_ref, _vdi ?? "").parse();
|
||||
return session.proxy.vdi_get_name_description(session.opaque_ref, _vdi ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -647,7 +647,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_virtual_size(session.opaque_ref, _vdi);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vdi_get_virtual_size(session.opaque_ref, _vdi ?? "").parse());
|
||||
return long.Parse(session.proxy.vdi_get_virtual_size(session.opaque_ref, _vdi ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -661,7 +661,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_physical_utilisation(session.opaque_ref, _vdi);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vdi_get_physical_utilisation(session.opaque_ref, _vdi ?? "").parse());
|
||||
return long.Parse(session.proxy.vdi_get_physical_utilisation(session.opaque_ref, _vdi ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -745,7 +745,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_location(session.opaque_ref, _vdi);
|
||||
else
|
||||
return (string)session.proxy.vdi_get_location(session.opaque_ref, _vdi ?? "").parse();
|
||||
return session.proxy.vdi_get_location(session.opaque_ref, _vdi ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2018,7 +2018,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_read_database_pool_uuid(session.opaque_ref, _vdi);
|
||||
else
|
||||
return (string)session.proxy.vdi_read_database_pool_uuid(session.opaque_ref, _vdi ?? "").parse();
|
||||
return session.proxy.vdi_read_database_pool_uuid(session.opaque_ref, _vdi ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2163,7 +2163,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_list_changed_blocks(session.opaque_ref, _vdi, _vdi_to);
|
||||
else
|
||||
return (string)session.proxy.vdi_list_changed_blocks(session.opaque_ref, _vdi ?? "", _vdi_to ?? "").parse();
|
||||
return session.proxy.vdi_list_changed_blocks(session.opaque_ref, _vdi ?? "", _vdi_to ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,10 +102,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VGPU proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
GPU_group = proxy.GPU_group == null ? null : XenRef<GPU_group>.Create(proxy.GPU_group);
|
||||
device = proxy.device == null ? null : (string)proxy.device;
|
||||
device = proxy.device == null ? null : 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);
|
||||
@ -255,7 +255,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_get_uuid(session.opaque_ref, _vgpu);
|
||||
else
|
||||
return (string)session.proxy.vgpu_get_uuid(session.opaque_ref, _vgpu ?? "").parse();
|
||||
return session.proxy.vgpu_get_uuid(session.opaque_ref, _vgpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -297,7 +297,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_get_device(session.opaque_ref, _vgpu);
|
||||
else
|
||||
return (string)session.proxy.vgpu_get_device(session.opaque_ref, _vgpu ?? "").parse();
|
||||
return session.proxy.vgpu_get_device(session.opaque_ref, _vgpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -117,20 +117,20 @@ namespace XenAPI
|
||||
|
||||
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);
|
||||
max_resolution_x = proxy.max_resolution_x == null ? 0 : long.Parse((string)proxy.max_resolution_x);
|
||||
max_resolution_y = proxy.max_resolution_y == null ? 0 : long.Parse((string)proxy.max_resolution_y);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
vendor_name = proxy.vendor_name == null ? null : proxy.vendor_name;
|
||||
model_name = proxy.model_name == null ? null : proxy.model_name;
|
||||
framebuffer_size = proxy.framebuffer_size == null ? 0 : long.Parse(proxy.framebuffer_size);
|
||||
max_heads = proxy.max_heads == null ? 0 : long.Parse(proxy.max_heads);
|
||||
max_resolution_x = proxy.max_resolution_x == null ? 0 : long.Parse(proxy.max_resolution_x);
|
||||
max_resolution_y = proxy.max_resolution_y == null ? 0 : long.Parse(proxy.max_resolution_y);
|
||||
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);
|
||||
supported_on_GPU_groups = proxy.supported_on_GPU_groups == null ? null : XenRef<GPU_group>.Create(proxy.supported_on_GPU_groups);
|
||||
enabled_on_GPU_groups = proxy.enabled_on_GPU_groups == null ? null : XenRef<GPU_group>.Create(proxy.enabled_on_GPU_groups);
|
||||
implementation = proxy.implementation == null ? (vgpu_type_implementation) 0 : (vgpu_type_implementation)Helper.EnumParseDefault(typeof(vgpu_type_implementation), (string)proxy.implementation);
|
||||
identifier = proxy.identifier == null ? null : (string)proxy.identifier;
|
||||
identifier = proxy.identifier == null ? null : proxy.identifier;
|
||||
experimental = (bool)proxy.experimental;
|
||||
}
|
||||
|
||||
@ -144,11 +144,11 @@ namespace XenAPI
|
||||
result_.max_heads = max_heads.ToString();
|
||||
result_.max_resolution_x = max_resolution_x.ToString();
|
||||
result_.max_resolution_y = max_resolution_y.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[] {};
|
||||
result_.supported_on_GPU_groups = (supported_on_GPU_groups != null) ? Helper.RefListToStringArray(supported_on_GPU_groups) : new string[] {};
|
||||
result_.enabled_on_GPU_groups = (enabled_on_GPU_groups != null) ? Helper.RefListToStringArray(enabled_on_GPU_groups) : new string[] {};
|
||||
result_.supported_on_PGPUs = supported_on_PGPUs == null ? new string[] {} : Helper.RefListToStringArray(supported_on_PGPUs);
|
||||
result_.enabled_on_PGPUs = enabled_on_PGPUs == null ? new string[] {} : Helper.RefListToStringArray(enabled_on_PGPUs);
|
||||
result_.VGPUs = VGPUs == null ? new string[] {} : Helper.RefListToStringArray(VGPUs);
|
||||
result_.supported_on_GPU_groups = supported_on_GPU_groups == null ? new string[] {} : Helper.RefListToStringArray(supported_on_GPU_groups);
|
||||
result_.enabled_on_GPU_groups = enabled_on_GPU_groups == null ? new string[] {} : Helper.RefListToStringArray(enabled_on_GPU_groups);
|
||||
result_.implementation = vgpu_type_implementation_helper.ToString(implementation);
|
||||
result_.identifier = identifier ?? "";
|
||||
result_.experimental = experimental;
|
||||
@ -290,7 +290,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_uuid(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return (string)session.proxy.vgpu_type_get_uuid(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
return session.proxy.vgpu_type_get_uuid(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -304,7 +304,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_vendor_name(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return (string)session.proxy.vgpu_type_get_vendor_name(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
return session.proxy.vgpu_type_get_vendor_name(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -318,7 +318,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_model_name(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return (string)session.proxy.vgpu_type_get_model_name(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
return session.proxy.vgpu_type_get_model_name(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -332,7 +332,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_framebuffer_size(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vgpu_type_get_framebuffer_size(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.vgpu_type_get_framebuffer_size(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -346,7 +346,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_max_heads(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vgpu_type_get_max_heads(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.vgpu_type_get_max_heads(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -360,7 +360,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_max_resolution_x(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vgpu_type_get_max_resolution_x(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.vgpu_type_get_max_resolution_x(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -374,7 +374,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_max_resolution_y(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vgpu_type_get_max_resolution_y(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.vgpu_type_get_max_resolution_y(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -472,7 +472,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_identifier(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return (string)session.proxy.vgpu_type_get_identifier(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
return session.proxy.vgpu_type_get_identifier(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -153,20 +153,20 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VIF proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vif_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vif_operations(proxy.current_operations);
|
||||
device = proxy.device == null ? null : (string)proxy.device;
|
||||
device = proxy.device == null ? null : proxy.device;
|
||||
network = proxy.network == null ? null : XenRef<Network>.Create(proxy.network);
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
MAC = proxy.MAC == null ? null : (string)proxy.MAC;
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse((string)proxy.MTU);
|
||||
MAC = proxy.MAC == null ? null : proxy.MAC;
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse(proxy.MTU);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
currently_attached = (bool)proxy.currently_attached;
|
||||
status_code = proxy.status_code == null ? 0 : long.Parse((string)proxy.status_code);
|
||||
status_detail = proxy.status_detail == null ? null : (string)proxy.status_detail;
|
||||
status_code = proxy.status_code == null ? 0 : long.Parse(proxy.status_code);
|
||||
status_detail = proxy.status_detail == null ? null : proxy.status_detail;
|
||||
runtime_properties = proxy.runtime_properties == null ? null : Maps.convert_from_proxy_string_string(proxy.runtime_properties);
|
||||
qos_algorithm_type = proxy.qos_algorithm_type == null ? null : (string)proxy.qos_algorithm_type;
|
||||
qos_algorithm_type = proxy.qos_algorithm_type == null ? null : proxy.qos_algorithm_type;
|
||||
qos_algorithm_params = proxy.qos_algorithm_params == null ? null : Maps.convert_from_proxy_string_string(proxy.qos_algorithm_params);
|
||||
qos_supported_algorithms = proxy.qos_supported_algorithms == null ? new string[] {} : (string [])proxy.qos_supported_algorithms;
|
||||
metrics = proxy.metrics == null ? null : XenRef<VIF_metrics>.Create(proxy.metrics);
|
||||
@ -176,17 +176,17 @@ namespace XenAPI
|
||||
ipv6_allowed = proxy.ipv6_allowed == null ? new string[] {} : (string [])proxy.ipv6_allowed;
|
||||
ipv4_configuration_mode = proxy.ipv4_configuration_mode == null ? (vif_ipv4_configuration_mode) 0 : (vif_ipv4_configuration_mode)Helper.EnumParseDefault(typeof(vif_ipv4_configuration_mode), (string)proxy.ipv4_configuration_mode);
|
||||
ipv4_addresses = proxy.ipv4_addresses == null ? new string[] {} : (string [])proxy.ipv4_addresses;
|
||||
ipv4_gateway = proxy.ipv4_gateway == null ? null : (string)proxy.ipv4_gateway;
|
||||
ipv4_gateway = proxy.ipv4_gateway == null ? null : proxy.ipv4_gateway;
|
||||
ipv6_configuration_mode = proxy.ipv6_configuration_mode == null ? (vif_ipv6_configuration_mode) 0 : (vif_ipv6_configuration_mode)Helper.EnumParseDefault(typeof(vif_ipv6_configuration_mode), (string)proxy.ipv6_configuration_mode);
|
||||
ipv6_addresses = proxy.ipv6_addresses == null ? new string[] {} : (string [])proxy.ipv6_addresses;
|
||||
ipv6_gateway = proxy.ipv6_gateway == null ? null : (string)proxy.ipv6_gateway;
|
||||
ipv6_gateway = proxy.ipv6_gateway == null ? null : proxy.ipv6_gateway;
|
||||
}
|
||||
|
||||
public Proxy_VIF ToProxy()
|
||||
{
|
||||
Proxy_VIF result_ = new Proxy_VIF();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vif_operations(current_operations);
|
||||
result_.device = device ?? "";
|
||||
result_.network = network ?? "";
|
||||
@ -469,7 +469,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_uuid(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_uuid(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_uuid(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -511,7 +511,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_device(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_device(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_device(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -553,7 +553,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_mac(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_mac(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_mac(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -567,7 +567,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_mtu(session.opaque_ref, _vif);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vif_get_mtu(session.opaque_ref, _vif ?? "").parse());
|
||||
return long.Parse(session.proxy.vif_get_mtu(session.opaque_ref, _vif ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -609,7 +609,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_status_code(session.opaque_ref, _vif);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vif_get_status_code(session.opaque_ref, _vif ?? "").parse());
|
||||
return long.Parse(session.proxy.vif_get_status_code(session.opaque_ref, _vif ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -623,7 +623,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_status_detail(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_status_detail(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_status_detail(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -651,7 +651,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_qos_algorithm_type(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_qos_algorithm_type(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_qos_algorithm_type(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -791,7 +791,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_ipv4_gateway(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_ipv4_gateway(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_ipv4_gateway(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -833,7 +833,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_ipv6_gateway(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_ipv6_gateway(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_ipv6_gateway(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,7 +87,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VIF_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
io_read_kbs = Convert.ToDouble(proxy.io_read_kbs);
|
||||
io_write_kbs = Convert.ToDouble(proxy.io_write_kbs);
|
||||
last_updated = proxy.last_updated;
|
||||
@ -215,7 +215,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_metrics_get_uuid(session.opaque_ref, _vif_metrics);
|
||||
else
|
||||
return (string)session.proxy.vif_metrics_get_uuid(session.opaque_ref, _vif_metrics ?? "").parse();
|
||||
return session.proxy.vif_metrics_get_uuid(session.opaque_ref, _vif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,10 +87,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VLAN proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
tagged_PIF = proxy.tagged_PIF == null ? null : XenRef<PIF>.Create(proxy.tagged_PIF);
|
||||
untagged_PIF = proxy.untagged_PIF == null ? null : XenRef<PIF>.Create(proxy.untagged_PIF);
|
||||
tag = proxy.tag == null ? 0 : long.Parse((string)proxy.tag);
|
||||
tag = proxy.tag == null ? 0 : long.Parse(proxy.tag);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vlan_get_uuid(session.opaque_ref, _vlan);
|
||||
else
|
||||
return (string)session.proxy.vlan_get_uuid(session.opaque_ref, _vlan ?? "").parse();
|
||||
return session.proxy.vlan_get_uuid(session.opaque_ref, _vlan ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -257,7 +257,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vlan_get_tag(session.opaque_ref, _vlan);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vlan_get_tag(session.opaque_ref, _vlan ?? "").parse());
|
||||
return long.Parse(session.proxy.vlan_get_tag(session.opaque_ref, _vlan ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -132,7 +132,8 @@ namespace XenAPI
|
||||
long hardware_platform_version,
|
||||
bool has_vendor_device,
|
||||
bool requires_reboot,
|
||||
string reference_label)
|
||||
string reference_label,
|
||||
domain_type domain_type)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.allowed_operations = allowed_operations;
|
||||
@ -217,6 +218,7 @@ namespace XenAPI
|
||||
this.has_vendor_device = has_vendor_device;
|
||||
this.requires_reboot = requires_reboot;
|
||||
this.reference_label = reference_label;
|
||||
this.domain_type = domain_type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -317,31 +319,32 @@ namespace XenAPI
|
||||
has_vendor_device = update.has_vendor_device;
|
||||
requires_reboot = update.requires_reboot;
|
||||
reference_label = update.reference_label;
|
||||
domain_type = update.domain_type;
|
||||
}
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VM proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vm_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vm_operations(proxy.current_operations);
|
||||
power_state = proxy.power_state == null ? (vm_power_state) 0 : (vm_power_state)Helper.EnumParseDefault(typeof(vm_power_state), (string)proxy.power_state);
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
user_version = proxy.user_version == null ? 0 : long.Parse((string)proxy.user_version);
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
user_version = proxy.user_version == null ? 0 : long.Parse(proxy.user_version);
|
||||
is_a_template = (bool)proxy.is_a_template;
|
||||
is_default_template = (bool)proxy.is_default_template;
|
||||
suspend_VDI = proxy.suspend_VDI == null ? null : XenRef<VDI>.Create(proxy.suspend_VDI);
|
||||
resident_on = proxy.resident_on == null ? null : XenRef<Host>.Create(proxy.resident_on);
|
||||
affinity = proxy.affinity == null ? null : XenRef<Host>.Create(proxy.affinity);
|
||||
memory_overhead = proxy.memory_overhead == null ? 0 : long.Parse((string)proxy.memory_overhead);
|
||||
memory_target = proxy.memory_target == null ? 0 : long.Parse((string)proxy.memory_target);
|
||||
memory_static_max = proxy.memory_static_max == null ? 0 : long.Parse((string)proxy.memory_static_max);
|
||||
memory_dynamic_max = proxy.memory_dynamic_max == null ? 0 : long.Parse((string)proxy.memory_dynamic_max);
|
||||
memory_dynamic_min = proxy.memory_dynamic_min == null ? 0 : long.Parse((string)proxy.memory_dynamic_min);
|
||||
memory_static_min = proxy.memory_static_min == null ? 0 : long.Parse((string)proxy.memory_static_min);
|
||||
memory_overhead = proxy.memory_overhead == null ? 0 : long.Parse(proxy.memory_overhead);
|
||||
memory_target = proxy.memory_target == null ? 0 : long.Parse(proxy.memory_target);
|
||||
memory_static_max = proxy.memory_static_max == null ? 0 : long.Parse(proxy.memory_static_max);
|
||||
memory_dynamic_max = proxy.memory_dynamic_max == null ? 0 : long.Parse(proxy.memory_dynamic_max);
|
||||
memory_dynamic_min = proxy.memory_dynamic_min == null ? 0 : long.Parse(proxy.memory_dynamic_min);
|
||||
memory_static_min = proxy.memory_static_min == null ? 0 : long.Parse(proxy.memory_static_min);
|
||||
VCPUs_params = proxy.VCPUs_params == null ? null : Maps.convert_from_proxy_string_string(proxy.VCPUs_params);
|
||||
VCPUs_max = proxy.VCPUs_max == null ? 0 : long.Parse((string)proxy.VCPUs_max);
|
||||
VCPUs_at_startup = proxy.VCPUs_at_startup == null ? 0 : long.Parse((string)proxy.VCPUs_at_startup);
|
||||
VCPUs_max = proxy.VCPUs_max == null ? 0 : long.Parse(proxy.VCPUs_max);
|
||||
VCPUs_at_startup = proxy.VCPUs_at_startup == null ? 0 : long.Parse(proxy.VCPUs_at_startup);
|
||||
actions_after_shutdown = proxy.actions_after_shutdown == null ? (on_normal_exit) 0 : (on_normal_exit)Helper.EnumParseDefault(typeof(on_normal_exit), (string)proxy.actions_after_shutdown);
|
||||
actions_after_reboot = proxy.actions_after_reboot == null ? (on_normal_exit) 0 : (on_normal_exit)Helper.EnumParseDefault(typeof(on_normal_exit), (string)proxy.actions_after_reboot);
|
||||
actions_after_crash = proxy.actions_after_crash == null ? (on_crash_behaviour) 0 : (on_crash_behaviour)Helper.EnumParseDefault(typeof(on_crash_behaviour), (string)proxy.actions_after_crash);
|
||||
@ -351,39 +354,39 @@ namespace XenAPI
|
||||
VUSBs = proxy.VUSBs == null ? null : XenRef<VUSB>.Create(proxy.VUSBs);
|
||||
crash_dumps = proxy.crash_dumps == null ? null : XenRef<Crashdump>.Create(proxy.crash_dumps);
|
||||
VTPMs = proxy.VTPMs == null ? null : XenRef<VTPM>.Create(proxy.VTPMs);
|
||||
PV_bootloader = proxy.PV_bootloader == null ? null : (string)proxy.PV_bootloader;
|
||||
PV_kernel = proxy.PV_kernel == null ? null : (string)proxy.PV_kernel;
|
||||
PV_ramdisk = proxy.PV_ramdisk == null ? null : (string)proxy.PV_ramdisk;
|
||||
PV_args = proxy.PV_args == null ? null : (string)proxy.PV_args;
|
||||
PV_bootloader_args = proxy.PV_bootloader_args == null ? null : (string)proxy.PV_bootloader_args;
|
||||
PV_legacy_args = proxy.PV_legacy_args == null ? null : (string)proxy.PV_legacy_args;
|
||||
HVM_boot_policy = proxy.HVM_boot_policy == null ? null : (string)proxy.HVM_boot_policy;
|
||||
PV_bootloader = proxy.PV_bootloader == null ? null : proxy.PV_bootloader;
|
||||
PV_kernel = proxy.PV_kernel == null ? null : proxy.PV_kernel;
|
||||
PV_ramdisk = proxy.PV_ramdisk == null ? null : proxy.PV_ramdisk;
|
||||
PV_args = proxy.PV_args == null ? null : proxy.PV_args;
|
||||
PV_bootloader_args = proxy.PV_bootloader_args == null ? null : proxy.PV_bootloader_args;
|
||||
PV_legacy_args = proxy.PV_legacy_args == null ? null : proxy.PV_legacy_args;
|
||||
HVM_boot_policy = proxy.HVM_boot_policy == null ? null : proxy.HVM_boot_policy;
|
||||
HVM_boot_params = proxy.HVM_boot_params == null ? null : Maps.convert_from_proxy_string_string(proxy.HVM_boot_params);
|
||||
HVM_shadow_multiplier = Convert.ToDouble(proxy.HVM_shadow_multiplier);
|
||||
platform = proxy.platform == null ? null : Maps.convert_from_proxy_string_string(proxy.platform);
|
||||
PCI_bus = proxy.PCI_bus == null ? null : (string)proxy.PCI_bus;
|
||||
PCI_bus = proxy.PCI_bus == null ? null : proxy.PCI_bus;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
domid = proxy.domid == null ? 0 : long.Parse((string)proxy.domid);
|
||||
domarch = proxy.domarch == null ? null : (string)proxy.domarch;
|
||||
domid = proxy.domid == null ? 0 : long.Parse(proxy.domid);
|
||||
domarch = proxy.domarch == null ? null : proxy.domarch;
|
||||
last_boot_CPU_flags = proxy.last_boot_CPU_flags == null ? null : Maps.convert_from_proxy_string_string(proxy.last_boot_CPU_flags);
|
||||
is_control_domain = (bool)proxy.is_control_domain;
|
||||
metrics = proxy.metrics == null ? null : XenRef<VM_metrics>.Create(proxy.metrics);
|
||||
guest_metrics = proxy.guest_metrics == null ? null : XenRef<VM_guest_metrics>.Create(proxy.guest_metrics);
|
||||
last_booted_record = proxy.last_booted_record == null ? null : (string)proxy.last_booted_record;
|
||||
recommendations = proxy.recommendations == null ? null : (string)proxy.recommendations;
|
||||
last_booted_record = proxy.last_booted_record == null ? null : proxy.last_booted_record;
|
||||
recommendations = proxy.recommendations == null ? null : proxy.recommendations;
|
||||
xenstore_data = proxy.xenstore_data == null ? null : Maps.convert_from_proxy_string_string(proxy.xenstore_data);
|
||||
ha_always_run = (bool)proxy.ha_always_run;
|
||||
ha_restart_priority = proxy.ha_restart_priority == null ? null : (string)proxy.ha_restart_priority;
|
||||
ha_restart_priority = proxy.ha_restart_priority == null ? null : proxy.ha_restart_priority;
|
||||
is_a_snapshot = (bool)proxy.is_a_snapshot;
|
||||
snapshot_of = proxy.snapshot_of == null ? null : XenRef<VM>.Create(proxy.snapshot_of);
|
||||
snapshots = proxy.snapshots == null ? null : XenRef<VM>.Create(proxy.snapshots);
|
||||
snapshot_time = proxy.snapshot_time;
|
||||
transportable_snapshot_id = proxy.transportable_snapshot_id == null ? null : (string)proxy.transportable_snapshot_id;
|
||||
transportable_snapshot_id = proxy.transportable_snapshot_id == null ? null : proxy.transportable_snapshot_id;
|
||||
blobs = proxy.blobs == null ? null : Maps.convert_from_proxy_string_XenRefBlob(proxy.blobs);
|
||||
tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags;
|
||||
blocked_operations = proxy.blocked_operations == null ? null : Maps.convert_from_proxy_vm_operations_string(proxy.blocked_operations);
|
||||
snapshot_info = proxy.snapshot_info == null ? null : Maps.convert_from_proxy_string_string(proxy.snapshot_info);
|
||||
snapshot_metadata = proxy.snapshot_metadata == null ? null : (string)proxy.snapshot_metadata;
|
||||
snapshot_metadata = proxy.snapshot_metadata == null ? null : proxy.snapshot_metadata;
|
||||
parent = proxy.parent == null ? null : XenRef<VM>.Create(proxy.parent);
|
||||
children = proxy.children == null ? null : XenRef<VM>.Create(proxy.children);
|
||||
bios_strings = proxy.bios_strings == null ? null : Maps.convert_from_proxy_string_string(proxy.bios_strings);
|
||||
@ -392,25 +395,26 @@ namespace XenAPI
|
||||
snapshot_schedule = proxy.snapshot_schedule == null ? null : XenRef<VMSS>.Create(proxy.snapshot_schedule);
|
||||
is_vmss_snapshot = (bool)proxy.is_vmss_snapshot;
|
||||
appliance = proxy.appliance == null ? null : XenRef<VM_appliance>.Create(proxy.appliance);
|
||||
start_delay = proxy.start_delay == null ? 0 : long.Parse((string)proxy.start_delay);
|
||||
shutdown_delay = proxy.shutdown_delay == null ? 0 : long.Parse((string)proxy.shutdown_delay);
|
||||
order = proxy.order == null ? 0 : long.Parse((string)proxy.order);
|
||||
start_delay = proxy.start_delay == null ? 0 : long.Parse(proxy.start_delay);
|
||||
shutdown_delay = proxy.shutdown_delay == null ? 0 : long.Parse(proxy.shutdown_delay);
|
||||
order = proxy.order == null ? 0 : long.Parse(proxy.order);
|
||||
VGPUs = proxy.VGPUs == null ? null : XenRef<VGPU>.Create(proxy.VGPUs);
|
||||
attached_PCIs = proxy.attached_PCIs == null ? null : XenRef<PCI>.Create(proxy.attached_PCIs);
|
||||
suspend_SR = proxy.suspend_SR == null ? null : XenRef<SR>.Create(proxy.suspend_SR);
|
||||
version = proxy.version == null ? 0 : long.Parse((string)proxy.version);
|
||||
generation_id = proxy.generation_id == null ? null : (string)proxy.generation_id;
|
||||
hardware_platform_version = proxy.hardware_platform_version == null ? 0 : long.Parse((string)proxy.hardware_platform_version);
|
||||
version = proxy.version == null ? 0 : long.Parse(proxy.version);
|
||||
generation_id = proxy.generation_id == null ? null : proxy.generation_id;
|
||||
hardware_platform_version = proxy.hardware_platform_version == null ? 0 : long.Parse(proxy.hardware_platform_version);
|
||||
has_vendor_device = (bool)proxy.has_vendor_device;
|
||||
requires_reboot = (bool)proxy.requires_reboot;
|
||||
reference_label = proxy.reference_label == null ? null : (string)proxy.reference_label;
|
||||
reference_label = proxy.reference_label == null ? null : proxy.reference_label;
|
||||
domain_type = proxy.domain_type == null ? (domain_type) 0 : (domain_type)Helper.EnumParseDefault(typeof(domain_type), (string)proxy.domain_type);
|
||||
}
|
||||
|
||||
public Proxy_VM ToProxy()
|
||||
{
|
||||
Proxy_VM result_ = new Proxy_VM();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vm_operations(current_operations);
|
||||
result_.power_state = vm_power_state_helper.ToString(power_state);
|
||||
result_.name_label = name_label ?? "";
|
||||
@ -433,12 +437,12 @@ namespace XenAPI
|
||||
result_.actions_after_shutdown = on_normal_exit_helper.ToString(actions_after_shutdown);
|
||||
result_.actions_after_reboot = on_normal_exit_helper.ToString(actions_after_reboot);
|
||||
result_.actions_after_crash = on_crash_behaviour_helper.ToString(actions_after_crash);
|
||||
result_.consoles = (consoles != null) ? Helper.RefListToStringArray(consoles) : new string[] {};
|
||||
result_.VIFs = (VIFs != null) ? Helper.RefListToStringArray(VIFs) : new string[] {};
|
||||
result_.VBDs = (VBDs != null) ? Helper.RefListToStringArray(VBDs) : new string[] {};
|
||||
result_.VUSBs = (VUSBs != null) ? Helper.RefListToStringArray(VUSBs) : new string[] {};
|
||||
result_.crash_dumps = (crash_dumps != null) ? Helper.RefListToStringArray(crash_dumps) : new string[] {};
|
||||
result_.VTPMs = (VTPMs != null) ? Helper.RefListToStringArray(VTPMs) : new string[] {};
|
||||
result_.consoles = consoles == null ? new string[] {} : Helper.RefListToStringArray(consoles);
|
||||
result_.VIFs = VIFs == null ? new string[] {} : Helper.RefListToStringArray(VIFs);
|
||||
result_.VBDs = VBDs == null ? new string[] {} : Helper.RefListToStringArray(VBDs);
|
||||
result_.VUSBs = VUSBs == null ? new string[] {} : Helper.RefListToStringArray(VUSBs);
|
||||
result_.crash_dumps = crash_dumps == null ? new string[] {} : Helper.RefListToStringArray(crash_dumps);
|
||||
result_.VTPMs = VTPMs == null ? new string[] {} : Helper.RefListToStringArray(VTPMs);
|
||||
result_.PV_bootloader = PV_bootloader ?? "";
|
||||
result_.PV_kernel = PV_kernel ?? "";
|
||||
result_.PV_ramdisk = PV_ramdisk ?? "";
|
||||
@ -464,7 +468,7 @@ namespace XenAPI
|
||||
result_.ha_restart_priority = ha_restart_priority ?? "";
|
||||
result_.is_a_snapshot = is_a_snapshot;
|
||||
result_.snapshot_of = snapshot_of ?? "";
|
||||
result_.snapshots = (snapshots != null) ? Helper.RefListToStringArray(snapshots) : new string[] {};
|
||||
result_.snapshots = snapshots == null ? new string[] {} : Helper.RefListToStringArray(snapshots);
|
||||
result_.snapshot_time = snapshot_time;
|
||||
result_.transportable_snapshot_id = transportable_snapshot_id ?? "";
|
||||
result_.blobs = Maps.convert_to_proxy_string_XenRefBlob(blobs);
|
||||
@ -473,7 +477,7 @@ namespace XenAPI
|
||||
result_.snapshot_info = Maps.convert_to_proxy_string_string(snapshot_info);
|
||||
result_.snapshot_metadata = snapshot_metadata ?? "";
|
||||
result_.parent = parent ?? "";
|
||||
result_.children = (children != null) ? Helper.RefListToStringArray(children) : new string[] {};
|
||||
result_.children = children == null ? new string[] {} : Helper.RefListToStringArray(children);
|
||||
result_.bios_strings = Maps.convert_to_proxy_string_string(bios_strings);
|
||||
result_.protection_policy = protection_policy ?? "";
|
||||
result_.is_snapshot_from_vmpp = is_snapshot_from_vmpp;
|
||||
@ -483,8 +487,8 @@ namespace XenAPI
|
||||
result_.start_delay = start_delay.ToString();
|
||||
result_.shutdown_delay = shutdown_delay.ToString();
|
||||
result_.order = order.ToString();
|
||||
result_.VGPUs = (VGPUs != null) ? Helper.RefListToStringArray(VGPUs) : new string[] {};
|
||||
result_.attached_PCIs = (attached_PCIs != null) ? Helper.RefListToStringArray(attached_PCIs) : new string[] {};
|
||||
result_.VGPUs = VGPUs == null ? new string[] {} : Helper.RefListToStringArray(VGPUs);
|
||||
result_.attached_PCIs = attached_PCIs == null ? new string[] {} : Helper.RefListToStringArray(attached_PCIs);
|
||||
result_.suspend_SR = suspend_SR ?? "";
|
||||
result_.version = version.ToString();
|
||||
result_.generation_id = generation_id ?? "";
|
||||
@ -492,6 +496,7 @@ namespace XenAPI
|
||||
result_.has_vendor_device = has_vendor_device;
|
||||
result_.requires_reboot = requires_reboot;
|
||||
result_.reference_label = reference_label ?? "";
|
||||
result_.domain_type = domain_type_helper.ToString(domain_type);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -680,6 +685,8 @@ namespace XenAPI
|
||||
requires_reboot = Marshalling.ParseBool(table, "requires_reboot");
|
||||
if (table.ContainsKey("reference_label"))
|
||||
reference_label = Marshalling.ParseString(table, "reference_label");
|
||||
if (table.ContainsKey("domain_type"))
|
||||
domain_type = (domain_type)Helper.EnumParseDefault(typeof(domain_type), Marshalling.ParseString(table, "domain_type"));
|
||||
}
|
||||
|
||||
public bool DeepEquals(VM other, bool ignoreCurrentOperations)
|
||||
@ -773,7 +780,8 @@ namespace XenAPI
|
||||
Helper.AreEqual2(this._hardware_platform_version, other._hardware_platform_version) &&
|
||||
Helper.AreEqual2(this._has_vendor_device, other._has_vendor_device) &&
|
||||
Helper.AreEqual2(this._requires_reboot, other._requires_reboot) &&
|
||||
Helper.AreEqual2(this._reference_label, other._reference_label);
|
||||
Helper.AreEqual2(this._reference_label, other._reference_label) &&
|
||||
Helper.AreEqual2(this._domain_type, other._domain_type);
|
||||
}
|
||||
|
||||
internal static List<VM> ProxyArrayToObjectList(Proxy_VM[] input)
|
||||
@ -850,10 +858,6 @@ namespace XenAPI
|
||||
{
|
||||
VM.set_PV_legacy_args(session, opaqueRef, _PV_legacy_args);
|
||||
}
|
||||
if (!Helper.AreEqual2(_HVM_boot_policy, server._HVM_boot_policy))
|
||||
{
|
||||
VM.set_HVM_boot_policy(session, opaqueRef, _HVM_boot_policy);
|
||||
}
|
||||
if (!Helper.AreEqual2(_HVM_boot_params, server._HVM_boot_params))
|
||||
{
|
||||
VM.set_HVM_boot_params(session, opaqueRef, _HVM_boot_params);
|
||||
@ -922,6 +926,10 @@ namespace XenAPI
|
||||
{
|
||||
VM.set_actions_after_crash(session, opaqueRef, _actions_after_crash);
|
||||
}
|
||||
if (!Helper.AreEqual2(_HVM_boot_policy, server._HVM_boot_policy))
|
||||
{
|
||||
VM.set_HVM_boot_policy(session, opaqueRef, _HVM_boot_policy);
|
||||
}
|
||||
if (!Helper.AreEqual2(_HVM_shadow_multiplier, server._HVM_shadow_multiplier))
|
||||
{
|
||||
VM.set_HVM_shadow_multiplier(session, opaqueRef, _HVM_shadow_multiplier);
|
||||
@ -962,6 +970,10 @@ namespace XenAPI
|
||||
{
|
||||
VM.set_has_vendor_device(session, opaqueRef, _has_vendor_device);
|
||||
}
|
||||
if (!Helper.AreEqual2(_domain_type, server._domain_type))
|
||||
{
|
||||
VM.set_domain_type(session, opaqueRef, _domain_type);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@ -1075,7 +1087,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_uuid(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_uuid(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_uuid(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1131,7 +1143,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_name_label(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_name_label(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_name_label(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1145,7 +1157,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_name_description(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_name_description(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_name_description(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1159,7 +1171,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_user_version(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_user_version(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_user_version(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1243,7 +1255,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_overhead(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_overhead(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_overhead(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1259,7 +1271,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_target(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_target(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_target(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1273,7 +1285,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_static_max(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_static_max(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_static_max(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1287,7 +1299,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_dynamic_max(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_dynamic_max(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_dynamic_max(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1301,7 +1313,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_dynamic_min(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_dynamic_min(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_dynamic_min(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1315,7 +1327,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_static_min(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_static_min(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_static_min(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1343,7 +1355,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_vcpus_max(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_vcpus_max(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_vcpus_max(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1357,7 +1369,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_vcpus_at_startup(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_vcpus_at_startup(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_vcpus_at_startup(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1497,7 +1509,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_bootloader(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_bootloader(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_bootloader(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1511,7 +1523,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_kernel(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_kernel(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_kernel(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1525,7 +1537,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_ramdisk(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_ramdisk(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_ramdisk(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1539,7 +1551,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_args(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_args(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_args(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1553,7 +1565,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_bootloader_args(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_bootloader_args(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_bootloader_args(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1567,21 +1579,23 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_legacy_args(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_legacy_args(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_legacy_args(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the HVM/boot_policy field of the given VM.
|
||||
/// First published in XenServer 4.0.
|
||||
/// Deprecated since Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm">The opaque_ref of the given vm</param>
|
||||
[Deprecated("Unreleased")]
|
||||
public static string get_HVM_boot_policy(Session session, string _vm)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_hvm_boot_policy(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_hvm_boot_policy(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_hvm_boot_policy(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1639,7 +1653,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pci_bus(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pci_bus(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pci_bus(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1667,7 +1681,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_domid(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_domid(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_domid(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1681,7 +1695,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_domarch(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_domarch(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_domarch(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1751,7 +1765,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_last_booted_record(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_last_booted_record(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_last_booted_record(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1765,7 +1779,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_recommendations(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_recommendations(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_recommendations(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1809,7 +1823,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_ha_restart_priority(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_ha_restart_priority(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_ha_restart_priority(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1879,7 +1893,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_transportable_snapshot_id(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_transportable_snapshot_id(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_transportable_snapshot_id(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1949,7 +1963,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_snapshot_metadata(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_snapshot_metadata(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_snapshot_metadata(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2079,7 +2093,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_start_delay(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_start_delay(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_start_delay(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2093,7 +2107,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_shutdown_delay(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_shutdown_delay(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_shutdown_delay(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2107,7 +2121,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_order(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_order(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_order(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2163,7 +2177,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_version(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_version(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_version(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2177,7 +2191,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_generation_id(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_generation_id(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_generation_id(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2191,7 +2205,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_hardware_platform_version(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_hardware_platform_version(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_hardware_platform_version(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2233,7 +2247,21 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_reference_label(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_reference_label(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_reference_label(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the domain_type field of the given VM.
|
||||
/// First published in XenServer 7.4.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm">The opaque_ref of the given vm</param>
|
||||
public static domain_type get_domain_type(Session session, string _vm)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_domain_type(session.opaque_ref, _vm);
|
||||
else
|
||||
return (domain_type)Helper.EnumParseDefault(typeof(domain_type), (string)session.proxy.vm_get_domain_type(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2477,21 +2505,6 @@ namespace XenAPI
|
||||
session.proxy.vm_set_pv_legacy_args(session.opaque_ref, _vm ?? "", _legacy_args ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the HVM/boot_policy field of the given VM.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm">The opaque_ref of the given vm</param>
|
||||
/// <param name="_boot_policy">New value to set</param>
|
||||
public static void set_HVM_boot_policy(Session session, string _vm, string _boot_policy)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.vm_set_hvm_boot_policy(session.opaque_ref, _vm, _boot_policy);
|
||||
else
|
||||
session.proxy.vm_set_hvm_boot_policy(session.opaque_ref, _vm ?? "", _boot_policy ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the HVM/boot_params field of the given VM.
|
||||
/// First published in XenServer 4.0.
|
||||
@ -3558,7 +3571,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_compute_memory_overhead(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_compute_memory_overhead(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_compute_memory_overhead(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -4011,7 +4024,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_maximise_memory(session.opaque_ref, _vm, _total, _approximate);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_maximise_memory(session.opaque_ref, _vm ?? "", _total.ToString(), _approximate).parse());
|
||||
return long.Parse(session.proxy.vm_maximise_memory(session.opaque_ref, _vm ?? "", _total.ToString(), _approximate).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -4937,7 +4950,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_call_plugin(session.opaque_ref, _vm, _plugin, _fn, _args);
|
||||
else
|
||||
return (string)session.proxy.vm_call_plugin(session.opaque_ref, _vm ?? "", _plugin ?? "", _fn ?? "", Maps.convert_to_proxy_string_string(_args)).parse();
|
||||
return session.proxy.vm_call_plugin(session.opaque_ref, _vm ?? "", _plugin ?? "", _fn ?? "", Maps.convert_to_proxy_string_string(_args)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -5051,6 +5064,38 @@ namespace XenAPI
|
||||
return XenRef<Task>.Create(session.proxy.async_vm_set_actions_after_crash(session.opaque_ref, _vm ?? "", on_crash_behaviour_helper.ToString(_value)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the VM.domain_type field of the given VM, which will take effect when it is next started
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm">The opaque_ref of the given vm</param>
|
||||
/// <param name="_value">The new domain type</param>
|
||||
public static void set_domain_type(Session session, string _vm, domain_type _value)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.vm_set_domain_type(session.opaque_ref, _vm, _value);
|
||||
else
|
||||
session.proxy.vm_set_domain_type(session.opaque_ref, _vm ?? "", domain_type_helper.ToString(_value)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the VM.HVM_boot_policy field of the given VM, which will take effect when it is next started
|
||||
/// First published in XenServer 4.0.
|
||||
/// Deprecated since Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm">The opaque_ref of the given vm</param>
|
||||
/// <param name="_value">The new HVM boot policy</param>
|
||||
[Deprecated("Unreleased")]
|
||||
public static void set_HVM_boot_policy(Session session, string _vm, string _value)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.vm_set_hvm_boot_policy(session.opaque_ref, _vm, _value);
|
||||
else
|
||||
session.proxy.vm_set_hvm_boot_policy(session.opaque_ref, _vm ?? "", _value ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return a list of all the VMs known to the system.
|
||||
/// First published in XenServer 4.0.
|
||||
@ -6640,5 +6685,25 @@ namespace XenAPI
|
||||
}
|
||||
}
|
||||
private string _reference_label = "";
|
||||
|
||||
/// <summary>
|
||||
/// The type of domain that will be created when the VM is started
|
||||
/// First published in XenServer 7.4.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(domain_typeConverter))]
|
||||
public virtual domain_type domain_type
|
||||
{
|
||||
get { return _domain_type; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _domain_type))
|
||||
{
|
||||
_domain_type = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("domain_type");
|
||||
}
|
||||
}
|
||||
}
|
||||
private domain_type _domain_type = domain_type.unspecified;
|
||||
}
|
||||
}
|
||||
|
@ -132,12 +132,12 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VMPP proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
is_policy_enabled = (bool)proxy.is_policy_enabled;
|
||||
backup_type = proxy.backup_type == null ? (vmpp_backup_type) 0 : (vmpp_backup_type)Helper.EnumParseDefault(typeof(vmpp_backup_type), (string)proxy.backup_type);
|
||||
backup_retention_value = proxy.backup_retention_value == null ? 0 : long.Parse((string)proxy.backup_retention_value);
|
||||
backup_retention_value = proxy.backup_retention_value == null ? 0 : long.Parse(proxy.backup_retention_value);
|
||||
backup_frequency = proxy.backup_frequency == null ? (vmpp_backup_frequency) 0 : (vmpp_backup_frequency)Helper.EnumParseDefault(typeof(vmpp_backup_frequency), (string)proxy.backup_frequency);
|
||||
backup_schedule = proxy.backup_schedule == null ? null : Maps.convert_from_proxy_string_string(proxy.backup_schedule);
|
||||
is_backup_running = (bool)proxy.is_backup_running;
|
||||
@ -173,7 +173,7 @@ namespace XenAPI
|
||||
result_.archive_schedule = Maps.convert_to_proxy_string_string(archive_schedule);
|
||||
result_.is_archive_running = is_archive_running;
|
||||
result_.archive_last_run_time = archive_last_run_time;
|
||||
result_.VMs = (VMs != null) ? Helper.RefListToStringArray(VMs) : new string[] {};
|
||||
result_.VMs = VMs == null ? new string[] {} : Helper.RefListToStringArray(VMs);
|
||||
result_.is_alarm_enabled = is_alarm_enabled;
|
||||
result_.alarm_config = Maps.convert_to_proxy_string_string(alarm_config);
|
||||
result_.recent_alerts = recent_alerts;
|
||||
@ -453,7 +453,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_get_uuid(session.opaque_ref, _vmpp);
|
||||
else
|
||||
return (string)session.proxy.vmpp_get_uuid(session.opaque_ref, _vmpp ?? "").parse();
|
||||
return session.proxy.vmpp_get_uuid(session.opaque_ref, _vmpp ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -467,7 +467,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_get_name_label(session.opaque_ref, _vmpp);
|
||||
else
|
||||
return (string)session.proxy.vmpp_get_name_label(session.opaque_ref, _vmpp ?? "").parse();
|
||||
return session.proxy.vmpp_get_name_label(session.opaque_ref, _vmpp ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -481,7 +481,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_get_name_description(session.opaque_ref, _vmpp);
|
||||
else
|
||||
return (string)session.proxy.vmpp_get_name_description(session.opaque_ref, _vmpp ?? "").parse();
|
||||
return session.proxy.vmpp_get_name_description(session.opaque_ref, _vmpp ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -523,7 +523,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_get_backup_retention_value(session.opaque_ref, _vmpp);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vmpp_get_backup_retention_value(session.opaque_ref, _vmpp ?? "").parse());
|
||||
return long.Parse(session.proxy.vmpp_get_backup_retention_value(session.opaque_ref, _vmpp ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -793,7 +793,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_protect_now(session.opaque_ref, _vmpp);
|
||||
else
|
||||
return (string)session.proxy.vmpp_protect_now(session.opaque_ref, _vmpp ?? "").parse();
|
||||
return session.proxy.vmpp_protect_now(session.opaque_ref, _vmpp ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -807,7 +807,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_archive_now(session.opaque_ref, _snapshot);
|
||||
else
|
||||
return (string)session.proxy.vmpp_archive_now(session.opaque_ref, _snapshot ?? "").parse();
|
||||
return session.proxy.vmpp_archive_now(session.opaque_ref, _snapshot ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,12 +102,12 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VMSS proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
enabled = (bool)proxy.enabled;
|
||||
type = proxy.type == null ? (vmss_type) 0 : (vmss_type)Helper.EnumParseDefault(typeof(vmss_type), (string)proxy.type);
|
||||
retained_snapshots = proxy.retained_snapshots == null ? 0 : long.Parse((string)proxy.retained_snapshots);
|
||||
retained_snapshots = proxy.retained_snapshots == null ? 0 : long.Parse(proxy.retained_snapshots);
|
||||
frequency = proxy.frequency == null ? (vmss_frequency) 0 : (vmss_frequency)Helper.EnumParseDefault(typeof(vmss_frequency), (string)proxy.frequency);
|
||||
schedule = proxy.schedule == null ? null : Maps.convert_from_proxy_string_string(proxy.schedule);
|
||||
last_run_time = proxy.last_run_time;
|
||||
@ -126,7 +126,7 @@ namespace XenAPI
|
||||
result_.frequency = vmss_frequency_helper.ToString(frequency);
|
||||
result_.schedule = Maps.convert_to_proxy_string_string(schedule);
|
||||
result_.last_run_time = last_run_time;
|
||||
result_.VMs = (VMs != null) ? Helper.RefListToStringArray(VMs) : new string[] {};
|
||||
result_.VMs = VMs == null ? new string[] {} : Helper.RefListToStringArray(VMs);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmss_get_uuid(session.opaque_ref, _vmss);
|
||||
else
|
||||
return (string)session.proxy.vmss_get_uuid(session.opaque_ref, _vmss ?? "").parse();
|
||||
return session.proxy.vmss_get_uuid(session.opaque_ref, _vmss ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -363,7 +363,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmss_get_name_label(session.opaque_ref, _vmss);
|
||||
else
|
||||
return (string)session.proxy.vmss_get_name_label(session.opaque_ref, _vmss ?? "").parse();
|
||||
return session.proxy.vmss_get_name_label(session.opaque_ref, _vmss ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -377,7 +377,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmss_get_name_description(session.opaque_ref, _vmss);
|
||||
else
|
||||
return (string)session.proxy.vmss_get_name_description(session.opaque_ref, _vmss ?? "").parse();
|
||||
return session.proxy.vmss_get_name_description(session.opaque_ref, _vmss ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -419,7 +419,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmss_get_retained_snapshots(session.opaque_ref, _vmss);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vmss_get_retained_snapshots(session.opaque_ref, _vmss ?? "").parse());
|
||||
return long.Parse(session.proxy.vmss_get_retained_snapshots(session.opaque_ref, _vmss ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -534,7 +534,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmss_snapshot_now(session.opaque_ref, _vmss);
|
||||
else
|
||||
return (string)session.proxy.vmss_snapshot_now(session.opaque_ref, _vmss ?? "").parse();
|
||||
return session.proxy.vmss_snapshot_now(session.opaque_ref, _vmss ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -90,9 +90,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VM_appliance proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vm_appliance_operation>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vm_appliance_operation(proxy.current_operations);
|
||||
VMs = proxy.VMs == null ? null : XenRef<VM>.Create(proxy.VMs);
|
||||
@ -104,9 +104,9 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vm_appliance_operation(current_operations);
|
||||
result_.VMs = (VMs != null) ? Helper.RefListToStringArray(VMs) : new string[] {};
|
||||
result_.VMs = VMs == null ? new string[] {} : Helper.RefListToStringArray(VMs);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_appliance_get_uuid(session.opaque_ref, _vm_appliance);
|
||||
else
|
||||
return (string)session.proxy.vm_appliance_get_uuid(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
return session.proxy.vm_appliance_get_uuid(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -313,7 +313,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_appliance_get_name_label(session.opaque_ref, _vm_appliance);
|
||||
else
|
||||
return (string)session.proxy.vm_appliance_get_name_label(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
return session.proxy.vm_appliance_get_name_label(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -327,7 +327,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_appliance_get_name_description(session.opaque_ref, _vm_appliance);
|
||||
else
|
||||
return (string)session.proxy.vm_appliance_get_name_description(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
return session.proxy.vm_appliance_get_name_description(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -114,7 +114,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VM_guest_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
os_version = proxy.os_version == null ? null : Maps.convert_from_proxy_string_string(proxy.os_version);
|
||||
PV_drivers_version = proxy.PV_drivers_version == null ? null : Maps.convert_from_proxy_string_string(proxy.PV_drivers_version);
|
||||
PV_drivers_up_to_date = (bool)proxy.PV_drivers_up_to_date;
|
||||
@ -287,7 +287,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_guest_metrics_get_uuid(session.opaque_ref, _vm_guest_metrics);
|
||||
else
|
||||
return (string)session.proxy.vm_guest_metrics_get_uuid(session.opaque_ref, _vm_guest_metrics ?? "").parse();
|
||||
return session.proxy.vm_guest_metrics_get_uuid(session.opaque_ref, _vm_guest_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -64,7 +64,8 @@ namespace XenAPI
|
||||
Dictionary<string, string> other_config,
|
||||
bool hvm,
|
||||
bool nested_virt,
|
||||
bool nomigrate)
|
||||
bool nomigrate,
|
||||
domain_type current_domain_type)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.memory_actual = memory_actual;
|
||||
@ -81,6 +82,7 @@ namespace XenAPI
|
||||
this.hvm = hvm;
|
||||
this.nested_virt = nested_virt;
|
||||
this.nomigrate = nomigrate;
|
||||
this.current_domain_type = current_domain_type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -113,13 +115,14 @@ namespace XenAPI
|
||||
hvm = update.hvm;
|
||||
nested_virt = update.nested_virt;
|
||||
nomigrate = update.nomigrate;
|
||||
current_domain_type = update.current_domain_type;
|
||||
}
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VM_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
memory_actual = proxy.memory_actual == null ? 0 : long.Parse((string)proxy.memory_actual);
|
||||
VCPUs_number = proxy.VCPUs_number == null ? 0 : long.Parse((string)proxy.VCPUs_number);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
memory_actual = proxy.memory_actual == null ? 0 : long.Parse(proxy.memory_actual);
|
||||
VCPUs_number = proxy.VCPUs_number == null ? 0 : long.Parse(proxy.VCPUs_number);
|
||||
VCPUs_utilisation = proxy.VCPUs_utilisation == null ? null : Maps.convert_from_proxy_long_double(proxy.VCPUs_utilisation);
|
||||
VCPUs_CPU = proxy.VCPUs_CPU == null ? null : Maps.convert_from_proxy_long_long(proxy.VCPUs_CPU);
|
||||
VCPUs_params = proxy.VCPUs_params == null ? null : Maps.convert_from_proxy_string_string(proxy.VCPUs_params);
|
||||
@ -132,6 +135,7 @@ namespace XenAPI
|
||||
hvm = (bool)proxy.hvm;
|
||||
nested_virt = (bool)proxy.nested_virt;
|
||||
nomigrate = (bool)proxy.nomigrate;
|
||||
current_domain_type = proxy.current_domain_type == null ? (domain_type) 0 : (domain_type)Helper.EnumParseDefault(typeof(domain_type), (string)proxy.current_domain_type);
|
||||
}
|
||||
|
||||
public Proxy_VM_metrics ToProxy()
|
||||
@ -152,6 +156,7 @@ namespace XenAPI
|
||||
result_.hvm = hvm;
|
||||
result_.nested_virt = nested_virt;
|
||||
result_.nomigrate = nomigrate;
|
||||
result_.current_domain_type = domain_type_helper.ToString(current_domain_type);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -204,6 +209,8 @@ namespace XenAPI
|
||||
nested_virt = Marshalling.ParseBool(table, "nested_virt");
|
||||
if (table.ContainsKey("nomigrate"))
|
||||
nomigrate = Marshalling.ParseBool(table, "nomigrate");
|
||||
if (table.ContainsKey("current_domain_type"))
|
||||
current_domain_type = (domain_type)Helper.EnumParseDefault(typeof(domain_type), Marshalling.ParseString(table, "current_domain_type"));
|
||||
}
|
||||
|
||||
public bool DeepEquals(VM_metrics other)
|
||||
@ -227,7 +234,8 @@ namespace XenAPI
|
||||
Helper.AreEqual2(this._other_config, other._other_config) &&
|
||||
Helper.AreEqual2(this._hvm, other._hvm) &&
|
||||
Helper.AreEqual2(this._nested_virt, other._nested_virt) &&
|
||||
Helper.AreEqual2(this._nomigrate, other._nomigrate);
|
||||
Helper.AreEqual2(this._nomigrate, other._nomigrate) &&
|
||||
Helper.AreEqual2(this._current_domain_type, other._current_domain_type);
|
||||
}
|
||||
|
||||
internal static List<VM_metrics> ProxyArrayToObjectList(Proxy_VM_metrics[] input)
|
||||
@ -295,7 +303,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_metrics_get_uuid(session.opaque_ref, _vm_metrics);
|
||||
else
|
||||
return (string)session.proxy.vm_metrics_get_uuid(session.opaque_ref, _vm_metrics ?? "").parse();
|
||||
return session.proxy.vm_metrics_get_uuid(session.opaque_ref, _vm_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -309,7 +317,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_metrics_get_memory_actual(session.opaque_ref, _vm_metrics);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_metrics_get_memory_actual(session.opaque_ref, _vm_metrics ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_metrics_get_memory_actual(session.opaque_ref, _vm_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -323,7 +331,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_metrics_get_vcpus_number(session.opaque_ref, _vm_metrics);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_metrics_get_vcpus_number(session.opaque_ref, _vm_metrics ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_metrics_get_vcpus_number(session.opaque_ref, _vm_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -494,6 +502,20 @@ namespace XenAPI
|
||||
return (bool)session.proxy.vm_metrics_get_nomigrate(session.opaque_ref, _vm_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the current_domain_type field of the given VM_metrics.
|
||||
/// First published in XenServer 7.4.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm_metrics">The opaque_ref of the given vm_metrics</param>
|
||||
public static domain_type get_current_domain_type(Session session, string _vm_metrics)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_metrics_get_current_domain_type(session.opaque_ref, _vm_metrics);
|
||||
else
|
||||
return (domain_type)Helper.EnumParseDefault(typeof(domain_type), (string)session.proxy.vm_metrics_get_current_domain_type(session.opaque_ref, _vm_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the other_config field of the given VM_metrics.
|
||||
/// First published in XenServer 5.0.
|
||||
@ -844,5 +866,25 @@ namespace XenAPI
|
||||
}
|
||||
}
|
||||
private bool _nomigrate = false;
|
||||
|
||||
/// <summary>
|
||||
/// The current domain type of the VM (for running,suspended, or paused VMs). The last-known domain type for halted VMs.
|
||||
/// First published in XenServer 7.4.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(domain_typeConverter))]
|
||||
public virtual domain_type current_domain_type
|
||||
{
|
||||
get { return _current_domain_type; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _current_domain_type))
|
||||
{
|
||||
_current_domain_type = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("current_domain_type");
|
||||
}
|
||||
}
|
||||
}
|
||||
private domain_type _current_domain_type = domain_type.unspecified;
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VTPM proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
backend = proxy.backend == null ? null : XenRef<VM>.Create(proxy.backend);
|
||||
}
|
||||
@ -250,7 +250,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vtpm_get_uuid(session.opaque_ref, _vtpm);
|
||||
else
|
||||
return (string)session.proxy.vtpm_get_uuid(session.opaque_ref, _vtpm ?? "").parse();
|
||||
return session.proxy.vtpm_get_uuid(session.opaque_ref, _vtpm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -93,7 +93,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VUSB proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vusb_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vusb_operations(proxy.current_operations);
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
@ -106,7 +106,7 @@ namespace XenAPI
|
||||
{
|
||||
Proxy_VUSB result_ = new Proxy_VUSB();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vusb_operations(current_operations);
|
||||
result_.VM = VM ?? "";
|
||||
result_.USB_group = USB_group ?? "";
|
||||
@ -233,7 +233,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vusb_get_uuid(session.opaque_ref, _vusb);
|
||||
else
|
||||
return (string)session.proxy.vusb_get_uuid(session.opaque_ref, _vusb ?? "").parse();
|
||||
return session.proxy.vusb_get_uuid(session.opaque_ref, _vusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,11 +87,11 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Vdi_nbd_server_info proxy)
|
||||
{
|
||||
exportname = proxy.exportname == null ? null : (string)proxy.exportname;
|
||||
address = proxy.address == null ? null : (string)proxy.address;
|
||||
port = proxy.port == null ? 0 : long.Parse((string)proxy.port);
|
||||
cert = proxy.cert == null ? null : (string)proxy.cert;
|
||||
subject = proxy.subject == null ? null : (string)proxy.subject;
|
||||
exportname = proxy.exportname == null ? null : proxy.exportname;
|
||||
address = proxy.address == null ? null : proxy.address;
|
||||
port = proxy.port == null ? 0 : long.Parse(proxy.port);
|
||||
cert = proxy.cert == null ? null : proxy.cert;
|
||||
subject = proxy.subject == null ? null : proxy.subject;
|
||||
}
|
||||
|
||||
public Proxy_Vdi_nbd_server_info ToProxy()
|
||||
|
@ -37,7 +37,7 @@ namespace XenAPI
|
||||
[JsonConverter(typeof(cluster_host_operationConverter))]
|
||||
public enum cluster_host_operation
|
||||
{
|
||||
enable, disable, unknown
|
||||
enable, disable, destroy, unknown
|
||||
}
|
||||
|
||||
public static class cluster_host_operation_helper
|
||||
@ -58,6 +58,8 @@ namespace XenAPI
|
||||
return "enable";
|
||||
case cluster_host_operation.disable:
|
||||
return "disable";
|
||||
case cluster_host_operation.destroy:
|
||||
return "destroy";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
|
78
XenModel/XenAPI/domain_type.cs
Normal file
78
XenModel/XenAPI/domain_type.cs
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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 Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace XenAPI
|
||||
{
|
||||
[JsonConverter(typeof(domain_typeConverter))]
|
||||
public enum domain_type
|
||||
{
|
||||
hvm, pv, pv_in_pvh, unspecified, unknown
|
||||
}
|
||||
|
||||
public static class domain_type_helper
|
||||
{
|
||||
public static string ToString(domain_type x)
|
||||
{
|
||||
return x.StringOf();
|
||||
}
|
||||
}
|
||||
|
||||
public static partial class EnumExt
|
||||
{
|
||||
public static string StringOf(this domain_type x)
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
case domain_type.hvm:
|
||||
return "hvm";
|
||||
case domain_type.pv:
|
||||
return "pv";
|
||||
case domain_type.pv_in_pvh:
|
||||
return "pv_in_pvh";
|
||||
case domain_type.unspecified:
|
||||
return "unspecified";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class domain_typeConverter : XenEnumConverter
|
||||
{
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteValue(((domain_type)value).StringOf());
|
||||
}
|
||||
}
|
||||
}
|
74
XenModel/XenAPI/sr_health.cs
Normal file
74
XenModel/XenAPI/sr_health.cs
Normal file
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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 Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace XenAPI
|
||||
{
|
||||
[JsonConverter(typeof(sr_healthConverter))]
|
||||
public enum sr_health
|
||||
{
|
||||
healthy, recovering, unknown
|
||||
}
|
||||
|
||||
public static class sr_health_helper
|
||||
{
|
||||
public static string ToString(sr_health x)
|
||||
{
|
||||
return x.StringOf();
|
||||
}
|
||||
}
|
||||
|
||||
public static partial class EnumExt
|
||||
{
|
||||
public static string StringOf(this sr_health x)
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
case sr_health.healthy:
|
||||
return "healthy";
|
||||
case sr_health.recovering:
|
||||
return "recovering";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class sr_healthConverter : XenEnumConverter
|
||||
{
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteValue(((sr_health)value).StringOf());
|
||||
}
|
||||
}
|
||||
}
|
@ -362,6 +362,7 @@
|
||||
<Compile Include="XenAPI\cluster_operation.cs" />
|
||||
<Compile Include="XenAPI\Converters.cs" />
|
||||
<Compile Include="XenAPI\DeprecatedAttribute.cs" />
|
||||
<Compile Include="XenAPI\domain_type.cs" />
|
||||
<Compile Include="XenAPI\DR_task.cs" />
|
||||
<Compile Include="XenAPI\Feature.cs" />
|
||||
<Compile Include="XenAPI\FriendlyErrorNames.Designer.cs">
|
||||
@ -388,6 +389,7 @@
|
||||
<Compile Include="XenAPI\pool_allowed_operations.cs" />
|
||||
<Compile Include="XenAPI\Pool_update.cs" />
|
||||
<Compile Include="XenAPI\primary_address_type.cs" />
|
||||
<Compile Include="XenAPI\Probe_result.cs" />
|
||||
<Compile Include="XenAPI\PUSB.cs" />
|
||||
<Compile Include="XenAPI\PVS_cache_storage.cs" />
|
||||
<Compile Include="XenAPI\PVS_proxy.cs" />
|
||||
@ -396,6 +398,8 @@
|
||||
<Compile Include="XenAPI\PVS_site.cs" />
|
||||
<Compile Include="XenAPI\SDN_controller.cs" />
|
||||
<Compile Include="XenAPI\sdn_controller_protocol.cs" />
|
||||
<Compile Include="XenAPI\sr_health.cs" />
|
||||
<Compile Include="XenAPI\Sr_stat.cs" />
|
||||
<Compile Include="XenAPI\tristate_type.cs" />
|
||||
<Compile Include="XenAPI\update_after_apply_guidance.cs" />
|
||||
<Compile Include="XenAPI\USB_group.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user