From 4586832d5f29ee1d99a75acce89130907176a53f Mon Sep 17 00:00:00 2001 From: Gabor Apati-Nagy Date: Wed, 25 Nov 2015 11:01:28 +0000 Subject: [PATCH] CA-178985: Removed ova.xml import from XenCenter because it has been broken and we decided not to keep this feature Signed-off-by: Gabor Apati-Nagy --- XenAdmin/Wizards/ImportWizard/ImportSourcePage.cs | 12 ++++-------- XenModel/Actions/VM/ImportVmAction.cs | 10 +--------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/XenAdmin/Wizards/ImportWizard/ImportSourcePage.cs b/XenAdmin/Wizards/ImportWizard/ImportSourcePage.cs index 57949c157..d6bc44664 100644 --- a/XenAdmin/Wizards/ImportWizard/ImportSourcePage.cs +++ b/XenAdmin/Wizards/ImportWizard/ImportSourcePage.cs @@ -57,7 +57,7 @@ namespace XenAdmin.Wizards.ImportWizard private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private readonly string[] m_supportedImageTypes = new[] { ".vhd", ".vmdk" };//CA-61385: remove ".vdi", ".wim" support for Boston private readonly string[] m_supportedApplianceTypes = new[] { ".ovf", ".ova", ".ova.gz" }; - private readonly string[] m_supportedXvaTypes = new[] {".xva", "ova.xml"}; + private readonly string[] m_supportedXvaTypes = new[] { ".xva" }; /// /// Stores the last valid selected appliance @@ -211,8 +211,6 @@ namespace XenAdmin.Wizards.ImportWizard public bool IsWIM { get; private set; } - public bool IsXvaVersion1 { get; private set; } - public ulong DiskCapacity { get; private set; } #endregion @@ -244,9 +242,7 @@ namespace XenAdmin.Wizards.ImportWizard FileInfo info = new FileInfo(m_textBoxFile.Text); ImageLength = info.Length > 0 ? (ulong)info.Length : 0; - DiskCapacity = IsXvaVersion1 - ? GetTotalSizeFromXmlGeneva() //Geneva style - : GetTotalSizeFromXmlXva(GetXmlStringFromTarXVA()); //xva style + DiskCapacity = GetTotalSizeFromXmlXva(GetXmlStringFromTarXVA()); //xva style } catch (Exception) { @@ -474,8 +470,8 @@ namespace XenAdmin.Wizards.ImportWizard return false; } - if (ext == "ova.xml") - IsXvaVersion1 = true; + if (ext == "ova.xml") + return false; //not supported anymore TypeOfImport = ImportWizard.ImportType.Xva; return true; diff --git a/XenModel/Actions/VM/ImportVmAction.cs b/XenModel/Actions/VM/ImportVmAction.cs index 248fd5684..c1f6b8b17 100644 --- a/XenModel/Actions/VM/ImportVmAction.cs +++ b/XenModel/Actions/VM/ImportVmAction.cs @@ -120,15 +120,7 @@ namespace XenAdmin.Actions try { - string vmRef; - - if (m_filename.EndsWith("ova.xml"))//importing version 1 from of VM - { - m_filename = m_filename.Replace("ova.xml", ""); - vmRef = GetVmRef(applyVersionOneFiles()); - } - else//importing current format of VM - vmRef = GetVmRef(applyFile()); + string vmRef = GetVmRef(applyFile()); if (Cancelling) throw new CancelledException();