Skip to content

Commit

Permalink
Merge pull request #1068 from yaacov/dont-add-glance-to-none-openstack
Browse files Browse the repository at this point in the history
🐞  Check provider type before assuming vm use glance
  • Loading branch information
yaacov authored Apr 7, 2024
2 parents d3f524c + a69b29f commit bd8289e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const calculateStorages = (
draft: Draft<CreateVmMigrationPageState>,
): Partial<CreateVmMigrationPageState['calculatedPerNamespace']> => {
const {
receivedAsParams: { sourceProvider },
existingResources,
underConstruction: { plan },
calculatedOnce: { sourceStorageLabelToId, storageIdsUsedBySelectedVms },
Expand Down Expand Up @@ -121,7 +122,7 @@ export const calculateStorages = (
let usedBySelectedVms = storageIdsUsedBySelectedVms.some(
(id) => id === sourceStorageLabelToId[label] || id === label,
);
if (label === 'glance') {
if (label === 'glance' && sourceProvider?.spec?.type === 'openstack') {
usedBySelectedVms = true;
}
return {
Expand Down

0 comments on commit bd8289e

Please sign in to comment.