public NewVMApplianceWizard(Pool pool) : base(pool.Connection) { InitializeComponent(); xenTabPageRBAC = new RBACWarningPage(); xenTabPageVMs = new NewVMGroupVMsPage <VM_appliance>(); xenTabPageName = new NewVMApplianceNamePage(); xenTabPageFinish = new NewVMApplianceFinishPage(); xenTabPageVMOrderAndDelays = new NewVMApplianceVMOrderAndDelaysPage(); Pool = pool; xenTabPageVMs.Pool = pool; #region RBAC Warning Page Checks if (Pool.Connection.Session.IsLocalSuperuser || Helpers.GetMaster(Pool.Connection).external_auth_type == Auth.AUTH_TYPE_NONE) { //do nothing } else { RBACWarningPage.WizardPermissionCheck check = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_WARNING_VM_APPLIANCE); check.AddApiCheck("VM_appliance.async_create"); check.Blocking = true; xenTabPageRBAC.AddPermissionChecks(xenConnection, check); AddPage(xenTabPageRBAC, 0); } #endregion xenTabPageVMOrderAndDelays.Pool = pool; AddPages(xenTabPageName, xenTabPageVMs, xenTabPageVMOrderAndDelays, xenTabPageFinish); }
public DRFailoverWizard(Pool pool, DRWizardType wizardType) : base(pool.Connection) { InitializeComponent(); RBACWarningPage = new RBACWarningPage(); DRFailoverWizardFirstPage = new DRFailoverWizardFirstPage(); DRFailoverWizardStoragePage1 = new DRFailoverWizardStoragePage(); DRFailoverWizardPrecheckPage1 = new DRFailoverWizardPrecheckPage(); DRFailoverWizardRecoverPage1 = new DRFailoverWizardRecoverPage(); DRFailoverWizardAppliancesPage1 = new DRFailoverWizardAppliancesPage(); DRFailoverWizardWelcomePage = new DRFailoverWizardWelcomePage(); DRFailoverWizardReportPage1 = new DRFailoverWizardReportPage(); Pool = pool; WizardType = wizardType; #region RBAC Warning Page Checks if (Pool.Connection.Session.IsLocalSuperuser || Helpers.GetMaster(Pool.Connection).external_auth_type == Auth.AUTH_TYPE_NONE) { } else { RBACWarningPage.WizardPermissionCheck check = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_DR_WIZARD_MESSAGE); check.AddApiCheck("DR_task.async_create"); check.Blocking = true; RBACWarningPage.AddPermissionChecks(xenConnection, check); AddPage(RBACWarningPage, 0); } #endregion DRFailoverWizardReportPage1.SummaryRetreiver = GetSummaryReport; DRFailoverWizardWelcomePage.WizardTypeChanged += DRFailoverWizardWelcomePage_WizardTypeChanged; DRFailoverWizardWelcomePage.SetWizardType(wizardType); DRFailoverWizardRecoverPage1.ReportStarted += DRFailoverWizardRecoverPage1_ReportStarted; DRFailoverWizardRecoverPage1.ReportLineGot += DRFailoverWizardRecoverPage1_ReportLineGot; DRFailoverWizardRecoverPage1.ReportActionResultGot += DRFailoverWizardRecoverPage1_ReportActionResultGot; DRFailoverWizardAppliancesPage1.Pool = pool; DRFailoverWizardPrecheckPage1.Pool = pool; DRFailoverWizardStoragePage1.NewDrTaskIntroduced += NewDrTaskIntroduced; DRFailoverWizardPrecheckPage1.NewDrTaskIntroduced += NewDrTaskIntroduced; DRFailoverWizardPrecheckPage1.SrIntroduced += DRFailoverWizardPrecheckPage1_SrIntroduced; AddPages(DRFailoverWizardWelcomePage, DRFailoverWizardFirstPage, DRFailoverWizardStoragePage1, DRFailoverWizardAppliancesPage1, DRFailoverWizardPrecheckPage1, DRFailoverWizardRecoverPage1, DRFailoverWizardReportPage1); }
public NewPolicyWizardSpecific(Pool pool) : base(pool) { this.Text = VMGroup <T> .VMPolicyWizardTitle; xenTabPagePolicy = new NewPolicyPolicyNamePage(VMGroup <T> .VMPolicyNamePageText, VMGroup <T> .VMPolicyNamePageTextMore, VMGroup <T> .VMPolicyNamePageTabName, VMGroup <T> .VMPolicyNamePageTabText, VMGroup <T> .VMPolicyNamePageNameFieldText); xenTabPageSnapshotType = new NewPolicySnapshotTypePageSpecific <T>(); xenTabPageVMsPage = new NewVMGroupVMsPage <T>(); xenTabPageFinish = new NewPolicyFinishPage(VMGroup <T> .VMPolicyFinishPageText, VMGroup <T> .VMPolicyFinishPageCheckboxText, VMGroup <T> .VMPolicyFinishPageTitle); xenTabPageRBAC = new RBACWarningPage(); xenTabPageVMsPage.Pool = pool; xenTabPageSnapshotFrequency = new NewPolicySnapshotFrequencyPage(); xenTabPageSnapshotFrequency.Pool = pool; #region RBAC Warning Page Checks if (Pool.Connection.Session.IsLocalSuperuser || Helpers.GetMaster(Pool.Connection).external_auth_type == Auth.AUTH_TYPE_NONE) { //do nothing } else { RBACWarningPage.WizardPermissionCheck check; check = new RBACWarningPage.WizardPermissionCheck(VMGroup <T> .VMPolicyRBACWarning); check.AddApiCheck(VMGroup <T> .VMPolicyRBACapiCheck); check.Blocking = true; xenTabPageRBAC.AddPermissionChecks(xenConnection, check); AddPage(xenTabPageRBAC, 0); } #endregion AddPages(xenTabPagePolicy, xenTabPageVMsPage); AddPage(xenTabPageSnapshotType); AddPages(xenTabPageSnapshotFrequency); if (VMGroup <T> .isVMPolicyVMPP) { xenTabPageArchive = new NewPolicyArchivePage(); xenTabPageArchive.Pool = pool; AddPage(xenTabPageArchive); xenTabPageEmail = new NewPolicyEmailPage(); xenTabPageEmail.Pool = pool; AddPages(xenTabPageEmail); } AddPages(xenTabPageFinish); }
public RestoreWizard(IXenObject xenModelObject) { this.InitializeComponent(); this._Message = base.Text = string.Format(Messages.RESTORE_VM_TITLE, Helpers.GetName(xenModelObject.Connection)); this.page_SetStorage = new Page_SetStorage(xenModelObject); this.page_SelectVM = new Page_SelectVM(); this.page_JobSettings = new Page_JobSettings(xenModelObject); this.page_JobSchedule = new Page_JobSchedule(); this.page_VMSettings = new Page_VMSettings(); this.page_Complete = new Page_Complete(); this.page_RbacWarning = new RBACWarningPage(); this._xenModelObject = xenModelObject; this.backup_info_list = new Dictionary <string, string>(); this.vmCheckedList = new List <AgentParamDataModel>(); this.restoreDataModel = new RestoreDataModel(); this.restore_info_list = new List <BackupRestoreConfig.ResultInfo>(); this.restoreListInfo = new BackupRestoreConfig.RestoreListInfo(); this.restore_vdi_list = new Dictionary <string, string>(); #region RBAC Warning Page Checks if (this._xenModelObject.Connection.Session.IsLocalSuperuser || Helpers.GetMaster(this._xenModelObject.Connection).external_auth_type == Auth.AUTH_TYPE_NONE) { //page_RbacWarning.DisableStep = true; } else { // Check to see if they can even create a VM RBACWarningPage.WizardPermissionCheck createCheck = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_WARNING_VM_WIZARD_RESTORE); foreach (RbacMethod method in StaticRBACDependencies) { createCheck.AddApiCheck(method); } createCheck.Blocking = true; page_RbacWarning.AddPermissionChecks(this._xenModelObject.Connection, createCheck); AddPage(page_RbacWarning, 0); } #endregion base.AddPages(new XenTabPage[] { this.page_SetStorage, this.page_SelectVM, this.page_JobSettings, this.page_JobSchedule, this.page_VMSettings, this.page_Complete }); }
internal ReplicationWizard(IXenObject XenObject) { this.InitializeComponent(); this._xenModelObject = XenObject; this.repChoseVmPage = new ReplicationChoseVmPage(XenObject); this.repJobSettingPage = new ReplicationJobSettingPage(); this.synchronizationPage = new ReplicationSynchronizationPage(); this.schedulePage = new ReplicationSchedulePage(XenObject); this.vmSettingsPage = new ReplicationVMSettingsPage(); this.completePage = new ReplicationCompletePage(); this.page_RbacWarning = new RBACWarningPage(); #region RBAC Warning Page Checks if (this._xenModelObject.Connection.Session.IsLocalSuperuser || Helpers.GetMaster(this._xenModelObject.Connection).external_auth_type == Auth.AUTH_TYPE_NONE) { //page_RbacWarning.DisableStep = true; } else { // Check to see if they can even create a VM RBACWarningPage.WizardPermissionCheck createCheck = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_WARNING_VM_WIZARD_REPLICATION); foreach (RbacMethod method in StaticRBACDependencies) { createCheck.AddApiCheck(method); } createCheck.Blocking = true; page_RbacWarning.AddPermissionChecks(this._xenModelObject.Connection, createCheck); AddPage(page_RbacWarning, 0); } #endregion base.AddPage(this.repChoseVmPage); base.AddPage(this.repJobSettingPage); base.AddPage(this.synchronizationPage); base.AddPage(this.schedulePage); base.AddPage(this.vmSettingsPage); base.AddPage(this.completePage); this.m_text = string.Format(Messages.REPLICATION_VM_TITLE, Helpers.GetName(XenObject.Connection)); }
public NewPolicyWizard(Pool pool) : base(pool.Connection) { InitializeComponent(); Pool = pool; this.Text = Messages.VMSS_WIZARD_TITLE; xenTabPagePolicy = new NewPolicyPolicyNamePage(Messages.NEW_VMSS_PAGE_TEXT, Messages.NEW_VMSS_PAGE_TEXT_MORE, Messages.VMSS_NAME, Messages.VMSS_NAME_TITLE, Messages.VMSS_NAME_FIELD_TEXT); xenTabPageSnapshotType = new NewPolicySnapshotTypePage(); xenTabPageVMsPage = new NewVMGroupVMsPage <VMSS>(); xenTabPageFinish = new NewPolicyFinishPage(Messages.VMSS_FINISH_PAGE_TEXT, Messages.VMSS_FINISH_PAGE_CHECKBOX_TEXT, Messages.VMSS_FINISH_TITLE); xenTabPageRBAC = new RBACWarningPage(); xenTabPageVMsPage.Pool = pool; xenTabPageSnapshotFrequency = new NewPolicySnapshotFrequencyPage(); xenTabPageSnapshotFrequency.Pool = pool; #region RBAC Warning Page Checks if (Pool.Connection.Session.IsLocalSuperuser || Helpers.GetMaster(Pool.Connection).external_auth_type == Auth.AUTH_TYPE_NONE) { //do nothing } else { RBACWarningPage.WizardPermissionCheck check; check = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_WARNING_VMSS); check.AddApiCheck("VMSS.async_create"); check.Blocking = true; xenTabPageRBAC.AddPermissionChecks(xenConnection, check); AddPage(xenTabPageRBAC, 0); } #endregion AddPages(xenTabPagePolicy, xenTabPageVMsPage); AddPage(xenTabPageSnapshotType); AddPages(xenTabPageSnapshotFrequency); AddPages(xenTabPageFinish); }
public NewPolicyWizard(Pool pool) : base(pool.Connection) { InitializeComponent(); xenTabPagePolicy = new NewPolicyPolicyNamePage(); xenTabPageSnapshotType = new NewPolicySnapshotTypePage(); xenTabPageSnapshotFrequency = new NewPolicySnapshotFrequencyPage(); xenTabPageVMsPage = new NewVMGroupVMsPage <VMPP>(); xenTabPageArchive = new NewPolicyArchivePage(); xenTabPageEmail = new NewPolicyEmailPage(); xenTabPageFinish = new NewPolicyFinishPage(); xenTabPageRBAC = new RBACWarningPage(); Pool = pool; xenTabPageVMsPage.Pool = pool; xenTabPageEmail.Pool = pool; xenTabPageArchive.Pool = pool; xenTabPageSnapshotFrequency.Pool = pool; #region RBAC Warning Page Checks if (Pool.Connection.Session.IsLocalSuperuser || Helpers.GetMaster(Pool.Connection).external_auth_type == Auth.AUTH_TYPE_NONE) { //do nothing } else { RBACWarningPage.WizardPermissionCheck check = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_WARNING_VMPP); check.AddApiCheck("VMPP.async_create"); check.Blocking = true; xenTabPageRBAC.AddPermissionChecks(xenConnection, check); AddPage(xenTabPageRBAC, 0); } #endregion AddPages(xenTabPagePolicy, xenTabPageVMsPage, xenTabPageSnapshotType, xenTabPageSnapshotFrequency, xenTabPageArchive, xenTabPageEmail, xenTabPageFinish); }
public BackupWizard(IXenObject XenObject) { this._xenModelObject = XenObject; InitializeComponent(); base.Text = string.Format(Messages.BACKUP_VM_TITLE, HalsignHelpers.GetName(this._xenModelObject.Connection)); this.xenChoseVmBackupPage = new BackupChoseVmPage(XenObject); this.scheduleBackupPage = new BackupSchedulePage(); this.summaryBackupPage = new BackupSummaryPage(); this.optionsBackupPage = new BackupOptionsPage(); this.completeBackupPage = new BackupCompletePage(); this.page_RbacWarning = new RBACWarningPage(); #region RBAC Warning Page Checks if (this._xenModelObject.Connection.Session.IsLocalSuperuser || Helpers.GetMaster(this._xenModelObject.Connection).external_auth_type == Auth.AUTH_TYPE_NONE) { //page_RbacWarning.DisableStep = true; } else { // Check to see if they can even create a VM RBACWarningPage.WizardPermissionCheck createCheck = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_WARNING_VM_WIZARD_BACKUP); foreach (RbacMethod method in StaticRBACDependencies) { createCheck.AddApiCheck(method); } createCheck.Blocking = true; page_RbacWarning.AddPermissionChecks(this._xenModelObject.Connection, createCheck); AddPage(page_RbacWarning, 0); } #endregion base.AddPage(this.xenChoseVmBackupPage); base.AddPage(this.scheduleBackupPage); base.AddPage(this.optionsBackupPage); base.AddPage(this.summaryBackupPage); base.AddPage(this.completeBackupPage); }
public NewVMWizard(IXenConnection connection, VM template, Host affinity) : base(connection) { InitializeComponent(); page_1_Template = new Page_Template(); page_1b_BiosLocking = new Page_CopyBiosStrings(); page_2_Name = new Page_Name(); page_3_InstallationMedia = new Page_InstallationMedia(); page_4_HomeServer = new Page_HomeServer(); page_5_CpuMem = new Page_CpuMem(); page_6_Storage = new Page_Storage(); page_7_Networking = new Page_Networking(); page_8_Finish = new Page_Finish(); page_RbacWarning = new RBACWarningPage(); page_Cloud = new Page_Cloud(); page_6b_LunPerVdi = new LunPerVdiNewVMMappingPage { Connection = xenConnection }; #region RBAC Warning Page Checks if (connection.Session.IsLocalSuperuser || Helpers.GetMaster(connection).external_auth_type == Auth.AUTH_TYPE_NONE) { //page_RbacWarning.DisableStep = true; } else { // Check to see if they can even create a VM RBACWarningPage.WizardPermissionCheck createCheck = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_WARNING_VM_WIZARD_BLOCK); foreach (RbacMethod method in CreateVMAction.StaticRBACDependencies) { createCheck.AddApiCheck(method); } createCheck.Blocking = true; // Check to see if they can set memory values RBACWarningPage.WizardPermissionCheck memCheck = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_WARNING_VM_WIZARD_MEM); memCheck.AddApiCheck("vm.set_memory_limits"); memCheck.WarningAction = new RBACWarningPage.PermissionCheckActionDelegate(delegate() { // no point letting them continue page_5_CpuMem.DisableMemoryControls(); }); // Check to see if they can set the VM's affinity RBACWarningPage.WizardPermissionCheck affinityCheck = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_WARNING_VM_WIZARD_AFFINITY); affinityCheck.ApiCallsToCheck.Add("vm.set_affinity"); affinityCheck.WarningAction = new RBACWarningPage.PermissionCheckActionDelegate(delegate() { page_4_HomeServer.DisableStep = true; BlockAffinitySelection = true; Program.Invoke(this, delegate { RefreshProgress(); }); }); page_RbacWarning.AddPermissionChecks(xenConnection, createCheck, affinityCheck, memCheck); AddPage(page_RbacWarning, 0); } #endregion page_8_Finish.SummaryRetreiver = GetSummary; AddPages(page_1_Template, page_2_Name, page_3_InstallationMedia, page_4_HomeServer, page_5_CpuMem, page_6_Storage, page_7_Networking, page_8_Finish); m_affinity = affinity; page_1_Template.SelectedTemplate = template; page_1b_BiosLocking.Affinity = affinity; page_3_InstallationMedia.Affinity = affinity; page_4_HomeServer.Affinity = affinity; page_6_Storage.Affinity = affinity; }