mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
Updated SDK to v23.10.0.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
parent
93d538c831
commit
b93a61673d
13
XenModel/XenAPI/FriendlyErrorNames.Designer.cs
generated
13
XenModel/XenAPI/FriendlyErrorNames.Designer.cs
generated
@ -19,7 +19,7 @@ namespace XenAPI {
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class FriendlyErrorNames {
|
||||
@ -1969,7 +1969,7 @@ namespace XenAPI {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The dynamic memory range violates constraint static_min <= dynamic_min = dynamic_max = static_max..
|
||||
/// Looks up a localized string similar to The dynamic memory range violates constraint static_min = dynamic_min = dynamic_max = static_max..
|
||||
/// </summary>
|
||||
public static string MEMORY_CONSTRAINT_VIOLATION_MAXPIN {
|
||||
get {
|
||||
@ -5375,6 +5375,15 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The next scheduled telemetry data collection is too far into the future. Pick a timestamp within two telemetry intervals starting from now..
|
||||
/// </summary>
|
||||
public static string TELEMETRY_NEXT_COLLECTION_TOO_LATE {
|
||||
get {
|
||||
return ResourceManager.GetString("TELEMETRY_NEXT_COLLECTION_TOO_LATE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cannot contact the other host using TLS on the specified address and port.
|
||||
/// </summary>
|
||||
|
@ -748,7 +748,7 @@
|
||||
<value>The dynamic memory range does not satisfy the following constraint.</value>
|
||||
</data>
|
||||
<data name="MEMORY_CONSTRAINT_VIOLATION_MAXPIN" xml:space="preserve">
|
||||
<value>The dynamic memory range violates constraint static_min <= dynamic_min = dynamic_max = static_max.</value>
|
||||
<value>The dynamic memory range violates constraint static_min = dynamic_min = dynamic_max = static_max.</value>
|
||||
</data>
|
||||
<data name="MEMORY_CONSTRAINT_VIOLATION_ORDER" xml:space="preserve">
|
||||
<value>The dynamic memory range violates constraint static_min <= dynamic_min <= dynamic_max <= static_max.</value>
|
||||
@ -1892,6 +1892,9 @@ Authorized Roles: {1}</value>
|
||||
<data name="TASK_CANCELLED" xml:space="preserve">
|
||||
<value>The request was asynchronously canceled.</value>
|
||||
</data>
|
||||
<data name="TELEMETRY_NEXT_COLLECTION_TOO_LATE" xml:space="preserve">
|
||||
<value>The next scheduled telemetry data collection is too far into the future. Pick a timestamp within two telemetry intervals starting from now.</value>
|
||||
</data>
|
||||
<data name="TLS_CONNECTION_FAILED" xml:space="preserve">
|
||||
<value>Cannot contact the other host using TLS on the specified address and port</value>
|
||||
</data>
|
||||
|
@ -1116,6 +1116,13 @@ namespace XenAPI
|
||||
return Rpc<string>("pool.get_repository_proxy_username", new JArray(session, _pool ?? ""), serializer);
|
||||
}
|
||||
|
||||
public XenRef<Secret> pool_get_repository_proxy_password(string session, string _pool)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Secret>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<Secret>>("pool.get_repository_proxy_password", new JArray(session, _pool ?? ""), serializer);
|
||||
}
|
||||
|
||||
public bool pool_get_migration_compression(string session, string _pool)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
@ -1130,6 +1137,27 @@ namespace XenAPI
|
||||
return Rpc<bool>("pool.get_coordinator_bias", new JArray(session, _pool ?? ""), serializer);
|
||||
}
|
||||
|
||||
public XenRef<Secret> pool_get_telemetry_uuid(string session, string _pool)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Secret>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<Secret>>("pool.get_telemetry_uuid", new JArray(session, _pool ?? ""), serializer);
|
||||
}
|
||||
|
||||
public telemetry_frequency pool_get_telemetry_frequency(string session, string _pool)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new telemetry_frequencyConverter()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<telemetry_frequency>("pool.get_telemetry_frequency", new JArray(session, _pool ?? ""), serializer);
|
||||
}
|
||||
|
||||
public DateTime pool_get_telemetry_next_collection(string session, string _pool)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenDateTimeConverter()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<DateTime>("pool.get_telemetry_next_collection", new JArray(session, _pool ?? ""), serializer);
|
||||
}
|
||||
|
||||
public void pool_set_name_label(string session, string _pool, string _name_label)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
@ -2145,6 +2173,34 @@ namespace XenAPI
|
||||
return Rpc<XenRef<Task>>("Async.pool.set_https_only", new JArray(session, _pool ?? "", _value), serializer);
|
||||
}
|
||||
|
||||
public void pool_set_telemetry_next_collection(string session, string _pool, DateTime _value)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenDateTimeConverter()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
Rpc("pool.set_telemetry_next_collection", new JArray(session, _pool ?? "", _value), serializer);
|
||||
}
|
||||
|
||||
public XenRef<Task> async_pool_set_telemetry_next_collection(string session, string _pool, DateTime _value)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Task>(), new XenDateTimeConverter()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<Task>>("Async.pool.set_telemetry_next_collection", new JArray(session, _pool ?? "", _value), serializer);
|
||||
}
|
||||
|
||||
public void pool_reset_telemetry_uuid(string session, string _pool)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
var serializer = CreateSerializer(converters);
|
||||
Rpc("pool.reset_telemetry_uuid", new JArray(session, _pool ?? ""), serializer);
|
||||
}
|
||||
|
||||
public XenRef<Task> async_pool_reset_telemetry_uuid(string session, string _pool)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Task>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<Task>>("Async.pool.reset_telemetry_uuid", new JArray(session, _pool ?? ""), serializer);
|
||||
}
|
||||
|
||||
public List<XenRef<Pool>> pool_get_all(string session)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefListConverter<Pool>()};
|
||||
@ -11938,6 +11994,20 @@ namespace XenAPI
|
||||
return Rpc<string>("VTPM.get_uuid", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public List<vtpm_operations> vtpm_get_allowed_operations(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<List<vtpm_operations>>("VTPM.get_allowed_operations", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public Dictionary<string, vtpm_operations> vtpm_get_current_operations(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<Dictionary<string, vtpm_operations>>("VTPM.get_current_operations", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public XenRef<VM> vtpm_get_vm(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<VM>()};
|
||||
|
@ -680,6 +680,52 @@ using System.Collections.Generic;
|
||||
}
|
||||
|
||||
|
||||
internal static Dictionary<string, vtpm_operations> convert_from_proxy_string_vtpm_operations(Object o)
|
||||
{
|
||||
Hashtable table = (Hashtable)o;
|
||||
Dictionary<string, vtpm_operations> result = new Dictionary<string, vtpm_operations>();
|
||||
if (table != null)
|
||||
{
|
||||
foreach (string key in table.Keys)
|
||||
{
|
||||
try
|
||||
{
|
||||
string k = key;
|
||||
vtpm_operations v = table[key] == null ? (vtpm_operations) 0 : (vtpm_operations)Helper.EnumParseDefault(typeof(vtpm_operations), (string)table[key]);
|
||||
result[k] = v;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// continue
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static Hashtable convert_to_proxy_string_vtpm_operations(Dictionary<string, vtpm_operations> table)
|
||||
{
|
||||
var result = new Hashtable();
|
||||
if (table != null)
|
||||
{
|
||||
foreach (string key in table.Keys)
|
||||
{
|
||||
try
|
||||
{
|
||||
string k = key ?? "";
|
||||
string v = vtpm_operations_helper.ToString(table[key]);
|
||||
result[k] = v;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// continue
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
internal static Dictionary<string, vusb_operations> convert_from_proxy_string_vusb_operations(Object o)
|
||||
{
|
||||
Hashtable table = (Hashtable)o;
|
||||
|
@ -95,8 +95,12 @@ namespace XenAPI
|
||||
string client_certificate_auth_name,
|
||||
string repository_proxy_url,
|
||||
string repository_proxy_username,
|
||||
XenRef<Secret> repository_proxy_password,
|
||||
bool migration_compression,
|
||||
bool coordinator_bias)
|
||||
bool coordinator_bias,
|
||||
XenRef<Secret> telemetry_uuid,
|
||||
telemetry_frequency telemetry_frequency,
|
||||
DateTime telemetry_next_collection)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.name_label = name_label;
|
||||
@ -142,8 +146,12 @@ namespace XenAPI
|
||||
this.client_certificate_auth_name = client_certificate_auth_name;
|
||||
this.repository_proxy_url = repository_proxy_url;
|
||||
this.repository_proxy_username = repository_proxy_username;
|
||||
this.repository_proxy_password = repository_proxy_password;
|
||||
this.migration_compression = migration_compression;
|
||||
this.coordinator_bias = coordinator_bias;
|
||||
this.telemetry_uuid = telemetry_uuid;
|
||||
this.telemetry_frequency = telemetry_frequency;
|
||||
this.telemetry_next_collection = telemetry_next_collection;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -210,8 +218,12 @@ namespace XenAPI
|
||||
client_certificate_auth_name = record.client_certificate_auth_name;
|
||||
repository_proxy_url = record.repository_proxy_url;
|
||||
repository_proxy_username = record.repository_proxy_username;
|
||||
repository_proxy_password = record.repository_proxy_password;
|
||||
migration_compression = record.migration_compression;
|
||||
coordinator_bias = record.coordinator_bias;
|
||||
telemetry_uuid = record.telemetry_uuid;
|
||||
telemetry_frequency = record.telemetry_frequency;
|
||||
telemetry_next_collection = record.telemetry_next_collection;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -310,10 +322,18 @@ namespace XenAPI
|
||||
repository_proxy_url = Marshalling.ParseString(table, "repository_proxy_url");
|
||||
if (table.ContainsKey("repository_proxy_username"))
|
||||
repository_proxy_username = Marshalling.ParseString(table, "repository_proxy_username");
|
||||
if (table.ContainsKey("repository_proxy_password"))
|
||||
repository_proxy_password = Marshalling.ParseRef<Secret>(table, "repository_proxy_password");
|
||||
if (table.ContainsKey("migration_compression"))
|
||||
migration_compression = Marshalling.ParseBool(table, "migration_compression");
|
||||
if (table.ContainsKey("coordinator_bias"))
|
||||
coordinator_bias = Marshalling.ParseBool(table, "coordinator_bias");
|
||||
if (table.ContainsKey("telemetry_uuid"))
|
||||
telemetry_uuid = Marshalling.ParseRef<Secret>(table, "telemetry_uuid");
|
||||
if (table.ContainsKey("telemetry_frequency"))
|
||||
telemetry_frequency = (telemetry_frequency)Helper.EnumParseDefault(typeof(telemetry_frequency), Marshalling.ParseString(table, "telemetry_frequency"));
|
||||
if (table.ContainsKey("telemetry_next_collection"))
|
||||
telemetry_next_collection = Marshalling.ParseDateTime(table, "telemetry_next_collection");
|
||||
}
|
||||
|
||||
public bool DeepEquals(Pool other, bool ignoreCurrentOperations)
|
||||
@ -369,8 +389,12 @@ namespace XenAPI
|
||||
Helper.AreEqual2(this._client_certificate_auth_name, other._client_certificate_auth_name) &&
|
||||
Helper.AreEqual2(this._repository_proxy_url, other._repository_proxy_url) &&
|
||||
Helper.AreEqual2(this._repository_proxy_username, other._repository_proxy_username) &&
|
||||
Helper.AreEqual2(this._repository_proxy_password, other._repository_proxy_password) &&
|
||||
Helper.AreEqual2(this._migration_compression, other._migration_compression) &&
|
||||
Helper.AreEqual2(this._coordinator_bias, other._coordinator_bias);
|
||||
Helper.AreEqual2(this._coordinator_bias, other._coordinator_bias) &&
|
||||
Helper.AreEqual2(this._telemetry_uuid, other._telemetry_uuid) &&
|
||||
Helper.AreEqual2(this._telemetry_frequency, other._telemetry_frequency) &&
|
||||
Helper.AreEqual2(this._telemetry_next_collection, other._telemetry_next_collection);
|
||||
}
|
||||
|
||||
public override string SaveChanges(Session session, string opaqueRef, Pool server)
|
||||
@ -969,6 +993,17 @@ namespace XenAPI
|
||||
return session.JsonRpcClient.pool_get_repository_proxy_username(session.opaque_ref, _pool);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the repository_proxy_password field of the given pool.
|
||||
/// First published in 21.3.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool">The opaque_ref of the given pool</param>
|
||||
public static XenRef<Secret> get_repository_proxy_password(Session session, string _pool)
|
||||
{
|
||||
return session.JsonRpcClient.pool_get_repository_proxy_password(session.opaque_ref, _pool);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the migration_compression field of the given pool.
|
||||
/// Experimental. First published in 22.33.0.
|
||||
@ -991,6 +1026,39 @@ namespace XenAPI
|
||||
return session.JsonRpcClient.pool_get_coordinator_bias(session.opaque_ref, _pool);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the telemetry_uuid field of the given pool.
|
||||
/// Experimental. First published in 23.9.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool">The opaque_ref of the given pool</param>
|
||||
public static XenRef<Secret> get_telemetry_uuid(Session session, string _pool)
|
||||
{
|
||||
return session.JsonRpcClient.pool_get_telemetry_uuid(session.opaque_ref, _pool);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the telemetry_frequency field of the given pool.
|
||||
/// Experimental. First published in 23.9.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool">The opaque_ref of the given pool</param>
|
||||
public static telemetry_frequency get_telemetry_frequency(Session session, string _pool)
|
||||
{
|
||||
return session.JsonRpcClient.pool_get_telemetry_frequency(session.opaque_ref, _pool);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the telemetry_next_collection field of the given pool.
|
||||
/// Experimental. First published in 23.9.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool">The opaque_ref of the given pool</param>
|
||||
public static DateTime get_telemetry_next_collection(Session session, string _pool)
|
||||
{
|
||||
return session.JsonRpcClient.pool_get_telemetry_next_collection(session.opaque_ref, _pool);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the name_label field of the given pool.
|
||||
/// First published in XenServer 4.0.
|
||||
@ -2707,6 +2775,52 @@ namespace XenAPI
|
||||
return session.JsonRpcClient.async_pool_set_https_only(session.opaque_ref, _pool, _value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the timestamp for the next telemetry data collection.
|
||||
/// Experimental. First published in 23.9.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool">The opaque_ref of the given pool</param>
|
||||
/// <param name="_value">The earliest timestamp (in UTC) when the next round of telemetry collection can be carried out.</param>
|
||||
public static void set_telemetry_next_collection(Session session, string _pool, DateTime _value)
|
||||
{
|
||||
session.JsonRpcClient.pool_set_telemetry_next_collection(session.opaque_ref, _pool, _value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the timestamp for the next telemetry data collection.
|
||||
/// Experimental. First published in 23.9.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool">The opaque_ref of the given pool</param>
|
||||
/// <param name="_value">The earliest timestamp (in UTC) when the next round of telemetry collection can be carried out.</param>
|
||||
public static XenRef<Task> async_set_telemetry_next_collection(Session session, string _pool, DateTime _value)
|
||||
{
|
||||
return session.JsonRpcClient.async_pool_set_telemetry_next_collection(session.opaque_ref, _pool, _value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Assign a new UUID to telemetry data.
|
||||
/// Experimental. First published in 23.9.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool">The opaque_ref of the given pool</param>
|
||||
public static void reset_telemetry_uuid(Session session, string _pool)
|
||||
{
|
||||
session.JsonRpcClient.pool_reset_telemetry_uuid(session.opaque_ref, _pool);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Assign a new UUID to telemetry data.
|
||||
/// Experimental. First published in 23.9.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool">The opaque_ref of the given pool</param>
|
||||
public static XenRef<Task> async_reset_telemetry_uuid(Session session, string _pool)
|
||||
{
|
||||
return session.JsonRpcClient.async_pool_reset_telemetry_uuid(session.opaque_ref, _pool);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return a list of all the pools known to the system.
|
||||
/// First published in XenServer 4.0.
|
||||
@ -3524,6 +3638,25 @@ namespace XenAPI
|
||||
}
|
||||
private string _repository_proxy_username = "";
|
||||
|
||||
/// <summary>
|
||||
/// Password for the authentication of the proxy used in syncing with the enabled repositories
|
||||
/// First published in 21.3.0.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(XenRefConverter<Secret>))]
|
||||
public virtual XenRef<Secret> repository_proxy_password
|
||||
{
|
||||
get { return _repository_proxy_password; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _repository_proxy_password))
|
||||
{
|
||||
_repository_proxy_password = value;
|
||||
NotifyPropertyChanged("repository_proxy_password");
|
||||
}
|
||||
}
|
||||
}
|
||||
private XenRef<Secret> _repository_proxy_password = new XenRef<Secret>("OpaqueRef:NULL");
|
||||
|
||||
/// <summary>
|
||||
/// Default behaviour during migration, True if stream compression should be used
|
||||
/// Experimental. First published in 22.33.0.
|
||||
@ -3558,5 +3691,62 @@ namespace XenAPI
|
||||
}
|
||||
}
|
||||
private bool _coordinator_bias = true;
|
||||
|
||||
/// <summary>
|
||||
/// The UUID of the pool for identification of telemetry data
|
||||
/// Experimental. First published in 23.9.0.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(XenRefConverter<Secret>))]
|
||||
public virtual XenRef<Secret> telemetry_uuid
|
||||
{
|
||||
get { return _telemetry_uuid; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _telemetry_uuid))
|
||||
{
|
||||
_telemetry_uuid = value;
|
||||
NotifyPropertyChanged("telemetry_uuid");
|
||||
}
|
||||
}
|
||||
}
|
||||
private XenRef<Secret> _telemetry_uuid = new XenRef<Secret>("OpaqueRef:NULL");
|
||||
|
||||
/// <summary>
|
||||
/// How often the telemetry collection will be carried out
|
||||
/// Experimental. First published in 23.9.0.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(telemetry_frequencyConverter))]
|
||||
public virtual telemetry_frequency telemetry_frequency
|
||||
{
|
||||
get { return _telemetry_frequency; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _telemetry_frequency))
|
||||
{
|
||||
_telemetry_frequency = value;
|
||||
NotifyPropertyChanged("telemetry_frequency");
|
||||
}
|
||||
}
|
||||
}
|
||||
private telemetry_frequency _telemetry_frequency = telemetry_frequency.weekly;
|
||||
|
||||
/// <summary>
|
||||
/// The earliest timestamp (in UTC) when the next round of telemetry collection can be carried out
|
||||
/// Experimental. First published in 23.9.0.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(XenDateTimeConverter))]
|
||||
public virtual DateTime telemetry_next_collection
|
||||
{
|
||||
get { return _telemetry_next_collection; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _telemetry_next_collection))
|
||||
{
|
||||
_telemetry_next_collection = value;
|
||||
NotifyPropertyChanged("telemetry_next_collection");
|
||||
}
|
||||
}
|
||||
}
|
||||
private DateTime _telemetry_next_collection = DateTime.ParseExact("19700101T00:00:00Z", "yyyyMMddTHH:mm:ssZ", CultureInfo.InvariantCulture);
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,8 @@ namespace XenAPI
|
||||
}
|
||||
|
||||
public VTPM(string uuid,
|
||||
List<vtpm_operations> allowed_operations,
|
||||
Dictionary<string, vtpm_operations> current_operations,
|
||||
XenRef<VM> VM,
|
||||
XenRef<VM> backend,
|
||||
persistence_backend persistence_backend,
|
||||
@ -59,6 +61,8 @@ namespace XenAPI
|
||||
bool is_protected)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.allowed_operations = allowed_operations;
|
||||
this.current_operations = current_operations;
|
||||
this.VM = VM;
|
||||
this.backend = backend;
|
||||
this.persistence_backend = persistence_backend;
|
||||
@ -87,6 +91,8 @@ namespace XenAPI
|
||||
public override void UpdateFrom(VTPM record)
|
||||
{
|
||||
uuid = record.uuid;
|
||||
allowed_operations = record.allowed_operations;
|
||||
current_operations = record.current_operations;
|
||||
VM = record.VM;
|
||||
backend = record.backend;
|
||||
persistence_backend = record.persistence_backend;
|
||||
@ -104,6 +110,10 @@ namespace XenAPI
|
||||
{
|
||||
if (table.ContainsKey("uuid"))
|
||||
uuid = Marshalling.ParseString(table, "uuid");
|
||||
if (table.ContainsKey("allowed_operations"))
|
||||
allowed_operations = Helper.StringArrayToEnumList<vtpm_operations>(Marshalling.ParseStringArray(table, "allowed_operations"));
|
||||
if (table.ContainsKey("current_operations"))
|
||||
current_operations = Maps.convert_from_proxy_string_vtpm_operations(Marshalling.ParseHashTable(table, "current_operations"));
|
||||
if (table.ContainsKey("VM"))
|
||||
VM = Marshalling.ParseRef<VM>(table, "VM");
|
||||
if (table.ContainsKey("backend"))
|
||||
@ -116,14 +126,18 @@ namespace XenAPI
|
||||
is_protected = Marshalling.ParseBool(table, "is_protected");
|
||||
}
|
||||
|
||||
public bool DeepEquals(VTPM other)
|
||||
public bool DeepEquals(VTPM other, bool ignoreCurrentOperations)
|
||||
{
|
||||
if (ReferenceEquals(null, other))
|
||||
return false;
|
||||
if (ReferenceEquals(this, other))
|
||||
return true;
|
||||
|
||||
if (!ignoreCurrentOperations && !Helper.AreEqual2(this.current_operations, other.current_operations))
|
||||
return false;
|
||||
|
||||
return Helper.AreEqual2(this._uuid, other._uuid) &&
|
||||
Helper.AreEqual2(this._allowed_operations, other._allowed_operations) &&
|
||||
Helper.AreEqual2(this._VM, other._VM) &&
|
||||
Helper.AreEqual2(this._backend, other._backend) &&
|
||||
Helper.AreEqual2(this._persistence_backend, other._persistence_backend) &&
|
||||
@ -177,6 +191,28 @@ namespace XenAPI
|
||||
return session.JsonRpcClient.vtpm_get_uuid(session.opaque_ref, _vtpm);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the allowed_operations field of the given VTPM.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vtpm">The opaque_ref of the given vtpm</param>
|
||||
public static List<vtpm_operations> get_allowed_operations(Session session, string _vtpm)
|
||||
{
|
||||
return session.JsonRpcClient.vtpm_get_allowed_operations(session.opaque_ref, _vtpm);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the current_operations field of the given VTPM.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vtpm">The opaque_ref of the given vtpm</param>
|
||||
public static Dictionary<string, vtpm_operations> get_current_operations(Session session, string _vtpm)
|
||||
{
|
||||
return session.JsonRpcClient.vtpm_get_current_operations(session.opaque_ref, _vtpm);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the VM field of the given VTPM.
|
||||
/// First published in XenServer 4.0.
|
||||
@ -316,6 +352,42 @@ namespace XenAPI
|
||||
}
|
||||
private string _uuid = "";
|
||||
|
||||
/// <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.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
public virtual List<vtpm_operations> allowed_operations
|
||||
{
|
||||
get { return _allowed_operations; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _allowed_operations))
|
||||
{
|
||||
_allowed_operations = value;
|
||||
NotifyPropertyChanged("allowed_operations");
|
||||
}
|
||||
}
|
||||
}
|
||||
private List<vtpm_operations> _allowed_operations = new List<vtpm_operations>() {};
|
||||
|
||||
/// <summary>
|
||||
/// links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
public virtual Dictionary<string, vtpm_operations> current_operations
|
||||
{
|
||||
get { return _current_operations; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _current_operations))
|
||||
{
|
||||
_current_operations = value;
|
||||
NotifyPropertyChanged("current_operations");
|
||||
}
|
||||
}
|
||||
}
|
||||
private Dictionary<string, vtpm_operations> _current_operations = new Dictionary<string, vtpm_operations>() {};
|
||||
|
||||
/// <summary>
|
||||
/// The virtual machine the TPM is attached to
|
||||
/// First published in XenServer 4.0.
|
||||
|
@ -48,6 +48,10 @@ namespace XenAPI
|
||||
/// </summary>
|
||||
pv_in_pvh,
|
||||
/// <summary>
|
||||
/// PVH
|
||||
/// </summary>
|
||||
pvh,
|
||||
/// <summary>
|
||||
/// Not specified or unknown domain type
|
||||
/// </summary>
|
||||
unspecified,
|
||||
@ -74,6 +78,8 @@ namespace XenAPI
|
||||
return "pv";
|
||||
case domain_type.pv_in_pvh:
|
||||
return "pv_in_pvh";
|
||||
case domain_type.pvh:
|
||||
return "pvh";
|
||||
case domain_type.unspecified:
|
||||
return "unspecified";
|
||||
default:
|
||||
|
86
XenModel/XenAPI/telemetry_frequency.cs
Normal file
86
XenModel/XenAPI/telemetry_frequency.cs
Normal file
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright (c) Cloud Software Group, Inc.
|
||||
*
|
||||
* 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(telemetry_frequencyConverter))]
|
||||
public enum telemetry_frequency
|
||||
{
|
||||
/// <summary>
|
||||
/// Run telemetry task daily
|
||||
/// </summary>
|
||||
daily,
|
||||
/// <summary>
|
||||
/// Run telemetry task weekly
|
||||
/// </summary>
|
||||
weekly,
|
||||
/// <summary>
|
||||
/// Run telemetry task monthly
|
||||
/// </summary>
|
||||
monthly,
|
||||
unknown
|
||||
}
|
||||
|
||||
public static class telemetry_frequency_helper
|
||||
{
|
||||
public static string ToString(telemetry_frequency x)
|
||||
{
|
||||
return x.StringOf();
|
||||
}
|
||||
}
|
||||
|
||||
public static partial class EnumExt
|
||||
{
|
||||
public static string StringOf(this telemetry_frequency x)
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
case telemetry_frequency.daily:
|
||||
return "daily";
|
||||
case telemetry_frequency.weekly:
|
||||
return "weekly";
|
||||
case telemetry_frequency.monthly:
|
||||
return "monthly";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class telemetry_frequencyConverter : XenEnumConverter
|
||||
{
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteValue(((telemetry_frequency)value).StringOf());
|
||||
}
|
||||
}
|
||||
}
|
@ -227,6 +227,10 @@ namespace XenAPI
|
||||
/// refers to the act of uninstalling the VM
|
||||
/// </summary>
|
||||
destroy,
|
||||
/// <summary>
|
||||
/// Creating and adding a VTPM to this VM
|
||||
/// </summary>
|
||||
create_vtpm,
|
||||
unknown
|
||||
}
|
||||
|
||||
@ -340,6 +344,8 @@ namespace XenAPI
|
||||
return "reverting";
|
||||
case vm_operations.destroy:
|
||||
return "destroy";
|
||||
case vm_operations.create_vtpm:
|
||||
return "create_vtpm";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
|
74
XenModel/XenAPI/vtpm_operations.cs
Normal file
74
XenModel/XenAPI/vtpm_operations.cs
Normal file
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright (c) Cloud Software Group, Inc.
|
||||
*
|
||||
* 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(vtpm_operationsConverter))]
|
||||
public enum vtpm_operations
|
||||
{
|
||||
/// <summary>
|
||||
/// Destroy a VTPM
|
||||
/// </summary>
|
||||
destroy,
|
||||
unknown
|
||||
}
|
||||
|
||||
public static class vtpm_operations_helper
|
||||
{
|
||||
public static string ToString(vtpm_operations x)
|
||||
{
|
||||
return x.StringOf();
|
||||
}
|
||||
}
|
||||
|
||||
public static partial class EnumExt
|
||||
{
|
||||
public static string StringOf(this vtpm_operations x)
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
case vtpm_operations.destroy:
|
||||
return "destroy";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class vtpm_operationsConverter : XenEnumConverter
|
||||
{
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteValue(((vtpm_operations)value).StringOf());
|
||||
}
|
||||
}
|
||||
}
|
@ -391,6 +391,7 @@
|
||||
<Compile Include="XenAPI\sriov_configuration_mode.cs" />
|
||||
<Compile Include="XenAPI\sr_health.cs" />
|
||||
<Compile Include="XenAPI\Sr_stat.cs" />
|
||||
<Compile Include="XenAPI\telemetry_frequency.cs" />
|
||||
<Compile Include="XenAPI\tristate_type.cs" />
|
||||
<Compile Include="XenAPI\tunnel_protocol.cs" />
|
||||
<Compile Include="XenAPI\update_after_apply_guidance.cs" />
|
||||
@ -408,6 +409,7 @@
|
||||
<Compile Include="XenAPI\vmss_type.cs" />
|
||||
<Compile Include="XenAPI\VM_appliance.cs" />
|
||||
<Compile Include="XenAPI\vm_appliance_operation.cs" />
|
||||
<Compile Include="XenAPI\vtpm_operations.cs" />
|
||||
<Compile Include="XenAPI\VUSB.cs" />
|
||||
<Compile Include="XenAPI\vusb_operations.cs" />
|
||||
<Compile Include="XenSearch\Common.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user