CP-28229: Update XenCenter to remove Cluster.network

This commit is contained in:
serenc 2018-05-18 14:29:50 +01:00 committed by Mihaela Stoica
parent 9a7fcde66e
commit 29d82b1498
12 changed files with 162 additions and 100 deletions

View File

@ -170,8 +170,8 @@ namespace XenAdmin.Dialogs
var pif = Tag as PIF;
var existingCluster = network != null ? network.Connection.Cache.Clusters.FirstOrDefault() : null;
if (pif != null && existingCluster != null && existingCluster.network.opaque_ref == network.opaque_ref)
if (pif != null && existingCluster != null)
{
Host host = network.Connection.Resolve(pif.host);

View File

@ -144,9 +144,10 @@ namespace XenAdmin.SettingsPanels
if (cluster != null)
{
var clusterHostOnMaster = pool.Connection.ResolveAll(cluster.cluster_hosts).FirstOrDefault(c => c.host.opaque_ref == pool.master.opaque_ref);
foreach (NetworkComboBoxItem item in comboBoxNetwork.Items.Cast<NetworkComboBoxItem>())
{
if (item.Network.opaque_ref == cluster.network.opaque_ref)
if (clusterHostOnMaster != null && item.Network.PIFs.Any(pif => pif.opaque_ref == clusterHostOnMaster.PIF.opaque_ref))
{
comboBoxNetwork.SelectedItem = item;
break;

View File

@ -250,7 +250,7 @@ namespace XenAdmin.Actions
private void DisableClustering(PIF pif, out List<PBD> gfs2Pbds)
{
gfs2Pbds = new List<PBD>();
var isUsedByClustering = Connection.Cache.Clusters.Any(cluster => cluster.network.opaque_ref == pif.network.opaque_ref);
var isUsedByClustering = Connection.Cache.Cluster_hosts.Any(cluster => cluster.PIF.opaque_ref == pif.opaque_ref);
if (!isUsedByClustering)
return;
@ -286,7 +286,7 @@ namespace XenAdmin.Actions
/// </summary>
private void EnableClustering(PIF pif, List<PBD> gfs2Pbds)
{
var isUsedByClustering = Connection.Cache.Clusters.Any(cluster => cluster.network.opaque_ref == pif.network.opaque_ref);
var isUsedByClustering = Connection.Cache.Cluster_hosts.Any(cluster => cluster.PIF.opaque_ref == pif.opaque_ref);
if (!isUsedByClustering)
return;

View File

@ -339,7 +339,7 @@ namespace XenAdmin.Actions
private static void ClearIP(AsyncAction action, PIF pif, int hi)
{
// if the network is used by clustering, then we don't remove the IP address
var isUsedByClustering = pif.Connection.Cache.Clusters.Any(cluster => cluster.network.opaque_ref == pif.network.opaque_ref);
var isUsedByClustering = pif.Connection.Cache.Cluster_hosts.Any(cluster => cluster.PIF.opaque_ref == pif.opaque_ref);
if (isUsedByClustering)
return;

View File

@ -51,14 +51,11 @@ namespace XenAdmin.Actions
if (existingCluster != null)
{
Cluster.pool_destroy(Session, existingCluster.opaque_ref);
var network = Connection.Resolve(existingCluster.network);
var clusterHosts = Connection.ResolveAll(existingCluster.cluster_hosts);
if (network != null)
foreach (var clusterHost in clusterHosts)
{
foreach (var pif in Connection.ResolveAll(network.PIFs))
{
PIF.set_disallow_unplug(Session, pif.opaque_ref, false);
}
PIF.set_disallow_unplug(Session, clusterHost.PIF.opaque_ref, false);
}
}
Description = string.Format(Messages.DISABLED_CLUSTERING_ON_POOL, Pool.Name());

View File

@ -58,7 +58,8 @@ namespace XenAPI
API_2_8 = 19, //XenServer 7.3 (inverness)
API_2_9 = 20, //XenServer 7.4 (jura)
API_2_10 = 21, //Unreleased (kolkata)
LATEST = 21,
API_2_11 = 22, //Unreleased (lima)
LATEST = 22,
UNKNOWN = 99
}
@ -110,6 +111,8 @@ namespace XenAPI
return "2.9";
case API_Version.API_2_10:
return "2.10";
case API_Version.API_2_11:
return "2.11";
default:
return "Unknown";
}

View File

@ -50,7 +50,6 @@ namespace XenAPI
public Cluster(string uuid,
List<XenRef<Cluster_host>> cluster_hosts,
XenRef<Network> network,
string cluster_token,
string cluster_stack,
List<cluster_operation> allowed_operations,
@ -63,7 +62,6 @@ namespace XenAPI
{
this.uuid = uuid;
this.cluster_hosts = cluster_hosts;
this.network = network;
this.cluster_token = cluster_token;
this.cluster_stack = cluster_stack;
this.allowed_operations = allowed_operations;
@ -92,7 +90,6 @@ namespace XenAPI
{
uuid = update.uuid;
cluster_hosts = update.cluster_hosts;
network = update.network;
cluster_token = update.cluster_token;
cluster_stack = update.cluster_stack;
allowed_operations = update.allowed_operations;
@ -108,7 +105,6 @@ namespace XenAPI
{
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 : 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);
@ -125,7 +121,6 @@ namespace XenAPI
Proxy_Cluster result_ = new Proxy_Cluster();
result_.uuid = uuid ?? "";
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 ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
@ -161,8 +156,6 @@ namespace XenAPI
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"))
@ -195,7 +188,6 @@ namespace XenAPI
return Helper.AreEqual2(this._uuid, other._uuid) &&
Helper.AreEqual2(this._cluster_hosts, other._cluster_hosts) &&
Helper.AreEqual2(this._network, other._network) &&
Helper.AreEqual2(this._cluster_token, other._cluster_token) &&
Helper.AreEqual2(this._cluster_stack, other._cluster_stack) &&
Helper.AreEqual2(this._allowed_operations, other._allowed_operations) &&
@ -288,20 +280,6 @@ namespace XenAPI
return XenRef<Cluster_host>.Create(session.proxy.cluster_get_cluster_hosts(session.opaque_ref, _cluster ?? "").parse());
}
/// <summary>
/// Get the network field of the given Cluster.
/// Experimental. First published in Unreleased.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_cluster">The opaque_ref of the given cluster</param>
public static XenRef<Network> get_network(Session session, string _cluster)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.cluster_get_network(session.opaque_ref, _cluster);
else
return XenRef<Network>.Create(session.proxy.cluster_get_network(session.opaque_ref, _cluster ?? "").parse());
}
/// <summary>
/// Get the cluster_token field of the given Cluster.
/// Experimental. First published in Unreleased.
@ -477,17 +455,17 @@ namespace XenAPI
/// 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>
/// <param name="_pif">The PIF to connect the cluster's first cluster_host to</param>
/// <param name="_cluster_stack">simply the string 'corosync'. No other cluster stacks are currently supported</param>
/// <param name="_pool_auto_join">true if xapi is automatically joining new pool members to the cluster</param>
/// <param name="_token_timeout">Corosync token timeout in seconds</param>
/// <param name="_token_timeout_coefficient">Corosync token timeout coefficient in seconds</param>
public static XenRef<Cluster> create(Session session, string _network, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient)
public static XenRef<Cluster> create(Session session, string _pif, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.cluster_create(session.opaque_ref, _network, _cluster_stack, _pool_auto_join, _token_timeout, _token_timeout_coefficient);
return session.JsonRpcClient.cluster_create(session.opaque_ref, _pif, _cluster_stack, _pool_auto_join, _token_timeout, _token_timeout_coefficient);
else
return XenRef<Cluster>.Create(session.proxy.cluster_create(session.opaque_ref, _network ?? "", _cluster_stack ?? "", _pool_auto_join, _token_timeout, _token_timeout_coefficient).parse());
return XenRef<Cluster>.Create(session.proxy.cluster_create(session.opaque_ref, _pif ?? "", _cluster_stack ?? "", _pool_auto_join, _token_timeout, _token_timeout_coefficient).parse());
}
/// <summary>
@ -495,17 +473,17 @@ namespace XenAPI
/// 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>
/// <param name="_pif">The PIF to connect the cluster's first cluster_host to</param>
/// <param name="_cluster_stack">simply the string 'corosync'. No other cluster stacks are currently supported</param>
/// <param name="_pool_auto_join">true if xapi is automatically joining new pool members to the cluster</param>
/// <param name="_token_timeout">Corosync token timeout in seconds</param>
/// <param name="_token_timeout_coefficient">Corosync token timeout coefficient in seconds</param>
public static XenRef<Task> async_create(Session session, string _network, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient)
public static XenRef<Task> async_create(Session session, string _pif, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.async_cluster_create(session.opaque_ref, _network, _cluster_stack, _pool_auto_join, _token_timeout, _token_timeout_coefficient);
return session.JsonRpcClient.async_cluster_create(session.opaque_ref, _pif, _cluster_stack, _pool_auto_join, _token_timeout, _token_timeout_coefficient);
else
return XenRef<Task>.Create(session.proxy.async_cluster_create(session.opaque_ref, _network ?? "", _cluster_stack ?? "", _pool_auto_join, _token_timeout, _token_timeout_coefficient).parse());
return XenRef<Task>.Create(session.proxy.async_cluster_create(session.opaque_ref, _pif ?? "", _cluster_stack ?? "", _pool_auto_join, _token_timeout, _token_timeout_coefficient).parse());
}
/// <summary>
@ -536,6 +514,34 @@ namespace XenAPI
return XenRef<Task>.Create(session.proxy.async_cluster_destroy(session.opaque_ref, _cluster ?? "").parse());
}
/// <summary>
/// Returns the network used by the cluster for inter-host communication, i.e. the network shared by all cluster host PIFs
/// Experimental. First published in Unreleased.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_cluster">The opaque_ref of the given cluster</param>
public static XenRef<Network> get_network(Session session, string _cluster)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.cluster_get_network(session.opaque_ref, _cluster);
else
return XenRef<Network>.Create(session.proxy.cluster_get_network(session.opaque_ref, _cluster ?? "").parse());
}
/// <summary>
/// Returns the network used by the cluster for inter-host communication, i.e. the network shared by all cluster host PIFs
/// Experimental. First published in Unreleased.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_cluster">The opaque_ref of the given cluster</param>
public static XenRef<Task> async_get_network(Session session, string _cluster)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.async_cluster_get_network(session.opaque_ref, _cluster);
else
return XenRef<Task>.Create(session.proxy.async_cluster_get_network(session.opaque_ref, _cluster ?? "").parse());
}
/// <summary>
/// Attempt to create a Cluster from the entire pool
/// Experimental. First published in Unreleased.
@ -718,26 +724,6 @@ namespace XenAPI
}
private List<XenRef<Cluster_host>> _cluster_hosts = new List<XenRef<Cluster_host>>() {};
/// <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
{
get { return _network; }
set
{
if (!Helper.AreEqual(value, _network))
{
_network = value;
Changed = true;
NotifyPropertyChanged("network");
}
}
}
private XenRef<Network> _network = new XenRef<Network>("OpaqueRef:NULL");
/// <summary>
/// The secret key used by xapi-clusterd when it talks to itself on other hosts
/// Experimental. First published in Unreleased.
@ -813,7 +799,7 @@ namespace XenAPI
private Dictionary<string, cluster_operation> _current_operations = new Dictionary<string, cluster_operation>() {};
/// <summary>
/// True if xapi is automatically joining new pool members to the cluster. This will be `true` in the first release
/// True if 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

View File

@ -52,6 +52,7 @@ namespace XenAPI
XenRef<Cluster> cluster,
XenRef<Host> host,
bool enabled,
XenRef<PIF> PIF,
List<cluster_host_operation> allowed_operations,
Dictionary<string, cluster_host_operation> current_operations,
Dictionary<string, string> other_config)
@ -60,6 +61,7 @@ namespace XenAPI
this.cluster = cluster;
this.host = host;
this.enabled = enabled;
this.PIF = PIF;
this.allowed_operations = allowed_operations;
this.current_operations = current_operations;
this.other_config = other_config;
@ -84,6 +86,7 @@ namespace XenAPI
cluster = update.cluster;
host = update.host;
enabled = update.enabled;
PIF = update.PIF;
allowed_operations = update.allowed_operations;
current_operations = update.current_operations;
other_config = update.other_config;
@ -95,6 +98,7 @@ namespace XenAPI
cluster = proxy.cluster == null ? null : XenRef<Cluster>.Create(proxy.cluster);
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
enabled = (bool)proxy.enabled;
PIF = proxy.PIF == null ? null : XenRef<PIF>.Create(proxy.PIF);
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<cluster_host_operation>(proxy.allowed_operations);
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_cluster_host_operation(proxy.current_operations);
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
@ -107,6 +111,7 @@ namespace XenAPI
result_.cluster = cluster ?? "";
result_.host = host ?? "";
result_.enabled = enabled;
result_.PIF = PIF ?? "";
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);
@ -140,6 +145,8 @@ namespace XenAPI
host = Marshalling.ParseRef<Host>(table, "host");
if (table.ContainsKey("enabled"))
enabled = Marshalling.ParseBool(table, "enabled");
if (table.ContainsKey("PIF"))
PIF = Marshalling.ParseRef<PIF>(table, "PIF");
if (table.ContainsKey("allowed_operations"))
allowed_operations = Helper.StringArrayToEnumList<cluster_host_operation>(Marshalling.ParseStringArray(table, "allowed_operations"));
if (table.ContainsKey("current_operations"))
@ -162,6 +169,7 @@ namespace XenAPI
Helper.AreEqual2(this._cluster, other._cluster) &&
Helper.AreEqual2(this._host, other._host) &&
Helper.AreEqual2(this._enabled, other._enabled) &&
Helper.AreEqual2(this._PIF, other._PIF) &&
Helper.AreEqual2(this._allowed_operations, other._allowed_operations) &&
Helper.AreEqual2(this._other_config, other._other_config);
}
@ -271,6 +279,20 @@ namespace XenAPI
return (bool)session.proxy.cluster_host_get_enabled(session.opaque_ref, _cluster_host ?? "").parse();
}
/// <summary>
/// Get the PIF field of the given Cluster_host.
/// 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>
public static XenRef<PIF> get_PIF(Session session, string _cluster_host)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.cluster_host_get_pif(session.opaque_ref, _cluster_host);
else
return XenRef<PIF>.Create(session.proxy.cluster_host_get_pif(session.opaque_ref, _cluster_host ?? "").parse());
}
/// <summary>
/// Get the allowed_operations field of the given Cluster_host.
/// </summary>
@ -318,12 +340,13 @@ namespace XenAPI
/// <param name="session">The session</param>
/// <param name="_cluster">Cluster to join</param>
/// <param name="_host">new cluster member</param>
public static XenRef<Cluster_host> create(Session session, string _cluster, string _host)
/// <param name="_pif">Network interface to use for communication</param>
public static XenRef<Cluster_host> create(Session session, string _cluster, string _host, string _pif)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.cluster_host_create(session.opaque_ref, _cluster, _host);
return session.JsonRpcClient.cluster_host_create(session.opaque_ref, _cluster, _host, _pif);
else
return XenRef<Cluster_host>.Create(session.proxy.cluster_host_create(session.opaque_ref, _cluster ?? "", _host ?? "").parse());
return XenRef<Cluster_host>.Create(session.proxy.cluster_host_create(session.opaque_ref, _cluster ?? "", _host ?? "", _pif ?? "").parse());
}
/// <summary>
@ -333,12 +356,13 @@ namespace XenAPI
/// <param name="session">The session</param>
/// <param name="_cluster">Cluster to join</param>
/// <param name="_host">new cluster member</param>
public static XenRef<Task> async_create(Session session, string _cluster, string _host)
/// <param name="_pif">Network interface to use for communication</param>
public static XenRef<Task> async_create(Session session, string _cluster, string _host, string _pif)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.async_cluster_host_create(session.opaque_ref, _cluster, _host);
return session.JsonRpcClient.async_cluster_host_create(session.opaque_ref, _cluster, _host, _pif);
else
return XenRef<Task>.Create(session.proxy.async_cluster_host_create(session.opaque_ref, _cluster ?? "", _host ?? "").parse());
return XenRef<Task>.Create(session.proxy.async_cluster_host_create(session.opaque_ref, _cluster ?? "", _host ?? "", _pif ?? "").parse());
}
/// <summary>
@ -556,6 +580,26 @@ namespace XenAPI
}
private bool _enabled = false;
/// <summary>
/// Reference to the PIF object
/// Experimental. First published in Unreleased.
/// </summary>
[JsonConverter(typeof(XenRefConverter<PIF>))]
public virtual XenRef<PIF> PIF
{
get { return _PIF; }
set
{
if (!Helper.AreEqual(value, _PIF))
{
_PIF = value;
Changed = true;
NotifyPropertyChanged("PIF");
}
}
}
private XenRef<PIF> _PIF = new XenRef<PIF>("OpaqueRef:NULL");
/// <summary>
/// list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client.
/// </summary>

