Bump C# SDK to modified version of xapi 21.3.0/1.xs8

SDK update does not contain the removal of `evacuate` overloads

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
This commit is contained in:
Danilo Del Busso 2022-01-11 11:39:08 +00:00 committed by Danilo Del Busso
parent 7f38f71a6e
commit d7f1853562
6 changed files with 251 additions and 17 deletions

View File

@ -651,6 +651,12 @@
<data name="INVALID_REPOMD_XML" xml:space="preserve">
<value>The repomd.xml is invalid.</value>
</data>
<data name="INVALID_REPOSITORY_PROXY_CREDENTIAL" xml:space="preserve">
<value>The repository proxy username/password is invalid.</value>
</data>
<data name="INVALID_REPOSITORY_PROXY_URL" xml:space="preserve">
<value>The repository proxy URL is invalid.</value>
</data>
<data name="INVALID_UPDATE" xml:space="preserve">
<value>The uploaded update package is invalid.</value>
</data>

View File

@ -207,6 +207,13 @@ namespace XenAPI
return Rpc<string>("session.get_originator", new JArray(session, _session ?? ""), serializer);
}
public bool session_get_client_certificate(string session, string _session)
{
var converters = new List<JsonConverter> {};
var serializer = CreateSerializer(converters);
return Rpc<bool>("session.get_client_certificate", new JArray(session, _session ?? ""), serializer);
}
public void session_set_other_config(string session, string _session, Dictionary<string, string> _other_config)
{
var converters = new List<JsonConverter> {new StringStringMapConverter()};
@ -753,6 +760,20 @@ namespace XenAPI
Rpc("task.set_progress", new JArray(session, _task ?? "", _value), serializer);
}
public void task_set_result(string session, string _task, string _value)
{
var converters = new List<JsonConverter> {};
var serializer = CreateSerializer(converters);
Rpc("task.set_result", new JArray(session, _task ?? "", _value ?? ""), serializer);
}
public void task_set_error_info(string session, string _task, string[] _value)
{
var converters = new List<JsonConverter> {};
var serializer = CreateSerializer(converters);
Rpc("task.set_error_info", new JArray(session, _task ?? "", _value == null ? new JArray() : JArray.FromObject(_value)), serializer);
}
public List<XenRef<Task>> task_get_all(string session)
{
var converters = new List<JsonConverter> {new XenRefListConverter<Task>()};
@ -1075,6 +1096,20 @@ namespace XenAPI
return Rpc<string>("pool.get_client_certificate_auth_name", new JArray(session, _pool ?? ""), serializer);
}
public string pool_get_repository_proxy_url(string session, string _pool)
{
var converters = new List<JsonConverter> {};
var serializer = CreateSerializer(converters);
return Rpc<string>("pool.get_repository_proxy_url", new JArray(session, _pool ?? ""), serializer);
}
public string pool_get_repository_proxy_username(string session, string _pool)
{
var converters = new List<JsonConverter> {};
var serializer = CreateSerializer(converters);
return Rpc<string>("pool.get_repository_proxy_username", new JArray(session, _pool ?? ""), serializer);
}
public void pool_set_name_label(string session, string _pool, string _name_label)
{
var converters = new List<JsonConverter> {};
@ -1971,18 +2006,18 @@ namespace XenAPI
return Rpc<XenRef<Task>>("Async.pool.remove_repository", new JArray(session, _pool ?? "", _value ?? ""), serializer);
}
public string pool_sync_updates(string session, string _pool, bool _force)
public string pool_sync_updates(string session, string _pool, bool _force, string _token, string _token_id)
{
var converters = new List<JsonConverter> {};
var serializer = CreateSerializer(converters);
return Rpc<string>("pool.sync_updates", new JArray(session, _pool ?? "", _force), serializer);
return Rpc<string>("pool.sync_updates", new JArray(session, _pool ?? "", _force, _token ?? "", _token_id ?? ""), serializer);
}
public XenRef<Task> async_pool_sync_updates(string session, string _pool, bool _force)
public XenRef<Task> async_pool_sync_updates(string session, string _pool, bool _force, string _token, string _token_id)
{
var converters = new List<JsonConverter> {new XenRefConverter<Task>()};
var serializer = CreateSerializer(converters);
return Rpc<XenRef<Task>>("Async.pool.sync_updates", new JArray(session, _pool ?? "", _force), serializer);
return Rpc<XenRef<Task>>("Async.pool.sync_updates", new JArray(session, _pool ?? "", _force, _token ?? "", _token_id ?? ""), serializer);
}
public string[] pool_check_update_readiness(string session, string _pool, bool _requires_reboot)
@ -2027,6 +2062,20 @@ namespace XenAPI
return Rpc<XenRef<Task>>("Async.pool.disable_client_certificate_auth", new JArray(session, _pool ?? ""), serializer);
}
public void pool_configure_repository_proxy(string session, string _pool, string _url, string _username, string _password)
{
var converters = new List<JsonConverter> {};
var serializer = CreateSerializer(converters);
Rpc("pool.configure_repository_proxy", new JArray(session, _pool ?? "", _url ?? "", _username ?? "", _password ?? ""), serializer);
}
public XenRef<Task> async_pool_configure_repository_proxy(string session, string _pool, string _url, string _username, string _password)
{
var converters = new List<JsonConverter> {new XenRefConverter<Task>()};
var serializer = CreateSerializer(converters);
return Rpc<XenRef<Task>>("Async.pool.configure_repository_proxy", new JArray(session, _pool ?? "", _url ?? "", _username ?? "", _password ?? ""), serializer);
}
public List<XenRef<Pool>> pool_get_all(string session)
{
var converters = new List<JsonConverter> {new XenRefListConverter<Pool>()};

View File

@ -105,7 +105,7 @@ namespace XenAPI
VM_SECURE_BOOT_FAILED,
VM_CLONED,
VM_CRASHED,
VM_UNPAUSE,
VM_UNPAUSED,
VM_PAUSED,
VM_RESUMED,
VM_SUSPENDED,
@ -281,8 +281,8 @@ namespace XenAPI
return MessageType.VM_CLONED;
case "VM_CRASHED":
return MessageType.VM_CRASHED;
case "VM_UNPAUSE":
return MessageType.VM_UNPAUSE;
case "VM_UNPAUSED":
return MessageType.VM_UNPAUSED;
case "VM_PAUSED":
return MessageType.VM_PAUSED;
case "VM_RESUMED":

View File

@ -93,7 +93,9 @@ namespace XenAPI
bool tls_verification_enabled,
List<XenRef<Repository>> repositories,
bool client_certificate_auth_enabled,
string client_certificate_auth_name)
string client_certificate_auth_name,
string repository_proxy_url,
string repository_proxy_username)
{
this.uuid = uuid;
this.name_label = name_label;
@ -137,6 +139,8 @@ namespace XenAPI
this.repositories = repositories;
this.client_certificate_auth_enabled = client_certificate_auth_enabled;
this.client_certificate_auth_name = client_certificate_auth_name;
this.repository_proxy_url = repository_proxy_url;
this.repository_proxy_username = repository_proxy_username;
}
/// <summary>
@ -210,6 +214,8 @@ namespace XenAPI
repositories = record.repositories;
client_certificate_auth_enabled = record.client_certificate_auth_enabled;
client_certificate_auth_name = record.client_certificate_auth_name;
repository_proxy_url = record.repository_proxy_url;
repository_proxy_username = record.repository_proxy_username;
}
internal void UpdateFrom(Proxy_Pool proxy)
@ -256,6 +262,8 @@ namespace XenAPI
repositories = proxy.repositories == null ? null : XenRef<Repository>.Create(proxy.repositories);
client_certificate_auth_enabled = (bool)proxy.client_certificate_auth_enabled;
client_certificate_auth_name = proxy.client_certificate_auth_name == null ? null : proxy.client_certificate_auth_name;
repository_proxy_url = proxy.repository_proxy_url == null ? null : proxy.repository_proxy_url;
repository_proxy_username = proxy.repository_proxy_username == null ? null : proxy.repository_proxy_username;
}
/// <summary>
@ -350,6 +358,10 @@ namespace XenAPI
client_certificate_auth_enabled = Marshalling.ParseBool(table, "client_certificate_auth_enabled");
if (table.ContainsKey("client_certificate_auth_name"))
client_certificate_auth_name = Marshalling.ParseString(table, "client_certificate_auth_name");
if (table.ContainsKey("repository_proxy_url"))
repository_proxy_url = Marshalling.ParseString(table, "repository_proxy_url");
if (table.ContainsKey("repository_proxy_username"))
repository_proxy_username = Marshalling.ParseString(table, "repository_proxy_username");
}
public Proxy_Pool ToProxy()
@ -397,6 +409,8 @@ namespace XenAPI
result_.repositories = repositories == null ? new string[] {} : Helper.RefListToStringArray(repositories);
result_.client_certificate_auth_enabled = client_certificate_auth_enabled;
result_.client_certificate_auth_name = client_certificate_auth_name ?? "";
result_.repository_proxy_url = repository_proxy_url ?? "";
result_.repository_proxy_username = repository_proxy_username ?? "";
return result_;
}
@ -450,7 +464,9 @@ namespace XenAPI
Helper.AreEqual2(this._tls_verification_enabled, other._tls_verification_enabled) &&
Helper.AreEqual2(this._repositories, other._repositories) &&
Helper.AreEqual2(this._client_certificate_auth_enabled, other._client_certificate_auth_enabled) &&
Helper.AreEqual2(this._client_certificate_auth_name, other._client_certificate_auth_name);
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);
}
public override string SaveChanges(Session session, string opaqueRef, Pool server)
@ -1151,6 +1167,34 @@ namespace XenAPI
return session.XmlRpcProxy.pool_get_client_certificate_auth_name(session.opaque_ref, _pool ?? "").parse();
}
/// <summary>
/// Get the repository_proxy_url field of the given pool.
/// First published in Unreleased.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_pool">The opaque_ref of the given pool</param>
public static string get_repository_proxy_url(Session session, string _pool)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.pool_get_repository_proxy_url(session.opaque_ref, _pool);
else
return session.XmlRpcProxy.pool_get_repository_proxy_url(session.opaque_ref, _pool ?? "").parse();
}
/// <summary>
/// Get the repository_proxy_username field of the given pool.
/// First published in Unreleased.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_pool">The opaque_ref of the given pool</param>
public static string get_repository_proxy_username(Session session, string _pool)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.pool_get_repository_proxy_username(session.opaque_ref, _pool);
else
return session.XmlRpcProxy.pool_get_repository_proxy_username(session.opaque_ref, _pool ?? "").parse();
}
/// <summary>
/// Set the name_label field of the given pool.
/// First published in XenServer 4.0.
@ -3046,12 +3090,14 @@ namespace XenAPI
/// <param name="session">The session</param>
/// <param name="_pool">The opaque_ref of the given pool</param>
/// <param name="_force">If true local mirroring repo will be removed before syncing</param>
public static string sync_updates(Session session, string _pool, bool _force)
/// <param name="_token">The token for repository client authentication</param>
/// <param name="_token_id">The ID of the token</param>
public static string sync_updates(Session session, string _pool, bool _force, string _token, string _token_id)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.pool_sync_updates(session.opaque_ref, _pool, _force);
return session.JsonRpcClient.pool_sync_updates(session.opaque_ref, _pool, _force, _token, _token_id);
else
return session.XmlRpcProxy.pool_sync_updates(session.opaque_ref, _pool ?? "", _force).parse();
return session.XmlRpcProxy.pool_sync_updates(session.opaque_ref, _pool ?? "", _force, _token ?? "", _token_id ?? "").parse();
}
/// <summary>
@ -3061,12 +3107,14 @@ namespace XenAPI
/// <param name="session">The session</param>
/// <param name="_pool">The opaque_ref of the given pool</param>
/// <param name="_force">If true local mirroring repo will be removed before syncing</param>
public static XenRef<Task> async_sync_updates(Session session, string _pool, bool _force)
/// <param name="_token">The token for repository client authentication</param>
/// <param name="_token_id">The ID of the token</param>
public static XenRef<Task> async_sync_updates(Session session, string _pool, bool _force, string _token, string _token_id)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.async_pool_sync_updates(session.opaque_ref, _pool, _force);
return session.JsonRpcClient.async_pool_sync_updates(session.opaque_ref, _pool, _force, _token, _token_id);
else
return XenRef<Task>.Create(session.XmlRpcProxy.async_pool_sync_updates(session.opaque_ref, _pool ?? "", _force).parse());
return XenRef<Task>.Create(session.XmlRpcProxy.async_pool_sync_updates(session.opaque_ref, _pool ?? "", _force, _token ?? "", _token_id ?? "").parse());
}
/// <summary>
@ -3157,6 +3205,40 @@ namespace XenAPI
return XenRef<Task>.Create(session.XmlRpcProxy.async_pool_disable_client_certificate_auth(session.opaque_ref, _pool ?? "").parse());
}
/// <summary>
/// Configure the proxy used in syncing with the enabled repositories
/// First published in Unreleased.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_pool">The opaque_ref of the given pool</param>
/// <param name="_url">The URL of the proxy server</param>
/// <param name="_username">The username used to authenticate with the proxy server</param>
/// <param name="_password">The password used to authenticate with the proxy server</param>
public static void configure_repository_proxy(Session session, string _pool, string _url, string _username, string _password)
{
if (session.JsonRpcClient != null)
session.JsonRpcClient.pool_configure_repository_proxy(session.opaque_ref, _pool, _url, _username, _password);
else
session.XmlRpcProxy.pool_configure_repository_proxy(session.opaque_ref, _pool ?? "", _url ?? "", _username ?? "", _password ?? "").parse();
}
/// <summary>
/// Configure the proxy used in syncing with the enabled repositories
/// First published in Unreleased.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_pool">The opaque_ref of the given pool</param>
/// <param name="_url">The URL of the proxy server</param>
/// <param name="_username">The username used to authenticate with the proxy server</param>
/// <param name="_password">The password used to authenticate with the proxy server</param>
public static XenRef<Task> async_configure_repository_proxy(Session session, string _pool, string _url, string _username, string _password)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.async_pool_configure_repository_proxy(session.opaque_ref, _pool, _url, _username, _password);
else
return XenRef<Task>.Create(session.XmlRpcProxy.async_pool_configure_repository_proxy(session.opaque_ref, _pool ?? "", _url ?? "", _username ?? "", _password ?? "").parse());
}
/// <summary>
/// Return a list of all the pools known to the system.
/// First published in XenServer 4.0.
@ -3943,5 +4025,41 @@ namespace XenAPI
}
}
private string _client_certificate_auth_name = "";
/// <summary>
/// Url of the proxy used in syncing with the enabled repositories
/// First published in Unreleased.
/// </summary>
public virtual string repository_proxy_url
{
get { return _repository_proxy_url; }
set
{
if (!Helper.AreEqual(value, _repository_proxy_url))
{
_repository_proxy_url = value;
NotifyPropertyChanged("repository_proxy_url");
}
}
}
private string _repository_proxy_url = "";
/// <summary>
/// Username for the authentication of the proxy used in syncing with the enabled repositories
/// First published in Unreleased.
/// </summary>
public virtual string repository_proxy_username
{
get { return _repository_proxy_username; }
set
{
if (!Helper.AreEqual(value, _repository_proxy_username))
{
_repository_proxy_username = value;
NotifyPropertyChanged("repository_proxy_username");
}
}
}
private string _repository_proxy_username = "";
}
}

