From c1378a79134c891b0953279f1431f4cbf65847bd Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Thu, 28 Nov 2024 13:23:23 +0100 Subject: [PATCH] Wizard: Integrate HyperV selection in Azure target options This determines the generation the image will get registered as in Azure. V2 supports UEFI and more instance types than V1. --- .../steps/TargetEnvironment/Azure/index.tsx | 2 ++ .../CreateImageWizard/utilities/requestMapper.ts | 4 ++++ src/store/wizardSlice.ts | 13 +++++++++++++ 3 files changed, 19 insertions(+) diff --git a/src/Components/CreateImageWizard/steps/TargetEnvironment/Azure/index.tsx b/src/Components/CreateImageWizard/steps/TargetEnvironment/Azure/index.tsx index 00257c23..631629f5 100644 --- a/src/Components/CreateImageWizard/steps/TargetEnvironment/Azure/index.tsx +++ b/src/Components/CreateImageWizard/steps/TargetEnvironment/Azure/index.tsx @@ -14,6 +14,7 @@ import { import { ExternalLinkAltIcon } from '@patternfly/react-icons'; import { AzureAuthButton } from './AzureAuthButton'; +import { AzureHyperVSelect } from './AzureHyperVSelect'; import { AzureResourceGroups } from './AzureResourceGroups'; import { AzureSourcesSelect } from './AzureSourcesSelect'; @@ -91,6 +92,7 @@ const Azure = () => { Learn more about OAuth 2.0 + { return state.wizard.azure.resourceGroup; }; +export const selectAzureHyperVGeneration = (state: RootState) => { + return state.wizard.azure.hyperVGeneration; +}; + export const selectGcpShareMethod = (state: RootState) => { return state.wizard.gcp.shareMethod; }; @@ -406,6 +412,12 @@ export const wizardSlice = createSlice({ changeAzureResourceGroup: (state, action: PayloadAction) => { state.azure.resourceGroup = action.payload; }, + changeAzureHyperVGeneration: ( + state, + action: PayloadAction<'V1' | 'V2'> + ) => { + state.azure.hyperVGeneration = action.payload; + }, reinitializeAzure: (state) => { state.azure.shareMethod = 'sources'; state.azure.tenantId = ''; @@ -690,6 +702,7 @@ export const { changeAzureSubscriptionId, changeAzureSource, changeAzureResourceGroup, + changeAzureHyperVGeneration, reinitializeAzure, changeGcpShareMethod, changeGcpAccountType,