View File

@ -493,7 +493,7 @@
<value>The server failed to acquire an IP address on its management interface and therefore cannot contact the master.</value>
</data>
<data name="HOST_HAS_RESIDENT_VMS" xml:space="preserve">
<value>This server cannot be forgotten because there are some user VMs still running</value>
<value>This server can not be forgotten because there are some user VMs still running</value>
</data>
<data name="HOST_IN_EMERGENCY_MODE" xml:space="preserve">
<value>This server is in emergency mode</value>
@ -594,6 +594,9 @@
<data name="INVALID_CIDR_ADDRESS_SPECIFIED" xml:space="preserve">
<value>A required parameter contained an invalid CIDR address (&lt;addr&gt;/&lt;prefix length&gt;)</value>
</data>
<data name="INVALID_CLUSTER_STACK" xml:space="preserve">
<value>The cluster stack provided is not supported.</value>
</data>
<data name="INVALID_DEVICE" xml:space="preserve">
<value>The device name {0} is invalid</value>
</data>
@ -921,6 +924,9 @@
<data name="PIF_IS_VLAN" xml:space="preserve">
<value>You tried to create a VLAN on top of another VLAN - use the underlying physical PIF/bond instead</value>
</data>
<data name="PIF_NOT_ATTACHED_TO_HOST" xml:space="preserve">
<value>Cluster_host creation failed as the PIF provided is not attached to the host.</value>
</data>
<data name="PIF_NOT_PRESENT" xml:space="preserve">
<value>This host has no PIF on the given network.</value>
</data>
@ -1286,6 +1292,9 @@ Authorized Roles: {1}</value>
<data name="SR_BACKEND_FAILURE_181" xml:space="preserve">
<value>Error in Metadata volume operation for SR.</value>
</data>
<data name="SR_BACKEND_FAILURE_182" xml:space="preserve">
<value>ISCSI delete failed</value>
</data>
<data name="SR_BACKEND_FAILURE_19" xml:space="preserve">
<value>No such device</value>
</data>

