Ejemplo n.º 1
0
		public ExportApplianceWizard(IXenConnection con, SelectedItemCollection selection)
			: base(con)
		{
			InitializeComponent();

		    m_pageExportAppliance = new ExportAppliancePage();
            m_pageRbac = new RBACWarningPage();
		    m_pageExportSelectVMs = new ExportSelectVMsPage();
            m_pageExportEula = new ExportEulaPage();
		    m_pageExportOptions = new ExportOptionsPage();
		    m_pageTvmIp = new TvmIpPage();
            m_pageFinish = new ExportFinishPage();

			m_selectedObject = selection.FirstAsXenObject;

			if (selection.Count == 1 && (m_selectedObject is VM || m_selectedObject is VM_appliance))
				m_pageExportAppliance.ApplianceFileName = m_selectedObject.Name;

			m_pageExportAppliance.OvfModeOnly = m_selectedObject is VM_appliance;
			m_pageTvmIp.IsExportMode = true;
			m_pageFinish.SummaryRetreiver = GetSummary;
			m_pageExportSelectVMs.SelectedItems = selection;

            AddPages(m_pageExportAppliance, m_pageExportSelectVMs, m_pageFinish);
		}
Ejemplo n.º 2
0
		public ImportWizard(IXenConnection con, IXenObject xenObject, string filename, bool ovfModeOnly)
			: base(con)
		{
			InitializeComponent();

		    m_pageStorage = new ImportSelectStoragePage();
		    m_pageNetwork = new ImportSelectNetworkPage();
		    m_pageHost = new ImportSelectHostPage();
		    m_pageSecurity = new ImportSecurityPage();
		    m_pageEula = new ImportEulaPage();
		    m_pageOptions = new ImportOptionsPage();
		    m_pageFinish = new ImportFinishPage();
		    m_pageRbac = new RBACWarningPage();
		    m_pageTvmIp = new TvmIpPage();
		    m_pageVMconfig = new ImageVMConfigPage();
		    m_pageImportSource = new ImportSourcePage();
		    m_pageXvaStorage = new StoragePickerPage();
		    m_pageXvaNetwork = new NetworkPickerPage();
		    m_pageXvaHost = new GlobalSelectHost();
            lunPerVdiMappingPage = new LunPerVdiImportPage { Connection = con };

			m_selectedObject = xenObject;
            m_pageTvmIp.IsExportMode = false;
			m_pageFinish.SummaryRetreiver = GetSummary;
			m_pageXvaStorage.ImportVmCompleted += m_pageXvaStorage_ImportVmCompleted;

			if (!string.IsNullOrEmpty(filename))
				m_pageImportSource.SetFileName(filename);

			m_pageImportSource.OvfModeOnly = ovfModeOnly;
            AddPages(m_pageImportSource, m_pageHost, m_pageStorage, m_pageNetwork, m_pageFinish);
		}