mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
CA-201421: tools ISO is missing in drop-down list
This commit is contained in:
parent
7867901e0d
commit
5093ef677c
@ -257,8 +257,7 @@ namespace XenAdmin.Controls
|
||||
{
|
||||
foreach (VDI vdi in connection.ResolveAll<VDI>(srWrapper.item.VDIs))
|
||||
{
|
||||
if(Actions.InstallPVToolsAction.ISONameOld.Equals(vdi.name_label) ||
|
||||
Actions.InstallPVToolsAction.ISONameNew.Equals(vdi.name_label))
|
||||
if (vdi.IsToolsIso)
|
||||
items.Add(new ToStringWrapper<VDI>(vdi, " " + vdi.Name));
|
||||
}
|
||||
}
|
||||
|
@ -44,10 +44,6 @@ namespace XenAdmin.Actions
|
||||
private readonly Action _xsToolsNotFound;
|
||||
private readonly bool _searchHiddenIsOs;
|
||||
|
||||
// The 'well known' name of the ISO containing our PV tools.
|
||||
public const string ISONameOld = "xswindrivers.iso";
|
||||
public const string ISONameNew = "xs-tools.iso";
|
||||
|
||||
public InstallPVToolsAction(VM vm, Action xsToolsNotfound, bool searchHiddenISOs)
|
||||
: base(vm.Connection, string.Format(Messages.INSTALLTOOLS_TITLE, vm.Name))
|
||||
{
|
||||
@ -140,12 +136,8 @@ namespace XenAdmin.Actions
|
||||
{
|
||||
foreach (VDI vdi in Connection.ResolveAllShownXenModelObjects(sr.VDIs, searchHiddenISOs))
|
||||
{
|
||||
if (ISONameOld.Equals(vdi.name_label) ||
|
||||
ISONameNew.Equals(vdi.name_label) ||
|
||||
vdi.is_tools_iso)
|
||||
{
|
||||
if (vdi.IsToolsIso)
|
||||
return vdi;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -300,6 +300,24 @@ namespace XenAPI
|
||||
get { return other_config.ContainsKey("config-drive") && other_config["config-drive"].ToLower() == "true"; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether this is a Tools ISO. Finds the old method (by name) as well as
|
||||
/// the new method (field on the VDI).
|
||||
/// </summary>
|
||||
public bool IsToolsIso
|
||||
{
|
||||
get
|
||||
{
|
||||
const string ISONameOld = "xswindrivers.iso";
|
||||
const string ISONameNew = "xs-tools.iso";
|
||||
|
||||
return
|
||||
is_tools_iso ||
|
||||
ISONameOld.Equals(name_label) ||
|
||||
ISONameNew.Equals(name_label);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether read caching is enabled on this disk on a specific host
|
||||
|
Loading…
Reference in New Issue
Block a user