mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CP-10824: Supp Pack installation through XenCenter: Add other_config entry for the temporary VDI
- add an entry in the VDI's other_config to identify it as supp pack iso, so that we can easily find these vdis and remove if needed Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
23eabb23d9
commit
a6b58acbd2
@ -63,6 +63,7 @@ namespace XenAdmin.Actions
|
||||
|
||||
ApiMethodsToRoleCheck.Add("VDI.create");
|
||||
ApiMethodsToRoleCheck.Add("VDI.destroy");
|
||||
ApiMethodsToRoleCheck.Add("VDI.set_other_config");
|
||||
ApiMethodsToRoleCheck.Add("http/put_import_raw_vdi");
|
||||
|
||||
Host = master;
|
||||
@ -150,6 +151,15 @@ namespace XenAdmin.Actions
|
||||
throw;
|
||||
}
|
||||
|
||||
// mark the vdi as being a temporary supp pack iso
|
||||
vdi = Connection.Resolve(vdiRef);
|
||||
if (vdi != null)
|
||||
{
|
||||
var otherConfig = new Dictionary<string, string>(vdi.other_config);
|
||||
otherConfig["supp_pack_iso"] = "true";
|
||||
VDI.set_other_config(Session, vdiRef, otherConfig);
|
||||
}
|
||||
|
||||
if (localStorageHost != null)
|
||||
VdiRefs.Add(localStorageHost, vdiRef);
|
||||
else // shared SR
|
||||
|
Loading…
Reference in New Issue
Block a user