From 47d2ac49b3ef8a733524e6473f3c824e2145b545 Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Fri, 19 Jul 2013 10:54:12 +0100 Subject: [PATCH] Host.apply_edition has an extra parameter. Provide overload for backwards compatibility. --- XenModel/XenAPI/Overloads.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/XenModel/XenAPI/Overloads.cs b/XenModel/XenAPI/Overloads.cs index 52878e85a..8811942b3 100644 --- a/XenModel/XenAPI/Overloads.cs +++ b/XenModel/XenAPI/Overloads.cs @@ -45,6 +45,10 @@ namespace XenAPI Response session_login_with_password(string _uname, string _pwd, string _version); + [XmlRpcMethod("host.apply_edition")] + Response + host_apply_edition(string session, string _host, string _edition); + #endregion #region pre-6.1 compatibility @@ -216,6 +220,17 @@ namespace XenAPI return XenRef.Create(session.proxy.async_host_create_new_blob(session.uuid, (_host != null) ? _host : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } + + /// + /// Backward compatibility for Host.apply_edition in XenServer 6.1. + /// + public static void apply_edition(Session session, string _host, string _edition) + { + if (Helper.APIVersionMeets(session, API_Version.API_2_0)) + System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.2 or newer."); + + session.proxy.host_apply_edition(session.uuid, (_host != null) ? _host : "", (_edition != null) ? _edition : "").parse(); + } } public partial class Network