Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
UISettingService,
} from '../../services';
import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service';
import BundleService from '../../services/BundleService';

type ClusterDetailsProps = {
cluster?: Cluster;
Expand Down Expand Up @@ -81,9 +82,17 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
try {
const searchParams = new URLSearchParams(location.search);
const isAssistedMigration = searchParams.get('source') === 'assisted_migration';
//For Assisted Migration we need to LVMs operator
//For Assisted Migration we need the LVMs operator and also the virtualization bundle operators
if (isAssistedMigration) {
params.olmOperators = [{ name: 'lvm' }];
const selectedBundle = (await BundleService.listBundles()).find(
(b) => b.id === 'virtualization',
);
const virtOperators = selectedBundle?.operators;
params.olmOperators = [
...params.olmOperators,
...(virtOperators ? virtOperators.map((op) => ({ name: op })) : []),
];
}
const cluster = await ClustersService.create(params, isAssistedMigration);
navigate(`../${cluster.id}`, { state: ClusterWizardFlowStateNew });
Expand Down
Loading