示例#1
0
        protected void InitialiseWizard(IEnumerable <SelectedItem> selection)
        {
            CreateMappingsFromSelection(selection);
            UpdateWindowTitle();
            m_pageDestination = new CrossPoolMigrateDestinationPage(hostPreSelection, VmsFromSelection(selection), wizardMode)
            {
                VmMappings = m_vmMappings,
            };

            m_pageStorage         = new CrossPoolMigrateStoragePage();
            m_pageNetwork         = new CrossPoolMigrateNetworkingPage();
            m_pageTransferNetwork = new CrossPoolMigrateTransferNetworkPage(VmsFromSelection(selection));
            m_pageFinish          = new CrossPoolMigrateFinishPage(selection.Count(), wizardMode)
            {
                SummaryRetreiver = GetVMMappingSummary
            };
            m_pageTargetRbac = new RBACWarningPage();

            m_pageCopyMode      = new CrossPoolMigrateCopyModePage(VmsFromSelection(selection));
            m_pageIntraPoolCopy = new IntraPoolCopyPage(VmsFromSelection(selection));

            if (wizardMode == WizardMode.Copy)
            {
                AddPages(m_pageCopyMode, m_pageIntraPoolCopy);
            }
            else
            {
                AddPages(m_pageDestination, m_pageStorage, m_pageFinish);
            }
        }
        protected void InitialiseWizard(IEnumerable <SelectedItem> selection)
        {
            var vmsFromSelection = VmsFromSelection(selection);

            CreateMappingsFromSelection(selection);
            HasTemplatesOnly = vmsFromSelection != null && vmsFromSelection.All(vm => vm.is_a_template);

            UpdateWindowTitle();
            m_pageDestination = CreateCrossPoolMigrateDestinationPage(selection);

            m_pageStorage         = new CrossPoolMigrateStoragePage(wizardMode);
            m_pageNetwork         = new CrossPoolMigrateNetworkingPage(HasTemplatesOnly, wizardMode);
            m_pageTransferNetwork = new CrossPoolMigrateTransferNetworkPage(vmsFromSelection, HasTemplatesOnly, wizardMode);
            m_pageFinish          = new CrossPoolMigrateFinishPage(selection.Count(), wizardMode, HasTemplatesOnly)
            {
                SummaryRetreiver = GetVMMappingSummary
            };
            m_pageTargetRbac = new RBACWarningPage();

            m_pageCopyMode      = new CrossPoolMigrateCopyModePage(vmsFromSelection);
            m_pageIntraPoolCopy = new IntraPoolCopyPage(vmsFromSelection);

            if (wizardMode == WizardMode.Copy)
            {
                AddPages(m_pageCopyMode, m_pageIntraPoolCopy);
            }
            else
            {
                AddPages(m_pageDestination, m_pageStorage, m_pageFinish);
            }
        }
示例#3
0
        private void InitialiseWizard(SelectedItemCollection selection)
        {
            var vmsFromSelection = new List <VM>();

            foreach (var item in selection)
            {
                var vm = item.XenObject as VM;
                if (vm == null)
                {
                    continue;
                }

                vmsFromSelection.Add(vm);
                m_vmMappings.Add(item.XenObject.opaque_ref, new VmMapping {
                    VmNameLabel = item.XenObject.Name()
                });
            }

            HasTemplatesOnly = vmsFromSelection.Count > 0 && vmsFromSelection.All(vm => vm.is_a_template);

            UpdateWindowTitle();

            m_pageDestination = new CrossPoolMigrateDestinationPage(vmsFromSelection,
                                                                    wizardMode, GetSourceConnectionsForSelection(selection), _force)
            {
                VmMappings = m_vmMappings,
                Connection = selection.GetConnectionOfFirstItem()
            };
            m_pageDestination.SetDefaultTarget(hostPreSelection);

            m_pageStorage         = new CrossPoolMigrateStoragePage(wizardMode);
            m_pageNetwork         = new CrossPoolMigrateNetworkingPage(HasTemplatesOnly, wizardMode);
            m_pageTransferNetwork = new CrossPoolMigrateTransferNetworkPage(vmsFromSelection, HasTemplatesOnly, wizardMode);
            m_pageFinish          = new CrossPoolMigrateFinishPage(selection.Count(), wizardMode, HasTemplatesOnly)
            {
                SummaryRetreiver = GetVMMappingSummary
            };
            m_pageTargetRbac = new RBACWarningPage();

            m_pageCopyMode      = new CrossPoolMigrateCopyModePage(vmsFromSelection);
            m_pageIntraPoolCopy = new IntraPoolCopyPage(vmsFromSelection);

            if (wizardMode == WizardMode.Copy)
            {
                AddPages(m_pageCopyMode, m_pageIntraPoolCopy);
            }
            else
            {
                AddPages(m_pageDestination, m_pageStorage, m_pageFinish);
            }
        }