View File

@ -14124,13 +14124,6 @@ namespace XenAPI
return Rpc<List<XenRef<Cluster_host>>>("Cluster.get_cluster_hosts", new JArray(session, _cluster ?? ""), serializer);
}
public XenRef<Network> cluster_get_network(string session, string _cluster)
{
var converters = new List<JsonConverter> {new XenRefConverter<Network>()};
var serializer = CreateSerializer(converters);
return Rpc<XenRef<Network>>("Cluster.get_network", new JArray(session, _cluster ?? ""), serializer);
}
public string cluster_get_cluster_token(string session, string _cluster)
{
var converters = new List<JsonConverter> {};
@ -14215,18 +14208,18 @@ namespace XenAPI
Rpc("Cluster.remove_from_other_config", new JArray(session, _cluster ?? "", _key ?? ""), serializer);
}
public XenRef<Cluster> cluster_create(string session, string _network, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient)
public XenRef<Cluster> cluster_create(string session, string _pif, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient)
{
var converters = new List<JsonConverter> {new XenRefConverter<Cluster>(), new XenRefConverter<Network>()};
var converters = new List<JsonConverter> {new XenRefConverter<Cluster>(), new XenRefConverter<PIF>()};
var serializer = CreateSerializer(converters);
return Rpc<XenRef<Cluster>>("Cluster.create", new JArray(session, _network ?? "", _cluster_stack ?? "", _pool_auto_join, _token_timeout, _token_timeout_coefficient), serializer);
return Rpc<XenRef<Cluster>>("Cluster.create", new JArray(session, _pif ?? "", _cluster_stack ?? "", _pool_auto_join, _token_timeout, _token_timeout_coefficient), serializer);
}
public XenRef<Task> async_cluster_create(string session, string _network, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient)
public XenRef<Task> async_cluster_create(string session, string _pif, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient)
{
var converters = new List<JsonConverter> {new XenRefConverter<Task>(), new XenRefConverter<Network>()};
var converters = new List<JsonConverter> {new XenRefConverter<Task>(), new XenRefConverter<PIF>()};
var serializer = CreateSerializer(converters);
return Rpc<XenRef<Task>>("Async.Cluster.create", new JArray(session, _network ?? "", _cluster_stack ?? "", _pool_auto_join, _token_timeout, _token_timeout_coefficient), serializer);
return Rpc<XenRef<Task>>("Async.Cluster.create", new JArray(session, _pif ?? "", _cluster_stack ?? "", _pool_auto_join, _token_timeout, _token_timeout_coefficient), serializer);
}
public void cluster_destroy(string session, string _cluster)
@ -14243,6 +14236,20 @@ namespace XenAPI
return Rpc<XenRef<Task>>("Async.Cluster.destroy", new JArray(session, _cluster ?? ""), serializer);
}
public XenRef<Network> cluster_get_network(string session, string _cluster)
{
var converters = new List<JsonConverter> {new XenRefConverter<Network>()};
var serializer = CreateSerializer(converters);
return Rpc<XenRef<Network>>("Cluster.get_network", new JArray(session, _cluster ?? ""), serializer);
}
public XenRef<Task> async_cluster_get_network(string session, string _cluster)
{
var converters = new List<JsonConverter> {new XenRefConverter<Task>()};
var serializer = CreateSerializer(converters);
return Rpc<XenRef<Task>>("Async.Cluster.get_network", new JArray(session, _cluster ?? ""), serializer);
}
public XenRef<Cluster> cluster_pool_create(string session, string _network, string _cluster_stack, double _token_timeout, double _token_timeout_coefficient)
{
var converters = new List<JsonConverter> {new XenRefConverter<Cluster>(), new XenRefConverter<Network>()};
@ -14355,6 +14362,13 @@ namespace XenAPI
return Rpc<bool>("Cluster_host.get_enabled", new JArray(session, _cluster_host ?? ""), serializer);
}
public XenRef<PIF> cluster_host_get_pif(string session, string _cluster_host)
{
var converters = new List<JsonConverter> {new XenRefConverter<PIF>()};
var serializer = CreateSerializer(converters);
return Rpc<XenRef<PIF>>("Cluster_host.get_PIF", new JArray(session, _cluster_host ?? ""), serializer);
}
public List<cluster_host_operation> cluster_host_get_allowed_operations(string session, string _cluster_host)
{
var converters = new List<JsonConverter> {};
@ -14376,18 +14390,18 @@ namespace XenAPI
return Rpc<Dictionary<string, string>>("Cluster_host.get_other_config", new JArray(session, _cluster_host ?? ""), serializer);
}
public XenRef<Cluster_host> cluster_host_create(string session, string _cluster, string _host)
public XenRef<Cluster_host> cluster_host_create(string session, string _cluster, string _host, string _pif)
{
var converters = new List<JsonConverter> {new XenRefConverter<Cluster_host>(), new XenRefConverter<Cluster>(), new XenRefConverter<Host>()};
var converters = new List<JsonConverter> {new XenRefConverter<Cluster_host>(), new XenRefConverter<Cluster>(), new XenRefConverter<Host>(), new XenRefConverter<PIF>()};
var serializer = CreateSerializer(converters);
return Rpc<XenRef<Cluster_host>>("Cluster_host.create", new JArray(session, _cluster ?? "", _host ?? ""), serializer);
return Rpc<XenRef<Cluster_host>>("Cluster_host.create", new JArray(session, _cluster ?? "", _host ?? "", _pif ?? ""), serializer);
}
public XenRef<Task> async_cluster_host_create(string session, string _cluster, string _host)
public XenRef<Task> async_cluster_host_create(string session, string _cluster, string _host, string _pif)
{
var converters = new List<JsonConverter> {new XenRefConverter<Task>(), new XenRefConverter<Cluster>(), new XenRefConverter<Host>()};
var converters = new List<JsonConverter> {new XenRefConverter<Task>(), new XenRefConverter<Cluster>(), new XenRefConverter<Host>(), new XenRefConverter<PIF>()};
var serializer = CreateSerializer(converters);
return Rpc<XenRef<Task>>("Async.Cluster_host.create", new JArray(session, _cluster ?? "", _host ?? ""), serializer);
return Rpc<XenRef<Task>>("Async.Cluster_host.create", new JArray(session, _cluster ?? "", _host ?? "", _pif ?? ""), serializer);
}
public void cluster_host_destroy(string session, string _cluster_host)

