Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 1e234c8

Browse files
author
Konstantina Chremmou
committed
Merge pull request #5 from MihaelaStoica/master
Host.apply_edition has an extra parameter. Provide C# overload for backwards compatibility.
2 parents a90375d + ec16786 commit 1e234c8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

csharp/src/Overloads.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public partial interface Proxy : IXmlRpcProxy
4444
[XmlRpcMethod("session.login_with_password")]
4545
Response<string>
4646
session_login_with_password(string _uname, string _pwd, string _version);
47+
48+
[XmlRpcMethod("host.apply_edition")]
49+
Response<string>
50+
host_apply_edition(string session, string _host, string _edition);
4751

4852
#endregion
4953

@@ -215,6 +219,17 @@ public static XenRef<Task> async_create_new_blob(Session session, string _host,
215219
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
216220

217221
return XenRef<Task>.Create(session.proxy.async_host_create_new_blob(session.uuid, (_host != null) ? _host : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse());
222+
}
223+
224+
/// <summary>
225+
/// Backward compatibility for Host.apply_edition in XenServer 6.1.
226+
/// </summary>
227+
public static void apply_edition(Session session, string _host, string _edition)
228+
{
229+
if (Helper.APIVersionMeets(session, API_Version.API_2_0))
230+
System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.2 or newer.");
231+
232+
session.proxy.host_apply_edition(session.uuid, (_host != null) ? _host : "", (_edition != null) ? _edition : "").parse();
218233
}
219234
}
220235

0 commit comments

Comments
 (0)