示例#4
0
        private void InitialiseWizard(IEnumerable <SelectedItem> selection)
        {
            Text = Messages.CPM_WIZARD_TITLE;
            CreateMappingsFromSelection(selection);
            m_pageDestination = new CrossPoolMigrateDestinationPage(hostPreSelection, VmsFromSelection(selection))
            {
                VmMappings = m_vmMappings,
            };

            m_pageStorage         = new CrossPoolMigrateStoragePage();
            m_pageNetwork         = new CrossPoolMigrateNetworkingPage();
            m_pageTransferNetwork = new CrossPoolMigrateTransferNetworkPage(VmsFromSelection(selection));
            m_pageFinish          = new CrossPoolMigrateFinishPage {
                SummaryRetreiver = GetVMMappingSummary
            };
            m_pageTargetRbac = new RBACWarningPage();

            AddPages(m_pageDestination, m_pageStorage, m_pageTransferNetwork, m_pageFinish);
        }
        private void InitialiseWizard(IEnumerable<SelectedItem> selection)
        {
            Text = Messages.CPM_WIZARD_TITLE;
            CreateMappingsFromSelection(selection);
            m_pageDestination = new CrossPoolMigrateDestinationPage(hostPreSelection, VmsFromSelection(selection) )
                                    {
                                        VmMappings = m_vmMappings,
                                    };

            m_pageStorage = new CrossPoolMigrateStoragePage();
            m_pageNetwork = new CrossPoolMigrateNetworkingPage();
            m_pageTransferNetwork = new CrossPoolMigrateTransferNetworkPage(VmsFromSelection(selection));
            m_pageFinish = new CrossPoolMigrateFinishPage {SummaryRetreiver = GetVMMappingSummary};
            m_pageTargetRbac = new RBACWarningPage();

            AddPages(m_pageDestination, m_pageStorage, m_pageTransferNetwork, m_pageFinish);
        }
        protected void InitialiseWizard(IEnumerable<SelectedItem> selection)
        {
            CreateMappingsFromSelection(selection);
            UpdateWindowTitle();
            m_pageDestination = new CrossPoolMigrateDestinationPage(hostPreSelection, VmsFromSelection(selection), wizardMode)
                                    {
                                        VmMappings = m_vmMappings,
                                    };

            m_pageStorage = new CrossPoolMigrateStoragePage();
            m_pageNetwork = new CrossPoolMigrateNetworkingPage();
            m_pageTransferNetwork = new CrossPoolMigrateTransferNetworkPage(VmsFromSelection(selection));
            m_pageFinish = new CrossPoolMigrateFinishPage(selection.Count(), wizardMode) { SummaryRetreiver = GetVMMappingSummary };
            m_pageTargetRbac = new RBACWarningPage();

            m_pageCopyMode = new CrossPoolMigrateCopyModePage(VmsFromSelection(selection));
            m_pageIntraPoolCopy = new IntraPoolCopyPage(VmsFromSelection(selection));

            if (wizardMode == WizardMode.Copy)
                AddPages(m_pageCopyMode, m_pageIntraPoolCopy);
            else
                AddPages(m_pageDestination, m_pageStorage, m_pageFinish);
        }
        protected void InitialiseWizard(IEnumerable<SelectedItem> selection)
        {
            var vmsFromSelection = VmsFromSelection(selection);

            CreateMappingsFromSelection(selection);
            HasTemplatesOnly = vmsFromSelection != null && vmsFromSelection.All(vm => vm.is_a_template);

            UpdateWindowTitle();
            m_pageDestination = CreateCrossPoolMigrateDestinationPage(selection);

            m_pageStorage = new CrossPoolMigrateStoragePage(wizardMode);
            m_pageNetwork = new CrossPoolMigrateNetworkingPage(HasTemplatesOnly, wizardMode);
            m_pageTransferNetwork = new CrossPoolMigrateTransferNetworkPage(vmsFromSelection, HasTemplatesOnly, wizardMode);
            m_pageFinish = new CrossPoolMigrateFinishPage(selection.Count(), wizardMode, HasTemplatesOnly) { SummaryRetreiver = GetVMMappingSummary };
            m_pageTargetRbac = new RBACWarningPage();

            m_pageCopyMode = new CrossPoolMigrateCopyModePage(vmsFromSelection);
            m_pageIntraPoolCopy = new IntraPoolCopyPage(vmsFromSelection);

            if (wizardMode == WizardMode.Copy)
                AddPages(m_pageCopyMode, m_pageIntraPoolCopy);
            else
                AddPages(m_pageDestination, m_pageStorage, m_pageFinish);
        }