View File

@ -138,6 +138,10 @@ namespace XenAPI
Response<string>
session_get_originator(string session, string _session);
[XmlRpcMethod("session.get_client_certificate")]
Response<bool>
session_get_client_certificate(string session, string _session);
[XmlRpcMethod("session.set_other_config")]
Response<string>
session_set_other_config(string session, string _session, Object _other_config);
@ -450,6 +454,14 @@ namespace XenAPI
Response<string>
task_set_progress(string session, string _task, double _value);
[XmlRpcMethod("task.set_result")]
Response<string>
task_set_result(string session, string _task, string _value);
[XmlRpcMethod("task.set_error_info")]
Response<string>
task_set_error_info(string session, string _task, string [] _value);
[XmlRpcMethod("task.get_all")]
Response<string []>
task_get_all(string session);
@ -634,6 +646,14 @@ namespace XenAPI
Response<string>
pool_get_client_certificate_auth_name(string session, string _pool);
[XmlRpcMethod("pool.get_repository_proxy_url")]
Response<string>
pool_get_repository_proxy_url(string session, string _pool);
[XmlRpcMethod("pool.get_repository_proxy_username")]
Response<string>
pool_get_repository_proxy_username(string session, string _pool);
[XmlRpcMethod("pool.set_name_label")]
Response<string>
pool_set_name_label(string session, string _pool, string _name_label);
@ -1148,11 +1168,11 @@ namespace XenAPI
[XmlRpcMethod("pool.sync_updates")]
Response<string>
pool_sync_updates(string session, string _pool, bool _force);
pool_sync_updates(string session, string _pool, bool _force, string _token, string _token_id);
[XmlRpcMethod("Async.pool.sync_updates")]
Response<string>
async_pool_sync_updates(string session, string _pool, bool _force);
async_pool_sync_updates(string session, string _pool, bool _force, string _token, string _token_id);
[XmlRpcMethod("pool.check_update_readiness")]
Response<string []>
@ -1178,6 +1198,14 @@ namespace XenAPI
Response<string>
async_pool_disable_client_certificate_auth(string session, string _pool);
[XmlRpcMethod("pool.configure_repository_proxy")]
Response<string>
pool_configure_repository_proxy(string session, string _pool, string _url, string _username, string _password);
[XmlRpcMethod("Async.pool.configure_repository_proxy")]
Response<string>
async_pool_configure_repository_proxy(string session, string _pool, string _url, string _username, string _password);
[XmlRpcMethod("pool.get_all")]
Response<string []>
pool_get_all(string session);
@ -8660,6 +8688,7 @@ namespace XenAPI
public string [] tasks;
public string parent;
public string originator;
public bool client_certificate;
}
[XmlRpcMissingMapping(MappingAction.Ignore)]
@ -8752,6 +8781,8 @@ namespace XenAPI
public string [] repositories;
public bool client_certificate_auth_enabled;
public string client_certificate_auth_name;
public string repository_proxy_url;
public string repository_proxy_username;
}
[XmlRpcMissingMapping(MappingAction.Ignore)]

View File

@ -684,6 +684,36 @@ namespace XenAPI
session.XmlRpcProxy.task_set_progress(session.opaque_ref, _task ?? "", _value).parse();
}
/// <summary>
/// Set the task result
/// First published in Unreleased.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_task">The opaque_ref of the given task</param>
/// <param name="_value">Task result to be set</param>
public static void set_result(Session session, string _task, string _value)
{
if (session.JsonRpcClient != null)
session.JsonRpcClient.task_set_result(session.opaque_ref, _task, _value);
else
session.XmlRpcProxy.task_set_result(session.opaque_ref, _task ?? "", _value ?? "").parse();
}
/// <summary>
/// Set the task error info
/// First published in Unreleased.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_task">The opaque_ref of the given task</param>
/// <param name="_value">Task error info to be set</param>
public static void set_error_info(Session session, string _task, string[] _value)
{
if (session.JsonRpcClient != null)
session.JsonRpcClient.task_set_error_info(session.opaque_ref, _task, _value);
else
session.XmlRpcProxy.task_set_error_info(session.opaque_ref, _task ?? "", _value).parse();
}
/// <summary>
/// Return a list of all the tasks known to the system.
/// First published in XenServer 4.0.