mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 23:39:51 +01:00
CA-324350: When the OVF files are compressed, create manifest and signature on the final package after the compression.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
f24a81bd28
commit
d23c40c543
@ -138,20 +138,6 @@ namespace XenAdmin.Actions.OvfActions
|
|||||||
OVF.SaveAs(env, ovfPath);
|
OVF.SaveAs(env, ovfPath);
|
||||||
PercentComplete = 85;
|
PercentComplete = 85;
|
||||||
|
|
||||||
CheckForCancellation();
|
|
||||||
|
|
||||||
if (m_signAppliance)
|
|
||||||
{
|
|
||||||
Description = Messages.SIGNING_APPLIANCE;
|
|
||||||
OVF.Sign(m_certificate, appFolder, appFile);
|
|
||||||
}
|
|
||||||
else if (m_createManifest)
|
|
||||||
{
|
|
||||||
Description = Messages.CREATING_MANIFEST;
|
|
||||||
OVF.Manifest(appFolder, appFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
PercentComplete = 90;
|
|
||||||
CheckForCancellation();
|
CheckForCancellation();
|
||||||
|
|
||||||
if (m_createOVA)
|
if (m_createOVA)
|
||||||
@ -159,6 +145,9 @@ namespace XenAdmin.Actions.OvfActions
|
|||||||
log.Info($"Archiving OVF package {m_applianceFileName} into OVA");
|
log.Info($"Archiving OVF package {m_applianceFileName} into OVA");
|
||||||
Description = String.Format(Messages.CREATING_FILE, String.Format("{0}.ova", m_applianceFileName));
|
Description = String.Format(Messages.CREATING_FILE, String.Format("{0}.ova", m_applianceFileName));
|
||||||
|
|
||||||
|
ManifestAndSign(appFolder, appFile);
|
||||||
|
PercentComplete = 90;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OVF.ConvertOVFtoOVA(env, ovfPath, () => Cancelling, m_compressOVFfiles);
|
OVF.ConvertOVFtoOVA(env, ovfPath, () => Cancelling, m_compressOVFfiles);
|
||||||
@ -181,12 +170,29 @@ namespace XenAdmin.Actions.OvfActions
|
|||||||
{
|
{
|
||||||
throw new CancelledException();
|
throw new CancelledException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PercentComplete = 95;
|
||||||
|
ManifestAndSign(appFolder, appFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
PercentComplete = 100;
|
PercentComplete = 100;
|
||||||
Description = Messages.COMPLETED;
|
Description = Messages.COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ManifestAndSign(string appFolder, string appFile)
|
||||||
|
{
|
||||||
|
if (m_signAppliance)
|
||||||
|
{
|
||||||
|
Description = Messages.SIGNING_APPLIANCE;
|
||||||
|
OVF.Sign(m_certificate, appFolder, appFile);
|
||||||
|
}
|
||||||
|
else if (m_createManifest)
|
||||||
|
{
|
||||||
|
Description = Messages.CREATING_MANIFEST;
|
||||||
|
OVF.Manifest(appFolder, appFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void CheckForCancellation()
|
private void CheckForCancellation()
|
||||||
{
|
{
|
||||||
if (Cancelling)
|
if (Cancelling)
|
||||||
|
Loading…
Reference in New Issue
Block a user