View File

@ -2255,7 +2255,7 @@ namespace XenAPI
private primary_address_type _primary_address_type = primary_address_type.IPv4;
/// <summary>
/// Indicates whether the interface is managed by xapi. If it is not, then xapi will not configure the interface, the commands PIF.plug/unplug/reconfigure_ip(v6) can not be used, nor can the interface be bonded or have VLANs based on top through xapi.
/// Indicates whether the interface is managed by xapi. If it is not, then xapi will not configure the interface, the commands PIF.plug/unplug/reconfigure_ip(v6) cannot be used, nor can the interface be bonded or have VLANs based on top through xapi.
/// First published in XenServer 6.2 SP1.
/// </summary>
public virtual bool managed

View File

@ -8092,10 +8092,6 @@ namespace XenAPI
Response<string []>
cluster_get_cluster_hosts(string session, string _cluster);
[XmlRpcMethod("Cluster.get_network")]
Response<string>
cluster_get_network(string session, string _cluster);
[XmlRpcMethod("Cluster.get_cluster_token")]
Response<string>
cluster_get_cluster_token(string session, string _cluster);
@ -8146,11 +8142,11 @@ namespace XenAPI
[XmlRpcMethod("Cluster.create")]
Response<string>
cluster_create(string session, string _network, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient);
cluster_create(string session, string _pif, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient);
[XmlRpcMethod("Async.Cluster.create")]
Response<string>
async_cluster_create(string session, string _network, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient);
async_cluster_create(string session, string _pif, string _cluster_stack, bool _pool_auto_join, double _token_timeout, double _token_timeout_coefficient);
[XmlRpcMethod("Cluster.destroy")]
Response<string>
@ -8160,6 +8156,14 @@ namespace XenAPI
Response<string>
async_cluster_destroy(string session, string _cluster);
[XmlRpcMethod("Cluster.get_network")]
Response<string>
cluster_get_network(string session, string _cluster);
[XmlRpcMethod("Async.Cluster.get_network")]
Response<string>
async_cluster_get_network(string session, string _cluster);
[XmlRpcMethod("Cluster.pool_create")]
Response<string>
cluster_pool_create(string session, string _network, string _cluster_stack, double _token_timeout, double _token_timeout_coefficient);
@ -8224,6 +8228,10 @@ namespace XenAPI
Response<bool>
cluster_host_get_enabled(string session, string _cluster_host);
[XmlRpcMethod("Cluster_host.get_PIF")]
Response<string>
cluster_host_get_pif(string session, string _cluster_host);
[XmlRpcMethod("Cluster_host.get_allowed_operations")]
Response<string []>
cluster_host_get_allowed_operations(string session, string _cluster_host);
@ -8238,11 +8246,11 @@ namespace XenAPI
[XmlRpcMethod("Cluster_host.create")]
Response<string>
cluster_host_create(string session, string _cluster, string _host);
cluster_host_create(string session, string _cluster, string _host, string _pif);
[XmlRpcMethod("Async.Cluster_host.create")]
Response<string>
async_cluster_host_create(string session, string _cluster, string _host);
async_cluster_host_create(string session, string _cluster, string _host, string _pif);
[XmlRpcMethod("Cluster_host.destroy")]
Response<string>
@ -9331,7 +9339,6 @@ namespace XenAPI
{
public string uuid;
public string [] cluster_hosts;
public string network;
public string cluster_token;
public string cluster_stack;
public string [] allowed_operations;
@ -9350,6 +9357,7 @@ namespace XenAPI
public string cluster;
public string host;
public bool enabled;
public string PIF;
public string [] allowed_operations;
public Object current_operations;
public Object other_config;