mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
Merge pull request #1204 from GaborApatiNagy/CAR-2245_CP-19265
CP-19265: Use Pool_update.async_apply
This commit is contained in:
commit
f7a7420369
@ -675,8 +675,8 @@ namespace XenAdmin.TabPages
|
||||
|
||||
if (elyOrGreater)
|
||||
{
|
||||
// As of Ely we use host.patches_requiring_reboot to generate the list of reboot required messages
|
||||
messages = CheckHostPatchesRequiringReboot(host);
|
||||
// As of Ely we use host.updates_requiring_reboot to generate the list of reboot required messages
|
||||
messages = CheckHostUpdatesRequiringReboot(host);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1774,10 +1774,10 @@ namespace XenAdmin.TabPages
|
||||
|
||||
if (Helpers.ElyOrGreater(pool.Connection))
|
||||
{
|
||||
// As of Ely we use CheckHostPatchesRequiringReboot to get reboot messages for a host
|
||||
// As of Ely we use CheckHostUpdatesRequiringReboot to get reboot messages for a host
|
||||
foreach (Host host in xenObject.Connection.Cache.Hosts)
|
||||
{
|
||||
warnings.AddRange(CheckHostPatchesRequiringReboot(host));
|
||||
warnings.AddRange(CheckHostUpdatesRequiringReboot(host));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1826,33 +1826,38 @@ namespace XenAdmin.TabPages
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of warnings for patches that require the host to be rebooted
|
||||
/// Creates a list of warnings for updates that require the host to be rebooted
|
||||
/// </summary>
|
||||
/// <param name="host"></param>
|
||||
/// <returns></returns>
|
||||
private List<KeyValuePair<String, String>> CheckHostPatchesRequiringReboot(Host host)
|
||||
private List<KeyValuePair<String, String>> CheckHostUpdatesRequiringReboot(Host host)
|
||||
{
|
||||
var warnings = new List<KeyValuePair<String, String>>();
|
||||
var patchRefs = host.patches_requiring_reboot;
|
||||
foreach (var patchRef in patchRefs)
|
||||
var updateRefs = host.updates_requiring_reboot;
|
||||
foreach (var updateRef in updateRefs)
|
||||
{
|
||||
var patch = host.Connection.Resolve(patchRef);
|
||||
warnings.Add(CreateWarningRow(host, patch));
|
||||
var update = host.Connection.Resolve(updateRef);
|
||||
warnings.Add(CreateWarningRow(host, update));
|
||||
}
|
||||
|
||||
return warnings;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private KeyValuePair<string, string> CreateWarningRow(Host host, Pool_patch patch)
|
||||
{
|
||||
//TODO: Could we come up with a better key string than foopatch on blahhost?
|
||||
var key = String.Format(Messages.GENERAL_PANEL_UPDATE_KEY, patch.Name, host.Name);
|
||||
var value = string.Format(Messages.GENERAL_PANEL_UPDATE_WARNING, host.Name, patch.Name);
|
||||
|
||||
return new KeyValuePair<string, string>(key, value);
|
||||
}
|
||||
|
||||
private KeyValuePair<string, string> CreateWarningRow(Host host, Pool_update update)
|
||||
{
|
||||
var key = String.Format(Messages.GENERAL_PANEL_UPDATE_KEY, update.Name, host.Name);
|
||||
var value = string.Format(Messages.GENERAL_PANEL_UPDATE_WARNING, host.Name, update.Name);
|
||||
|
||||
return new KeyValuePair<string, string>(key, value);
|
||||
}
|
||||
|
||||
private static string GetUUID(IXenObject o)
|
||||
{
|
||||
|
@ -554,28 +554,13 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Live patching has failed for a host if that host requires a reboot for this patch, and we expected to live patch
|
||||
/// Returns true if <paramref name="host"/> has to be rebooted for this update
|
||||
/// </summary>
|
||||
/// <param name="host"></param>
|
||||
/// <returns></returns>
|
||||
private bool LivePatchingFailedForHost(Host host)
|
||||
private bool HostRequiresReboot(Host host)
|
||||
{
|
||||
if (!host.patches_requiring_reboot.Any())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (var patchRef in host.patches_requiring_reboot)
|
||||
{
|
||||
var poolPatch = host.Connection.Resolve(patchRef);
|
||||
if (poolPatch.uuid.Equals(Patch.uuid))
|
||||
{
|
||||
// This patch failed
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return
|
||||
host.updates_requiring_reboot !=null && PoolUpdate != null
|
||||
&& host.updates_requiring_reboot.Select(uRef => host.Connection.Resolve(uRef)).Any(u => u != null && u.uuid.Equals(PoolUpdate.uuid));
|
||||
}
|
||||
|
||||
private void FinishedSuccessfully()
|
||||
@ -589,7 +574,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
|
||||
foreach (var host in SelectedMasters)
|
||||
{
|
||||
if (LivePatchingAttemptedForHost(host) && LivePatchingFailedForHost(host))
|
||||
if (LivePatchingAttemptedForHost(host) && HostRequiresReboot(host))
|
||||
{
|
||||
livePatchingFailedHosts.Add(host);
|
||||
}
|
||||
|
@ -48,10 +48,9 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
|
||||
|
||||
protected override void RunWithSession(ref Session session)
|
||||
{
|
||||
//XenRef<Task> task =
|
||||
Pool_update.apply(session, poolUpdate.opaque_ref, host.opaque_ref);
|
||||
XenRef<Task> task = Pool_update.async_apply(session, poolUpdate.opaque_ref, host.opaque_ref);
|
||||
|
||||
//PollTaskForResultAndDestroy(Connection, ref session, task);
|
||||
PollTaskForResultAndDestroy(Connection, ref session, task);
|
||||
}
|
||||
}
|
||||
}
|
@ -66,11 +66,11 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
|
||||
{
|
||||
log.DebugFormat("Checking host.patches_requiring_reboot now on '{0}'...", hostObject);
|
||||
|
||||
if (hostObject.patches_requiring_reboot.Count > 0)
|
||||
if (hostObject.updates_requiring_reboot.Count > 0)
|
||||
{
|
||||
AvoidRestartHosts.Remove(hostObject.uuid);
|
||||
|
||||
log.DebugFormat("Restart is needed now (hostObject.patches_requiring_reboot has {0} items in it). Evacuating now. Will restart after.", hostObject.patches_requiring_reboot.Count);
|
||||
log.DebugFormat("Restart is needed now (hostObject.updates_requiring_reboot has {0} items in it). Evacuating now. Will restart after.", hostObject.updates_requiring_reboot.Count);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -558,6 +558,9 @@
|
||||
<data name="INVALID_PATCH_WITH_LOG" xml:space="preserve">
|
||||
<value>The uploaded update file is invalid.</value>
|
||||
</data>
|
||||
<data name="INVALID_UPDATE" xml:space="preserve">
|
||||
<value>The uploaded update package is invalid</value>
|
||||
</data>
|
||||
<data name="INVALID_VALUE" xml:space="preserve">
|
||||
<value>The value '{1}' is invalid for field '{0}'.</value>
|
||||
</data>
|
||||
@ -1568,6 +1571,12 @@ Authorized Roles: {1}</value>
|
||||
<data name="UNKNOWN_BOOTLOADER" xml:space="preserve">
|
||||
<value>The requested bootloader {1} for VM {0} is unknown</value>
|
||||
</data>
|
||||
<data name="UPDATE_IS_APPLIED" xml:space="preserve">
|
||||
<value>The specified update has been applied and cannot be destroyed.</value>
|
||||
</data>
|
||||
<data name="UPDATE_POOL_APPLY_FAILED" xml:space="preserve">
|
||||
<value>The update cannot be applied for the following host(s).</value>
|
||||
</data>
|
||||
<data name="USER_IS_NOT_LOCAL_SUPERUSER" xml:space="preserve">
|
||||
<value>Only the local superuser can execute this operation</value>
|
||||
</data>
|
||||
|
@ -101,7 +101,7 @@ namespace XenAPI
|
||||
host_display display,
|
||||
long[] virtual_hardware_platform_versions,
|
||||
XenRef<VM> control_domain,
|
||||
List<XenRef<Pool_patch>> patches_requiring_reboot)
|
||||
List<XenRef<Pool_update>> updates_requiring_reboot)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.name_label = name_label;
|
||||
@ -156,7 +156,7 @@ namespace XenAPI
|
||||
this.display = display;
|
||||
this.virtual_hardware_platform_versions = virtual_hardware_platform_versions;
|
||||
this.control_domain = control_domain;
|
||||
this.patches_requiring_reboot = patches_requiring_reboot;
|
||||
this.updates_requiring_reboot = updates_requiring_reboot;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -223,7 +223,7 @@ namespace XenAPI
|
||||
display = update.display;
|
||||
virtual_hardware_platform_versions = update.virtual_hardware_platform_versions;
|
||||
control_domain = update.control_domain;
|
||||
patches_requiring_reboot = update.patches_requiring_reboot;
|
||||
updates_requiring_reboot = update.updates_requiring_reboot;
|
||||
}
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host proxy)
|
||||
@ -281,7 +281,7 @@ namespace XenAPI
|
||||
display = proxy.display == null ? (host_display) 0 : (host_display)Helper.EnumParseDefault(typeof(host_display), (string)proxy.display);
|
||||
virtual_hardware_platform_versions = proxy.virtual_hardware_platform_versions == null ? null : Helper.StringArrayToLongArray(proxy.virtual_hardware_platform_versions);
|
||||
control_domain = proxy.control_domain == null ? null : XenRef<VM>.Create(proxy.control_domain);
|
||||
patches_requiring_reboot = proxy.patches_requiring_reboot == null ? null : XenRef<Pool_patch>.Create(proxy.patches_requiring_reboot);
|
||||
updates_requiring_reboot = proxy.updates_requiring_reboot == null ? null : XenRef<Pool_update>.Create(proxy.updates_requiring_reboot);
|
||||
}
|
||||
|
||||
public Proxy_Host ToProxy()
|
||||
@ -340,7 +340,7 @@ namespace XenAPI
|
||||
result_.display = host_display_helper.ToString(display);
|
||||
result_.virtual_hardware_platform_versions = (virtual_hardware_platform_versions != null) ? Helper.LongArrayToStringArray(virtual_hardware_platform_versions) : new string[] {};
|
||||
result_.control_domain = (control_domain != null) ? control_domain : "";
|
||||
result_.patches_requiring_reboot = (patches_requiring_reboot != null) ? Helper.RefListToStringArray(patches_requiring_reboot) : new string[] {};
|
||||
result_.updates_requiring_reboot = (updates_requiring_reboot != null) ? Helper.RefListToStringArray(updates_requiring_reboot) : new string[] {};
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ namespace XenAPI
|
||||
display = (host_display)Helper.EnumParseDefault(typeof(host_display), Marshalling.ParseString(table, "display"));
|
||||
virtual_hardware_platform_versions = Marshalling.ParseLongArray(table, "virtual_hardware_platform_versions");
|
||||
control_domain = Marshalling.ParseRef<VM>(table, "control_domain");
|
||||
patches_requiring_reboot = Marshalling.ParseSetRef<Pool_patch>(table, "patches_requiring_reboot");
|
||||
updates_requiring_reboot = Marshalling.ParseSetRef<Pool_update>(table, "updates_requiring_reboot");
|
||||
}
|
||||
|
||||
public bool DeepEquals(Host other, bool ignoreCurrentOperations)
|
||||
@ -468,7 +468,7 @@ namespace XenAPI
|
||||
Helper.AreEqual2(this._display, other._display) &&
|
||||
Helper.AreEqual2(this._virtual_hardware_platform_versions, other._virtual_hardware_platform_versions) &&
|
||||
Helper.AreEqual2(this._control_domain, other._control_domain) &&
|
||||
Helper.AreEqual2(this._patches_requiring_reboot, other._patches_requiring_reboot);
|
||||
Helper.AreEqual2(this._updates_requiring_reboot, other._updates_requiring_reboot);
|
||||
}
|
||||
|
||||
public override string SaveChanges(Session session, string opaqueRef, Host server)
|
||||
@ -825,9 +825,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Get the patches field of the given host.
|
||||
/// First published in XenServer 4.0.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The opaque_ref of the given host</param>
|
||||
[Deprecated("")]
|
||||
public static List<XenRef<Host_patch>> get_patches(Session session, string _host)
|
||||
{
|
||||
return XenRef<Host_patch>.Create(session.proxy.host_get_patches(session.uuid, (_host != null) ? _host : "").parse());
|
||||
@ -1153,14 +1155,14 @@ namespace XenAPI
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the patches_requiring_reboot field of the given host.
|
||||
/// Get the updates_requiring_reboot field of the given host.
|
||||
/// First published in .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The opaque_ref of the given host</param>
|
||||
public static List<XenRef<Pool_patch>> get_patches_requiring_reboot(Session session, string _host)
|
||||
public static List<XenRef<Pool_update>> get_updates_requiring_reboot(Session session, string _host)
|
||||
{
|
||||
return XenRef<Pool_patch>.Create(session.proxy.host_get_patches_requiring_reboot(session.uuid, (_host != null) ? _host : "").parse());
|
||||
return XenRef<Pool_update>.Create(session.proxy.host_get_updates_requiring_reboot(session.uuid, (_host != null) ? _host : "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2235,18 +2237,6 @@ namespace XenAPI
|
||||
return (string)session.proxy.host_call_extension(session.uuid, (_host != null) ? _host : "", (_call != null) ? _call : "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Call a XenAPI extension on this host
|
||||
/// First published in .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The opaque_ref of the given host</param>
|
||||
/// <param name="_call">Rpc call for the extension</param>
|
||||
public static XenRef<Task> async_call_extension(Session session, string _host, string _call)
|
||||
{
|
||||
return XenRef<Task>.Create(session.proxy.async_host_call_extension(session.uuid, (_host != null) ? _host : "", (_call != null) ? _call : "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This call queries the host's clock for the current time
|
||||
/// First published in XenServer 5.0.
|
||||
@ -3572,22 +3562,22 @@ namespace XenAPI
|
||||
private XenRef<VM> _control_domain;
|
||||
|
||||
/// <summary>
|
||||
/// List of patches which require reboot
|
||||
/// List of updates which require reboot
|
||||
/// First published in .
|
||||
/// </summary>
|
||||
public virtual List<XenRef<Pool_patch>> patches_requiring_reboot
|
||||
public virtual List<XenRef<Pool_update>> updates_requiring_reboot
|
||||
{
|
||||
get { return _patches_requiring_reboot; }
|
||||
get { return _updates_requiring_reboot; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _patches_requiring_reboot))
|
||||
if (!Helper.AreEqual(value, _updates_requiring_reboot))
|
||||
{
|
||||
_patches_requiring_reboot = value;
|
||||
_updates_requiring_reboot = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("patches_requiring_reboot");
|
||||
NotifyPropertyChanged("updates_requiring_reboot");
|
||||
}
|
||||
}
|
||||
}
|
||||
private List<XenRef<Pool_patch>> _patches_requiring_reboot;
|
||||
private List<XenRef<Pool_update>> _updates_requiring_reboot;
|
||||
}
|
||||
}
|
||||
|
@ -181,9 +181,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Get a record containing the current state of the given host_patch.
|
||||
/// First published in XenServer 4.0.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host_patch">The opaque_ref of the given host_patch</param>
|
||||
[Deprecated("")]
|
||||
public static Host_patch get_record(Session session, string _host_patch)
|
||||
{
|
||||
return new Host_patch((Proxy_Host_patch)session.proxy.host_patch_get_record(session.uuid, (_host_patch != null) ? _host_patch : "").parse());
|
||||
@ -192,9 +194,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Get a reference to the host_patch instance with the specified UUID.
|
||||
/// First published in XenServer 4.0.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_uuid">UUID of object to return</param>
|
||||
[Deprecated("")]
|
||||
public static XenRef<Host_patch> get_by_uuid(Session session, string _uuid)
|
||||
{
|
||||
return XenRef<Host_patch>.Create(session.proxy.host_patch_get_by_uuid(session.uuid, (_uuid != null) ? _uuid : "").parse());
|
||||
@ -203,9 +207,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Get all the host_patch instances with the given label.
|
||||
/// First published in XenServer 4.0.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_label">label of object to return</param>
|
||||
[Deprecated("")]
|
||||
public static List<XenRef<Host_patch>> get_by_name_label(Session session, string _label)
|
||||
{
|
||||
return XenRef<Host_patch>.Create(session.proxy.host_patch_get_by_name_label(session.uuid, (_label != null) ? _label : "").parse());
|
||||
@ -413,8 +419,10 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Return a list of all the host_patchs known to the system.
|
||||
/// First published in XenServer 4.0.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
[Deprecated("")]
|
||||
public static List<XenRef<Host_patch>> get_all(Session session)
|
||||
{
|
||||
return XenRef<Host_patch>.Create(session.proxy.host_patch_get_all(session.uuid).parse());
|
||||
|
@ -56,6 +56,7 @@ namespace XenAPI
|
||||
bool pool_applied,
|
||||
List<XenRef<Host_patch>> host_patches,
|
||||
List<after_apply_guidance> after_apply_guidance,
|
||||
XenRef<Pool_update> pool_update,
|
||||
Dictionary<string, string> other_config)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
@ -66,6 +67,7 @@ namespace XenAPI
|
||||
this.pool_applied = pool_applied;
|
||||
this.host_patches = host_patches;
|
||||
this.after_apply_guidance = after_apply_guidance;
|
||||
this.pool_update = pool_update;
|
||||
this.other_config = other_config;
|
||||
}
|
||||
|
||||
@ -88,6 +90,7 @@ namespace XenAPI
|
||||
pool_applied = update.pool_applied;
|
||||
host_patches = update.host_patches;
|
||||
after_apply_guidance = update.after_apply_guidance;
|
||||
pool_update = update.pool_update;
|
||||
other_config = update.other_config;
|
||||
}
|
||||
|
||||
@ -101,6 +104,7 @@ namespace XenAPI
|
||||
pool_applied = (bool)proxy.pool_applied;
|
||||
host_patches = proxy.host_patches == null ? null : XenRef<Host_patch>.Create(proxy.host_patches);
|
||||
after_apply_guidance = proxy.after_apply_guidance == null ? null : Helper.StringArrayToEnumList<after_apply_guidance>(proxy.after_apply_guidance);
|
||||
pool_update = proxy.pool_update == null ? null : XenRef<Pool_update>.Create(proxy.pool_update);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
|
||||
@ -115,6 +119,7 @@ namespace XenAPI
|
||||
result_.pool_applied = pool_applied;
|
||||
result_.host_patches = (host_patches != null) ? Helper.RefListToStringArray(host_patches) : new string[] {};
|
||||
result_.after_apply_guidance = (after_apply_guidance != null) ? Helper.ObjectListToStringArray(after_apply_guidance) : new string[] {};
|
||||
result_.pool_update = (pool_update != null) ? pool_update : "";
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
return result_;
|
||||
}
|
||||
@ -133,6 +138,7 @@ namespace XenAPI
|
||||
pool_applied = Marshalling.ParseBool(table, "pool_applied");
|
||||
host_patches = Marshalling.ParseSetRef<Host_patch>(table, "host_patches");
|
||||
after_apply_guidance = Helper.StringArrayToEnumList<after_apply_guidance>(Marshalling.ParseStringArray(table, "after_apply_guidance"));
|
||||
pool_update = Marshalling.ParseRef<Pool_update>(table, "pool_update");
|
||||
other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
|
||||
}
|
||||
|
||||
@ -151,6 +157,7 @@ namespace XenAPI
|
||||
Helper.AreEqual2(this._pool_applied, other._pool_applied) &&
|
||||
Helper.AreEqual2(this._host_patches, other._host_patches) &&
|
||||
Helper.AreEqual2(this._after_apply_guidance, other._after_apply_guidance) &&
|
||||
Helper.AreEqual2(this._pool_update, other._pool_update) &&
|
||||
Helper.AreEqual2(this._other_config, other._other_config);
|
||||
}
|
||||
|
||||
@ -174,9 +181,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Get a record containing the current state of the given pool_patch.
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
[Deprecated("")]
|
||||
public static Pool_patch get_record(Session session, string _pool_patch)
|
||||
{
|
||||
return new Pool_patch((Proxy_Pool_patch)session.proxy.pool_patch_get_record(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse());
|
||||
@ -185,9 +194,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Get a reference to the pool_patch instance with the specified UUID.
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_uuid">UUID of object to return</param>
|
||||
[Deprecated("")]
|
||||
public static XenRef<Pool_patch> get_by_uuid(Session session, string _uuid)
|
||||
{
|
||||
return XenRef<Pool_patch>.Create(session.proxy.pool_patch_get_by_uuid(session.uuid, (_uuid != null) ? _uuid : "").parse());
|
||||
@ -196,9 +207,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Get all the pool_patch instances with the given label.
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_label">label of object to return</param>
|
||||
[Deprecated("")]
|
||||
public static List<XenRef<Pool_patch>> get_by_name_label(Session session, string _label)
|
||||
{
|
||||
return XenRef<Pool_patch>.Create(session.proxy.pool_patch_get_by_name_label(session.uuid, (_label != null) ? _label : "").parse());
|
||||
@ -292,6 +305,17 @@ namespace XenAPI
|
||||
return Helper.StringArrayToEnumList<after_apply_guidance>(session.proxy.pool_patch_get_after_apply_guidance(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the pool_update field of the given pool_patch.
|
||||
/// First published in .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
public static XenRef<Pool_update> get_pool_update(Session session, string _pool_patch)
|
||||
{
|
||||
return XenRef<Pool_update>.Create(session.proxy.pool_patch_get_pool_update(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the other_config field of the given pool_patch.
|
||||
/// First published in XenServer 4.1.
|
||||
@ -343,10 +367,12 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Apply the selected patch to a host and return its output
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
/// <param name="_host">The host to apply the patch too</param>
|
||||
[Deprecated("")]
|
||||
public static string apply(Session session, string _pool_patch, string _host)
|
||||
{
|
||||
return (string)session.proxy.pool_patch_apply(session.uuid, (_pool_patch != null) ? _pool_patch : "", (_host != null) ? _host : "").parse();
|
||||
@ -355,10 +381,12 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Apply the selected patch to a host and return its output
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
/// <param name="_host">The host to apply the patch too</param>
|
||||
[Deprecated("")]
|
||||
public static XenRef<Task> async_apply(Session session, string _pool_patch, string _host)
|
||||
{
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_patch_apply(session.uuid, (_pool_patch != null) ? _pool_patch : "", (_host != null) ? _host : "").parse());
|
||||
@ -367,9 +395,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Apply the selected patch to all hosts in the pool and return a map of host_ref -> patch output
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
[Deprecated("")]
|
||||
public static void pool_apply(Session session, string _pool_patch)
|
||||
{
|
||||
session.proxy.pool_patch_pool_apply(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse();
|
||||
@ -378,9 +408,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Apply the selected patch to all hosts in the pool and return a map of host_ref -> patch output
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
[Deprecated("")]
|
||||
public static XenRef<Task> async_pool_apply(Session session, string _pool_patch)
|
||||
{
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_patch_pool_apply(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse());
|
||||
@ -389,10 +421,12 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Execute the precheck stage of the selected patch on a host and return its output
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
/// <param name="_host">The host to run the prechecks on</param>
|
||||
[Deprecated("")]
|
||||
public static string precheck(Session session, string _pool_patch, string _host)
|
||||
{
|
||||
return (string)session.proxy.pool_patch_precheck(session.uuid, (_pool_patch != null) ? _pool_patch : "", (_host != null) ? _host : "").parse();
|
||||
@ -401,10 +435,12 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Execute the precheck stage of the selected patch on a host and return its output
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
/// <param name="_host">The host to run the prechecks on</param>
|
||||
[Deprecated("")]
|
||||
public static XenRef<Task> async_precheck(Session session, string _pool_patch, string _host)
|
||||
{
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_patch_precheck(session.uuid, (_pool_patch != null) ? _pool_patch : "", (_host != null) ? _host : "").parse());
|
||||
@ -413,9 +449,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Removes the patch's files from the server
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
[Deprecated("")]
|
||||
public static void clean(Session session, string _pool_patch)
|
||||
{
|
||||
session.proxy.pool_patch_clean(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse();
|
||||
@ -424,9 +462,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Removes the patch's files from the server
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
[Deprecated("")]
|
||||
public static XenRef<Task> async_clean(Session session, string _pool_patch)
|
||||
{
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_patch_clean(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse());
|
||||
@ -435,9 +475,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Removes the patch's files from all hosts in the pool, but does not remove the database entries
|
||||
/// First published in XenServer 6.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
[Deprecated("")]
|
||||
public static void pool_clean(Session session, string _pool_patch)
|
||||
{
|
||||
session.proxy.pool_patch_pool_clean(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse();
|
||||
@ -446,9 +488,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Removes the patch's files from all hosts in the pool, but does not remove the database entries
|
||||
/// First published in XenServer 6.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
[Deprecated("")]
|
||||
public static XenRef<Task> async_pool_clean(Session session, string _pool_patch)
|
||||
{
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_patch_pool_clean(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse());
|
||||
@ -457,9 +501,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Removes the patch's files from all hosts in the pool, and removes the database entries. Only works on unapplied patches.
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
[Deprecated("")]
|
||||
public static void destroy(Session session, string _pool_patch)
|
||||
{
|
||||
session.proxy.pool_patch_destroy(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse();
|
||||
@ -468,9 +514,11 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Removes the patch's files from all hosts in the pool, and removes the database entries. Only works on unapplied patches.
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
[Deprecated("")]
|
||||
public static XenRef<Task> async_destroy(Session session, string _pool_patch)
|
||||
{
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_patch_destroy(session.uuid, (_pool_patch != null) ? _pool_patch : "").parse());
|
||||
@ -479,10 +527,12 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Removes the patch's files from the specified host
|
||||
/// First published in XenServer 6.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
/// <param name="_host">The host on which to clean the patch</param>
|
||||
[Deprecated("")]
|
||||
public static void clean_on_host(Session session, string _pool_patch, string _host)
|
||||
{
|
||||
session.proxy.pool_patch_clean_on_host(session.uuid, (_pool_patch != null) ? _pool_patch : "", (_host != null) ? _host : "").parse();
|
||||
@ -491,10 +541,12 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Removes the patch's files from the specified host
|
||||
/// First published in XenServer 6.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_pool_patch">The opaque_ref of the given pool_patch</param>
|
||||
/// <param name="_host">The host on which to clean the patch</param>
|
||||
[Deprecated("")]
|
||||
public static XenRef<Task> async_clean_on_host(Session session, string _pool_patch, string _host)
|
||||
{
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_patch_clean_on_host(session.uuid, (_pool_patch != null) ? _pool_patch : "", (_host != null) ? _host : "").parse());
|
||||
@ -503,8 +555,10 @@ namespace XenAPI
|
||||
/// <summary>
|
||||
/// Return a list of all the pool_patchs known to the system.
|
||||
/// First published in XenServer 4.1.
|
||||
/// Deprecated since .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
[Deprecated("")]
|
||||
public static List<XenRef<Pool_patch>> get_all(Session session)
|
||||
{
|
||||
return XenRef<Pool_patch>.Create(session.proxy.pool_patch_get_all(session.uuid).parse());
|
||||
@ -664,6 +718,25 @@ namespace XenAPI
|
||||
}
|
||||
private List<after_apply_guidance> _after_apply_guidance;
|
||||
|
||||
/// <summary>
|
||||
/// A reference to the associated pool_update object
|
||||
/// First published in .
|
||||
/// </summary>
|
||||
public virtual XenRef<Pool_update> pool_update
|
||||
{
|
||||
get { return _pool_update; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _pool_update))
|
||||
{
|
||||
_pool_update = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("pool_update");
|
||||
}
|
||||
}
|
||||
}
|
||||
private XenRef<Pool_update> _pool_update;
|
||||
|
||||
/// <summary>
|
||||
/// additional configuration
|
||||
/// </summary>
|
||||
|
@ -395,7 +395,7 @@ namespace XenAPI
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the update's files from all hosts in the pool, and removes the database entries. But does not revert the update.
|
||||
/// Removes the database entry. Only works on unapplied update.
|
||||
/// First published in .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
@ -406,7 +406,7 @@ namespace XenAPI
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the update's files from all hosts in the pool, and removes the database entries. But does not revert the update.
|
||||
/// Removes the database entry. Only works on unapplied update.
|
||||
/// First published in .
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
|
@ -1088,6 +1088,10 @@ namespace XenAPI
|
||||
Response<string []>
|
||||
pool_patch_get_after_apply_guidance(string session, string _pool_patch);
|
||||
|
||||
[XmlRpcMethod("pool_patch.get_pool_update")]
|
||||
Response<string>
|
||||
pool_patch_get_pool_update(string session, string _pool_patch);
|
||||
|
||||
[XmlRpcMethod("pool_patch.get_other_config")]
|
||||
Response<Object>
|
||||
pool_patch_get_other_config(string session, string _pool_patch);
|
||||
@ -3084,9 +3088,9 @@ namespace XenAPI
|
||||
Response<string>
|
||||
host_get_control_domain(string session, string _host);
|
||||
|
||||
[XmlRpcMethod("host.get_patches_requiring_reboot")]
|
||||
[XmlRpcMethod("host.get_updates_requiring_reboot")]
|
||||
Response<string []>
|
||||
host_get_patches_requiring_reboot(string session, string _host);
|
||||
host_get_updates_requiring_reboot(string session, string _host);
|
||||
|
||||
[XmlRpcMethod("host.set_name_label")]
|
||||
Response<string>
|
||||
@ -3456,10 +3460,6 @@ namespace XenAPI
|
||||
Response<string>
|
||||
host_call_extension(string session, string _host, string _call);
|
||||
|
||||
[XmlRpcMethod("Async.host.call_extension")]
|
||||
Response<string>
|
||||
async_host_call_extension(string session, string _host, string _call);
|
||||
|
||||
[XmlRpcMethod("host.get_servertime")]
|
||||
Response<DateTime>
|
||||
host_get_servertime(string session, string _host);
|
||||
@ -7133,6 +7133,7 @@ namespace XenAPI
|
||||
public bool pool_applied;
|
||||
public string [] host_patches;
|
||||
public string [] after_apply_guidance;
|
||||
public string pool_update;
|
||||
public Object other_config;
|
||||
}
|
||||
|
||||
@ -7367,7 +7368,7 @@ namespace XenAPI
|
||||
public string display;
|
||||
public string [] virtual_hardware_platform_versions;
|
||||
public string control_domain;
|
||||
public string [] patches_requiring_reboot;
|
||||
public string [] updates_requiring_reboot;
|
||||
}
|
||||
|
||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||
|
Loading…
Reference in New Issue
Block a user