From 7f4b62a5993e89f8ae39327c90732da5b44af528 Mon Sep 17 00:00:00 2001 From: Jonathan Kilzi Date: Tue, 8 Aug 2023 13:06:12 +0300 Subject: [PATCH] Migrates the entire code-base to @openshift-assisted/types - The commit adds a basic client for AMS, used to retrieve the pull-secret. - CI workflow adjusted in order to pick up automatically the workspaces that are meant to be published to NPM. - Release docs updated as well --- .github/workflows/release.yaml | 26 +- .../components/App/components/AboutModal.tsx | 10 +- docs/RELEASE_WORKFLOW.md | 44 +- libs/locales/package.json | 6 +- libs/toolbox/package.json | 5 +- libs/types/package.json | 30 +- libs/types/tsconfig.eslint.json | 1 - libs/types/tsconfig.json | 6 +- .../components/Agent/AgentsSelectionTable.tsx | 2 +- .../lib/cim/components/Agent/tableUtils.tsx | 2 +- .../ClusterDeployment/ArmCheckbox.tsx | 2 +- .../ClusterDeploymentCredentials.tsx | 3 +- .../ClusterDeploymentHostDiscoveryTable.tsx | 2 +- .../ClusterDeploymentHostsNetworkTable.tsx | 3 +- .../ClusterDeploymentNetworkingForm.tsx | 2 +- .../ClusterDeploymentValidationsOverview.tsx | 2 +- .../ClusterDeploymentWizardFooter.tsx | 2 +- .../NetworkConfiguration.tsx | 2 +- .../components/ClusterDeployment/helpers.ts | 2 +- .../networkConfigurationValidation.ts | 5 +- .../wizardTransition.test.ts | 21 +- .../InfraEnv/InfraEnvAgentTable.tsx | 2 +- .../components/InfraEnv/InfraTableToolbar.tsx | 3 +- .../ACMFeatureSupportLevelProvider.tsx | 2 +- .../featureStateUtils.tsx | 2 +- .../lib/cim/components/helpers/agents.ts | 2 +- .../lib/cim/components/helpers/status.ts | 2 +- .../lib/cim/components/helpers/toAssisted.ts | 2 +- .../lib/cim/components/helpers/versions.ts | 3 +- .../modals/MassApproveAgentModal.tsx | 3 +- .../modals/MassDeleteAgentModal.tsx | 2 +- libs/ui-lib/lib/cim/config/constants.ts | 3 +- .../cim/types/k8s/agent-cluster-install.ts | 2 +- libs/ui-lib/lib/cim/types/k8s/agent.ts | 8 +- .../access-token-api.ts | 19 + .../api/assisted-service/ClustersAPI.ts | 2 +- .../assisted-service/ComponentVersionsAPI.ts | 2 +- .../common/api/assisted-service/EventsAPI.ts | 2 +- .../common/api/assisted-service/HostsAPI.ts | 6 +- .../api/assisted-service/InfraEnvsAPI.ts | 2 +- .../api/assisted-service/ManagedDomainsAPI.ts | 2 +- .../NewFeatureSupportLevelsAPI.ts | 6 +- .../SupportedOpenshiftVersionsAPI.ts | 2 +- libs/ui-lib/lib/common/api/axiosClient.ts | 71 +- libs/ui-lib/lib/common/api/index.ts | 1 - libs/ui-lib/lib/common/api/swagger.yaml | 7450 ----------------- libs/ui-lib/lib/common/api/types.ts | 2709 ------ libs/ui-lib/lib/common/api/utils.ts | 5 +- .../components/AddHosts/AddHostsContext.tsx | 2 +- .../CertificateFields.tsx | 2 +- .../DiscoveryImageConfigForm.tsx | 6 +- .../DiskEncryptionMode.tsx | 2 +- .../DiskEncryptionValues.ts | 2 +- .../clusterConfiguration/SNODisclaimer.tsx | 2 +- .../clusterConfiguration/SecurityFields.tsx | 2 +- .../components/clusterConfiguration/utils.ts | 2 +- .../clusterDetail/ClusterCredentials.tsx | 2 +- .../clusterDetail/ClusterProgress.tsx | 2 +- .../clusterDetail/ClusterProgressItems.tsx | 2 +- .../components/clusterDetail/ConsoleModal.tsx | 3 +- .../clusterDetail/FinalizingProgress.tsx | 2 +- .../clusterDetail/KubeconfigDownload.tsx | 2 +- .../clusterDetail/OperatorsProgressItem.tsx | 7 +- .../clusterDetail/ProgressBarTexts.tsx | 2 +- .../ClusterWizardStepValidationsAlert.tsx | 2 +- .../clusterWizard/ReviewHostsInventory.tsx | 2 +- .../clusterWizard/ReviewValidations.tsx | 5 +- .../clusterWizard/clusterDetailsValidation.ts | 2 +- .../AvailableSubnetsControl.tsx | 2 +- .../networkingSteps/VirtualIPControlGroup.tsx | 2 +- .../common/components/clusterWizard/types.ts | 7 +- .../clusterWizard/validationsInfoUtils.ts | 7 +- .../common/components/clusters/PullSecret.tsx | 2 +- .../FeatureSupportLevelBadge.tsx | 2 +- .../FeatureSupportLevelContext.tsx | 2 +- .../components/fetching/EventListFetch.tsx | 2 +- .../hosts/AdditionalNTPSourcesDialog.tsx | 6 +- .../components/hosts/DiskLimitations.tsx | 2 +- .../lib/common/components/hosts/DiskRole.tsx | 6 +- .../common/components/hosts/EditHostForm.tsx | 2 +- .../common/components/hosts/EditHostModal.tsx | 2 +- .../components/hosts/FormatDiskCheckbox.tsx | 2 +- .../common/components/hosts/HostProgress.tsx | 2 +- .../common/components/hosts/HostRowDetail.tsx | 2 +- .../common/components/hosts/HostStatus.tsx | 2 +- .../components/hosts/HostValidationGroups.tsx | 2 +- .../lib/common/components/hosts/Hostname.tsx | 2 +- .../common/components/hosts/HostsCount.tsx | 2 +- .../common/components/hosts/HostsTable.tsx | 2 +- .../hosts/MassChangeHostnameModal.tsx | 2 +- .../components/hosts/MassDeleteHostModal.tsx | 2 +- .../lib/common/components/hosts/RoleCell.tsx | 2 +- .../common/components/hosts/RoleDropdown.tsx | 2 +- .../common/components/hosts/hardwareInfo.ts | 2 +- .../lib/common/components/hosts/status.tsx | 2 +- .../common/components/hosts/tableUtils.tsx | 7 +- .../lib/common/components/hosts/types.ts | 7 +- .../lib/common/components/hosts/utils.ts | 6 +- .../NewFeatureSupportLevelBadge.tsx | 2 +- .../newFeatureSupportLevels/types.ts | 6 +- .../newFeatureSupportLevels/utils.ts | 2 +- .../common/components/storage/DisksTable.tsx | 2 +- .../components/storage/StorageDetail.tsx | 3 +- .../components/storage/StorageTable.tsx | 3 +- .../components/storage/StorageUtils.tsx | 3 +- .../components/ui/ClusterEventsToolbar.tsx | 7 +- .../lib/common/components/ui/EventsList.tsx | 2 +- .../components/ui/ViewClusterEventsButton.tsx | 2 +- .../lib/common/components/ui/WizardFooter.tsx | 2 +- .../lib/common/components/ui/eventsModal.tsx | 2 +- .../ui/formik/SingleNodeCheckbox.tsx | 2 +- .../lib/common/components/ui/formik/utils.ts | 6 +- .../components/ui/formik/validationSchemas.ts | 2 +- libs/ui-lib/lib/common/config/constants.ts | 10 +- .../lib/common/selectors/clusterSelectors.ts | 2 +- libs/ui-lib/lib/common/types/clusters.ts | 2 +- .../lib/common/types/cpuArchitecture.ts | 2 +- libs/ui-lib/lib/common/types/events.ts | 7 +- .../lib/common/types/featureSupportLevel.ts | 6 +- .../lib/common/types/generateIsoFields.ts | 2 +- libs/ui-lib/lib/common/types/hosts.ts | 6 +- libs/ui-lib/lib/common/types/versions.ts | 5 +- .../components/AddHosts/InventoryAddHost.tsx | 3 +- .../day2Wizard/Day2ClusterDetails.tsx | 8 +- .../Day2DiscoveryImageModalButton.tsx | 3 +- .../AddHosts/day2Wizard/Day2StaticIP.tsx | 12 +- .../day2Wizard/Day2WizardContextProvider.tsx | 3 +- .../lib/ocm/components/AddHosts/types.ts | 3 +- .../HostsClusterDetailTabContent.tsx | 2 +- .../ClusterDefaultConfigurationContext.tsx | 2 +- .../CpuArchitectureDropdown.tsx | 2 +- .../DiscoveryImageForm.tsx | 3 +- .../DiscoveryImageModal.tsx | 11 +- .../clusterConfiguration/HostInventory.tsx | 2 +- .../InformationAndAlerts.tsx | 3 +- .../OcmClusterDetailsFormFields.tsx | 3 +- .../OcmClusterProgressItems.tsx | 2 +- .../OcmDiscoveryImageConfigForm.tsx | 7 +- .../OcmOperatorProgressItem.tsx | 7 +- .../clusterConfiguration/OcmSNODisclaimer.tsx | 3 +- .../OcmSingleNodeCheckbox.tsx | 12 +- .../CustomManifestsPage.tsx | 2 +- .../components/CustomManifests.tsx | 2 +- .../components/propTypes.ts | 2 +- .../manifestsConfiguration/data/dataTypes.ts | 2 +- .../AvailableSubnetsControl.tsx | 3 +- .../NetworkConfiguration.tsx | 6 +- .../NetworkConfigurationForm.tsx | 10 +- .../NetworkConfigurationTableBase.tsx | 3 +- .../networkConfiguration/StackTypeControl.tsx | 10 +- .../VirtualIPControlGroup.tsx | 4 +- .../networkConfigurationValidation.ts | 10 +- .../operators/CnvHostRequirements.tsx | 3 +- .../operators/LvmCheckbox.tsx | 2 +- .../operators/LvmHostRequirements.tsx | 2 +- .../clusterConfiguration/operators/utils.tsx | 2 +- .../ExternalPlatformDropdown.tsx | 3 +- .../platformIntegration/constants.tsx | 2 +- .../review/ReviewClusterDetailTable.tsx | 3 +- .../review/ReviewNetworkingTable.tsx | 2 +- .../review/ReviewOperatorsTable.tsx | 2 +- .../review/ReviewPreflightChecks.tsx | 9 +- .../review/ReviewStep.tsx | 3 +- .../review/ReviewSummary.tsx | 2 +- .../FormViewHosts/FormViewHosts.tsx | 2 +- .../FormViewNetworkWide.tsx | 2 +- .../components/StaticIpHostsArray.tsx | 7 +- .../components/YamlView/MacIpMapping.tsx | 7 +- .../staticIp/components/YamlView/YamlView.tsx | 2 +- .../components/YamlView/YamlViewFields.tsx | 8 +- .../YamlView/yamlViewValidationSchema.tsx | 11 +- .../staticIp/components/propTypes.ts | 6 +- .../staticIp/data/dataTypes.ts | 2 +- .../staticIp/data/dummyData.ts | 5 +- .../staticIp/data/emptyData.ts | 2 +- .../data/formDataFromInfraEnvField.ts | 2 +- .../staticIp/data/formDataToInfraEnvField.ts | 5 +- .../staticIp/data/fromInfraEnv.ts | 5 +- .../AssistedInstallerDetailCard.tsx | 2 +- .../clusterDetail/ClusterDetail.tsx | 2 +- .../ClusterDetailStatusMessages.tsx | 3 +- .../ClusterDetailStatusVarieties.tsx | 10 +- .../ClusterDetailsButtonGroup.tsx | 3 +- .../ClusterInstallationError.tsx | 9 +- .../ClusterInstallationProgressCard.tsx | 3 +- .../clusterDetail/ClusterProperties.tsx | 3 +- .../ClusterSummaryExpandable.tsx | 2 +- .../clusterDetail/HostInventoryExpandable.tsx | 3 +- .../clusterDetail/OpenShiftVersionDetail.tsx | 3 +- .../clusterDetail/ProgressBarAlerts.tsx | 3 +- .../clusterDetail/RebootNodeZeroModal.tsx | 3 +- .../clusterDetail/getProgressBarAlerts.tsx | 8 +- .../ocm/components/clusterDetail/utils.tsx | 11 +- .../clusterWizard/ClusterDetails.tsx | 3 +- .../clusterWizard/ClusterDetailsForm.tsx | 10 +- .../clusterWizard/ClusterWizard.tsx | 7 +- .../ClusterWizardContextProvider.tsx | 3 +- .../clusterWizard/ClusterWizardFooter.tsx | 2 +- .../clusterWizard/ClusterWizardNavigation.tsx | 2 +- .../clusterWizard/CustomManifestStep.tsx | 3 +- .../clusterWizard/HostDiscovery.tsx | 6 +- .../components/clusterWizard/Operators.tsx | 3 +- .../ocm/components/clusterWizard/StaticIp.tsx | 3 +- .../ocm/components/clusterWizard/Storage.tsx | 2 +- .../clusterWizard/wizardTransition.ts | 8 +- .../ocm/components/clusters/ClusterPage.tsx | 3 +- .../ocm/components/clusters/ClusterStatus.tsx | 3 +- .../lib/ocm/components/clusters/Clusters.tsx | 2 +- .../clusters/ClustersListToolbar.tsx | 3 +- .../ocm/components/clusters/clusterPolling.ts | 3 +- .../lib/ocm/components/clusters/utils.ts | 4 +- .../FeatureSupportLevelProvider.tsx | 8 +- .../ReviewClusterFeatureSupportLevels.tsx | 2 +- .../featureSupportLevels/featureStateUtils.ts | 3 +- .../ocm/components/fetching/fetchEvents.ts | 4 +- .../components/hosts/ClusterHostsTable.tsx | 3 +- .../ocm/components/hosts/HardwareStatus.tsx | 2 +- .../hosts/HostRequirementsContent.tsx | 3 +- .../components/hosts/HostsDiscoveryTable.tsx | 3 +- .../components/hosts/HostsStorageTable.tsx | 3 +- .../components/hosts/ModalDialogsContext.tsx | 2 +- .../ocm/components/hosts/StorageAlerts.tsx | 3 +- .../ocm/components/hosts/use-hosts-table.tsx | 12 +- libs/ui-lib/lib/ocm/components/hosts/utils.ts | 14 +- libs/ui-lib/lib/ocm/config/constants.ts | 2 +- .../ocm/hooks/useClusterCustomManifests.ts | 6 +- .../hooks/useClusterPreflightRequirements.ts | 5 +- .../ocm/hooks/useClusterSupportedPlatforms.ts | 2 +- libs/ui-lib/lib/ocm/hooks/useInfraEnv.ts | 7 +- libs/ui-lib/lib/ocm/hooks/useInfraEnvId.ts | 7 +- .../lib/ocm/hooks/useInfraEnvImageUrl.ts | 3 +- .../lib/ocm/hooks/useInfraEnvIpxeImageUrl.ts | 3 +- .../ui-lib/lib/ocm/hooks/useManagedDomains.ts | 3 +- .../lib/ocm/hooks/useOpenshiftVersions.tsx | 11 +- libs/ui-lib/lib/ocm/hooks/usePullSecret.ts | 16 +- .../lib/ocm/hooks/useSetClusterPermissions.ts | 3 +- .../lib/ocm/hooks/useUsedClusterNames.ts | 3 +- .../ocm/reducers/clusters/clustersSlice.ts | 3 +- .../reducers/clusters/currentClusterSlice.ts | 8 +- libs/ui-lib/lib/ocm/selectors/clusters.tsx | 2 +- .../lib/ocm/services/ClusterDetailsService.ts | 10 +- .../lib/ocm/services/ClustersService.ts | 18 +- .../ocm/services/CpuArchitectureService.ts | 2 +- .../lib/ocm/services/Day2ClusterService.ts | 3 +- .../ocm/services/DiscoveryImageFormService.ts | 2 +- .../lib/ocm/services/DiskEncryptionService.ts | 6 +- .../lib/ocm/services/HostDiscoveryService.ts | 5 +- libs/ui-lib/lib/ocm/services/HostsService.ts | 7 +- .../ocm/services/InfraEnvIdsCacheService.ts | 3 +- .../lib/ocm/services/InfraEnvsService.ts | 10 +- .../lib/ocm/services/OperatorsService.tsx | 6 +- libs/ui-lib/lib/ocm/services/types.ts | 4 +- .../lib/ocm/store/slices/infraEnvs/slice.ts | 2 +- .../lib/ocm/store/slices/infraEnvs/thunks.ts | 11 +- libs/ui-lib/lib/ocm/types.ts | 3 - libs/ui-lib/package.json | 2 + yarn.lock | 6 +- 257 files changed, 697 insertions(+), 10659 deletions(-) create mode 100644 libs/ui-lib/lib/common/api/accounts-management-service/access-token-api.ts delete mode 100644 libs/ui-lib/lib/common/api/swagger.yaml delete mode 100644 libs/ui-lib/lib/common/api/types.ts delete mode 100644 libs/ui-lib/lib/ocm/types.ts diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 44f1a459a2..ee56d4829d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,12 +18,24 @@ jobs: echo "Expecting to be in a release branch, but we are in: ${{ github.event.release.target_commitish }}" exit 1 fi + - uses: actions/checkout@v3 with: token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }} ref: ${{ github.event.release.target_commitish }} fetch-depth: 0 + - name: Lookup for workspaces to be published + run: | + declare -a workspaces=() + for pkg in `ls -1 libs/*/package.json`; do + if [[ "$(jq '.publishConfig.access == "public"' ${pkg})" == "true" ]]; then + workspaces+=("${pkg:5:-13}") + fi + done + (IFS=,; printf 'The following workspaces will be published: [%s]' "${workspaces[*]}") + echo "WORKSPACES=${workspaces}" >> $GITHUB_ENV + - name: Configuring git run: | git config user.name '${{ github.actor }}' @@ -39,8 +51,7 @@ jobs: - name: Bump workspaces to ${{ github.ref_name }} run: | - workspaces=(ui-lib locales) - for ws in "${workspaces[@]}"; do + for ws in "${WORKSPACES[@]}"; do yarn workspace @openshift-assisted/${ws} version ${GITHUB_REF_NAME:1} # The above command adds a `stableVersion` field after bumping. Removing it as it's buggy. # See: https://github.com/yarnpkg/berry/issues/4328 @@ -55,10 +66,13 @@ jobs: NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} run: | yarn config set npmScopes.openshift-assisted.npmAuthToken $NPM_AUTH_TOKEN - yarn workspace @openshift-assisted/ui-lib npm publish - # Sleep ${{ vars.NPM_PUBLISH_DELAY }} in order to give time for processing the previously published package. - sleep ${{ vars.NPM_PUBLISH_DELAY }} - yarn workspace @openshift-assisted/locales npm publish + for ws in "${WORKSPACES[@]}"; do + yarn workspace @openshift-assisted/${ws} npm publish + # Verify the package has been published before publishing another one. + until yarn info @openshift-assisted/${ws} &> /dev/null; do + sleep ${{ vars.NPM_PUBLISH_DELAY }} + done + done - name: Update the repo run: | diff --git a/apps/assisted-ui/src/components/App/components/AboutModal.tsx b/apps/assisted-ui/src/components/App/components/AboutModal.tsx index a6b27381a2..026b512828 100644 --- a/apps/assisted-ui/src/components/App/components/AboutModal.tsx +++ b/apps/assisted-ui/src/components/App/components/AboutModal.tsx @@ -8,14 +8,8 @@ import { } from '@patternfly/react-core'; import { GIT_SHA, VERSION, SERVICE_LABELS, IMAGE_REPO } from '../../../config'; import redHatLogo from '../../../images/Logo-Red_Hat-OpenShift_Container_Platform-B-Reverse-RGB.png'; -import { - Services, - Api, - Constants, - DetailList, - DetailItem, - ListVersions, -} from '@openshift-assisted/ui-lib/ocm'; +import { Services, Api, Constants, DetailList, DetailItem } from '@openshift-assisted/ui-lib/ocm'; +import { ListVersions } from '@openshift-assisted/types/assisted-installer-service'; export const AboutModalButton: React.FC = () => { const [isModalOpen, setIsModalOpen] = useState(false); diff --git a/docs/RELEASE_WORKFLOW.md b/docs/RELEASE_WORKFLOW.md index 4270b4c50f..6a3b4789dd 100644 --- a/docs/RELEASE_WORKFLOW.md +++ b/docs/RELEASE_WORKFLOW.md @@ -1,17 +1,39 @@ -# Release workflow (maintainers only) +# Release workflow -Releasing a new version involves publishing the following packages to npmjs.com and creating a +Releasing a new version involves publishing packages to the NPM public registry and creating a container image containing a stand-alone version of the UI app (see -[apps/assisted-ui](https://github.com/openshift-assisted/assisted-installer-ui/tree/master/apps/assisted-ui)): +[apps/assisted-ui](https://github.com/openshift-assisted/assisted-installer-ui/tree/master/apps/assisted-ui)). +The [release.yaml](../.github/workflows/release.yaml) workflow contains the scripts for producing +and publishing the final artifacts. + +## How JS libraries are selected for publishing by the CI + +The library's `package.json` must contain the following section in order to be selected by the CI. + +```json +{ + "publishConfig": { + "access": "public" + } +} +``` + +## Instructions + +1. Make sure you have been granted the `maintaner` role in the project settings. +2. Create a new branch from `master` and name it following this pattern: + `releases/v`. +3. [Draft a new release through GitHub's interface](https://github.com/openshift-assisted/assisted-installer-ui/releases/new). +4. Fill the form with the following details: + 1. Tag: `v` + 2. Target branch: `releases/v` (the same as in the previous step). + 3. Title: `v` (again, the same as in the previous step). + 4. Description: Generate the release notes automatically (recommended), or edit the field + manually. + +## List of publicly available artifacts - [@openshift-assisted/ui-lib](https://www.npmjs.com/package/@openshift-assisted/ui-lib) +- [@openshift-assisted/types](https://www.npmjs.com/package/@openshift-assisted/types) - [@openshift-assisted/locales](https://www.npmjs.com/package/@openshift-assisted/locales) - https://quay.io/repository/edge-infrastructure/assisted-installer-ui?tab=tags - -1. Create a new branch from `master` in this repo, called `release/v`. -2. [Draft a new release through GitHub's interface](https://github.com/openshift-assisted/assisted-installer-ui/releases/new). -3. Fill the form with the following details: - 1. Tag: `v` - 2. Target branch: `release/v` (same as in step 2 above). - 3. Title: `v` - 4. Description: Generate the release notes automatically (or edit the field manually) diff --git a/libs/locales/package.json b/libs/locales/package.json index 33bf3967d1..32eaa62a90 100644 --- a/libs/locales/package.json +++ b/libs/locales/package.json @@ -8,7 +8,8 @@ "./en/translation.json": "./lib/en/translation.json", "./ja/translation.json": "./lib/ja/translation.json", "./ko/translation.json": "./lib/ko/translation.json", - "./zh/translation.json": "./lib/zh/translation.json" + "./zh/translation.json": "./lib/zh/translation.json", + "./package.json": "./package.json" }, "typesVersions": { "*": { @@ -27,7 +28,8 @@ } }, "files": [ - "lib" + "lib", + "tsconfig.json" ], "license": "Apache-2.0", "name": "@openshift-assisted/locales", diff --git a/libs/toolbox/package.json b/libs/toolbox/package.json index f65436ea59..d9ffa3e7d8 100644 --- a/libs/toolbox/package.json +++ b/libs/toolbox/package.json @@ -17,10 +17,6 @@ ], "type": "module", "name": "@openshift-assisted/toolbox", - "publishConfig": { - "access": "public" - }, - "private": true, "repository": { "directory": "libs/toolbox", "type": "git", @@ -31,5 +27,6 @@ "check_types": "yarn run -T tsc --noEmit", "clean": "yarn run -T rimraf build node_modules" }, + "private": true, "version": "1.0.0" } diff --git a/libs/types/package.json b/libs/types/package.json index 3fb19c2696..259694e94f 100644 --- a/libs/types/package.json +++ b/libs/types/package.json @@ -1,23 +1,39 @@ { "name": "@openshift-assisted/types", - "versio": "1.0.0", + "version": "1.0.0", "packageManager": "yarn@3.4.1", "type": "module", "exports": { - "./assisted-installer-service": { - "types": "./assisted-installer-service.d.ts" - }, - "./accounts-management-service": { - "types": "./accounts-management-service.d.ts" + "./assisted-installer-service": "./assisted-installer-service.d.ts", + "./accounts-management-service": "./accounts-management-service.d.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "./assisted-installer-service": [ + "./assisted-installer-service.d.ts" + ], + "./accounts-management-service": [ + "./accounts-management-service.d.ts" + ] } }, + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", "url": "https://github.com/openshift-assisted/assisted-installer-ui.git", "directory": "libs/types" }, + "files": [ + "accounts-management-service.d.ts", + "assisted-installer-service.d.ts", + "tsconfig.json" + ], "scripts": { - "update-types:assisted-installer-service": "node scripts/update-assisted-installer-service-types.js" + "update-types:assisted-installer-service": "node scripts/update-assisted-installer-service-types.js", + "watch": "yarn run -T toolbox watch --dir=. 'yalc push --changed'" }, "devDependencies": { "@types/js-yaml": "^4.0.1", diff --git a/libs/types/tsconfig.eslint.json b/libs/types/tsconfig.eslint.json index ffb84c03a5..a8d4317b49 100644 --- a/libs/types/tsconfig.eslint.json +++ b/libs/types/tsconfig.eslint.json @@ -1,5 +1,4 @@ { "extends": "./tsconfig.json", - "include": ["*.d.ts"], "exclude": [] } diff --git a/libs/types/tsconfig.json b/libs/types/tsconfig.json index 65181bf194..be535cbb3e 100644 --- a/libs/types/tsconfig.json +++ b/libs/types/tsconfig.json @@ -1,3 +1,7 @@ { - "extends": "@tsconfig/recommended" + "compilerOptions": { + "resolveJsonModule": true, + "noEmit": true + }, + "include": ["*.d.ts"] } diff --git a/libs/ui-lib/lib/cim/components/Agent/AgentsSelectionTable.tsx b/libs/ui-lib/lib/cim/components/Agent/AgentsSelectionTable.tsx index 97de46157c..d23984fa89 100644 --- a/libs/ui-lib/lib/cim/components/Agent/AgentsSelectionTable.tsx +++ b/libs/ui-lib/lib/cim/components/Agent/AgentsSelectionTable.tsx @@ -24,7 +24,7 @@ import { useFormikHelpers } from '../../../common/hooks/useFormikHelpers'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { HostDetail } from '../../../common/components/hosts/HostRowDetail'; import { ExpandComponentProps } from '../../../common/components/hosts/AITable'; -import { Host } from '../../../common/api/types'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; import { HostsTableDetailContextProvider, useHostsTableDetailContext, diff --git a/libs/ui-lib/lib/cim/components/Agent/tableUtils.tsx b/libs/ui-lib/lib/cim/components/Agent/tableUtils.tsx index ec37a4a548..ba9d06b75e 100644 --- a/libs/ui-lib/lib/cim/components/Agent/tableUtils.tsx +++ b/libs/ui-lib/lib/cim/components/Agent/tableUtils.tsx @@ -3,7 +3,6 @@ import { sortable, expandable, breakWord } from '@patternfly/react-table'; import { Link } from 'react-router-dom'; import { - Host, HostsTableActions, getInventory, getHostname, @@ -27,6 +26,7 @@ import noop from 'lodash-es/noop.js'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { TFunction } from 'i18next'; import { AgentMachineK8sResource } from '../Hypershift/types'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; export const agentHostnameColumn = ( t: TFunction, diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/ArmCheckbox.tsx b/libs/ui-lib/lib/cim/components/ClusterDeployment/ArmCheckbox.tsx index f0a80e3f99..9b72309c66 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/ArmCheckbox.tsx +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/ArmCheckbox.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import { Checkbox, FormGroup, Tooltip } from '@patternfly/react-core'; import { useField, useFormikContext } from 'formik'; import { - ClusterCreateParams, CpuArchitecture, getFieldId, HelperText, @@ -14,6 +13,7 @@ import { useFeatureSupportLevel, } from '../../../common/components/featureSupportLevels'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; +import { ClusterCreateParams } from '@openshift-assisted/types/assisted-installer-service'; const Label = ({ version }: { version: string }) => { const { t } = useTranslation(); diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentCredentials.tsx b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentCredentials.tsx index fab18a04c9..b0247dcecf 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentCredentials.tsx +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentCredentials.tsx @@ -1,11 +1,12 @@ import React from 'react'; -import { ClusterCredentials, Credentials } from '../../../common'; +import { ClusterCredentials } from '../../../common'; import { AgentK8sResource } from '../../types/k8s/agent'; import { AgentClusterInstallK8sResource } from '../../types/k8s/agent-cluster-install'; import { ClusterDeploymentK8sResource } from '../../types/k8s/cluster-deployment'; import { getAICluster } from '../helpers/toAssisted'; import { FetchSecret } from './types'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; +import { Credentials } from '@openshift-assisted/types/assisted-installer-service'; type ClusterDeploymentCredentialsProps = { clusterDeployment: ClusterDeploymentK8sResource; diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.tsx b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.tsx index f2a542d6aa..c59f3f90a3 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.tsx +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import noop from 'lodash-es/noop.js'; import { Stack, StackItem } from '@patternfly/react-core'; -import { Host } from '../../../common/api/types'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; import { discoveryTypeColumn, agentStatusColumn, diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsNetworkTable.tsx b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsNetworkTable.tsx index d1938fde38..4be3cb1412 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsNetworkTable.tsx +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsNetworkTable.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { ConnectedIcon } from '@patternfly/react-icons'; -import { EmptyState, Host } from '../../../common'; +import { EmptyState } from '../../../common'; import { AgentTableActions } from './types'; import { AgentClusterInstallK8sResource, @@ -19,6 +19,7 @@ import { } from '../../../common/components/hosts/tableUtils'; import { usePagination } from '../../../common/components/hosts/usePagination'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; type ExpandComponentContextType = { onSetInstallationDiskId?: ClusterDeploymentHostsNetworkTableProps['onSetInstallationDiskId']; diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.tsx b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.tsx index 27218d345c..2c3a762b70 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.tsx +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.tsx @@ -15,7 +15,6 @@ import { StackItem, } from '@patternfly/react-core'; import { - ClusterDefaultConfig, CLUSTER_DEFAULT_NETWORK_SETTINGS_IPV4, getHostSubnets, SecurityFields, @@ -36,6 +35,7 @@ import { useFormikContext } from 'formik'; import { getGridSpans } from './helpers'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { Trans } from 'react-i18next'; +import { ClusterDefaultConfig } from '@openshift-assisted/types/assisted-installer-service'; // TODO(mlibra): So far a constant. Should be queried from somewhere. export const defaultNetworkSettings: ClusterDefaultConfig = CLUSTER_DEFAULT_NETWORK_SETTINGS_IPV4; diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentValidationsOverview.tsx b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentValidationsOverview.tsx index 7cff15e62c..879e168e26 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentValidationsOverview.tsx +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentValidationsOverview.tsx @@ -11,7 +11,7 @@ import { ListItem, } from '@patternfly/react-core'; import { TFunction } from 'i18next'; -import { Cluster } from '../../../common/api/types'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { ValidationsInfo, ValidationGroup as ClusterValidationGroup, diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.tsx b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.tsx index f2ec95b466..517e882986 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.tsx +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.tsx @@ -10,7 +10,7 @@ import { import ClusterDeploymentWizardContext from './ClusterDeploymentWizardContext'; import { ClusterWizardStepHostStatusDeterminationObject } from '../../../common/types/hosts'; import { ValidationsInfo } from '../../../common/types/clusters'; -import { Cluster } from '../../../common/api/types'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { ClusterWizardStepsType, wizardStepsValidationsMap } from './wizardTransition'; import { AgentClusterInstallK8sResource } from '../../types/k8s/agent-cluster-install'; import { AgentK8sResource } from '../../types/k8s/agent'; diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/NetworkConfiguration.tsx b/libs/ui-lib/lib/cim/components/ClusterDeployment/NetworkConfiguration.tsx index f4c1dab95e..c24f1c9823 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/NetworkConfiguration.tsx +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/NetworkConfiguration.tsx @@ -13,7 +13,6 @@ import { } from '../../../common/components/clusterWizard/networkingSteps'; import { canSelectNetworkTypeSDN, - ClusterDefaultConfig, getDefaultNetworkType, isAdvNetworkConf, isSNO, @@ -23,6 +22,7 @@ import { } from '../../../common'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { NetworkTypeControlGroup } from '../../../common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup'; +import { ClusterDefaultConfig } from '@openshift-assisted/types/assisted-installer-service'; export type NetworkConfigurationProps = VirtualIPControlGroupProps & { defaultNetworkSettings: ClusterDefaultConfig; diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/helpers.ts b/libs/ui-lib/lib/cim/components/ClusterDeployment/helpers.ts index 26db7c48bd..82124cca3a 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/helpers.ts +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/helpers.ts @@ -1,7 +1,7 @@ import mapKeys from 'lodash-es/mapKeys.js'; import camelCase from 'lodash-es/camelCase.js'; import uniq from 'lodash-es/uniq.js'; -import { EventList } from '../../../common/api/types'; +import { EventList } from '@openshift-assisted/types/assisted-installer-service'; import { AgentClusterInstallK8sResource, InfraEnvK8sResource, diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts b/libs/ui-lib/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts index ce90ee7318..1b0aa4506b 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts @@ -1,5 +1,8 @@ import * as Yup from 'yup'; -import { Cluster, ClusterDefaultConfig } from '../../../common/api'; +import { + Cluster, + ClusterDefaultConfig, +} from '@openshift-assisted/types/assisted-installer-service'; import { HostSubnets, NetworkConfigurationValues } from '../../../common/types/clusters'; import { hostPrefixValidationSchema, diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/wizardTransition.test.ts b/libs/ui-lib/lib/cim/components/ClusterDeployment/wizardTransition.test.ts index 6b81aed6ab..23cf648bce 100644 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/wizardTransition.test.ts +++ b/libs/ui-lib/lib/cim/components/ClusterDeployment/wizardTransition.test.ts @@ -7,12 +7,12 @@ import { canNextFromHostSelectionStep, canNextFromNetworkingStep, } from './wizardTransition'; +import { ValidationGroup as ClusterValidationGroup } from '../../../common'; +import { ValidationGroup as HostValidationGroup } from '../../../common/types/hosts'; import { ClusterValidationId, HostValidationId, - ValidationGroup as ClusterValidationGroup, -} from '../../../common'; -import { ValidationGroup as HostValidationGroup } from '../../../common/types/hosts'; +} from '@openshift-assisted/types/assisted-installer-service'; const agentClusterInstallBase: AgentClusterInstallK8sResource = { apiVersion: 'foo-apiVersion', @@ -121,18 +121,13 @@ describe('CIM wizardTransition calculation', () => { const agentClusterInstall = getAgentClusterInstall(); expect(canNextFromHostSelectionStep(agentClusterInstall, [])).toBe(true); - // @ts-expect-error The object has just been built agentClusterInstall.status.validationsInfo.hostsData[3].status = 'disabled'; expect(canNextFromHostSelectionStep(agentClusterInstall, [])).toBe(true); - // @ts-expect-error Known object content agentClusterInstall.status.validationsInfo.hostsData[3].status = 'pending'; expect(canNextFromHostSelectionStep(agentClusterInstall, [])).toBe(false); - // @ts-expect-error Known object content agentClusterInstall.status.validationsInfo.hostsData[3].status = 'error'; expect(canNextFromHostSelectionStep(agentClusterInstall, [])).toBe(false); - // @ts-expect-error Known object content agentClusterInstall.status.validationsInfo.hostsData[3].status = 'success'; - // @ts-expect-error Known object content agentClusterInstall.status.validationsInfo?.hostsData.push({ id: 'all-hosts-are-ready-to-install' /* Irrelevant for the wizard step */, status: 'error', @@ -140,7 +135,6 @@ describe('CIM wizardTransition calculation', () => { }); expect(canNextFromHostSelectionStep(agentClusterInstall, [])).toBe(true) /* Still true */; // removing required validation - // @ts-expect-error Known object content agentClusterInstall.status.validationsInfo.hostsData.splice(1, 1); expect(canNextFromHostSelectionStep(agentClusterInstall, [])).toBe(false); // revert the change @@ -161,10 +155,8 @@ describe('CIM wizardTransition calculation', () => { const agents = getAgents(); expect(canNextFromHostSelectionStep(agentClusterInstall, agents)).toBe(true); - // @ts-expect-error Known object content agents[0].status.validationsInfo.hardware[1].status = 'disabled'; expect(canNextFromHostSelectionStep(agentClusterInstall, agents)).toBe(true); - // @ts-expect-error Known object content agents[0].status.validationsInfo.hardware[1].status = 'error'; expect(canNextFromHostSelectionStep(agentClusterInstall, agents)).toBe(false); }); @@ -175,13 +167,11 @@ describe('CIM wizardTransition calculation', () => { // Whole "hardware" group must be of success expect(canNextFromHostSelectionStep(agentClusterInstall, agents)).toBe(true); - // @ts-expect-error Known object content agents[0].status.validationsInfo.hardware[3].status = 'error'; expect(canNextFromHostSelectionStep(agentClusterInstall, agents)).toBe(false); const agentsWitNonMandatoryGroup = getAgents(); // Adding irrelevant validation to a "non-mandatory" group (the infrastructure, only the "hardware" group is mandatory for this transition) - // @ts-expect-error Known object content agentsWitNonMandatoryGroup[0].status.validationsInfo.infrastructure = [ { id: 'belongs-to-machine-cidr' /* Irrelevant for the step, so should be still passing */, @@ -194,7 +184,6 @@ describe('CIM wizardTransition calculation', () => { ); const agentsWithoutHardwareGroup = getAgents('hardware', []); - // @ts-expect-error Known object content agents[0].status.validationsInfo.hardware = undefined; expect(canNextFromHostSelectionStep(agentClusterInstall, agentsWithoutHardwareGroup)).toBe( false, @@ -238,11 +227,9 @@ describe('CIM wizardTransitions', () => { expect(canNextFromNetworkingStep(agentClusterInstall, [])).toBe(true); // One validation from a mandatory group is failing - // @ts-expect-error Known object content agentClusterInstall.status.validationsInfo.network[0].status = 'error'; expect(canNextFromNetworkingStep(agentClusterInstall, [])).toBe(false); // Revert - // @ts-expect-error Known object content agentClusterInstall.status.validationsInfo.network[0].status = 'success'; expect(canNextFromNetworkingStep(agentClusterInstall, [])).toBe(true); @@ -250,12 +237,10 @@ describe('CIM wizardTransitions', () => { expect(canNextFromNetworkingStep(agentClusterInstall, agents)).toBe(true); // The ntp-synced is set as soft-validation, so still passing - // @ts-expect-error Known object content agents[0].status.validationsInfo.network[0].status = 'error'; expect(canNextFromNetworkingStep(agentClusterInstall, agents)).toBe(true); // The has-default-route is NOT set as soft-validation, so it should fail - // @ts-expect-error Known object content agents[0].status.validationsInfo.network[1].status = 'error'; expect(canNextFromNetworkingStep(agentClusterInstall, agents)).toBe(false); }); diff --git a/libs/ui-lib/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx b/libs/ui-lib/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx index ff3b735a0e..c370664471 100644 --- a/libs/ui-lib/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +++ b/libs/ui-lib/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { Button, DropdownItem, Stack, StackItem } from '@patternfly/react-core'; import noop from 'lodash-es/noop.js'; -import { Host } from '../../../common/api/types'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; import { discoveryTypeColumn, agentStatusColumn, diff --git a/libs/ui-lib/lib/cim/components/InfraEnv/InfraTableToolbar.tsx b/libs/ui-lib/lib/cim/components/InfraEnv/InfraTableToolbar.tsx index b85b3d1f6e..e78138754b 100644 --- a/libs/ui-lib/lib/cim/components/InfraEnv/InfraTableToolbar.tsx +++ b/libs/ui-lib/lib/cim/components/InfraEnv/InfraTableToolbar.tsx @@ -16,10 +16,11 @@ import { FilterIcon } from '@patternfly/react-icons'; import * as React from 'react'; import { HostStatus } from '../../../common/components/hosts/types'; import { agentStatus } from '../helpers/agentStatus'; -import { Host, TableToolbar } from '../../../common'; +import { TableToolbar } from '../../../common'; import { usePagination } from '../../../common/components/hosts/usePagination'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { StatusCount } from '../Agent/tableUtils'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; const getStatusesForFiler = (statuses: HostStatus) => { const filterStatuses: { diff --git a/libs/ui-lib/lib/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.tsx b/libs/ui-lib/lib/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.tsx index e262ed40ef..cf2c7ede36 100644 --- a/libs/ui-lib/lib/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.tsx +++ b/libs/ui-lib/lib/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.tsx @@ -3,7 +3,6 @@ import { FeatureSupportLevelsMap, FeatureIdToSupportLevel, FeatureId, - SupportLevel, FeatureSupportLevelContextProvider, FeatureSupportLevelData, } from '../../../common'; @@ -12,6 +11,7 @@ import { featureSupportLevelsACM } from '../../config/constants'; import { getFeatureDisabledReason, isFeatureSupported } from './featureStateUtils'; import { getOCPVersions, getVersionFromReleaseImage, getMajorMinorVersion } from '../helpers'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; +import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; export type ACMFeatureSupportLevelProvider = PropsWithChildren<{ clusterImages: ClusterImageSetK8sResource[]; diff --git a/libs/ui-lib/lib/cim/components/featureSupportLevels/featureStateUtils.tsx b/libs/ui-lib/lib/cim/components/featureSupportLevels/featureStateUtils.tsx index d761e88150..518addc49d 100644 --- a/libs/ui-lib/lib/cim/components/featureSupportLevels/featureStateUtils.tsx +++ b/libs/ui-lib/lib/cim/components/featureSupportLevels/featureStateUtils.tsx @@ -1,6 +1,6 @@ import { FeatureId, OpenshiftVersionOptionType } from '../../../common/types'; import { TFunction } from 'i18next'; -import { SupportLevel } from '../../../common/api'; +import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; const getClusterExistsReason = (t: TFunction) => t('ai:This option is not editable after the draft cluster is created'); diff --git a/libs/ui-lib/lib/cim/components/helpers/agents.ts b/libs/ui-lib/lib/cim/components/helpers/agents.ts index bf4dea2910..efa3ab0d14 100644 --- a/libs/ui-lib/lib/cim/components/helpers/agents.ts +++ b/libs/ui-lib/lib/cim/components/helpers/agents.ts @@ -1,5 +1,5 @@ import { AgentStatus } from './status'; -import { Host } from '../../../common/api/types'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; import { AgentK8sResource, BareMetalHostK8sResource } from '../../types'; import { getAgentStatus } from './status'; import { INFRAENV_AGENTINSTALL_LABEL_KEY } from '../common/constants'; diff --git a/libs/ui-lib/lib/cim/components/helpers/status.ts b/libs/ui-lib/lib/cim/components/helpers/status.ts index 6002303e77..f12416140a 100644 --- a/libs/ui-lib/lib/cim/components/helpers/status.ts +++ b/libs/ui-lib/lib/cim/components/helpers/status.ts @@ -3,7 +3,7 @@ import { AgentClusterInstallStatusCondition, AgentClusterInstallStatusConditionType, } from '../../types/k8s/agent-cluster-install'; -import { Cluster, Host } from '../../../common/api/types'; +import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service'; import { AgentK8sResource, AgentStatusCondition, diff --git a/libs/ui-lib/lib/cim/components/helpers/toAssisted.ts b/libs/ui-lib/lib/cim/components/helpers/toAssisted.ts index 09dc0b3565..f3d7d67478 100644 --- a/libs/ui-lib/lib/cim/components/helpers/toAssisted.ts +++ b/libs/ui-lib/lib/cim/components/helpers/toAssisted.ts @@ -1,6 +1,6 @@ import cloneDeep from 'lodash-es/cloneDeep.js'; import { AgentK8sResource } from '../../types/k8s/agent'; -import { Cluster, Host, Inventory } from '../../../common/api/types'; +import { Cluster, Host, Inventory } from '@openshift-assisted/types/assisted-installer-service'; import { ClusterDeploymentK8sResource } from '../../types/k8s/cluster-deployment'; import { AgentClusterInstallK8sResource } from '../../types/k8s/agent-cluster-install'; import { getAgentStatus, getClusterStatus } from './status'; diff --git a/libs/ui-lib/lib/cim/components/helpers/versions.ts b/libs/ui-lib/lib/cim/components/helpers/versions.ts index 87bd315bd2..634ae9637a 100644 --- a/libs/ui-lib/lib/cim/components/helpers/versions.ts +++ b/libs/ui-lib/lib/cim/components/helpers/versions.ts @@ -5,7 +5,8 @@ import { ClusterImageSetK8sResource, ClusterVersionK8sResource, } from '../../types'; -import { OpenshiftVersionOptionType, OpenshiftVersion } from '../../../common'; +import { OpenshiftVersionOptionType } from '../../../common'; +import { OpenshiftVersion } from '@openshift-assisted/types/assisted-installer-service'; export const getVersionFromReleaseImage = (releaseImage = '') => { const match = /.+:(.*)-/gm.exec(releaseImage); diff --git a/libs/ui-lib/lib/cim/components/modals/MassApproveAgentModal.tsx b/libs/ui-lib/lib/cim/components/modals/MassApproveAgentModal.tsx index 92f732299a..60fb0d923b 100644 --- a/libs/ui-lib/lib/cim/components/modals/MassApproveAgentModal.tsx +++ b/libs/ui-lib/lib/cim/components/modals/MassApproveAgentModal.tsx @@ -14,12 +14,13 @@ import { getAIHosts } from '../helpers'; import { AgentK8sResource } from '../../types'; import HostsTable from '../../../common/components/hosts/HostsTable'; import { TableRow } from '../../../common/components/hosts/AITable'; -import { Host, ModalProgress } from '../../../common'; +import { ModalProgress } from '../../../common'; import { agentStatus } from '../helpers/agentStatus'; import { usePagination } from '../../../common/components/hosts/usePagination'; import { getErrorMessage } from '../../../common/utils'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { TFunction } from 'i18next'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; type ApproveTableRowProps = { agent?: AgentK8sResource; diff --git a/libs/ui-lib/lib/cim/components/modals/MassDeleteAgentModal.tsx b/libs/ui-lib/lib/cim/components/modals/MassDeleteAgentModal.tsx index e2e03d2691..2fa248a8d0 100644 --- a/libs/ui-lib/lib/cim/components/modals/MassDeleteAgentModal.tsx +++ b/libs/ui-lib/lib/cim/components/modals/MassDeleteAgentModal.tsx @@ -5,7 +5,6 @@ import { Link } from 'react-router-dom'; import { sortable } from '@patternfly/react-table'; import { global_palette_blue_300 as blueInfoColor } from '@patternfly/react-tokens/dist/js/global_palette_blue_300'; import { - Host, getHostname, getInventory, MassDeleteHostModal as CommonMassDeleteHostModal, @@ -26,6 +25,7 @@ import { getBMHStatus, getAgentStatus } from '../helpers'; import { usePagination } from '../../../common/components/hosts/usePagination'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { TFunction } from 'i18next'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; const hostnameColumn = (agents: AgentK8sResource[], t: TFunction): TableRow => { return { diff --git a/libs/ui-lib/lib/cim/config/constants.ts b/libs/ui-lib/lib/cim/config/constants.ts index 18d7820c78..39ab66f67a 100644 --- a/libs/ui-lib/lib/cim/config/constants.ts +++ b/libs/ui-lib/lib/cim/config/constants.ts @@ -1,4 +1,5 @@ -import { FeatureId, SupportLevel } from '../../common'; +import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; +import { FeatureId } from '../../common'; type FeatureConfig = { featureId: FeatureId; diff --git a/libs/ui-lib/lib/cim/types/k8s/agent-cluster-install.ts b/libs/ui-lib/lib/cim/types/k8s/agent-cluster-install.ts index 6eaf381051..5682953728 100644 --- a/libs/ui-lib/lib/cim/types/k8s/agent-cluster-install.ts +++ b/libs/ui-lib/lib/cim/types/k8s/agent-cluster-install.ts @@ -1,5 +1,5 @@ import { K8sResourceCommon } from '@openshift-console/dynamic-plugin-sdk'; -import { Cluster } from '../../../common'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { ValidationsInfo } from '../../../common/types/clusters'; import { StatusCondition } from './shared'; diff --git a/libs/ui-lib/lib/cim/types/k8s/agent.ts b/libs/ui-lib/lib/cim/types/k8s/agent.ts index e54f205887..b98ed3e585 100644 --- a/libs/ui-lib/lib/cim/types/k8s/agent.ts +++ b/libs/ui-lib/lib/cim/types/k8s/agent.ts @@ -1,5 +1,11 @@ import { K8sResourceCommon } from '@openshift-console/dynamic-plugin-sdk'; -import { Host, HostRole, HostStage, Inventory, Interface } from '../../../common'; +import { + Host, + HostRole, + HostStage, + Interface, + Inventory, +} from '@openshift-assisted/types/assisted-installer-service'; import { ValidationsInfo } from '../../../common/types/hosts'; import { StatusCondition } from './shared'; diff --git a/libs/ui-lib/lib/common/api/accounts-management-service/access-token-api.ts b/libs/ui-lib/lib/common/api/accounts-management-service/access-token-api.ts new file mode 100644 index 0000000000..15426bc885 --- /dev/null +++ b/libs/ui-lib/lib/common/api/accounts-management-service/access-token-api.ts @@ -0,0 +1,19 @@ +import { getOcmClient } from '../axiosClient'; +import { AccessTokenCfg } from '@openshift-assisted/types/accounts-management-service'; + +const client = getOcmClient(); +export const AccessTokenAPI = { + makeBaseURI() { + return `/api/accounts_mgmt/v2/access_token`; + }, + + async fetchPullSecret() { + let value: AccessTokenCfg | null = null; + if (client) { + const { data } = await client.post(AccessTokenAPI.makeBaseURI()); + value = data; + } + + return value; + }, +}; diff --git a/libs/ui-lib/lib/common/api/assisted-service/ClustersAPI.ts b/libs/ui-lib/lib/common/api/assisted-service/ClustersAPI.ts index 1b098cfda2..32c543af9a 100644 --- a/libs/ui-lib/lib/common/api/assisted-service/ClustersAPI.ts +++ b/libs/ui-lib/lib/common/api/assisted-service/ClustersAPI.ts @@ -15,7 +15,7 @@ import { UpdateManifestParams, Manifest, LogsType, -} from '../../api/types'; +} from '@openshift-assisted/types/assisted-installer-service'; import { AxiosResponse } from 'axios'; let _getRequestAbortController = new AbortController(); diff --git a/libs/ui-lib/lib/common/api/assisted-service/ComponentVersionsAPI.ts b/libs/ui-lib/lib/common/api/assisted-service/ComponentVersionsAPI.ts index 834bff2671..f0e0457f31 100644 --- a/libs/ui-lib/lib/common/api/assisted-service/ComponentVersionsAPI.ts +++ b/libs/ui-lib/lib/common/api/assisted-service/ComponentVersionsAPI.ts @@ -1,5 +1,5 @@ import { client } from '../../api/axiosClient'; -import { ListVersions } from '../../../common/api/types'; +import { ListVersions } from '@openshift-assisted/types/assisted-installer-service'; const ComponentVersionsAPI = { makeBaseURI() { diff --git a/libs/ui-lib/lib/common/api/assisted-service/EventsAPI.ts b/libs/ui-lib/lib/common/api/assisted-service/EventsAPI.ts index 1b5450d379..4d1ffa8ed0 100644 --- a/libs/ui-lib/lib/common/api/assisted-service/EventsAPI.ts +++ b/libs/ui-lib/lib/common/api/assisted-service/EventsAPI.ts @@ -1,4 +1,4 @@ -import { EventList, V2Events } from '../../../common/api/types'; +import { EventList, V2Events } from '@openshift-assisted/types/assisted-installer-service'; import { client } from '../../api/axiosClient'; let _getRequestAbortController = new AbortController(); diff --git a/libs/ui-lib/lib/common/api/assisted-service/HostsAPI.ts b/libs/ui-lib/lib/common/api/assisted-service/HostsAPI.ts index d6efd2030d..bdfe75efbf 100644 --- a/libs/ui-lib/lib/common/api/assisted-service/HostsAPI.ts +++ b/libs/ui-lib/lib/common/api/assisted-service/HostsAPI.ts @@ -1,4 +1,8 @@ -import { Host, HostUpdateParams, InfraEnv } from '../../../common/api/types'; +import { + Host, + HostUpdateParams, + InfraEnv, +} from '@openshift-assisted/types/assisted-installer-service'; import { client } from '../../api/axiosClient'; import { AxiosResponse } from 'axios'; import InfraEnvsAPI from './InfraEnvsAPI'; diff --git a/libs/ui-lib/lib/common/api/assisted-service/InfraEnvsAPI.ts b/libs/ui-lib/lib/common/api/assisted-service/InfraEnvsAPI.ts index 1e6f59deb8..c637e38249 100644 --- a/libs/ui-lib/lib/common/api/assisted-service/InfraEnvsAPI.ts +++ b/libs/ui-lib/lib/common/api/assisted-service/InfraEnvsAPI.ts @@ -4,7 +4,7 @@ import { InfraEnvCreateParams, PresignedUrl, InfraEnvUpdateParams, -} from '../../../common'; +} from '@openshift-assisted/types/assisted-installer-service'; import { AxiosResponse } from 'axios'; let _getRequestAbortController = new AbortController(); diff --git a/libs/ui-lib/lib/common/api/assisted-service/ManagedDomainsAPI.ts b/libs/ui-lib/lib/common/api/assisted-service/ManagedDomainsAPI.ts index 61111b741d..e47d07cb00 100644 --- a/libs/ui-lib/lib/common/api/assisted-service/ManagedDomainsAPI.ts +++ b/libs/ui-lib/lib/common/api/assisted-service/ManagedDomainsAPI.ts @@ -1,5 +1,5 @@ import { client } from '../../api/axiosClient'; -import { ManagedDomain } from '../../../common/api/types'; +import { ManagedDomain } from '@openshift-assisted/types/assisted-installer-service'; const ManagedDomainsAPI = { makeBaseURI() { diff --git a/libs/ui-lib/lib/common/api/assisted-service/NewFeatureSupportLevelsAPI.ts b/libs/ui-lib/lib/common/api/assisted-service/NewFeatureSupportLevelsAPI.ts index 53b6c86edc..2d6ff4e7ba 100644 --- a/libs/ui-lib/lib/common/api/assisted-service/NewFeatureSupportLevelsAPI.ts +++ b/libs/ui-lib/lib/common/api/assisted-service/NewFeatureSupportLevelsAPI.ts @@ -1,4 +1,4 @@ -import { clientWithoutConverter } from '../../api/axiosClient'; +import { clientWithoutCaseConverter } from '../../api/axiosClient'; import { ArchitecturesSupportsLevel, FeaturesSupportsLevel, @@ -13,7 +13,7 @@ const NewFeatureSupportLevelsAPI = { let queryParams = '?'; queryParams += openshiftVersion ? `openshift_version=${openshiftVersion}&` : ''; queryParams += cpuArchitecture ? `cpu_architecture=${cpuArchitecture}` : ''; - return clientWithoutConverter.get( + return clientWithoutCaseConverter.get( `${NewFeatureSupportLevelsAPI.makeBaseURI()}/features${queryParams}`, ); }, @@ -21,7 +21,7 @@ const NewFeatureSupportLevelsAPI = { architecturesSupportLevel(openshiftVersion: string) { let queryParams = '?'; queryParams += openshiftVersion ? `openshift_version=${openshiftVersion}&` : ''; - return clientWithoutConverter.get( + return clientWithoutCaseConverter.get( `${NewFeatureSupportLevelsAPI.makeBaseURI()}/architectures${queryParams}`, ); }, diff --git a/libs/ui-lib/lib/common/api/assisted-service/SupportedOpenshiftVersionsAPI.ts b/libs/ui-lib/lib/common/api/assisted-service/SupportedOpenshiftVersionsAPI.ts index 8121dab67f..ffc87b5e32 100644 --- a/libs/ui-lib/lib/common/api/assisted-service/SupportedOpenshiftVersionsAPI.ts +++ b/libs/ui-lib/lib/common/api/assisted-service/SupportedOpenshiftVersionsAPI.ts @@ -1,5 +1,5 @@ import { client } from '../../api/axiosClient'; -import { OpenshiftVersion } from '../../../common/api/types'; +import { OpenshiftVersion } from '@openshift-assisted/types/assisted-installer-service'; const SupportedOpenshiftVersionsAPI = { makeBaseURI() { diff --git a/libs/ui-lib/lib/common/api/axiosClient.ts b/libs/ui-lib/lib/common/api/axiosClient.ts index add67b2c0d..65f48861d7 100644 --- a/libs/ui-lib/lib/common/api/axiosClient.ts +++ b/libs/ui-lib/lib/common/api/axiosClient.ts @@ -2,56 +2,47 @@ import axios, { AxiosInstance } from 'axios'; import applyCaseMiddleware from 'axios-case-converter'; import { camelCase } from 'camel-case'; -// conforms basePath in swagger.json -export const BASE_PATH = '/api/assisted-install'; - -// Prevent axios converter to change object keys from '4.7-fc2' to '4_7Fc2' -const axiosCaseConverterOptions = { - caseFunctions: { - camel: (input: string) => - camelCase(input, { - stripRegexp: /[^A-Z0-9.-]+/gi, - }), - }, -}; - -const getDefaultClient = (withoutConverter = false) => { - const client = axios.create(); +const withAssistedInstallerBasePath = (client: AxiosInstance): AxiosInstance => { + // Conforms with basePath in swagger.json + const basePath = '/api/assisted-install'; client.interceptors.request.use((cfg) => { - cfg.url = `${process.env.AIUI_APP_API_ROOT || ''}${cfg.url || ''}`; - return cfg; - }); - - if (withoutConverter) { - return client; - } else { - return applyCaseMiddleware(client, axiosCaseConverterOptions); - } -}; - -let client: AxiosInstance = getDefaultClient(); -let clientWithoutConverter: AxiosInstance = getDefaultClient(true); -let ocmClient: AxiosInstance | null; -let isInOcm = false; + if (cfg.url) { + try { + const url = new URL(cfg.url); + cfg.url = `${url.origin}${basePath}${url.pathname}`; + } catch { + cfg.url = `${basePath}${cfg.url}`; + } + } -const aiInterceptor = (client: AxiosInstance) => { - client.interceptors.request.use((cfg) => { - cfg.url = `${BASE_PATH}${cfg.url || ''}`; return cfg; }); return client; }; +let isInOcm = false; +let ocmClient: AxiosInstance | null; +let client = applyCaseMiddleware( + withAssistedInstallerBasePath(axios.create()), + // Prevents axios converter to change object keys from '4.7-fc2' to '4_7Fc2' + { + caseFunctions: { + camel: (input: string) => + camelCase(input, { + stripRegexp: /[^A-Z0-9.-]+/gi, + }), + }, + }, +); +let clientWithoutCaseConverter = withAssistedInstallerBasePath(axios.create()); + const getOcmClient = () => ocmClient; export const setAuthInterceptor = (authInterceptor: (client: AxiosInstance) => AxiosInstance) => { - ocmClient = authInterceptor(axios.create()); isInOcm = true; - client = applyCaseMiddleware( - aiInterceptor(authInterceptor(axios.create())), - axiosCaseConverterOptions, - ); - clientWithoutConverter = aiInterceptor(authInterceptor(axios.create())); + ocmClient = authInterceptor(axios.create()); + client = authInterceptor(client); + clientWithoutCaseConverter = authInterceptor(clientWithoutCaseConverter); }; -export { client, getOcmClient, isInOcm, clientWithoutConverter }; +export { client, getOcmClient, isInOcm, clientWithoutCaseConverter }; diff --git a/libs/ui-lib/lib/common/api/index.ts b/libs/ui-lib/lib/common/api/index.ts index b2cb512213..1b7f8248fb 100644 --- a/libs/ui-lib/lib/common/api/index.ts +++ b/libs/ui-lib/lib/common/api/index.ts @@ -1,3 +1,2 @@ export * from './axiosClient'; -export * from './types'; export * from './utils'; diff --git a/libs/ui-lib/lib/common/api/swagger.yaml b/libs/ui-lib/lib/common/api/swagger.yaml deleted file mode 100644 index 6c7ba9745b..0000000000 --- a/libs/ui-lib/lib/common/api/swagger.yaml +++ /dev/null @@ -1,7450 +0,0 @@ -swagger: '2.0' -info: - description: 'Assisted installation' - version: 1.0.0 - title: AssistedInstall - license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html -host: api.openshift.com -basePath: /api/assisted-install -tags: - - name: Assisted installation - description: Agent-driven installation - - name: events - description: Events related to a cluster installation. - - name: installer - description: General OpenShift cluster installation APIs. - - name: managed_domains - description: Managed dns domains for a cluster installation. - - name: manifests - description: Manifests for customizing a cluster installation. - - name: operators - description: Information regarding supported operators. - - name: versions - description: Information regarding versions. - -schemes: - - http - - https -consumes: - - application/json -produces: - - application/json - -securityDefinitions: - agentAuth: - type: apiKey - in: header - name: X-Secret-Key - userAuth: - type: apiKey - in: header - name: Authorization - urlAuth: - type: apiKey - in: query - name: api_key - imageAuth: - type: apiKey - in: header - name: Image-Token - imageURLAuth: - type: apiKey - in: query - name: image_token - -security: - - userAuth: [admin, user] - -paths: - /v2/clusters: - post: - tags: - - installer - description: Creates a new OpenShift cluster definition. - operationId: v2RegisterCluster - parameters: - - in: body - name: new-cluster-params - description: The properties describing the new cluster. - required: true - schema: - $ref: '#/definitions/cluster-create-params' - responses: - '201': - description: Success. - schema: - $ref: '#/definitions/cluster' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - description: Retrieves the list of OpenShift clusters. - operationId: v2ListClusters - parameters: - - in: header - name: get_unregistered_clusters - description: Whether to return clusters that have been unregistered. - type: boolean - required: false - default: false - - in: query - name: openshift_cluster_id - description: A specific cluster to retrieve. - type: string - format: uuid - required: false - - in: query - name: ams_subscription_ids - description: - If non-empty, returned Clusters are filtered to those with matching subscription IDs. - required: false - type: array - items: - type: string - - in: query - name: with_hosts - description: Include hosts in the returned list. - type: boolean - allowEmptyValue: true - default: false - - in: query - name: owner - description: If provided, returns only clusters that are owned by the specified user. - type: string - required: false - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/cluster-list' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - - agentAuth: [] - description: Retrieves the details of the OpenShift cluster. - operationId: v2GetCluster - parameters: - - in: path - name: cluster_id - description: The cluster to be retrieved. - type: string - format: uuid - required: true - - in: header - name: discovery_agent_version - description: - The software version of the discovery agent that is retrieving the cluster details. - type: string - required: false - - in: header - name: get_unregistered_clusters - description: Whether to return clusters that have been unregistered. - type: boolean - required: false - default: false - - in: query - name: exclude-hosts - description: If true, do not include hosts. - type: boolean - required: false - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/cluster' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - delete: - tags: - - installer - description: Deletes an OpenShift cluster definition. - operationId: v2DeregisterCluster - parameters: - - in: path - name: cluster_id - description: The cluster to be deregistered. - format: uuid - type: string - required: true - responses: - '204': - description: Success. - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - patch: - tags: - - installer - description: Updates an OpenShift cluster definition. - operationId: V2UpdateCluster - parameters: - - in: path - name: cluster_id - description: The cluster to be updated. - type: string - format: uuid - required: true - - in: body - name: cluster-update-params - description: The properties to update. - required: true - schema: - $ref: '#/definitions/v2-cluster-update-params' - responses: - '201': - description: Success. - schema: - $ref: '#/definitions/cluster' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/hosts: - get: - tags: - - installer - description: Get a list of cluster hosts according to supplied filters. - operationId: ListClusterHosts - security: - - userAuth: [admin, read-only-admin, user] - - agentAuth: [] - parameters: - - in: path - name: cluster_id - description: The cluster whose hosts should be retrieved. - type: string - format: uuid - required: true - - in: query - name: role - description: Role to request. - type: string - enum: ['master', 'worker', 'auto-assign'] - required: false - - in: query - description: Hosts status to request. - name: status - type: string - required: false - - in: query - name: with-inventory - description: If true return the host's inventory. - type: boolean - required: false - - in: query - description: If true return the host's connectivity. - name: with-connectivity - type: boolean - required: false - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/host-list' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/supported-platforms: - get: - tags: - - installer - description: A list of platforms that this cluster can support in its current configuration. - operationId: GetClusterSupportedPlatforms - security: - - userAuth: [admin, read-only-admin, user] - parameters: - - in: path - name: cluster_id - description: The cluster whose platform types should be retrieved. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - type: array - items: - $ref: '#/definitions/platform_type' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs: - post: - tags: - - installer - description: Creates a new OpenShift Discovery ISO. - operationId: RegisterInfraEnv - parameters: - - in: body - name: infraenv-create-params - description: The parameters for the generated ISO. - required: true - schema: - $ref: '#/definitions/infra-env-create-params' - responses: - '201': - description: Success. - schema: - $ref: '#/definitions/infra-env' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - description: Retrieves the list of infra-envs. - operationId: ListInfraEnvs - parameters: - - in: query - name: cluster_id - description: If provided, returns only infra-envs which directly reference this cluster. - type: string - format: uuid - required: false - - in: query - name: owner - description: If provided, returns only infra-envs that are owned by the specified user. - type: string - required: false - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/infra-env-list' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - - agentAuth: [] - - urlAuth: [] - - imageAuth: [] - - imageURLAuth: [] - description: Retrieves the details of the infra-env. - operationId: GetInfraEnv - parameters: - - in: path - name: infra_env_id - description: The infra-env to be retrieved. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/infra-env' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - patch: - tags: - - installer - description: Updates an infra-env. - operationId: UpdateInfraEnv - parameters: - - in: path - name: infra_env_id - description: The infra-env to be updated. - type: string - format: uuid - required: true - - in: body - name: infra-env-update-params - description: The properties to update. - required: true - schema: - $ref: '#/definitions/infra-env-update-params' - responses: - '201': - description: Success. - schema: - $ref: '#/definitions/infra-env' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - - delete: - tags: - - installer - description: Deletes an infra-env. - operationId: DeregisterInfraEnv - parameters: - - in: path - name: infra_env_id - description: The infra-env to be deleted. - format: uuid - type: string - required: true - responses: - '204': - description: Success. - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/downloads/image-url: - get: - tags: - - installer - description: Creates a new pre-signed image download URL for the infra-env. - operationId: GetInfraEnvDownloadURL - parameters: - - in: path - name: infra_env_id - description: The infra-env to be retrieved. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/presigned-url' - '400': - description: Bad Request. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts: - post: - tags: - - installer - security: - - agentAuth: [] - description: Registers a new OpenShift agent. - operationId: v2RegisterHost - parameters: - - in: path - name: infra_env_id - description: The infra-env that the agent is associated with. - type: string - format: uuid - required: true - - in: body - name: new-host-params - description: The description of the agent being registered. - required: true - schema: - $ref: '#/definitions/host-create-params' - - in: header - name: discovery_agent_version - description: The software version of the discovery agent that is registering the agent. - type: string - required: false - responses: - '201': - description: Success. - schema: - $ref: '#/definitions/host_registration_response' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Cluster cannot accept new agents due to its current state. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - - agentAuth: [] - description: Retrieves the list of OpenShift hosts that belong the infra-env. - operationId: v2ListHosts - parameters: - - in: path - name: infra_env_id - description: The infra-env that the hosts are asociated with. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/host-list' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - description: Retrieves the details of the OpenShift host. - operationId: v2GetHost - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host that should be retrieved. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host that should be retrieved. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/host' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - patch: - tags: - - installer - description: Update an Openshift host - operationId: v2UpdateHost - parameters: - - in: path - name: infra_env_id - description: The infra-env ID of the host to be updated. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host that should be updated. - type: string - format: uuid - required: true - - in: body - name: host-update-params - description: The properties to update. - required: true - schema: - $ref: '#/definitions/host-update-params' - responses: - '201': - description: Success. - schema: - $ref: '#/definitions/host' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - delete: - tags: - - installer - description: Deregisters an OpenShift host. - operationId: v2DeregisterHost - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host that should be deregistered. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host that should be deregistered. - type: string - format: uuid - required: true - responses: - '204': - description: Success. - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}/instructions: - get: - tags: - - installer - security: - - agentAuth: [] - description: Retrieves the next operations that the host agent needs to perform. - operationId: v2GetNextSteps - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host that is retrieving instructions. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host that is retrieving instructions. - type: string - format: uuid - required: true - - in: query - name: timestamp - type: integer - description: The time on the host as seconds since the Unix epoch. - required: false - - in: header - name: discovery_agent_version - description: The software version of the discovery agent that is retrieving instructions. - type: string - required: false - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/steps' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - post: - tags: - - installer - security: - - agentAuth: [] - description: Posts the result of the operations from the host agent. - operationId: v2PostStepReply - parameters: - - in: header - name: discovery_agent_version - description: The software version of the discovery agent that is posting results. - type: string - required: false - - in: path - name: infra_env_id - description: The infra-env of the host that is posting results. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host that is posting results. - type: string - format: uuid - required: true - - name: reply - description: The results to be posted. - in: body - schema: - $ref: '#/definitions/step-reply' - responses: - '204': - description: Success. - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}/progress: - put: - tags: - - installer - security: - - agentAuth: [] - description: Update installation progress. - operationId: v2UpdateHostInstallProgress - parameters: - - in: header - name: discovery_agent_version - description: The software version of the discovery agent that is updating progress. - type: string - required: false - - in: path - name: infra_env_id - description: The infra-env of the host being updated. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The ID of the host to update. - type: string - format: uuid - required: true - - in: body - name: host-progress - description: New progress value. - required: true - schema: - $ref: '#/definitions/host-progress' - responses: - '200': - description: Update install progress. - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}/actions/bind: - post: - tags: - - installer - description: Bind host to a cluster - operationId: BindHost - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host that is being bound. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host that is being bound. - type: string - format: uuid - required: true - - name: bind-host-params - description: The parameters for the host binding. - in: body - required: true - schema: - $ref: '#/definitions/bind-host-params' - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/host' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}/actions/unbind: - post: - tags: - - installer - description: Unbind host to a cluster - operationId: UnbindHost - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host that is being bound. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host that is being bound. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/host' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Conflict. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}/actions/reset-validation/{validation_id}: - patch: - tags: - - installer - summary: Reset failed host validation. - operationId: v2ResetHostValidation - description: - Reset failed host validation. It may be performed on any host validation with persistent - validation result. - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host that its validation is being reset. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host that its validation is being reset. - type: string - format: uuid - required: true - - in: path - description: The id of the validation being reset. - type: string - name: validation_id - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/host' - '400': - description: Bad Request - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}/actions/reset: - post: - tags: - - installer - description: reset a failed host for day2 cluster. - operationId: v2ResetHost - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host that is being reset. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host that is being reset. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/host' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}/actions/install: - post: - tags: - - installer - description: install specific host for day2 cluster. - operationId: v2InstallHost - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host that is being installed. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host that is being installed. - type: string - format: uuid - required: true - responses: - '202': - description: Success. - schema: - $ref: '#/definitions/host' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}/installer-args: - patch: - tags: - - installer - description: Updates a host's installer arguments. - operationId: v2UpdateHostInstallerArgs - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host whose installer arguments should be updated. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host whose installer arguments should be updated. - type: string - format: uuid - required: true - - in: body - name: installer-args-params - description: The updated installer arguments. - required: true - schema: - $ref: '#/definitions/installer-args-params' - responses: - '201': - description: Success. - schema: - $ref: '#/definitions/host' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}/ignition: - get: - tags: - - installer - description: - Fetch the ignition file for this host as a string. In case of unbound host produces an error - operationId: v2GetHostIgnition - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host whose ignition file should be obtained. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host whose ignition file should be obtained. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/host-ignition-params' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - patch: - tags: - - installer - description: Patch the ignition file for this host - operationId: v2UpdateHostIgnition - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host whose ignition file should be updated. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host whose ignition file should be updated. - type: string - format: uuid - required: true - - in: body - name: host-ignition-params - description: Ignition config overrides. - required: true - schema: - $ref: '#/definitions/host-ignition-params' - responses: - '201': - description: Success. - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/downloads/files: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - - agentAuth: [] - - urlAuth: [] - - imageAuth: [] - - imageURLAuth: [] - description: Downloads the customized ignition file for this host - operationId: v2DownloadInfraEnvFiles - produces: - - application/octet-stream - parameters: - - in: path - name: infra_env_id - description: The infra-env whose file should be downloaded. - type: string - format: uuid - required: true - - in: query - name: file_name - description: The file to be downloaded. - type: string - enum: [discovery.ign, ipxe-script, static-network-config] - required: true - - in: query - name: mac - description: Mac address of the host running ipxe script. - type: string - format: mac - required: false - - in: query - name: ipxe_script_type - description: Specify the script type to be served for iPXE. - required: false - type: string - enum: ['discovery-image-always', 'boot-order-control'] - - in: query - name: discovery_iso_type - description: - Overrides the ISO type for the disovery ignition, either 'full-iso' or 'minimal-iso'. - required: false - type: string - enum: ['full-iso', 'minimal-iso'] - responses: - '200': - description: Success. - schema: - type: file - '400': - description: Bad Request. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/downloads/files-presigned: - get: - tags: - - installer - description: Creates a new pre-signed download URL for the infra-env. - operationId: GetInfraEnvPresignedFileURL - parameters: - - in: path - name: infra_env_id - description: The file's infra-env. - type: string - format: uuid - required: true - - in: query - name: file_name - description: The file to be downloaded. - type: string - enum: [discovery.ign, ipxe-script] - required: true - - in: query - name: ipxe_script_type - description: Specify the script type to be served for iPXE. - required: false - type: string - enum: ['discovery-image-always', 'boot-order-control'] - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/presigned-url' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress: - put: - tags: - - installer - security: - - agentAuth: [] - description: Update log collection state and progress. - operationId: v2UpdateHostLogsProgress - parameters: - - in: path - name: infra_env_id - description: The infra-env whose log progress is being updated. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host whose log progress is being updated. - type: string - format: uuid - required: true - - in: body - name: logs-progress-params - description: Parameters for updating log progress. - required: true - schema: - $ref: '#/definitions/logs-progress-params' - responses: - '204': - description: Update cluster install progress. - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '501': - description: Not implemented. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/regenerate-signing-key: - post: - tags: - - installer - description: Regenerate InfraEnv token signing key. - operationId: RegenerateInfraEnvSigningKey - parameters: - - in: path - name: infra_env_id - description: The target InfraEnv. - type: string - format: uuid - required: true - responses: - '204': - description: Success. - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/default-config: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - description: Get the default values for various cluster properties. - operationId: V2GetClusterDefaultConfig - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/cluster_default_config' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/downloads/credentials-presigned: - get: - tags: - - installer - security: - - userAuth: [user] - description: Get the cluster admin credentials. - operationId: V2GetPresignedForClusterCredentials - parameters: - - in: path - name: cluster_id - description: The cluster that owns the file that should be downloaded. - type: string - format: uuid - required: true - - in: query - name: file_name - description: The file to be downloaded. - type: string - enum: [kubeadmin-password, kubeconfig, kubeconfig-noingress] - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/presigned-url' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/credentials: - get: - tags: - - installer - security: - - userAuth: [user] - description: Get the cluster admin credentials. - operationId: V2GetCredentials - parameters: - - in: path - name: cluster_id - description: The cluster whose admin credentials should be retrieved. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/credentials' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/downloads/files: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - - agentAuth: [] - - urlAuth: [] - description: Downloads files relating to the installed/installing cluster. - operationId: V2DownloadClusterFiles - produces: - - application/octet-stream - parameters: - - in: path - name: cluster_id - description: The cluster that owns the file that should be downloaded. - type: string - format: uuid - required: true - - in: query - name: file_name - description: The file to be downloaded. - type: string - enum: - [ - bootstrap.ign, - master.ign, - metadata.json, - worker.ign, - install-config.yaml, - custom_manifests.json, - custom_manifests.yaml, - ] - required: true - - in: header - name: discovery_agent_version - description: The software version of the discovery agent that is downloading the file. - type: string - required: false - responses: - '200': - description: Success. - schema: - type: file - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/downloads/credentials: - get: - tags: - - installer - security: - - userAuth: [user] - - urlAuth: [] - - agentAuth: [] - description: Downloads credentials relating to the installed/installing cluster. - operationId: V2DownloadClusterCredentials - produces: - - application/octet-stream - parameters: - - in: path - name: cluster_id - description: The cluster that owns the credential file that should be downloaded. - type: string - format: uuid - required: true - - in: query - name: file_name - description: The credential file to be downloaded. - type: string - enum: [kubeadmin-password, kubeconfig, kubeconfig-noingress] - required: true - responses: - '200': - description: Success. - schema: - type: file - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/downloads/files-presigned: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - description: Retrieves a pre-signed S3 URL for downloading cluster files. - operationId: V2GetPresignedForClusterFiles - parameters: - - in: path - name: cluster_id - description: The cluster that owns the file that should be downloaded. - type: string - format: uuid - required: true - - in: query - name: file_name - description: The file to be downloaded. - type: string - enum: - [ - bootstrap.ign, - master.ign, - metadata.json, - worker.ign, - install-config.yaml, - logs, - manifests, - ] - required: true - - in: query - name: logs_type - description: If downloading logs, the type of logs to download. - type: string - enum: ['host', 'controller', 'all'] - required: false - - in: query - name: host_id - description: If downloading a file related to a host, the relevant host. - type: string - format: uuid - required: false - - in: query - name: additional_name - description: - If downloading a manifest, the file name, prefaced with folder name, for example, - openshift/99-openshift-xyz.yaml. - type: string - required: false - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/presigned-url' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/infra-envs/{infra_env_id}/downloads/minimal-initrd: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - - urlAuth: [] - - imageAuth: [] - description: | - Get the initial ramdisk for minimal ISO based installations. - operationId: DownloadMinimalInitrd - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host that should be retrieved. - type: string - format: uuid - required: true - produces: - - application/octet-stream - responses: - '200': - description: Success. - schema: - type: string - format: binary - '204': - description: Empty Success. - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Conflict. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/install-config: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - description: Get the cluster's install config YAML. - operationId: v2GetClusterInstallConfig - parameters: - - in: path - name: cluster_id - description: The cluster whose install config is being retrieved. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - type: string - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - patch: - tags: - - installer - description: Override values in the install config. - operationId: v2UpdateClusterInstallConfig - parameters: - - in: path - name: cluster_id - description: The cluster whose install config is being updated. - type: string - format: uuid - required: true - - in: body - name: install-config-params - description: Install config overrides. - required: true - schema: - type: string - responses: - '201': - description: Success. - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/domains: - get: - tags: - - managed_domains - security: - - userAuth: [admin, read-only-admin, user] - description: List of managed DNS domains. - operationId: V2ListManagedDomains - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/list-managed-domains' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/actions/install: - post: - tags: - - installer - description: Installs the OpenShift cluster. - operationId: v2InstallCluster - parameters: - - in: path - name: cluster_id - description: The cluster to be installed. - type: string - format: uuid - required: true - responses: - '202': - description: Success. - schema: - $ref: '#/definitions/cluster' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/actions/cancel: - post: - tags: - - installer - description: Cancels an ongoing installation. - operationId: V2CancelInstallation - parameters: - - in: path - name: cluster_id - description: The cluster whose installation is to be canceled. - type: string - format: uuid - required: true - responses: - '202': - description: Success. - schema: - $ref: '#/definitions/cluster' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/actions/reset: - post: - tags: - - installer - description: Resets a failed installation. - operationId: v2ResetCluster - parameters: - - in: path - name: cluster_id - description: The cluster whose installation is to be reset. - type: string - format: uuid - required: true - responses: - '202': - description: Success. - schema: - $ref: '#/definitions/cluster' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/actions/allow-add-workers: - post: - tags: - - installer - description: - Deprecated, maintained for legacy purposes. Does the same thing as allow-add-hosts. Use - allow-add-hosts instead. - deprecated: true - operationId: TransformClusterToDay2 - parameters: - - in: path - name: cluster_id - description: The cluster to transform. - type: string - format: uuid - required: true - responses: - '202': - description: Success. - schema: - $ref: '#/definitions/cluster' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/actions/allow-add-hosts: - post: - tags: - - installer - description: Transforms installed cluster to a state which allows adding hosts. - operationId: TransformClusterToAddingHosts - parameters: - - in: path - name: cluster_id - description: The cluster to transform. - type: string - format: uuid - required: true - responses: - '202': - description: Success. - schema: - $ref: '#/definitions/cluster' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/preflight-requirements: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - description: Get preflight requirements for a cluster. - operationId: v2GetPreflightRequirements - parameters: - - in: path - name: cluster_id - description: The cluster to return preflight requirements for. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/preflight-hardware-requirements' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/supported-operators/{operator_name}: - get: - tags: - - operators - security: - - userAuth: [admin, read-only-admin, user] - description: Lists properties for an operator. - operationId: V2ListOperatorProperties - parameters: - - in: path - name: operator_name - description: The operator name. - type: string - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/operator-properties' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/supported-operators: - get: - tags: - - operators - operationId: V2ListSupportedOperators - description: Retrieves the list of supported operators. - responses: - '200': - description: Success. - schema: - type: array - items: - type: string - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/uploads/ingress-cert: - post: - tags: - - installer - security: - - agentAuth: [] - description: Transfer the ingress certificate for the cluster. - operationId: v2UploadClusterIngressCert - parameters: - - in: path - name: cluster_id - description: The cluster to associate with the ingress certificate. - type: string - format: uuid - required: true - - in: body - name: ingress-cert-params - description: The ingress certificate. - required: true - schema: - $ref: '#/definitions/ingress-cert-params' - - in: header - name: discovery_agent_version - description: - The software version of the discovery agent that is uploading the ingress certificate. - type: string - required: false - responses: - '201': - description: Success. - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/actions/complete-installation: - post: - tags: - - installer - security: - - agentAuth: [] - description: Agent API to mark a finalizing installation as complete and progress to 100%. - operationId: v2CompleteInstallation - parameters: - - in: path - name: cluster_id - description: The cluster whose installation is being completing. - type: string - format: uuid - required: true - - in: body - name: completion-params - description: The final status of the cluster installation. - required: true - schema: - $ref: '#/definitions/completion-params' - - in: header - name: discovery_agent_version - description: - The software version of the discovery agent that is completing the installation. - type: string - required: false - responses: - '202': - description: Success. - schema: - $ref: '#/definitions/cluster' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/logs-progress: - put: - tags: - - installer - security: - - agentAuth: [] - description: Update log collection state and progress. - operationId: v2UpdateClusterLogsProgress - parameters: - - in: path - name: cluster_id - description: The cluster whose log progress is being updated. - type: string - format: uuid - required: true - - in: body - name: logs-progress-params - description: Parameters for updating log progress. - required: true - schema: - $ref: '#/definitions/logs-progress-params' - responses: - '204': - description: Update cluster install progress. - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/manifests: - get: - tags: - - manifests - security: - - userAuth: [] - description: Lists manifests for customizing cluster installation. - operationId: V2ListClusterManifests - parameters: - - in: path - name: cluster_id - description: The cluster for which the manifests should be listed. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/list-manifests' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - post: - tags: - - manifests - security: - - userAuth: [] - description: Creates a manifest for customizing cluster installation. - operationId: V2CreateClusterManifest - parameters: - - in: path - name: cluster_id - description: The cluster for which a new manifest should be created. - type: string - format: uuid - required: true - - in: body - name: CreateManifestParams - description: The new manifest to create. - required: true - schema: - $ref: '#/definitions/create-manifest-params' - responses: - '201': - description: Success. - schema: - $ref: '#/definitions/manifest' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - patch: - tags: - - manifests - security: - - userAuth: [] - description: Updates a manifest for customizing cluster installation. - operationId: V2UpdateClusterManifest - parameters: - - in: path - name: cluster_id - description: The cluster for which a new manifest should be updated. - type: string - format: uuid - required: true - - in: body - name: UpdateManifestParams - description: The manifest to be updated. - required: true - schema: - $ref: '#/definitions/update-manifest-params' - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/manifest' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - delete: - tags: - - manifests - description: Deletes a manifest from the cluster. - operationId: V2DeleteClusterManifest - parameters: - - in: path - name: cluster_id - description: The cluster whose manifest should be deleted. - type: string - format: uuid - required: true - - in: query - name: folder - description: - The folder that contains the files. Manifests can be placed in 'manifests' or - 'openshift' directories. - type: string - enum: [manifests, openshift] - required: false - default: manifests - - in: query - name: file_name - description: The manifest file name to delete from the cluster. - type: string - required: true - responses: - '200': - description: Success. - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/component-versions: - get: - tags: - - versions - security: - - userAuth: [admin, read-only-admin, user] - description: List of component versions. - operationId: v2ListComponentVersions - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/list-versions' - - /v2/openshift-versions: - get: - tags: - - versions - security: - - userAuth: [admin, read-only-admin, user] - operationId: v2ListSupportedOpenshiftVersions - description: Retrieves the list of OpenShift supported versions. - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/openshift-versions' - '400': - description: Bad Request - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/manifests/files: - get: - tags: - - manifests - security: - - userAuth: [] - description: Downloads cluster manifest. - operationId: v2DownloadClusterManifest - produces: - - application/octet-stream - parameters: - - in: path - name: cluster_id - description: The cluster whose manifest should be downloaded. - type: string - format: uuid - required: true - - in: query - name: folder - description: - The folder that contains the files. Manifests can be placed in 'manifests' or - 'openshift' directories. - type: string - enum: [manifests, openshift] - required: false - default: manifests - - in: query - name: file_name - description: The manifest file name to download. - type: string - required: true - responses: - '200': - description: Success. - schema: - type: file - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/logs: - get: - tags: - - installer - description: Download cluster logs. - security: - - userAuth: [admin, read-only-admin, user] - - urlAuth: [] - operationId: V2DownloadClusterLogs - produces: - - 'application/octet-stream' - parameters: - - in: path - name: cluster_id - description: The cluster whose logs should be downloaded. - type: string - format: uuid - required: true - - in: query - name: logs_type - description: The type of logs to be downloaded. - type: string - enum: ['host', 'controller', 'all'] - required: false - - in: query - name: host_id - description: A specific host in the cluster whose logs should be downloaded. - type: string - format: uuid - required: false - responses: - '200': - description: Success. - schema: - type: file - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - post: - tags: - - installer - security: - - agentAuth: [] - description: Agent API to upload logs. - operationId: V2UploadLogs - consumes: - - multipart/form-data - parameters: - - in: path - name: cluster_id - description: The cluster whose logs should be uploaded. - type: string - format: uuid - required: true - - in: formData - name: upfile - description: The log file to be uploaded. - type: file - required: false - maxLength: 104857600 #100MB - x-mimetype: application/zip - - in: query - name: logs_type - description: The type of log file to be uploaded. - type: string - enum: ['host', 'controller'] - required: true - - in: query - name: infra_env_id - description: The infra-env ID of the host. - type: string - format: uuid - required: false - - in: query - name: host_id - description: The host whose logs should be uploaded. - type: string - format: uuid - required: false - responses: - '204': - description: Success. - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/monitored-operators: - get: - tags: - - operators - - installer - security: - - agentAuth: [] - description: Lists operators to be monitored for a cluster. - operationId: V2ListOfClusterOperators - parameters: - - in: path - name: cluster_id - description: The cluster to return operators for. - type: string - format: uuid - required: true - - in: query - name: operator_name - description: An operator in the specified cluster to return its data. - type: string - required: false - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/monitored-operators-list' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - put: - tags: - - operators - - installer - security: - - agentAuth: [] - description: Controller API to report of monitored operators. - operationId: v2ReportMonitoredOperatorStatus - parameters: - - in: path - name: cluster_id - description: The cluster whose operators are being monitored. - type: string - format: uuid - required: true - - in: body - name: report-params - description: The operators monitor report. - required: true - schema: - $ref: '#/definitions/operator-monitor-report' - responses: - '200': - description: Success. - '400': - description: Bad Request - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/infra-env/{infra_env_id}/hosts/{host_id}/downloads/ignition: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - - agentAuth: [] - description: - Downloads the customized ignition file for this bound host, produces octet stream. For - unbound host - error is returned - operationId: v2DownloadHostIgnition - produces: - - application/octet-stream - parameters: - - in: path - name: infra_env_id - description: The infra-env of the host whose ignition file should be downloaded. - type: string - format: uuid - required: true - - in: path - name: host_id - description: The host whose ignition file should be downloaded. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - type: file - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '409': - description: Error. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/events: - get: - tags: - - events - security: - - userAuth: [admin, read-only-admin, user] - - urlAuth: [] - description: Lists events for a cluster. - operationId: v2ListEvents - parameters: - - in: query - name: cluster_id - description: The cluster to return events for. - type: string - format: uuid - required: false - - in: query - name: host_id - description: - A host in the specified cluster to return events for (DEPRECATED. Use `host_ids` - instead). - type: string - format: uuid - required: false - - in: query - name: host_ids - description: Hosts in the specified cluster to return events for. - type: array - items: - type: string - format: uuid - required: false - - in: query - name: infra_env_id - description: The infra-env to return events for. - type: string - format: uuid - required: false - - in: query - name: limit - description: The maximum number of records to retrieve. - type: integer - required: false - - in: query - name: offset - description: Number of records to skip before starting to return the records. - type: integer - required: false - - in: query - name: order - description: Order by event_time of events retrieved. - type: string - enum: [ascending, descending] - default: ascending - - in: query - name: severities - description: Retrieved events severities. - type: array - items: - type: string - enum: [info, warning, error, critical] - required: false - - in: query - name: message - description: Retrieved events message pattern. - type: string - required: false - - in: query - name: deleted_hosts - description: Deleted hosts flag. - type: boolean - required: false - - in: query - name: cluster_level - description: Cluster level events flag. - type: boolean - required: false - - in: query - name: categories - description: A comma-separated list of event categories. - type: array - items: - type: string - required: false - responses: - '200': - description: Success. - headers: - Severity-Count-Info: - type: integer - description: "Count of events with severity 'info'." - minimum: 0 - Severity-Count-Warning: - type: integer - description: "Count of events with severity 'warning'." - minimum: 0 - Severity-Count-Error: - type: integer - description: "Count of events with severity 'error'." - minimum: 0 - Severity-Count-Critical: - type: integer - description: Count of events with severity 'critical'. - minimum: 0 - Event-Count: - type: integer - description: Count of events retrieved. - minimum: 0 - schema: - $ref: '#/definitions/event-list' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '405': - description: Method Not Allowed. - schema: - $ref: '#/definitions/error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/support-levels/features: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - operationId: GetSupportedFeatures - description: Retrieves the features support levels for each OpenShift version. - parameters: - - in: query - name: openshift_version - type: string - description: Version of the OpenShift cluster. - required: true - - in: query - name: cpu_architecture - description: The CPU architecture of the image (x86_64/arm64/etc). - type: string - # TODO: remove arm64 when AI moves to using aarch64 - enum: ['x86_64', 'aarch64', 'arm64', 'ppc64le', 's390x', 'multi'] - default: x86_64 - responses: - '200': - description: Success. - schema: - type: object - properties: - features: - description: Keys will be one of features-support-level-id enum. - $ref: '#/definitions/support-levels' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/support-levels/architectures: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - operationId: GetSupportedArchitectures - description: Retrieves the architecture support-levels for each OpenShift version. - parameters: - - in: query - name: openshift_version - type: string - description: Version of the OpenShift cluster. - required: true - responses: - '200': - description: Success. - schema: - type: object - properties: - architectures: - description: Keys will be one of architecture-support-level-id enum. - $ref: '#/definitions/support-levels' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/feature-support-levels: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - operationId: v2ListFeatureSupportLevels - description: - (DEPRECATED) Retrieves the support levels for features for each OpenShift version. - deprecated: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/feature-support-levels' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '503': - description: Unavailable. - schema: - $ref: '#/definitions/error' - - /v2/clusters/import: - post: - tags: - - installer - description: - Import an AI cluster using minimal data associated with existing OCP cluster, in order to - allow adding day2 hosts to that cluster - operationId: v2ImportCluster - parameters: - - in: body - name: new-import-cluster-params - description: Parameters for importing a OCP cluster for adding nodes. - required: true - schema: - $ref: '#/definitions/import-cluster-params' - responses: - '201': - description: Success. - schema: - $ref: '#/definitions/cluster' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - - /v2/clusters/{cluster_id}/ignored-validations: - get: - tags: - - installer - description: Fetch the validations which are to be ignored for this cluster. - operationId: v2GetIgnoredValidations - parameters: - - in: path - name: cluster_id - description: - The cluster whose failing validations should be ignored according to this list. - type: string - format: uuid - required: true - responses: - '200': - description: Success. - schema: - $ref: '#/definitions/ignored-validations' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - put: - tags: - - installer - description: Register the validations which are to be ignored for this cluster. - operationId: v2SetIgnoredValidations - parameters: - - in: path - name: cluster_id - description: - The cluster whose failing validations should be ignored according to this list. - type: string - format: uuid - required: true - - in: body - name: ignored_validations - description: The validations to be ignored. - required: true - schema: - $ref: '#/definitions/ignored-validations' - responses: - '201': - description: Success. - schema: - $ref: '#/definitions/ignored-validations' - '400': - description: Error. - schema: - $ref: '#/definitions/error' - '404': - description: Error. - schema: - $ref: '#/definitions/error' - '401': - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - '500': - description: Error. - schema: - $ref: '#/definitions/error' - -definitions: - ignored-validations: - type: object - properties: - cluster-validation-ids: - type: string - format: string - description: - JSON-formatted list of cluster validation IDs that will be ignored for all hosts that - belong to this cluster. It may also contain a list with a single string "all" to ignore - all cluster validations. Some validations cannot be ignored. - host-validation-ids: - type: string - format: string - description: - JSON-formatted list of host validation IDs that will be ignored for all hosts that belong - to this cluster. It may also contain a list with a single string "all" to ignore all host - validations. Some validations cannot be ignored. - monitored-operator: - type: object - properties: - cluster_id: - type: string - format: uuid - description: The cluster that this operator is associated with. - x-go-custom-tag: gorm:"primaryKey" - name: - type: string - description: Unique name of the operator. - x-go-custom-tag: gorm:"primaryKey" - version: - type: string - description: Operator version - namespace: - type: string - description: Namespace where to deploy an operator. Only some operators require a namespace. - subscription_name: - type: string - description: The name of the subscription of the operator. - operator_type: - $ref: '#/definitions/operator-type' - properties: - type: string - description: Blob of operator-dependent parameters that are required for installation. - x-go-custom-tag: gorm:"type:text" - timeout_seconds: - type: integer - description: - Positive number represents a timeout in seconds for the operator to be available. - status: - $ref: '#/definitions/operator-status' - status_info: - type: string - description: Detailed information about the operator state. - status_updated_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: Time at which the operator was last updated. - - operator-monitor-report: - type: object - properties: - name: - type: string - description: Unique name of the operator. - version: - type: string - description: operator version. - status: - $ref: '#/definitions/operator-status' - status_info: - type: string - description: Detailed information about the operator state. - - operator-type: - type: string - enum: ['builtin', 'olm'] - description: Kind of operator. Different types are monitored by the service differently. - - operator-status: - type: string - enum: ['failed', 'progressing', 'available'] - description: Represents the operator state. - - operator-create-params: - type: object - properties: - name: - type: string - properties: - type: string - description: Blob of operator-dependent parameters that are required for installation. - x-go-custom-tag: gorm:"type:text" - - monitored-operators-list: - type: array - items: - $ref: '#/definitions/monitored-operator' - - list-managed-domains: - type: array - items: - $ref: '#/definitions/managed-domain' - - managed-domain: - type: object - properties: - domain: - type: string - provider: - type: string - enum: ['route53'] - - list-versions: - type: object - properties: - versions: - $ref: '#/definitions/versions' - release_tag: - type: string - - versions: - type: object - additionalProperties: - type: string - - openshift-versions: - type: object - additionalProperties: - $ref: '#/definitions/openshift-version' - - feature-support-levels: - type: array - description: - (DEPRECATED) List of objects that containing a list of feature-support level and attached to - openshift-version - items: - $ref: '#/definitions/feature-support-level' - - feature-support-level: - type: object - description: (DEPRECATED) List of features attached to openshift version - properties: - openshift_version: - type: string - description: Version of the OpenShift cluster. - features: - type: array - items: - type: object - required: - - feature_id - - support_level - properties: - feature_id: - type: string - description: (DEPRECATED) The ID of the feature - enum: - - 'ADDITIONAL_NTP_SOURCE' - - 'REQUESTED_HOSTNAME' - - 'PROXY' - - 'SNO' - - 'DAY2_HOSTS' - - 'VIP_AUTO_ALLOC' - - 'DISK_SELECTION' - - 'OVN_NETWORK_TYPE' - - 'SDN_NETWORK_TYPE' - - 'PLATFORM_SELECTION' - - 'SCHEDULABLE_MASTERS' - - 'AUTO_ASSIGN_ROLE' - - 'CUSTOM_MANIFEST' - - 'DISK_ENCRYPTION' - - 'CLUSTER_MANAGED_NETWORKING_WITH_VMS' - - 'ARM64_ARCHITECTURE' - - 'ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING' - - 'PPC64LE_ARCHITECTURE' - - 'S390X_ARCHITECTURE' - - 'SINGLE_NODE_EXPANSION' - - 'LVM' - - 'DUAL_STACK_NETWORKING' - - 'MULTIARCH_RELEASE_IMAGE' - - 'NUTANIX_INTEGRATION' - - 'DUAL_STACK_VIPS' - - 'USER_MANAGED_NETWORKING_WITH_MULTI_NODE' - support_level: - $ref: '#/definitions/support-level' - - support-levels: - type: object - description: Map of feature ID or CPU architecture alongside their support level - additionalProperties: - $ref: '#/definitions/support-level' - - support-level: - type: string - enum: [supported, unsupported, tech-preview, dev-preview, unavailable] - - feature-support-level-id: - type: string - enum: - - 'SNO' - - 'VIP_AUTO_ALLOC' - - 'CUSTOM_MANIFEST' - - 'SINGLE_NODE_EXPANSION' - - 'LVM' - - 'ODF' - - 'LSO' - - 'CNV' - - 'MCE' - - 'NUTANIX_INTEGRATION' - - 'VSPHERE_INTEGRATION' - - 'DUAL_STACK_VIPS' - - 'CLUSTER_MANAGED_NETWORKING' - - 'USER_MANAGED_NETWORKING' - - 'MINIMAL_ISO' - - 'FULL_ISO' - - 'EXTERNAL_PLATFORM_OCI' - - architecture-support-level-id: - type: string - enum: - - 'X86_64_ARCHITECTURE' - - 'ARM64_ARCHITECTURE' - - 'PPC64LE_ARCHITECTURE' - - 'S390X_ARCHITECTURE' - - 'MULTIARCH_RELEASE_IMAGE' - - preflight-hardware-requirements: - type: object - properties: - operators: - description: Preflight operators hardware requirements - type: array - items: - $ref: '#/definitions/operator-hardware-requirements' - ocp: - description: Preflight OCP requirements - $ref: '#/definitions/host-type-hardware-requirements-wrapper' - - operator-hardware-requirements: - type: object - properties: - operator_name: - description: - Unique name of the operator. Corresponds to name property of the monitored-operator, i.e. - "lso", "cnv", etc. - type: string - dependencies: - description: - List of other operator unique names that are required to be installed. Corresponds to name - property of the monitored-operator, i.e. "lso", "cnv", etc. - type: array - items: - type: string - requirements: - $ref: '#/definitions/host-type-hardware-requirements-wrapper' - - host-type-hardware-requirements-wrapper: - type: object - properties: - worker: - description: Requirements towards a worker node - $ref: '#/definitions/host-type-hardware-requirements' - master: - description: Requirements towards a master node - $ref: '#/definitions/host-type-hardware-requirements' - - host-type-hardware-requirements: - type: object - properties: - quantitative: - description: Host requirements that can be quantified - $ref: '#/definitions/cluster-host-requirements-details' - qualitative: - description: - Host requirements that cannot be quantified at the time of calculation. Descriptions or - formulas of requiements - type: array - items: - type: string - - cluster-host-requirements-list: - type: array - items: - $ref: '#/definitions/cluster-host-requirements' - - cluster-host-requirements: - type: object - properties: - host_id: - type: string - format: uuid - description: Unique identifier of the host the requirements relate to. - total: - $ref: '#/definitions/cluster-host-requirements-details' - description: Total host requirements for the cluster configuration - ocp: - $ref: '#/definitions/cluster-host-requirements-details' - description: Host requirements for the OCP installation - operators: - type: array - items: - $ref: '#/definitions/operator-host-requirements' - description: Host requirements related to requested operators - - operator-host-requirements: - type: object - properties: - operator_name: - type: string - description: Name of the operator - requirements: - $ref: '#/definitions/cluster-host-requirements-details' - description: Host requirements for the operator - - cluster-host-requirements-details: - type: object - properties: - cpu_cores: - type: integer - description: Required number of CPU cores - ram_mib: - type: integer - description: Required number of RAM in MiB - disk_size_gb: - type: integer - description: Required disk size in GB - installation_disk_speed_threshold_ms: - type: integer - description: Required installation disk speed in ms - network_latency_threshold_ms: - type: number - format: double - x-nullable: true - description: Maximum network average latency (RTT) at L3 for role. - packet_loss_percentage: - type: number - format: double - x-nullable: true - description: Maximum packet loss allowed at L3 for role. - tpm_enabled_in_bios: - type: boolean - description: Whether TPM module should be enabled in host's BIOS. - - versioned-host-requirements: - type: object - properties: - version: - type: string - description: Version of the component for which requirements are defined - master: - x-go-name: MasterRequirements - $ref: '#/definitions/cluster-host-requirements-details' - description: Master node requirements - worker: - x-go-name: WorkerRequirements - $ref: '#/definitions/cluster-host-requirements-details' - description: Worker node requirements - sno: - x-go-name: SNORequirements - $ref: '#/definitions/cluster-host-requirements-details' - description: Single node OpenShift node requirements - edge-worker: - x-go-name: EdgeWorkerRequirements - $ref: '#/definitions/cluster-host-requirements-details' - description: Edge Worker OpenShift node requirements - - event-list: - type: array - items: - $ref: '#/definitions/event' - - event: - type: object - required: - - severity - - message - - event_time - properties: - name: - type: string - description: Event Name. - cluster_id: - type: string - format: uuid - description: Unique identifier of the cluster this event relates to. - x-go-custom-tag: gorm:"index" - x-nullable: true - host_id: - type: string - format: uuid - description: Unique identifier of the host this event relates to. - x-go-custom-tag: gorm:"index" - x-nullable: true - infra_env_id: - type: string - format: uuid - description: Unique identifier of the infra-env this event relates to. - x-go-custom-tag: gorm:"index" - x-nullable: true - severity: - type: string - enum: [info, warning, error, critical] - category: - type: string - enum: ['user', 'metrics'] - x-go-custom-tag: gorm:"default:'user'" - message: - type: string - x-go-custom-tag: gorm:"type:varchar(4096)" - event_time: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - request_id: - type: string - format: uuid - description: Unique identifier of the request that caused this event to occur. - props: - type: string - description: Additional properties for the event in JSON format. - x-go-custom-tag: gorm:"type:text" - - image-create-params: - type: object - properties: - ssh_public_key: - type: string - description: SSH public key for debugging the installation. - static_network_config: - type: array - items: - $ref: '#/definitions/host_static_network_config' - image_type: - description: Type of image that should be generated. - $ref: '#/definitions/image_type' - - host-create-params: - type: object - required: - - host_id - properties: - host_id: - type: string - format: uuid - discovery_agent_version: - type: string - - host_registration_response: - allOf: - - $ref: '#/definitions/host' - - properties: - next_step_runner_command: - type: object - description: Command for starting the next step runner - properties: - command: - type: string - args: - type: array - items: - type: string - retry_seconds: - type: integer - description: - How long in seconds to wait before retrying registration if the command fails - - host: - type: object - required: - - kind - - id - - href - - status - - status_info - properties: - kind: - type: string - enum: ['Host', 'AddToExistingClusterHost'] - description: | - Indicates the type of this object. Will be 'Host' if this is a complete object or 'HostLink' if it is just a link, or - 'AddToExistingClusterHost' for host being added to existing OCP cluster, or - id: - type: string - format: uuid - description: Unique identifier of the object. - x-go-custom-tag: gorm:"primaryKey" - href: - type: string - description: Self link. - cluster_id: - type: string - format: uuid - x-go-custom-tag: gorm:"foreignkey:Cluster" - x-nullable: true - description: The cluster that this host is associated with. - infra_env_id: - type: string - format: uuid - x-go-custom-tag: gorm:"primaryKey;foreignkey:InfraEnvID" - description: The infra-env that this host is associated with. - status: - type: string - enum: - - discovering - - known - - disconnected - - insufficient - - disabled - - preparing-for-installation - - preparing-failed - - preparing-successful - - pending-for-input - - installing - - installing-in-progress - - installing-pending-user-action - - resetting-pending-user-action - - installed - - error - - resetting - - added-to-existing-cluster - - cancelled - - binding - - unbinding - - unbinding-pending-user-action - - known-unbound - - disconnected-unbound - - insufficient-unbound - - disabled-unbound - - discovering-unbound - - reclaiming - - reclaiming-rebooting - status_info: - type: string - x-go-custom-tag: gorm:"type:varchar(2048)" - validations_info: - type: string - description: - JSON-formatted string containing the validation results for each validation id grouped by - category (network, hardware, etc.) - x-go-custom-tag: gorm:"type:text" - logs_info: - $ref: '#/definitions/logs_state' - description: The progress of log collection or empty if logs are not applicable - status_updated_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: The last time that the host status was updated. - progress: - $ref: '#/definitions/host-progress-info' - stage_started_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: Time at which the current progress stage started. - stage_updated_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: Time at which the current progress stage was last updated. - progress_stages: - type: array - items: - $ref: '#/definitions/host-stage' - x-go-custom-tag: gorm:"-" - x-nullable: true - connectivity: - x-go-custom-tag: gorm:"type:text" - type: string - api_vip_connectivity: - x-go-custom-tag: gorm:"type:text" - type: string - description: Contains a serialized api_vip_connectivity_response - tang_connectivity: - x-go-custom-tag: gorm:"type:text" - type: string - inventory: - x-go-custom-tag: gorm:"type:text" - type: string - free_addresses: - x-go-custom-tag: gorm:"type:text" - type: string - ntp_sources: - x-go-custom-tag: gorm:"type:text" - type: string - description: The configured NTP sources on the host. - disks_info: - x-go-custom-tag: gorm:"type:text" - type: string - description: Additional information about disks, formatted as JSON. - role: - $ref: '#/definitions/host-role' - suggested_role: - $ref: '#/definitions/host-role' - bootstrap: - type: boolean - logs_collected_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - logs_started_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - installer_version: - type: string - description: Installer version. - installation_disk_path: - type: string - description: - Contains the inventory disk path, This field is replaced by installation_disk_id field and - used for backward compatability with the old UI. - example: /dev/sda - installation_disk_id: - type: string - description: Contains the inventory disk id to install on. - updated_at: - type: string - format: date-time - x-go-type: - type: Time - import: - package: time - hints: - noValidation: true - x-go-custom-tag: gorm:"type:timestamp with time zone" - created_at: - type: string - format: date-time - x-go-type: - type: Time - import: - package: time - hints: - noValidation: true - x-go-custom-tag: gorm:"type:timestamp with time zone" - checked_in_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: The last time the host's agent communicated with the service. - registered_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: The last time the host's agent tried to register in the service. - discovery_agent_version: - type: string - requested_hostname: - type: string - user_name: - type: string - media_status: - type: string - x-nullable: true - enum: - - connected - - disconnected - default: connected - deleted_at: - description: swagger:ignore - x-go-custom-tag: gorm:"type:timestamp with time zone;index" - x-nullable: false - x-go-type: - type: DeletedAt - import: - package: gorm.io/gorm - hints: - noValidation: true - ignition_config_overrides: - x-go-custom-tag: gorm:"type:text" - type: string - description: - Json formatted string containing the user overrides for the host's pointer ignition - example: - '{"ignition": {"version": "3.1.0"}, "storage": {"files": [{"path": "/tmp/example", - "contents": {"source": "data:text/plain;base64,aGVscGltdHJhcHBlZGluYXN3YWdnZXJzcGVj"}}]}}' - installer_args: - type: string - timestamp: - type: integer - description: The time on the host as seconds since the Unix epoch. - machine_config_pool_name: - type: string - images_status: - x-go-custom-tag: gorm:"type:text" - type: string - description: Array of image statuses. - domain_name_resolutions: - x-go-custom-tag: gorm:"type:text" - type: string - description: The domain name resolution result. - ignition_endpoint_token_set: - type: boolean - description: True if the token to fetch the ignition from ignition_endpoint_url is set. - node_labels: - x-go-custom-tag: gorm:"type:text" - type: string - description: Json containing node's labels. - disks_to_be_formatted: - x-go-custom-tag: gorm:"type:text" - type: string - description: |- - A comma-separated list of disks that will be formatted once - installation begins, unless otherwise set to be skipped by - skip_formatting_disks. This means that this list also includes disks - that appear in skip_formatting_disks. This property is managed by the - service and cannot be modified by the user. - skip_formatting_disks: - x-go-custom-tag: gorm:"type:text" - type: string - description: |- - A comma-seperated list of host disks that the service will avoid - formatting. - installer-args-params: - type: object - properties: - args: - description: List of additional arguments passed to coreos-installer - example: - [ - '--append-karg', - 'ip=192.0.2.2::192.0.2.254:255.255.255.0:core0.example.com:enp1s0:none', - '--save-partindex', - '1', - '-n', - ] - type: array - items: - type: string - - steps: - type: object - properties: - next_instruction_seconds: - type: integer - post_step_action: - type: string - description: What to do after finishing to run step instructions - default: continue - enum: - - exit - - continue - instructions: - type: array - items: - $ref: '#/definitions/step' - - step-type: - type: string - enum: - - connectivity-check - - execute - - inventory - - install - - free-network-addresses - - dhcp-lease-allocate - - api-vip-connectivity-check - - tang-connectivity-check - - ntp-synchronizer - - installation-disk-speed-check - - container-image-availability - - domain-resolution - - stop-installation - - logs-gather - - next-step-runner - - upgrade-agent - - download-boot-artifacts - - reboot-for-reclaim - - verify-vips - - step: - type: object - properties: - step_type: - $ref: '#/definitions/step-type' - step_id: - type: string - args: - type: array - items: - type: string - - steps-reply: - type: array - items: - $ref: '#/definitions/step-reply' - - step-reply: - type: object - properties: - step_type: - $ref: '#/definitions/step-type' - step_id: - type: string - exit_code: - type: integer - output: - type: string - error: - type: string - - connectivity-check-nic: - type: object - properties: - name: - type: string - mac: - format: mac - type: string - ip_addresses: - type: array - items: - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$' - type: string - - connectivity-check-host: - type: object - properties: - host_id: - type: string - format: uuid - nics: - type: array - items: - $ref: '#/definitions/connectivity-check-nic' - - connectivity-check-params: - type: array - items: - $ref: '#/definitions/connectivity-check-host' - - host-list: - type: array - items: - $ref: '#/definitions/host' - - cluster-create-params: - type: object - required: - - name - - openshift_version - - pull_secret - properties: - name: - type: string - minLength: 1 - maxLength: 54 - description: Name of the OpenShift cluster. - high_availability_mode: - type: string - enum: ['Full', 'None'] - default: 'Full' - description: | - Guaranteed availability of the installed cluster. 'Full' installs a Highly-Available cluster - over multiple master nodes whereas 'None' installs a full cluster over one node. - openshift_version: - type: string - description: Version of the OpenShift cluster. - ocp_release_image: - type: string - description: OpenShift release image URI. - base_dns_domain: - type: string - description: - Base domain of the cluster. All DNS records must be sub-domains of this base and include - the cluster name. - cluster_network_cidr: - type: string - description: - IP address block from which Pod IPs are allocated. This block must not overlap with - existing physical networks. These IP addresses are used for the Pod network, and if you - need to access the Pods from an external network, configure load balancers and routers to - manage the traffic. - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$' - default: '10.128.0.0/14' - cluster_network_host_prefix: - type: integer - description: - The subnet prefix length to assign to each individual node. For example, if - clusterNetworkHostPrefix is set to 23, then each node is assigned a /23 subnet out of the - given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) - 2) pod IPs addresses. - If you are required to provide access to nodes from an external network, configure load - balancers and routers to manage the traffic. - minimum: 1 - maximum: 128 - default: 23 - service_network_cidr: - type: string - description: - The IP address pool to use for service IP addresses. You can enter only one IP address - pool. If you need to access the services from an external network, configure load - balancers and routers to manage the traffic. - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$' - default: '172.30.0.0/16' - api_vip: - type: string - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$' - description: (DEPRECATED) The virtual IP used to reach the OpenShift cluster's API. - api_vips: - type: array - description: - The virtual IPs used to reach the OpenShift cluster's API. Enter one IP address for - single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP - stack used). The order of stacks should be the same as order of subnets in Cluster - Networks, Service Networks, and Machine Networks. - items: - $ref: '#/definitions/api_vip' - ingress_vip: - type: string - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$' - description: (DEPRECATED) The virtual IP used for cluster ingress traffic. - ingress_vips: - type: array - description: - The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack - clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). - The order of stacks should be the same as order of subnets in Cluster Networks, Service - Networks, and Machine Networks. - items: - $ref: '#/definitions/ingress_vip' - pull_secret: - type: string - description: - The pull secret obtained from Red Hat OpenShift Cluster Manager at - console.redhat.com/openshift/install/pull-secret. - ssh_public_key: - type: string - description: SSH public key for debugging OpenShift nodes. - vip_dhcp_allocation: - type: boolean - description: Indicate if virtual IP DHCP allocation mode is enabled. - x-nullable: true - default: false - http_proxy: - type: string - description: | - A proxy URL to use for creating HTTP connections outside the cluster. - http://\:\@\:\ - x-nullable: true - https_proxy: - type: string - description: | - A proxy URL to use for creating HTTPS connections outside the cluster. - http://\:\@\:\ - x-nullable: true - no_proxy: - type: string - description: - An "*" or a comma-separated list of destination domain names, domains, IP addresses, or - other network CIDRs to exclude from proxying. - x-nullable: true - user_managed_networking: - type: boolean - description: Indicate if the networking is managed by the user. - x-nullable: true - default: false - additional_ntp_source: - type: string - description: - A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - x-nullable: true - olm_operators: - type: array - description: List of OLM operators to be installed. - items: - $ref: '#/definitions/operator-create-params' - hyperthreading: - type: string - description: Enable/disable hyperthreading on master nodes, worker nodes, or all nodes. - enum: ['masters', 'workers', 'none', 'all'] - default: 'all' - network_type: - type: string - description: 'The desired network type used.' - enum: ['OpenShiftSDN', 'OVNKubernetes'] - x-nullable: true - schedulable_masters: - type: boolean - description: Schedule workloads on masters - default: false - cluster_networks: - type: array - description: Cluster networks that are associated with this cluster. - items: - $ref: '#/definitions/cluster_network' - x-nullable: true - service_networks: - type: array - description: Service networks that are associated with this cluster. - items: - $ref: '#/definitions/service_network' - x-nullable: true - machine_networks: - type: array - description: Machine networks that are associated with this cluster. - items: - $ref: '#/definitions/machine_network' - x-nullable: true - platform: - $ref: '#/definitions/platform' - x-nullable: true - cpu_architecture: - type: string - x-nullable: false - default: 'x86_64' - # TODO: remove arm64 when AI moves to using aarch64 - enum: ['x86_64', 'aarch64', 'arm64', 'ppc64le', 's390x', 'multi'] - description: The CPU architecture of the image (x86_64/arm64/etc). - disk_encryption: - $ref: '#/definitions/disk-encryption' - description: Installation disks encryption mode and host roles to be applied. - ignition_endpoint: - $ref: '#/definitions/ignition-endpoint' - description: Explicit ignition endpoint overrides the default ignition endpoint. - tags: - type: string - description: A comma-separated list of tags that are associated to the cluster. - x-nullable: true - - host-update-params: - type: object - properties: - host_role: - type: string - x-nullable: true - enum: ['auto-assign', 'master', 'worker'] - host_name: - type: string - x-nullable: true - disks_selected_config: - type: array - x-nullable: true - items: - $ref: '#/definitions/disk-config-params' - disks_skip_formatting: - type: array - x-nullable: true - description: Allows changing the host's skip_formatting_disks parameter - items: - $ref: '#/definitions/disk-skip-formatting-params' - machine_config_pool_name: - type: string - x-nullable: true - ignition_endpoint_token: - x-nullable: true - type: string - description: - A string which will be used as Authorization Bearer token to fetch the ignition from - ignition_endpoint_url. - node_labels: - type: array - description: Labels to be added to the corresponding node. - x-nullable: true - items: - $ref: '#/definitions/node-label-params' - - v2-cluster-update-params: - type: object - properties: - name: - type: string - minLength: 1 - maxLength: 54 - description: OpenShift cluster name. - x-nullable: true - base_dns_domain: - type: string - description: - Base domain of the cluster. All DNS records must be sub-domains of this base and include - the cluster name. - x-nullable: true - cluster_network_cidr: - type: string - description: - IP address block from which Pod IPs are allocated. This block must not overlap with - existing physical networks. These IP addresses are used for the Pod network, and if you - need to access the Pods from an external network, configure load balancers and routers to - manage the traffic. - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$' - x-nullable: true - platform: - $ref: '#/definitions/platform' - cluster_network_host_prefix: - type: integer - description: - The subnet prefix length to assign to each individual node. For example, if - clusterNetworkHostPrefix is set to 23, then each node is assigned a /23 subnet out of the - given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) - 2) pod IPs addresses. - If you are required to provide access to nodes from an external network, configure load - balancers and routers to manage the traffic. - minimum: 1 - maximum: 128 - x-nullable: true - service_network_cidr: - type: string - description: - The IP address pool to use for service IP addresses. You can enter only one IP address - pool. If you need to access the services from an external network, configure load - balancers and routers to manage the traffic. - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$' - x-nullable: true - api_vip: - type: string - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$' - description: (DEPRECATED) The virtual IP used to reach the OpenShift cluster's API. - x-nullable: true - api_vips: - type: array - description: - The virtual IPs used to reach the OpenShift cluster's API. Enter one IP address for - single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP - stack used). The order of stacks should be the same as order of subnets in Cluster - Networks, Service Networks, and Machine Networks. - items: - $ref: '#/definitions/api_vip' - x-nullable: true - ingress_vip: - type: string - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$' - description: (DEPRECATED) The virtual IP used for cluster ingress traffic. - x-nullable: true - ingress_vips: - type: array - description: - The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack - clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). - The order of stacks should be the same as order of subnets in Cluster Networks, Service - Networks, and Machine Networks. - items: - $ref: '#/definitions/ingress_vip' - x-nullable: true - api_vip_dns_name: - type: string - description: The domain name used to reach the OpenShift cluster API. - x-nullable: true - machine_network_cidr: - type: string - description: - A CIDR that all hosts belonging to the cluster should have an interfaces with IP address - that belongs to this CIDR. The api_vip belongs to this CIDR. - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$' - x-nullable: true - pull_secret: - type: string - description: - The pull secret obtained from Red Hat OpenShift Cluster Manager at - console.redhat.com/openshift/install/pull-secret. - x-nullable: true - ssh_public_key: - type: string - description: SSH public key for debugging OpenShift nodes. - x-nullable: true - vip_dhcp_allocation: - type: boolean - description: Indicate if virtual IP DHCP allocation mode is enabled. - x-nullable: true - http_proxy: - type: string - description: | - A proxy URL to use for creating HTTP connections outside the cluster. - http://\:\@\:\ - x-nullable: true - https_proxy: - type: string - description: | - A proxy URL to use for creating HTTPS connections outside the cluster. - http://\:\@\:\ - x-nullable: true - no_proxy: - type: string - description: - An "*" or a comma-separated list of destination domain names, domains, IP addresses, or - other network CIDRs to exclude from proxying. - x-nullable: true - user_managed_networking: - type: boolean - description: Indicate if the networking is managed by the user. - x-nullable: true - additional_ntp_source: - type: string - description: - A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - x-nullable: true - olm_operators: - type: array - description: List of OLM operators to be installed. - items: - $ref: '#/definitions/operator-create-params' - hyperthreading: - type: string - description: Enable/disable hyperthreading on master nodes, worker nodes, or all nodes. - enum: ['masters', 'workers', 'all', 'none'] - x-nullable: true - network_type: - type: string - description: The desired network type used. - enum: ['OpenShiftSDN', 'OVNKubernetes'] - x-nullable: true - schedulable_masters: - type: boolean - description: Schedule workloads on masters - default: false - cluster_networks: - type: array - description: Cluster networks that are associated with this cluster. - items: - $ref: '#/definitions/cluster_network' - x-nullable: true - service_networks: - type: array - description: Service networks that are associated with this cluster. - items: - $ref: '#/definitions/service_network' - x-nullable: true - machine_networks: - type: array - description: Machine networks that are associated with this cluster. - items: - $ref: '#/definitions/machine_network' - x-nullable: true - disk_encryption: - $ref: '#/definitions/disk-encryption' - description: Installation disks encryption mode and host roles to be applied. - ignition_endpoint: - $ref: '#/definitions/ignition-endpoint' - description: Explicit ignition endpoint overrides the default ignition endpoint. - tags: - type: string - description: A comma-separated list of tags that are associated to the cluster. - x-nullable: true - - import-cluster-params: - type: object - required: - - name - - api_vip_dnsname - - openshift_cluster_id - properties: - name: - type: string - description: OpenShift cluster name. - api_vip_dnsname: - type: string - description: The domain name used to reach the OpenShift cluster API. - openshift_version: - type: string - description: Version of the OpenShift cluster. - openshift_cluster_id: - type: string - format: uuid - description: The id of the OCP cluster, that hosts will be added to - - cluster: - type: object - required: - - kind - - id - - href - - image_info - - status - - status_info - properties: - kind: - type: string - enum: ['Cluster', 'AddHostsCluster'] - description: | - Indicates the type of this object. Will be 'Cluster' if this is a complete object, - 'AddHostsCluster' for cluster that add hosts to existing OCP cluster, - high_availability_mode: - type: string - enum: ['Full', 'None'] - default: 'Full' - description: | - Guaranteed availability of the installed cluster. 'Full' installs a Highly-Available cluster - over multiple master nodes whereas 'None' installs a full cluster over one node. - id: - type: string - format: uuid - description: Unique identifier of the object. - x-go-custom-tag: gorm:"primaryKey" - href: - type: string - description: Self link. - name: - type: string - description: Name of the OpenShift cluster. - user_name: - type: string - org_id: - type: string - email_domain: - type: string - openshift_version: - type: string - description: Version of the OpenShift cluster. - ocp_release_image: - type: string - description: OpenShift release image URI. - openshift_cluster_id: - type: string - format: uuid - description: Cluster ID on OCP system. - image_info: - $ref: '#/definitions/image_info' - platform: - $ref: '#/definitions/platform' - base_dns_domain: - type: string - description: - Base domain of the cluster. All DNS records must be sub-domains of this base and include - the cluster name. - cluster_network_cidr: - type: string - description: - IP address block from which Pod IPs are allocated. This block must not overlap with - existing physical networks. These IP addresses are used for the Pod network, and if you - need to access the Pods from an external network, configure load balancers and routers to - manage the traffic. - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$' - cluster_network_host_prefix: - type: integer - description: - The subnet prefix length to assign to each individual node. For example, if - clusterNetworkHostPrefix is set to 23, then each node is assigned a /23 subnet out of the - given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) - 2) pod IPs addresses. - If you are required to provide access to nodes from an external network, configure load - balancers and routers to manage the traffic. - minimum: 1 - maximum: 128 - service_network_cidr: - type: string - description: - The IP address pool to use for service IP addresses. You can enter only one IP address - pool. If you need to access the services from an external network, configure load - balancers and routers to manage the traffic. - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$' - api_vip: - type: string - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$' - description: (DEPRECATED) The virtual IP used to reach the OpenShift cluster's API. - api_vips: - x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID" - x-nullable: true - type: array - description: - The virtual IPs used to reach the OpenShift cluster's API. Enter one IP address for - single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP - stack used). The order of stacks should be the same as order of subnets in Cluster - Networks, Service Networks, and Machine Networks. - items: - $ref: '#/definitions/api_vip' - api_vip_dns_name: - type: string - description: The domain name used to reach the OpenShift cluster API. - x-nullable: true - machine_network_cidr: - type: string - description: - A CIDR that all hosts belonging to the cluster should have an interfaces with IP address - that belongs to this CIDR. The api_vip belongs to this CIDR. - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$' - ingress_vip: - type: string - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$' - description: (DEPRECATED) The virtual IP used for cluster ingress traffic. - ingress_vips: - x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID" - x-nullable: true - type: array - description: - The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack - clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). - The order of stacks should be the same as order of subnets in Cluster Networks, Service - Networks, and Machine Networks. - items: - $ref: '#/definitions/ingress_vip' - ssh_public_key: - type: string - description: SSH public key for debugging OpenShift nodes. - http_proxy: - type: string - description: | - A proxy URL to use for creating HTTP connections outside the cluster. - http://\:\@\:\ - https_proxy: - type: string - description: | - A proxy URL to use for creating HTTPS connections outside the cluster. - http://\:\@\:\ - x-go-custom-tag: gorm:"column:https_proxy" - no_proxy: - type: string - description: - A comma-separated list of destination domain names, domains, IP addresses, or other - network CIDRs to exclude from proxying. - status: - type: string - description: Status of the OpenShift cluster. - enum: - - insufficient - - ready - - error - - preparing-for-installation - - pending-for-input - - installing - - finalizing - - installed - - adding-hosts - - cancelled - - installing-pending-user-action - status_info: - type: string - x-go-custom-tag: gorm:"type:varchar(2048)" - description: Additional information pertaining to the status of the OpenShift cluster. - status_updated_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: The last time that the cluster status was updated. - progress: - $ref: '#/definitions/cluster-progress-info' - description: Installation progress percentages of the cluster. - disk_encryption: - $ref: '#/definitions/disk-encryption' - description: Information regarding hosts' installation disks encryption. - hosts: - x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID" - type: array - description: Hosts that are associated with this cluster. - items: - $ref: '#/definitions/host' - ready_host_count: - type: integer - format: int64 - description: hosts associated to this cluster that are in 'known' state. - x-go-custom-tag: gorm:"-" - enabled_host_count: - type: integer - format: int64 - description: hosts associated to this cluster that are not in 'disabled' state. - x-go-custom-tag: gorm:"-" - total_host_count: - type: integer - format: int64 - description: All hosts associated to this cluster. - x-go-custom-tag: gorm:"-" - schedulable_masters: - type: boolean - description: Schedule workloads on masters - default: false - schedulable_masters_forced_true: - type: boolean - description: | - Indicates if schedule workloads on masters will be enabled regardless the value of 'schedulable_masters' property. - Set to 'true' when not enough hosts are associated with this cluster to disable the scheduling on masters. - default: true - updated_at: - type: string - format: date-time - x-go-type: - type: Time - import: - package: time - hints: - noValidation: true - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: The last time that this cluster was updated. - created_at: - type: string - format: date-time - x-go-type: - type: Time - import: - package: time - hints: - noValidation: true - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: The time that this cluster was created. - install_started_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: The time that this cluster started installation. - install_completed_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: The time that this cluster completed installation. - host_networks: - type: array - items: - $ref: '#/definitions/host_network' - x-go-custom-tag: gorm:"-" - x-nullable: true - description: List of host networks to be filled during query. - pull_secret_set: - type: boolean - description: True if the pull secret has been added to the cluster. - vip_dhcp_allocation: - type: boolean - description: Indicate if virtual IP DHCP allocation mode is enabled. - x-nullable: true - validations_info: - type: string - description: - JSON-formatted string containing the validation results for each validation id grouped by - category (network, hosts-data, etc.) - x-go-custom-tag: gorm:"type:text" - logs_info: - $ref: '#/definitions/logs_state' - description: The progress of log collection or empty if logs are not applicable - install_config_overrides: - x-go-custom-tag: gorm:"type:text" - type: string - description: - JSON-formatted string containing the user overrides for the install-config.yaml file. - example: '{"networking":{"networkType": "OVNKubernetes"},"fips":true}' - controller_logs_collected_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - controller_logs_started_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - connectivity_majority_groups: - type: string - description: Json formatted string containing the majority groups for connectivity checks. - x-go-custom-tag: gorm:"type:text" - ip_collisions: - type: string - description: Json formatted string containing ip collisions detected in the cluster. - x-go-custom-tag: gorm:"type:text" - ignored_host_validations: - type: string - description: - Json formatted string containing a list of host validations to be ignored. May also - contain a list with a single string "all" to ignore all host validations. Some validations - cannot be ignored. - x-go-custom-tag: gorm:"type:text" - ignored_cluster_validations: - type: string - description: - Json formatted string containing a list of cluster validations to be ignored. May also - contain a list with a single string "all" to ignore all cluster validations. Some - validations cannot be ignored. - x-go-custom-tag: gorm:"type:text" - deleted_at: - description: swagger:ignore - x-go-custom-tag: gorm:"type:timestamp with time zone;index" - x-nullable: false - x-go-type: - type: DeletedAt - import: - package: gorm.io/gorm - hints: - noValidation: true - user_managed_networking: - type: boolean - x-nullable: true - description: Indicate if the networking is managed by the user. - additional_ntp_source: - type: string - description: - A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - monitored_operators: - x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID" - type: array - description: Operators that are associated with this cluster. - items: - $ref: '#/definitions/monitored-operator' - ams_subscription_id: - type: string - format: uuid - description: Unique identifier of the AMS subscription in OCM. - hyperthreading: - type: string - enum: ['masters', 'workers', 'all', 'none'] - description: Enable/disable hyperthreading on master nodes, worker nodes, or all nodes - feature_usage: - type: string - description: JSON-formatted string containing the usage information by feature name - x-go-custom-tag: gorm:"type:text" - network_type: - type: string - description: The desired network type used. - enum: ['OpenShiftSDN', 'OVNKubernetes'] - x-nullable: true - cluster_networks: - x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID" - x-nullable: true - type: array - description: Cluster networks that are associated with this cluster. - items: - $ref: '#/definitions/cluster_network' - service_networks: - x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID" - x-nullable: true - type: array - description: Service networks that are associated with this cluster. - items: - $ref: '#/definitions/service_network' - machine_networks: - x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID" - x-nullable: true - type: array - description: Machine networks that are associated with this cluster. - items: - $ref: '#/definitions/machine_network' - cpu_architecture: - type: string - x-nullable: false - default: - 'x86_64' - # TODO: remove arm64 when AI moves to using aarch64 - enum: ['x86_64', 'aarch64', 'arm64', 'ppc64le', 's390x', 'multi'] - description: The CPU architecture of the image (x86_64/arm64/etc). - ignition_endpoint: - $ref: '#/definitions/ignition-endpoint' - description: Explicit ignition endpoint overrides the default ignition endpoint. - imported: - type: boolean - default: false - description: |- - Indicates whether this cluster is an imported day-2 cluster or a - regular cluster. Clusters are considered imported when they are - created via the ../clusters/import endpoint. Day-2 clusters converted - from day-1 clusters by kube-api controllers or the - ../clusters//actions/allow-add-hosts endpoint are not - considered imported. Imported clusters usually lack a lot of - information and are filled with default values that don't necessarily - reflect the actual cluster they represent - tags: - type: string - description: A comma-separated list of tags that are associated to the cluster. - - ignition-endpoint: - type: object - description: Explicit ignition endpoint overrides the default ignition endpoint. - x-go-custom-tag: gorm:"embedded;embeddedPrefix:ignition_endpoint_" - properties: - url: - type: string - description: The URL for the ignition endpoint. - x-nullable: true - ca_certificate: - type: string - x-nullable: true - description: base64 encoded CA certficate to be used when contacting the URL via https. - - platform: - type: object - x-go-custom-tag: gorm:"embedded;embeddedPrefix:platform_" - description: The configuration for the specific platform upon which to perform the installation. - required: - - type - properties: - type: - $ref: '#/definitions/platform_type' - is_external: - description: Indicates if the underlying platform type is external. - readOnly: true - type: boolean - - image_info: - type: object - x-go-custom-tag: gorm:"embedded;embeddedPrefix:image_" - properties: - ssh_public_key: - type: string - description: SSH public key for debugging the installation. - size_bytes: - type: integer - minimum: 0 - download_url: - type: string - generator_version: - type: string - description: Image generator version. - created_at: - type: string - format: date-time - x-go-type: - type: Time - import: - package: time - hints: - noValidation: true - x-go-custom-tag: gorm:"type:timestamp with time zone" - expires_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - static_network_config: - type: string - description: - static network configuration string in the format expected by discovery ignition - generation - type: - $ref: '#/definitions/image_type' - - host_static_network_config: - type: object - properties: - network_yaml: - type: string - description: yaml string that can be processed by nmstate - mac_interface_map: - $ref: '#/definitions/mac_interface_map' - description: mapping of host macs to logical interfaces used in the network yaml - - mac_interface_map: - type: array - items: - type: object - properties: - mac_address: - type: string - pattern: '^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$' - description: mac address present on the host - logical_nic_name: - type: string - description: nic name used in the yaml, which relates 1:1 to the mac address - - image_type: - type: string - enum: [full-iso, minimal-iso] - - free-addresses-list: - type: array - items: - type: string - format: ipv4 - - cluster-list: - type: array - items: - $ref: '#/definitions/cluster' - - host_network: - type: object - properties: - cidr: - type: string - host_ids: - type: array - items: - type: string - format: uuid - - l2-connectivity: - type: object - properties: - outgoing_nic: - type: string - outgoing_ip_address: - type: string - remote_ip_address: - type: string - remote_mac: - type: string - successful: - type: boolean - - l3-connectivity: - type: object - properties: - outgoing_nic: - type: string - remote_ip_address: - type: string - successful: - type: boolean - average_rtt_ms: - type: number - format: double - description: Average round trip time in milliseconds. - x-go-name: 'AverageRTTMs' - packet_loss_percentage: - type: number - format: double - description: Percentage of packets lost during connectivity check. - - connectivity-remote-host: - type: object - properties: - host_id: - type: string - format: uuid - l2_connectivity: - type: array - items: - $ref: '#/definitions/l2-connectivity' - l3_connectivity: - type: array - items: - $ref: '#/definitions/l3-connectivity' - - # Return value of connectivity check - connectivity-report: - type: object - properties: - remote_hosts: - type: array - items: - $ref: '#/definitions/connectivity-remote-host' - - ingress-cert-params: - type: string - - completion-params: - type: object - required: - - is_success - properties: - is_success: - type: boolean - error_info: - type: string - data: - type: object - description: additional data from the cluster - additionalProperties: - type: object - - host-progress: - type: object - properties: - current_stage: - $ref: '#/definitions/host-stage' - progress_info: - type: string - x-go-custom-tag: gorm:"type:varchar(2048)" - - host-progress-info: - type: object - x-go-custom-tag: gorm:"embedded;embeddedPrefix:progress_" - properties: - installation_percentage: - type: integer - current_stage: - $ref: '#/definitions/host-stage' - progress_info: - type: string - x-go-custom-tag: gorm:"type:varchar(2048)" - stage_started_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: Time at which the current progress stage started. - stage_updated_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: Time at which the current progress stage was last updated. - - cluster-progress-info: - type: object - x-go-custom-tag: gorm:"embedded;embeddedPrefix:progress_" - properties: - total_percentage: - type: integer - preparing_for_installation_stage_percentage: - type: integer - installing_stage_percentage: - type: integer - finalizing_stage_percentage: - type: integer - - disk-encryption: - type: object - x-go-custom-tag: gorm:"embedded;embeddedPrefix:disk_encryption_" - properties: - enable_on: - type: string - description: Enable/disable disk encryption on master nodes, worker nodes, or all nodes. - enum: ['none', 'all', 'masters', 'workers'] - default: none - mode: - type: string - description: The disk encryption mode to use. - enum: ['tpmv2', 'tang'] - default: tpmv2 - tang_servers: - type: string - description: - JSON-formatted string containing additional information regarding tang's configuration - example: - '[{"url":"http://tang.example.com:7500","thumbprint":"PLjNyRdGw03zlRoGjQYMahSZGu9"}, - {"url":"http://tang.example.com:7501","thumbprint":"PLjNyRdGw03zlRoGjQYMahSZGu8"}]' - x-go-custom-tag: gorm:"type:text" - - host-stage: - type: string - enum: - - Starting installation - - Waiting for control plane - - Waiting for bootkube - - Waiting for controller - - Installing - - Writing image to disk - - Rebooting - - Waiting for ignition - - Configuring - - Joined - - Done - - Failed - - error: - type: object - required: - - kind - - id - - href - - code - - reason - properties: - kind: - type: string - enum: ['Error'] - description: Indicates the type of this object. Will always be 'Error'. - id: - type: integer - format: int32 - description: Numeric identifier of the error. - minimum: 400 - maximum: 504 - href: - type: string - description: Self link. - code: - type: string - description: - Globally unique code of the error, composed of the unique identifier of the API and the - numeric identifier of the error. For example, if the numeric identifier of the error is 93 - and the identifier of the API is assisted_install then the code will be - ASSISTED-INSTALL-93. - reason: - type: string - description: Human-readable description of the error. - - cluster_default_config: - type: object - properties: - cluster_network_cidr: - type: string - pattern: '^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[\/]([1-9]|[1-2][0-9]|3[0-2]?)$' - cluster_network_host_prefix: - type: integer - minimum: 1 - maximum: 32 - inactive_deletion_hours: - type: integer - service_network_cidr: - type: string - pattern: '^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[\/]([1-9]|[1-2][0-9]|3[0-2]?)$' - ntp_source: - type: string - x-omitempty: false - cluster_networks_ipv4: - type: array - items: - $ref: '#/definitions/cluster_network' - cluster_networks_dualstack: - type: array - items: - $ref: '#/definitions/cluster_network' - service_networks_ipv4: - type: array - items: - $ref: '#/definitions/service_network' - service_networks_dualstack: - type: array - items: - $ref: '#/definitions/service_network' - forbidden_hostnames: - description: - This provides a list of forbidden hostnames. If this list is empty or not present, this - implies that the UI should fall back to a hard coded list. - type: array - items: - type: string - - infra_error: - type: object - required: - - code - - message - properties: - code: - type: integer - format: int32 - description: Numeric identifier of the error. - minimum: 401 - maximum: 403 - message: - type: string - description: Human-readable description of the error. - - interface: - type: object - properties: - ipv6_addresses: - type: array - items: - type: string - vendor: - type: string - name: - type: string - has_carrier: - type: boolean - product: - type: string - mtu: - type: integer - ipv4_addresses: - type: array - items: - type: string - biosdevname: - type: string - client_id: - type: string - mac_address: - type: string - flags: - type: array - items: - type: string - speed_mbps: - type: integer - type: - type: string - - disk: - type: object - properties: - id: - type: string - description: - Determine the disk's unique identifier which is the by-id field if it exists and fallback - to the by-path field otherwise - drive_type: - $ref: '#/definitions/drive_type' - has_uuid: - type: boolean - vendor: - type: string - name: - type: string - path: - type: string - hctl: - type: string - by_path: - type: string - description: by-path is the shortest physical path to the device - by_id: - type: string - description: - by-id is the World Wide Number of the device which guaranteed to be unique for every - storage device - model: - type: string - wwn: - type: string - serial: - type: string - size_bytes: - type: integer - bootable: - type: boolean - removable: - type: boolean - is_installation_media: - type: boolean - description: Whether the disk appears to be an installation media or not - installation_eligibility: - x-nullable: false - type: object - properties: - eligible: - type: boolean - description: Whether the disk is eligible for installation or not. - not_eligible_reasons: - type: array - description: Reasons for why this disk is not eligible for installation. - items: - type: string - smart: - type: string - io_perf: - $ref: '#/definitions/io_perf' - holders: - type: string - description: A comma-separated list of disk names that this disk belongs to - - drive_type: - type: string - enum: - - Unknown - - HDD - - FDD - - ODD - - SSD - - virtual - - Multipath - - iSCSI - - FC - - LVM - - RAID - - io_perf: - type: object - properties: - sync_duration: - type: integer - description: 99th percentile of fsync duration in milliseconds - - boot: - type: object - properties: - current_boot_mode: - type: string - pxe_interface: - type: string - - system_vendor: - type: object - properties: - serial_number: - type: string - product_name: - type: string - manufacturer: - type: string - virtual: - type: boolean - description: Whether the machine appears to be a virtual machine or not - - memory: - type: object - properties: - physical_bytes: - type: integer - usable_bytes: - type: integer - physical_bytes_method: - description: The method by which the physical memory was set - $ref: '#/definitions/memory_method' - - cpu: - type: object - properties: - count: - type: integer - frequency: - type: number - flags: - type: array - items: - type: string - model_name: - type: string - architecture: - type: string - - gpu: - type: object - properties: - vendor: - type: string - description: The name of the device vendor (for example "Intel Corporation") - vendor_id: - type: string - description: ID of the vendor (for example "8086") - device_id: - type: string - description: ID of the device (for example "3ea0") - name: - type: string - description: Product name of the device (for example "UHD Graphics 620 (Whiskey Lake)") - address: - type: string - description: Device address (for example "0000:00:02.0") - - route: - type: object - properties: - interface: - type: string - description: Interface to which packets for this route will be sent - gateway: - type: string - description: Gateway address where the packets are sent - destination: - type: string - description: The destination network or destination host - family: - type: integer - format: int32 - description: Defines whether this is an IPv4 (4) or IPv6 route (6) - metric: - type: integer - format: int32 - description: Route priority metric - - inventory: - type: object - properties: - hostname: - type: string - bmc_address: - type: string - interfaces: - type: array - items: - $ref: '#/definitions/interface' - disks: - type: array - items: - $ref: '#/definitions/disk' - boot: - $ref: '#/definitions/boot' - system_vendor: - $ref: '#/definitions/system_vendor' - bmc_v6address: - type: string - memory: - $ref: '#/definitions/memory' - cpu: - $ref: '#/definitions/cpu' - gpus: - type: array - items: - $ref: '#/definitions/gpu' - routes: - type: array - items: - $ref: '#/definitions/route' - tpm_version: - type: string - enum: ['none', '1.2', '2.0'] - - free_network_addresses: - type: object - properties: - network: - type: string - pattern: '^([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]|[1-2][0-9]|3[0-2]?$' - free_addresses: - type: array - items: - type: string - format: ipv4 - - free_networks_addresses: - type: array - items: - $ref: '#/definitions/free_network_addresses' - - free_addresses_request: - type: array - items: - type: string - pattern: '^([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]|[1-2][0-9]|3[0-2]?$' - - download_boot_artifacts_request: - type: object - description: - Information sent to the agent for downloading artifacts to boot a host into discovery. - required: - - kernel_url - - rootfs_url - - initrd_url - - host_fs_mount_dir - properties: - kernel_url: - type: string - description: URL address to download the kernel. - rootfs_url: - type: string - description: URL address to download the rootfs. - initrd_url: - type: string - description: URL address to download the initrd. - host_fs_mount_dir: - type: string - description: |- - The base directory on the host that contains the /boot folder. The host will download boot - artifacts into a folder in this directory. - - reboot_for_reclaim_request: - type: object - description: Information sent to the agent for rebooting a host into discovery. - required: - - host_fs_mount_dir - properties: - host_fs_mount_dir: - type: string - description: |- - The base directory on the host that contains the /boot folder. The host needs to - chroot into this directory in order to properly reboot. - - api_vip_connectivity_request: - type: object - required: - - url - properties: - url: - type: string - description: URL address of the API. - verify_cidr: - type: boolean - description: Whether to verify if the API VIP belongs to one of the interfaces (DEPRECATED). - ca_certificate: - type: string - x-nullable: true - description: A CA certficate to be used when contacting the URL via https. - ignition_endpoint_token: - x-nullable: true - type: string - description: - A string which will be used as Authorization Bearer token to fetch the ignition from - ignition_endpoint_url. - - api_vip_connectivity_response: - type: object - description: |- - The response from the day-2 agent's attempt to download the worker ignition file from the API machine config server of the target cluster. - Note - the name "API VIP connectivity" is old and misleading and is preserved for backwards compatibility. - properties: - is_success: - type: boolean - description: Whether the agent was able to download the ignition or not - url: - type: string - description: - This parameter mirrors the url parameter of the corresponding api_vip_connectivity_request - download_error: - type: string - description: - The error that occurred while downloading the worker ignition file, ignored when - is_success is true - ignition: - type: string - description: |- - Ignition file fetched from the target cluster's API machine config server. - This ignition file may be incomplete as almost all files / systemd units are removed from it by the agent in order to save space. - - tang_connectivity_request: - type: object - required: - - tang_servers - properties: - tang_servers: - type: string - description: - JSON-formatted string containing additional information regarding tang's configuration - - tang_connectivity_response: - type: object - properties: - is_success: - type: boolean - description: Tang check result. - tang_server_response: - type: array - items: - x-go-name: TangServerResponse - type: object - properties: - tang_url: - type: string - description: Tang URL. - payload: - type: string - description: Tang response payload. - signatures: - type: array - items: - x-go-name: TangServerSignatures - type: object - properties: - protected: - type: string - signature: - type: string - - disk_speed_check_request: - type: object - required: - - path - properties: - path: - type: string - description: --filename argument for fio (expects a file or a block device path). - - disk_speed_check_response: - type: object - properties: - io_sync_duration: - type: integer - description: The 99th percentile of fdatasync durations in milliseconds. - path: - type: string - description: The device path. - - domain_resolution_request: - type: object - required: - - domains - properties: - domains: - type: array - items: - x-go-name: DomainResolutionRequestDomain - type: object - required: - - domain_name - properties: - domain_name: - pattern: '^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*[.])+[a-zA-Z]{2,}[.]?$' - description: 'The domain name that should be resolved' - type: string - - domain_resolution_response: - type: object - required: - - resolutions - properties: - resolutions: - type: array - items: - x-go-name: DomainResolutionResponseDomain - type: object - required: - - domain_name - properties: - domain_name: - type: string - description: 'The domain that was resolved' - ipv4_addresses: - type: array - description: 'The IPv4 addresses of the domain, empty if none' - items: - type: string - format: ipv4 - ipv6_addresses: - type: array - description: 'The IPv6 addresses of the domain, empty if none' - items: - type: string - format: ipv6 - - disk_speed: - type: object - properties: - tested: - type: boolean - exit_code: - type: integer - speed_ms: - type: integer - - disk_info: - type: object - properties: - id: - type: string - format: uuid - path: - type: string - disk_speed: - $ref: '#/definitions/disk_speed' - - platform_type: - type: string - enum: - - baremetal - - nutanix - - vsphere - - none - - oci - - memory_method: - type: string - enum: - - dmidecode - - ghw - - meminfo - - credentials: - type: object - properties: - username: - type: string - password: - type: string - console_url: - type: string - - disk-config-params: - type: object - required: - - 'id' - properties: - id: - type: string - role: - $ref: '#/definitions/disk-role' - - disk-skip-formatting-params: - type: object - description: - Allows an addition or removal of a host disk from the host's skip_formatting_disks list - required: - - 'disk_id' - - 'skip_formatting' - properties: - disk_id: - type: string - description: - The ID of the disk that is being added to or removed from the host's skip_formatting_disks - list - skip_formatting: - type: boolean - description: - True if you wish to add the disk to the skip_formatting_disks list, false if you wish to - remove it - - disk-role: - type: string - enum: - - 'none' - - 'install' - - node-label-params: - type: object - required: - - 'key' - - 'value' - properties: - key: - description: The key for the label's key-value pair. - type: string - value: - description: The value for the label's key-value pair. - type: string - - host-role-update-params: - type: string - enum: - - 'auto-assign' - - 'master' - - 'worker' - - host-role: - type: string - enum: - - 'auto-assign' - - 'master' - - 'worker' - - 'bootstrap' - - host-validation-id: - type: string - enum: - - 'connected' - - 'media-connected' - - 'has-inventory' - - 'has-min-cpu-cores' - - 'has-min-valid-disks' - - 'has-min-memory' - - 'machine-cidr-defined' - - 'has-cpu-cores-for-role' - - 'has-memory-for-role' - - 'hostname-unique' - - 'hostname-valid' - - 'belongs-to-machine-cidr' - - 'ignition-downloadable' - - 'belongs-to-majority-group' - - 'valid-platform-network-settings' - - 'ntp-synced' - - 'time-synced-between-host-and-service' - - 'container-images-available' - - 'lso-requirements-satisfied' - - 'ocs-requirements-satisfied' - - 'odf-requirements-satisfied' - - 'lvm-requirements-satisfied' - - 'mce-requirements-satisfied' - - 'sufficient-installation-disk-speed' - - 'cnv-requirements-satisfied' - - 'sufficient-network-latency-requirement-for-role' - - 'sufficient-packet-loss-requirement-for-role' - - 'has-default-route' - - 'api-domain-name-resolved-correctly' - - 'api-int-domain-name-resolved-correctly' - - 'apps-domain-name-resolved-correctly' - - 'release-domain-name-resolved-correctly' - - 'compatible-with-cluster-platform' - - 'dns-wildcard-not-configured' - - 'disk-encryption-requirements-satisfied' - - 'non-overlapping-subnets' - - 'vsphere-disk-uuid-enabled' - - 'compatible-agent' - - 'no-skip-installation-disk' - - 'no-skip-missing-disk' - - 'no-ip-collisions-in-network' - - dhcp_allocation_request: - type: object - required: - - interface - - api_vip_mac - - ingress_vip_mac - properties: - interface: - type: string - description: The network interface (NIC) to run the DHCP requests on. - api_vip_mac: - type: string - format: mac - description: MAC address for the API virtual IP. - ingress_vip_mac: - type: string - format: mac - description: MAC address for the Ingress virtual IP. - api_vip_lease: - type: string - description: Contents of lease file to be used for API virtual IP. - ingress_vip_lease: - type: string - description: Contents of lease file to be used for for Ingress virtual IP. - - dhcp_allocation_response: - type: object - required: - - api_vip_address - - ingress_vip_address - properties: - api_vip_address: - type: string - format: ipv4 - description: The IPv4 address that was allocated by DHCP for the API virtual IP. - ingress_vip_address: - type: string - format: ipv4 - description: The IPv4 address that was allocated by DHCP for the Ingress virtual IP. - api_vip_lease: - type: string - description: Contents of last acquired lease for API virtual IP. - ingress_vip_lease: - type: string - description: Contents of last acquired lease for Ingress virtual IP. - - next_step_cmd_request: - type: object - required: - - infra_env_id - - host_id - - agent_version - properties: - infra_env_id: - type: string - format: uuid - description: Infra env id - host_id: - type: string - format: uuid - description: Host id - agent_version: - pattern: '^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$' - type: string - description: Agent image version - - logs_gather_cmd_request: - type: object - required: - - cluster_id - - infra_env_id - - host_id - - bootstrap - - installer_gather - properties: - cluster_id: - type: string - format: uuid - description: Cluster id - infra_env_id: - type: string - format: uuid - description: Infra env id - host_id: - type: string - format: uuid - description: Host id - bootstrap: - type: boolean - description: Host is bootstrap or not - installer_gather: - type: boolean - description: Run installer gather logs - default: true - master_ips: - type: array - description: List of master ips - items: - type: string - description: Master ip. - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$' - - install_cmd_request: - type: object - required: - - cluster_id - - infra_env_id - - host_id - - role - - boot_device - - controller_image - - installer_image - properties: - cluster_id: - type: string - format: uuid - description: Cluster id - infra_env_id: - type: string - format: uuid - description: Infra env id - host_id: - type: string - format: uuid - description: Host id - role: - $ref: '#/definitions/host-role' - boot_device: - type: string - description: Boot device to write image on - controller_image: - pattern: '^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$' - type: string - description: Assisted installer controller image - installer_image: - pattern: '^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$' - type: string - description: Assisted installer image - high_availability_mode: - type: string - enum: ['Full', 'None'] - default: 'Full' - description: | - Guaranteed availability of the installed cluster. 'Full' installs a Highly-Available cluster - over multiple master nodes whereas 'None' installs a full cluster over one node. - proxy: - $ref: '#/definitions/proxy' - check_cvo: - type: boolean - description: Check CVO status if needed - default: true - disks_to_format: - type: array - description: List of disks to format - items: - type: string - description: Disk to format - must_gather_image: - type: string - description: Must-gather images to use - mco_image: - pattern: '^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$' - type: string - description: Machine config operator image - openshift_version: - type: string - description: Version of the OpenShift cluster. - service_ips: - type: array - description: List of service ips - items: - type: string - description: Service ip. - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$' - installer_args: - type: string - description: Core-os installer addtional args - skip_installation_disk_cleanup: - type: boolean - description: Skip formatting installation disk - - ntp_synchronization_request: - type: object - required: - - ntp_source - properties: - ntp_source: - type: string - description: - A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - - ntp_synchronization_response: - properties: - ntp_sources: - type: array - items: - $ref: '#/definitions/ntp_source' - - ntp_source: - type: object - properties: - source_name: - type: string - description: NTP source name or IP. - source_state: - description: Indication of state of an NTP source. - $ref: '#/definitions/source_state' - - container_image_availability_request: - type: object - required: - - images - properties: - timeout: - type: integer - description: Positive number represents a timeout in seconds for a pull operation. - images: - type: array - description: List of image names to be checked. - items: - pattern: '^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$' - type: string - description: A fully qualified image name (FQIN). - - container_image_availability_response: - type: object - required: - - images - properties: - images: - type: array - description: List of images that were checked. - items: - $ref: '#/definitions/container_image_availability' - - container_image_availability: - type: object - properties: - name: - type: string - description: A fully qualified image name (FQIN). - size_bytes: - type: number - description: Size of the image in bytes. - time: - type: number - description: Seconds it took to pull the image. - download_rate: - type: number - description: The rate of size/time in seconds MBps. - result: - $ref: '#/definitions/container_image_availability_result' - - container_image_availability_result: - type: string - enum: ['success', 'failure'] - description: Image availability result. - - upgrade_agent_request: - type: object - properties: - agent_image: - type: string - description: | - Full image reference of the image that the agent should upgrade to, for example - `quay.io/registry-proxy.engineering.redhat.com/rh-osbs/openshift4-assisted-installer-agent-rhel8:v1.0.0-142`. - - upgrade_agent_response: - type: object - properties: - agent_image: - type: string - description: | - Full image reference of the image that the agent has upgraded to, for example - `quay.io/registry-proxy.engineering.redhat.com/rh-osbs/openshift4-assisted-installer-agent-rhel8:v1.0.0-142`. - result: - $ref: '#/definitions/upgrade_agent_result' - - upgrade_agent_result: - type: string - enum: ['success', 'failure'] - description: Agent upgrade result. - - vip_type: - type: string - description: The vip type. - enum: ['api', 'ingress'] - - verify_vip: - type: object - description: Request to verify single vip. - properties: - vip: - $ref: '#/definitions/ip' - vip_type: - $ref: '#/definitions/vip_type' - - verified_vip: - type: object - description: Single VIP verification result. - properties: - vip: - $ref: '#/definitions/ip' - vip_type: - $ref: '#/definitions/vip_type' - verification: - $ref: '#/definitions/vip_verification' - - verify_vips_request: - type: array - description: list of vips to be verified. - items: - $ref: '#/definitions/verify_vip' - - verify_vips_response: - type: array - description: list of verified vips. - items: - $ref: '#/definitions/verified_vip' - - source_state: - type: string - enum: - - synced - - combined - - not_combined - - error - - variable - - unreachable - - cluster-validation-id: - type: string - enum: - - 'machine-cidr-defined' - - 'cluster-cidr-defined' - - 'service-cidr-defined' - - 'no-cidrs-overlapping' - - 'networks-same-address-families' - - 'network-prefix-valid' - - 'machine-cidr-equals-to-calculated-cidr' - - 'api-vips-defined' - - 'api-vips-valid' - - 'ingress-vips-defined' - - 'ingress-vips-valid' - - 'all-hosts-are-ready-to-install' - - 'sufficient-masters-count' - - 'dns-domain-defined' - - 'pull-secret-set' - - 'ntp-server-configured' - - 'lso-requirements-satisfied' - - 'ocs-requirements-satisfied' - - 'odf-requirements-satisfied' - - 'cnv-requirements-satisfied' - - 'lvm-requirements-satisfied' - - 'mce-requirements-satisfied' - - 'network-type-valid' - - logs_type: - type: string - enum: - - 'host' - - 'controller' - - 'all' - - '' - - logs_state: - x-go-custom-tag: gorm:"type:varchar(2048)" - type: string - enum: - - 'requested' - - 'collecting' - - 'completed' - - 'timeout' - - '' - - logs-progress-params: - type: object - required: - - logs_state - properties: - logs_state: - description: The state of collecting logs. - $ref: '#/definitions/logs_state' - - list-manifests: - type: array - items: - $ref: '#/definitions/manifest' - - manifest: - type: object - properties: - folder: - description: - The folder that contains the files. Manifests can be placed in 'manifests' or 'openshift' - directories. - type: string - enum: [manifests, openshift] - file_name: - type: string - description: The file name prefaced by the folder that contains it. - - create-manifest-params: - type: object - properties: - folder: - description: - The folder that contains the files. Manifests can be placed in 'manifests' or 'openshift' - directories. - type: string - enum: [manifests, openshift] - default: manifests - file_name: - description: The name of the manifest to customize the installed OCP cluster. - type: string - pattern: '^[^/]*\.(yaml|yml|json)$' - content: - description: base64 encoded manifest content. - type: string - required: - - file_name - - content - - update-manifest-params: - type: object - properties: - folder: - description: The folder for the manifest to modify. - type: string - enum: [manifests, openshift] - default: manifests - x-nullable: false - file_name: - description: The file name for the manifest to modify. - type: string - pattern: '^[^/]*\.(yaml|yml|json)$' - x-nullable: false - updated_folder: - description: - The new folder for the manifest. Manifests can be placed in 'manifests' or 'openshift' - directories. - type: string - enum: [manifests, openshift] - default: manifests - x-nullable: true - updated_file_name: - description: The new file name for the manifest. - type: string - pattern: '^[^/]*\.(yaml|yml|json)$' - x-nullable: true - updated_content: - description: The new base64 encoded manifest content. - type: string - x-nullable: true - required: - - folder - - file_name - - host-ignition-params: - properties: - config: - type: string - - openshift-version: - type: object - required: - - display_name - - support_level - - cpu_architectures - properties: - display_name: - type: string - description: Name of the version to be presented to the user. - support_level: - type: string - enum: [beta, production, maintenance] - description: Level of support of the version. - default: - type: boolean - description: Indication that the version is the recommended one. - cpu_architectures: - type: array - items: - type: string - description: Available CPU architectures. - - os-image: - type: object - required: - - openshift_version - - cpu_architecture - - url - - version - properties: - openshift_version: - type: string - description: Version of the operating system image - example: '4.12' - cpu_architecture: - type: string - default: - 'x86_64' - # TODO: remove arm64 when AI moves to using aarch64 - enum: ['x86_64', 'aarch64', 'arm64', 'ppc64le', 's390x'] - description: The CPU architecture of the image (x86_64/arm64/etc). - x-go-custom-tag: gorm:"default:'x86_64'" - url: - type: string - description: The base OS image used for the discovery iso. - version: - type: string - description: Build ID of the OS image. - - os-images: - type: array - items: - $ref: '#/definitions/os-image' - - release-image: - type: object - required: - - openshift_version - - cpu_architecture - - url - - version - properties: - openshift_version: - type: string - description: Version of the OpenShift cluster. - cpu_architecture: - type: string - default: - 'x86_64' - # TODO: remove arm64 when AI moves to using aarch64 - enum: ['x86_64', 'aarch64', 'arm64', 'ppc64le', 's390x', 'multi'] - description: (DEPRECATED) The CPU architecture of the image (x86_64/arm64/etc). - x-go-custom-tag: gorm:"default:'x86_64'" - cpu_architectures: - type: array - items: - type: string - description: List of CPU architectures provided by the image. - url: - type: string - description: The installation image of the OpenShift cluster. - version: - type: string - description: OCP version from the release metadata. - default: - type: boolean - description: Indication that the version is the recommended one. - support_level: - type: string - enum: [beta, production, maintenance] - description: Level of support of the version. - - release-images: - type: array - items: - $ref: '#/definitions/release-image' - - kernel_argument: - type: object - description: - pair of [operation, argument] specifying the argument and what operation should be applied on - it. - properties: - operation: - type: string - enum: ['append', 'replace', 'delete'] - description: The operation to apply on the kernel argument. - value: - type: string - pattern: '^(?:(?:[^ \t\n\r"]+)|(?:"[^"]*"))+$' - description: | - Kernel argument can have the form or =. The following examples should - be supported: - rd.net.timeout.carrier=60 - isolcpus=1,2,10-20,100-2000:2/25 - quiet - The parsing by the command line parser in linux kernel is much looser and this pattern follows it. - - kernel_arguments: - description: - List of kernel arugment objects that define the operations and values to be applied. - x-omitempty: false - type: array - items: - $ref: '#/definitions/kernel_argument' - - operator-property: - type: object - properties: - name: - type: string - description: Name of the property - data_type: - type: string - enum: ['boolean', 'string', 'integer', 'float'] - description: Type of the property - mandatory: - type: boolean - description: Indicates whether the property is reqired - options: - type: array - items: - type: string - description: Values to select from - description: - type: string - description: Description of a property - default_value: - type: string - description: Default value for the property - - operator-properties: - type: array - items: - $ref: '#/definitions/operator-property' - - usage: - type: object - properties: - id: - type: string - description: Unique idenftifier of the feature - name: - type: string - description: name of the feature to track - data: - type: object - description: additional properties of the feature - additionalProperties: - type: object - - infra-env: - type: object - required: - - kind - - id - - href - - name - - type - - updated_at - - created_at - properties: - kind: - type: string - enum: ['InfraEnv'] - description: Indicates the type of this object. - id: - type: string - format: uuid - description: Unique identifier of the object. - x-go-custom-tag: gorm:"primaryKey" - href: - type: string - description: Self link. - openshift_version: - type: string - description: - Version of the OpenShift cluster (used to infer the RHCOS version - temporary until - generic logic implemented). - name: - type: string - description: Name of the infra-env. - user_name: - type: string - org_id: - type: string - email_domain: - type: string - proxy: - $ref: '#/definitions/proxy' - additional_ntp_sources: - type: string - description: - A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - ssh_authorized_key: - type: string - description: SSH public key for debugging the installation. - pull_secret_set: - type: boolean - description: True if the pull secret has been added to the cluster. - static_network_config: - type: string - description: - static network configuration string in the format expected by discovery ignition - generation. - type: - $ref: '#/definitions/image_type' - ignition_config_override: - type: string - description: - Json formatted string containing the user overrides for the initial ignition config. - cluster_id: - type: string - format: uuid - description: If set, all hosts that register will be associated with the specified cluster. - x-go-custom-tag: gorm:"index" - size_bytes: - type: integer - minimum: 0 - download_url: - type: string - generator_version: - type: string - description: Image generator version. - updated_at: - type: string - format: date-time - x-go-type: - type: Time - import: - package: time - hints: - noValidation: true - x-go-custom-tag: gorm:"type:timestamp with time zone" - description: The last time that this infra-env was updated. - created_at: - type: string - format: date-time - x-go-type: - type: Time - import: - package: time - hints: - noValidation: true - x-go-custom-tag: gorm:"type:timestamp with time zone" - expires_at: - type: string - format: date-time - x-go-custom-tag: gorm:"type:timestamp with time zone" - cpu_architecture: - type: string - x-nullable: false - default: - 'x86_64' - # TODO: remove arm64 when AI moves to using aarch64 - enum: ['x86_64', 'aarch64', 'arm64', 'ppc64le', 's390x'] - description: The CPU architecture of the image (x86_64/arm64/etc). - kernel_arguments: - type: string - x-nullable: true - x-go-custom-tag: gorm:"type:text" - description: JSON formatted string array representing the discovery image kernel arguments. - additional_trust_bundle: - type: string - x-nullable: false - description: |- - PEM-encoded X.509 certificate bundle. Hosts discovered by this - infra-env will trust the certificates in this bundle. Clusters formed - from the hosts discovered by this infra-env will also trust the - certificates in this bundle. - proxy: - type: object - x-go-custom-tag: gorm:"embedded;embeddedPrefix:proxy_" - properties: - http_proxy: - type: string - description: | - A proxy URL to use for creating HTTP connections outside the cluster. - http://\:\@\:\ - x-nullable: true - https_proxy: - type: string - description: | - A proxy URL to use for creating HTTPS connections outside the cluster. - http://\:\@\:\ - x-nullable: true - x-go-custom-tag: gorm:"column:https_proxy" - no_proxy: - type: string - description: - An "*" or a comma-separated list of destination domain names, domains, IP addresses, or - other network CIDRs to exclude from proxying. - x-nullable: true - - infra-env-list: - type: array - items: - $ref: '#/definitions/infra-env' - - infra-env-create-params: - type: object - required: - - name - - pull_secret - properties: - name: - type: string - description: Name of the infra-env. - proxy: - $ref: '#/definitions/proxy' - additional_ntp_sources: - type: string - description: - A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - x-nullable: true - ssh_authorized_key: - type: string - description: SSH public key for debugging the installation. - x-nullable: true - pull_secret: - type: string - description: - The pull secret obtained from Red Hat OpenShift Cluster Manager at - console.redhat.com/openshift/install/pull-secret. - static_network_config: - type: array - items: - $ref: '#/definitions/host_static_network_config' - image_type: - $ref: '#/definitions/image_type' - ignition_config_override: - type: string - description: - JSON formatted string containing the user overrides for the initial ignition config. - cluster_id: - type: string - format: uuid - description: If set, all hosts that register will be associated with the specified cluster. - x-nullable: true - openshift_version: - type: string - description: - Version of the OpenShift cluster (used to infer the RHCOS version - temporary until - generic logic implemented). - cpu_architecture: - type: string - x-nullable: false - default: - 'x86_64' - # TODO: remove arm64 when AI moves to using aarch64 - enum: ['x86_64', 'aarch64', 'arm64', 'ppc64le', 's390x'] - description: The CPU architecture of the image (x86_64/arm64/etc). - kernel_arguments: - $ref: '#/definitions/kernel_arguments' - additional_trust_bundle: - type: string - x-nullable: false - maxLength: 65535 - description: |- - PEM-encoded X.509 certificate bundle. Hosts discovered by this - infra-env will trust the certificates in this bundle. Clusters formed - from the hosts discovered by this infra-env will also trust the - certificates in this bundle. - infra-env-update-params: - type: object - properties: - proxy: - $ref: '#/definitions/proxy' - additional_ntp_sources: - type: string - description: - A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - x-nullable: true - ssh_authorized_key: - type: string - description: SSH public key for debugging the installation. - x-nullable: true - pull_secret: - type: string - description: - The pull secret obtained from Red Hat OpenShift Cluster Manager at - console.redhat.com/openshift/install/pull-secret. - static_network_config: - type: array - items: - $ref: '#/definitions/host_static_network_config' - image_type: - $ref: '#/definitions/image_type' - ignition_config_override: - type: string - description: - JSON formatted string containing the user overrides for the initial ignition config. - kernel_arguments: - $ref: '#/definitions/kernel_arguments' - additional_trust_bundle: - type: string - description: Allows users to change the additional_trust_bundle infra-env field - x-nullable: true - maxLength: 65535 - - ip: - type: string - x-go-custom-tag: gorm:"primaryKey" - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$' - - subnet: - type: string - x-go-custom-tag: gorm:"primaryKey" - pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$' - - vip_verification: - type: string - enum: ['unverified', 'failed', 'succeeded'] - description: vip verification result. - default: 'unverified' - - cluster_network: - type: object - description: - A network from which Pod IPs are allocated. This block must not overlap with existing physical - networks. These IP addresses are used for the Pod network, and if you need to access the Pods - from an external network, configure load balancers and routers to manage the traffic. - properties: - cluster_id: - type: string - format: uuid - description: The cluster that this network is associated with. - x-go-custom-tag: gorm:"primaryKey" - cidr: - $ref: '#/definitions/subnet' - description: The IP block address pool. - host_prefix: - type: integer - description: - The subnet prefix length to assign to each individual node. For example if is set to 23, - then each node is assigned a /23 subnet out of the given CIDR, which allows for 510 (2^(32 - - 23) - 2) pod IPs addresses. - minimum: 1 - maximum: 128 - - machine_network: - type: object - description: - A network that all hosts belonging to the cluster should have an interface with IP address in. - The VIPs (if exist) belong to this network. - properties: - cluster_id: - type: string - format: uuid - description: The cluster that this network is associated with. - x-go-custom-tag: gorm:"primaryKey" - cidr: - $ref: '#/definitions/subnet' - description: The IP block address pool. - - service_network: - type: object - description: IP address block for service IP blocks. - properties: - cluster_id: - type: string - format: uuid - description: - A network to use for service IP addresses. If you need to access the services from an - external network, configure load balancers and routers to manage the traffic. - x-go-custom-tag: gorm:"primaryKey" - cidr: - $ref: '#/definitions/subnet' - description: The IP block address pool. - - api_vip: - type: object - description: The virtual IP used to reach the OpenShift cluster's API. - properties: - cluster_id: - type: string - format: uuid - description: The cluster that this VIP is associated with. - x-go-custom-tag: gorm:"primaryKey" - ip: - $ref: '#/definitions/ip' - description: The IP address. - verification: - $ref: '#/definitions/vip_verification' - description: API VIP verification result. - - ingress_vip: - type: object - description: The virtual IP used for cluster ingress traffic. - properties: - cluster_id: - type: string - format: uuid - description: The cluster that this VIP is associated with. - x-go-custom-tag: gorm:"primaryKey" - ip: - $ref: '#/definitions/ip' - description: The IP address. - verification: - $ref: '#/definitions/vip_verification' - description: Ingress VIP verification result. - - bind-host-params: - required: - - cluster_id - properties: - cluster_id: - type: string - format: uuid - - presigned-url: - type: object - required: - - url - properties: - url: - type: string - description: Pre-signed URL for downloading the infra-env discovery image. - expires_at: - type: string - format: date-time - description: Expiration time for the URL token. diff --git a/libs/ui-lib/lib/common/api/types.ts b/libs/ui-lib/lib/common/api/types.ts deleted file mode 100644 index ee8e068e25..0000000000 --- a/libs/ui-lib/lib/common/api/types.ts +++ /dev/null @@ -1,2709 +0,0 @@ -/** - * The virtual IP used to reach the OpenShift cluster's API. - */ -export interface ApiVip { - /** - * The cluster that this VIP is associated with. - */ - clusterId?: string; // uuid - /** - * The IP address. - */ - ip?: Ip; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$ - /** - * API VIP verification result. - */ - verification?: VipVerification; -} -export interface ApiVipConnectivityRequest { - /** - * URL address of the API. - */ - url: string; - /** - * Whether to verify if the API VIP belongs to one of the interfaces (DEPRECATED). - */ - verifyCidr?: boolean; - /** - * A CA certficate to be used when contacting the URL via https. - */ - caCertificate?: string; - /** - * A string which will be used as Authorization Bearer token to fetch the ignition from ignitionEndpointUrl. - */ - ignitionEndpointToken?: string; -} -/** - * The response from the day-2 agent's attempt to download the worker ignition file from the API machine config server of the target cluster. - * Note - the name "API VIP connectivity" is old and misleading and is preserved for backwards compatibility. - */ -export interface ApiVipConnectivityResponse { - /** - * Whether the agent was able to download the ignition or not - */ - isSuccess?: boolean; - /** - * This parameter mirrors the url parameter of the corresponding apiVipConnectivityRequest - */ - url?: string; - /** - * The error that occurred while downloading the worker ignition file, ignored when isSuccess is true - */ - downloadError?: string; - /** - * Ignition file fetched from the target cluster's API machine config server. - * This ignition file may be incomplete as almost all files / systemd units are removed from it by the agent in order to save space. - */ - ignition?: string; -} -export type ArchitectureSupportLevelId = - | 'X86_64_ARCHITECTURE' - | 'ARM64_ARCHITECTURE' - | 'PPC64LE_ARCHITECTURE' - | 'S390X_ARCHITECTURE' - | 'MULTIARCH_RELEASE_IMAGE'; -export interface BindHostParams { - clusterId: string; // uuid -} -export interface Boot { - currentBootMode?: string; - pxeInterface?: string; -} -export interface Cluster { - /** - * Indicates the type of this object. Will be 'Cluster' if this is a complete object, - * 'AddHostsCluster' for cluster that add hosts to existing OCP cluster, - * - */ - kind: 'Cluster' | 'AddHostsCluster'; - /** - * Guaranteed availability of the installed cluster. 'Full' installs a Highly-Available cluster - * over multiple master nodes whereas 'None' installs a full cluster over one node. - * - */ - highAvailabilityMode?: 'Full' | 'None'; - /** - * Unique identifier of the object. - */ - id: string; // uuid - /** - * Self link. - */ - href: string; - /** - * Name of the OpenShift cluster. - */ - name?: string; - userName?: string; - orgId?: string; - emailDomain?: string; - /** - * Version of the OpenShift cluster. - */ - openshiftVersion?: string; - /** - * OpenShift release image URI. - */ - ocpReleaseImage?: string; - /** - * Cluster ID on OCP system. - */ - openshiftClusterId?: string; // uuid - imageInfo: ImageInfo; - platform?: Platform; - /** - * Base domain of the cluster. All DNS records must be sub-domains of this base and include the cluster name. - */ - baseDnsDomain?: string; - /** - * IP address block from which Pod IPs are allocated. This block must not overlap with existing physical networks. These IP addresses are used for the Pod network, and if you need to access the Pods from an external network, configure load balancers and routers to manage the traffic. - */ - clusterNetworkCidr?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ - /** - * The subnet prefix length to assign to each individual node. For example, if clusterNetworkHostPrefix is set to 23, then each node is assigned a /23 subnet out of the given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) - 2) pod IPs addresses. If you are required to provide access to nodes from an external network, configure load balancers and routers to manage the traffic. - */ - clusterNetworkHostPrefix?: number; - /** - * The IP address pool to use for service IP addresses. You can enter only one IP address pool. If you need to access the services from an external network, configure load balancers and routers to manage the traffic. - */ - serviceNetworkCidr?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ - /** - * (DEPRECATED) The virtual IP used to reach the OpenShift cluster's API. - */ - apiVip?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$ - /** - * The virtual IPs used to reach the OpenShift cluster's API. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks. - */ - apiVips?: ApiVip[]; - /** - * The domain name used to reach the OpenShift cluster API. - */ - apiVipDnsName?: string; - /** - * A CIDR that all hosts belonging to the cluster should have an interfaces with IP address that belongs to this CIDR. The apiVip belongs to this CIDR. - */ - machineNetworkCidr?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ - /** - * (DEPRECATED) The virtual IP used for cluster ingress traffic. - */ - ingressVip?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$ - /** - * The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks. - */ - ingressVips?: IngressVip[]; - /** - * SSH public key for debugging OpenShift nodes. - */ - sshPublicKey?: string; - /** - * A proxy URL to use for creating HTTP connections outside the cluster. - * http://\:\@\:\ - * - */ - httpProxy?: string; - /** - * A proxy URL to use for creating HTTPS connections outside the cluster. - * http://\:\@\:\ - * - */ - httpsProxy?: string; - /** - * A comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude from proxying. - */ - noProxy?: string; - /** - * Status of the OpenShift cluster. - */ - status: - | 'insufficient' - | 'ready' - | 'error' - | 'preparing-for-installation' - | 'pending-for-input' - | 'installing' - | 'finalizing' - | 'installed' - | 'adding-hosts' - | 'cancelled' - | 'installing-pending-user-action'; - /** - * Additional information pertaining to the status of the OpenShift cluster. - */ - statusInfo: string; - /** - * The last time that the cluster status was updated. - */ - statusUpdatedAt?: string; // date-time - /** - * Installation progress percentages of the cluster. - */ - progress?: ClusterProgressInfo; - /** - * Information regarding hosts' installation disks encryption. - */ - diskEncryption?: DiskEncryption; - /** - * Hosts that are associated with this cluster. - */ - hosts?: Host[]; - /** - * hosts associated to this cluster that are in 'known' state. - */ - readyHostCount?: number; // int64 - /** - * hosts associated to this cluster that are not in 'disabled' state. - */ - enabledHostCount?: number; // int64 - /** - * All hosts associated to this cluster. - */ - totalHostCount?: number; // int64 - /** - * Schedule workloads on masters - */ - schedulableMasters?: boolean; - /** - * Indicates if schedule workloads on masters will be enabled regardless the value of 'schedulableMasters' property. - * Set to 'true' when not enough hosts are associated with this cluster to disable the scheduling on masters. - * - */ - schedulableMastersForcedTrue?: boolean; - /** - * The last time that this cluster was updated. - */ - updatedAt?: string; // date-time - /** - * The time that this cluster was created. - */ - createdAt?: string; // date-time - /** - * The time that this cluster started installation. - */ - installStartedAt?: string; // date-time - /** - * The time that this cluster completed installation. - */ - installCompletedAt?: string; // date-time - /** - * List of host networks to be filled during query. - */ - hostNetworks?: HostNetwork[]; - /** - * True if the pull secret has been added to the cluster. - */ - pullSecretSet?: boolean; - /** - * Indicate if virtual IP DHCP allocation mode is enabled. - */ - vipDhcpAllocation?: boolean; - /** - * JSON-formatted string containing the validation results for each validation id grouped by category (network, hosts-data, etc.) - */ - validationsInfo?: string; - /** - * The progress of log collection or empty if logs are not applicable - */ - logsInfo?: LogsState; - /** - * JSON-formatted string containing the user overrides for the install-config.yaml file. - * example: - * {"networking":{"networkType": "OVNKubernetes"},"fips":true} - */ - installConfigOverrides?: string; - controllerLogsCollectedAt?: string; // date-time - controllerLogsStartedAt?: string; // date-time - /** - * Json formatted string containing the majority groups for connectivity checks. - */ - connectivityMajorityGroups?: string; - /** - * Json formatted string containing ip collisions detected in the cluster. - */ - ipCollisions?: string; - /** - * Json formatted string containing a list of host validations to be ignored. May also contain a list with a single string "all" to ignore all host validations. Some validations cannot be ignored. - */ - ignoredHostValidations?: string; - /** - * Json formatted string containing a list of cluster validations to be ignored. May also contain a list with a single string "all" to ignore all cluster validations. Some validations cannot be ignored. - */ - ignoredClusterValidations?: string; - /** - * swagger:ignore - */ - deletedAt?: unknown; - /** - * Indicate if the networking is managed by the user. - */ - userManagedNetworking?: boolean; - /** - * A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - */ - additionalNtpSource?: string; - /** - * Operators that are associated with this cluster. - */ - monitoredOperators?: MonitoredOperator[]; - /** - * Unique identifier of the AMS subscription in OCM. - */ - amsSubscriptionId?: string; // uuid - /** - * Enable/disable hyperthreading on master nodes, worker nodes, or all nodes - */ - hyperthreading?: 'masters' | 'workers' | 'all' | 'none'; - /** - * JSON-formatted string containing the usage information by feature name - */ - featureUsage?: string; - /** - * The desired network type used. - */ - networkType?: 'OpenShiftSDN' | 'OVNKubernetes'; - /** - * Cluster networks that are associated with this cluster. - */ - clusterNetworks?: ClusterNetwork[]; - /** - * Service networks that are associated with this cluster. - */ - serviceNetworks?: ServiceNetwork[]; - /** - * Machine networks that are associated with this cluster. - */ - machineNetworks?: MachineNetwork[]; - /** - * The CPU architecture of the image (x86_64/arm64/etc). - */ - cpuArchitecture?: 'x86_64' | 'aarch64' | 'arm64' | 'ppc64le' | 's390x' | 'multi'; - /** - * Explicit ignition endpoint overrides the default ignition endpoint. - */ - ignitionEndpoint?: IgnitionEndpoint; - /** - * Indicates whether this cluster is an imported day-2 cluster or a - * regular cluster. Clusters are considered imported when they are - * created via the ../clusters/import endpoint. Day-2 clusters converted - * from day-1 clusters by kube-api controllers or the - * ../clusters//actions/allow-add-hosts endpoint are not - * considered imported. Imported clusters usually lack a lot of - * information and are filled with default values that don't necessarily - * reflect the actual cluster they represent - */ - imported?: boolean; - /** - * A comma-separated list of tags that are associated to the cluster. - */ - tags?: string; -} -export interface ClusterCreateParams { - /** - * Name of the OpenShift cluster. - */ - name: string; - /** - * Guaranteed availability of the installed cluster. 'Full' installs a Highly-Available cluster - * over multiple master nodes whereas 'None' installs a full cluster over one node. - * - */ - highAvailabilityMode?: 'Full' | 'None'; - /** - * Version of the OpenShift cluster. - */ - openshiftVersion: string; - /** - * OpenShift release image URI. - */ - ocpReleaseImage?: string; - /** - * Base domain of the cluster. All DNS records must be sub-domains of this base and include the cluster name. - */ - baseDnsDomain?: string; - /** - * IP address block from which Pod IPs are allocated. This block must not overlap with existing physical networks. These IP addresses are used for the Pod network, and if you need to access the Pods from an external network, configure load balancers and routers to manage the traffic. - */ - clusterNetworkCidr?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ - /** - * The subnet prefix length to assign to each individual node. For example, if clusterNetworkHostPrefix is set to 23, then each node is assigned a /23 subnet out of the given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) - 2) pod IPs addresses. If you are required to provide access to nodes from an external network, configure load balancers and routers to manage the traffic. - */ - clusterNetworkHostPrefix?: number; - /** - * The IP address pool to use for service IP addresses. You can enter only one IP address pool. If you need to access the services from an external network, configure load balancers and routers to manage the traffic. - */ - serviceNetworkCidr?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ - /** - * (DEPRECATED) The virtual IP used to reach the OpenShift cluster's API. - */ - apiVip?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$ - /** - * The virtual IPs used to reach the OpenShift cluster's API. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks. - */ - apiVips?: ApiVip[]; - /** - * (DEPRECATED) The virtual IP used for cluster ingress traffic. - */ - ingressVip?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$ - /** - * The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks. - */ - ingressVips?: IngressVip[]; - /** - * The pull secret obtained from Red Hat OpenShift Cluster Manager at console.redhat.com/openshift/install/pull-secret. - */ - pullSecret: string; - /** - * SSH public key for debugging OpenShift nodes. - */ - sshPublicKey?: string; - /** - * Indicate if virtual IP DHCP allocation mode is enabled. - */ - vipDhcpAllocation?: boolean; - /** - * A proxy URL to use for creating HTTP connections outside the cluster. - * http://\:\@\:\ - * - */ - httpProxy?: string; - /** - * A proxy URL to use for creating HTTPS connections outside the cluster. - * http://\:\@\:\ - * - */ - httpsProxy?: string; - /** - * An "*" or a comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude from proxying. - */ - noProxy?: string; - /** - * Indicate if the networking is managed by the user. - */ - userManagedNetworking?: boolean; - /** - * A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - */ - additionalNtpSource?: string; - /** - * List of OLM operators to be installed. - */ - olmOperators?: OperatorCreateParams[]; - /** - * Enable/disable hyperthreading on master nodes, worker nodes, or all nodes. - */ - hyperthreading?: 'masters' | 'workers' | 'none' | 'all'; - /** - * The desired network type used. - */ - networkType?: 'OpenShiftSDN' | 'OVNKubernetes'; - /** - * Schedule workloads on masters - */ - schedulableMasters?: boolean; - /** - * Cluster networks that are associated with this cluster. - */ - clusterNetworks?: ClusterNetwork[]; - /** - * Service networks that are associated with this cluster. - */ - serviceNetworks?: ServiceNetwork[]; - /** - * Machine networks that are associated with this cluster. - */ - machineNetworks?: MachineNetwork[]; - platform?: Platform; - /** - * The CPU architecture of the image (x86_64/arm64/etc). - */ - cpuArchitecture?: 'x86_64' | 'aarch64' | 'arm64' | 'ppc64le' | 's390x' | 'multi'; - /** - * Installation disks encryption mode and host roles to be applied. - */ - diskEncryption?: DiskEncryption; - /** - * Explicit ignition endpoint overrides the default ignition endpoint. - */ - ignitionEndpoint?: IgnitionEndpoint; - /** - * A comma-separated list of tags that are associated to the cluster. - */ - tags?: string; -} -export interface ClusterDefaultConfig { - clusterNetworkCidr?: string; // ^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[\/]([1-9]|[1-2][0-9]|3[0-2]?)$ - clusterNetworkHostPrefix?: number; - inactiveDeletionHours?: number; - serviceNetworkCidr?: string; // ^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[\/]([1-9]|[1-2][0-9]|3[0-2]?)$ - ntpSource?: string; - clusterNetworksIpv4?: ClusterNetwork[]; - clusterNetworksDualstack?: ClusterNetwork[]; - serviceNetworksIpv4?: ServiceNetwork[]; - serviceNetworksDualstack?: ServiceNetwork[]; - /** - * This provides a list of forbidden hostnames. If this list is empty or not present, this implies that the UI should fall back to a hard coded list. - */ - forbiddenHostnames?: string[]; -} -export interface ClusterHostRequirements { - /** - * Unique identifier of the host the requirements relate to. - */ - hostId?: string; // uuid - /** - * Total host requirements for the cluster configuration - */ - total?: ClusterHostRequirementsDetails; - /** - * Host requirements for the OCP installation - */ - ocp?: ClusterHostRequirementsDetails; - /** - * Host requirements related to requested operators - */ - operators?: OperatorHostRequirements[]; -} -export interface ClusterHostRequirementsDetails { - /** - * Required number of CPU cores - */ - cpuCores?: number; - /** - * Required number of RAM in MiB - */ - ramMib?: number; - /** - * Required disk size in GB - */ - diskSizeGb?: number; - /** - * Required installation disk speed in ms - */ - installationDiskSpeedThresholdMs?: number; - /** - * Maximum network average latency (RTT) at L3 for role. - */ - networkLatencyThresholdMs?: number; // double - /** - * Maximum packet loss allowed at L3 for role. - */ - packetLossPercentage?: number; // double - /** - * Whether TPM module should be enabled in host's BIOS. - */ - tpmEnabledInBios?: boolean; -} -export type ClusterHostRequirementsList = ClusterHostRequirements[]; -export type ClusterList = Cluster[]; -/** - * A network from which Pod IPs are allocated. This block must not overlap with existing physical networks. These IP addresses are used for the Pod network, and if you need to access the Pods from an external network, configure load balancers and routers to manage the traffic. - */ -export interface ClusterNetwork { - /** - * The cluster that this network is associated with. - */ - clusterId?: string; // uuid - /** - * The IP block address pool. - */ - cidr?: Subnet; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ - /** - * The subnet prefix length to assign to each individual node. For example if is set to 23, then each node is assigned a /23 subnet out of the given CIDR, which allows for 510 (2^(32 - 23) - 2) pod IPs addresses. - */ - hostPrefix?: number; -} -export interface ClusterProgressInfo { - totalPercentage?: number; - preparingForInstallationStagePercentage?: number; - installingStagePercentage?: number; - finalizingStagePercentage?: number; -} -export type ClusterValidationId = - | 'machine-cidr-defined' - | 'cluster-cidr-defined' - | 'service-cidr-defined' - | 'no-cidrs-overlapping' - | 'networks-same-address-families' - | 'network-prefix-valid' - | 'machine-cidr-equals-to-calculated-cidr' - | 'api-vips-defined' - | 'api-vips-valid' - | 'ingress-vips-defined' - | 'ingress-vips-valid' - | 'all-hosts-are-ready-to-install' - | 'sufficient-masters-count' - | 'dns-domain-defined' - | 'pull-secret-set' - | 'ntp-server-configured' - | 'lso-requirements-satisfied' - | 'ocs-requirements-satisfied' - | 'odf-requirements-satisfied' - | 'cnv-requirements-satisfied' - | 'lvm-requirements-satisfied' - | 'mce-requirements-satisfied' - | 'network-type-valid'; -export interface CompletionParams { - isSuccess: boolean; - errorInfo?: string; - /** - * additional data from the cluster - */ - data?: { - [name: string]: Record; - }; -} -export interface ConnectivityCheckHost { - hostId?: string; // uuid - nics?: ConnectivityCheckNic[]; -} -export interface ConnectivityCheckNic { - name?: string; - mac?: string; // mac - ipAddresses?: string /* ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$ */[]; -} -export type ConnectivityCheckParams = ConnectivityCheckHost[]; -export interface ConnectivityRemoteHost { - hostId?: string; // uuid - l2Connectivity?: L2Connectivity[]; - l3Connectivity?: L3Connectivity[]; -} -export interface ConnectivityReport { - remoteHosts?: ConnectivityRemoteHost[]; -} -export interface ContainerImageAvailability { - /** - * A fully qualified image name (FQIN). - */ - name?: string; - /** - * Size of the image in bytes. - */ - sizeBytes?: number; - /** - * Seconds it took to pull the image. - */ - time?: number; - /** - * The rate of size/time in seconds MBps. - */ - downloadRate?: number; - result?: ContainerImageAvailabilityResult; -} -export interface ContainerImageAvailabilityRequest { - /** - * Positive number represents a timeout in seconds for a pull operation. - */ - timeout?: number; - /** - * List of image names to be checked. - */ - images: string /* ^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$ */[]; -} -export interface ContainerImageAvailabilityResponse { - /** - * List of images that were checked. - */ - images: ContainerImageAvailability[]; -} -/** - * Image availability result. - */ -export type ContainerImageAvailabilityResult = 'success' | 'failure'; -export interface Cpu { - count?: number; - frequency?: number; - flags?: string[]; - modelName?: string; - architecture?: string; -} -export interface CreateManifestParams { - /** - * The folder that contains the files. Manifests can be placed in 'manifests' or 'openshift' directories. - */ - folder?: 'manifests' | 'openshift'; - /** - * The name of the manifest to customize the installed OCP cluster. - */ - fileName: string; // ^[^/]*\.(yaml|yml|json)$ - /** - * base64 encoded manifest content. - */ - content: string; -} -export interface Credentials { - username?: string; - password?: string; - consoleUrl?: string; -} -export interface DhcpAllocationRequest { - /** - * The network interface (NIC) to run the DHCP requests on. - */ - interface: string; - /** - * MAC address for the API virtual IP. - */ - apiVipMac: string; // mac - /** - * MAC address for the Ingress virtual IP. - */ - ingressVipMac: string; // mac - /** - * Contents of lease file to be used for API virtual IP. - */ - apiVipLease?: string; - /** - * Contents of lease file to be used for for Ingress virtual IP. - */ - ingressVipLease?: string; -} -export interface DhcpAllocationResponse { - /** - * The IPv4 address that was allocated by DHCP for the API virtual IP. - */ - apiVipAddress: string; // ipv4 - /** - * The IPv4 address that was allocated by DHCP for the Ingress virtual IP. - */ - ingressVipAddress: string; // ipv4 - /** - * Contents of last acquired lease for API virtual IP. - */ - apiVipLease?: string; - /** - * Contents of last acquired lease for Ingress virtual IP. - */ - ingressVipLease?: string; -} -export interface Disk { - /** - * Determine the disk's unique identifier which is the by-id field if it exists and fallback to the by-path field otherwise - */ - id?: string; - driveType?: DriveType; - hasUuid?: boolean; - vendor?: string; - name?: string; - path?: string; - hctl?: string; - /** - * by-path is the shortest physical path to the device - */ - byPath?: string; - /** - * by-id is the World Wide Number of the device which guaranteed to be unique for every storage device - */ - byId?: string; - model?: string; - wwn?: string; - serial?: string; - sizeBytes?: number; - bootable?: boolean; - removable?: boolean; - /** - * Whether the disk appears to be an installation media or not - */ - isInstallationMedia?: boolean; - installationEligibility?: { - /** - * Whether the disk is eligible for installation or not. - */ - eligible?: boolean; - /** - * Reasons for why this disk is not eligible for installation. - */ - notEligibleReasons?: string[]; - }; - smart?: string; - ioPerf?: IoPerf; - /** - * A comma-separated list of disk names that this disk belongs to - */ - holders?: string; -} -export interface DiskConfigParams { - id: string; - role?: DiskRole; -} -export interface DiskEncryption { - /** - * Enable/disable disk encryption on master nodes, worker nodes, or all nodes. - */ - enableOn?: 'none' | 'all' | 'masters' | 'workers'; - /** - * The disk encryption mode to use. - */ - mode?: 'tpmv2' | 'tang'; - /** - * JSON-formatted string containing additional information regarding tang's configuration - * example: - * [{"url":"http://tang.example.com:7500","thumbprint":"PLjNyRdGw03zlRoGjQYMahSZGu9"}, {"url":"http://tang.example.com:7501","thumbprint":"PLjNyRdGw03zlRoGjQYMahSZGu8"}] - */ - tangServers?: string; -} -export interface DiskInfo { - id?: string; // uuid - path?: string; - diskSpeed?: DiskSpeed; -} -export type DiskRole = 'none' | 'install'; -/** - * Allows an addition or removal of a host disk from the host's skipFormattingDisks list - */ -export interface DiskSkipFormattingParams { - /** - * The ID of the disk that is being added to or removed from the host's skipFormattingDisks list - */ - diskId: string; - /** - * True if you wish to add the disk to the skipFormattingDisks list, false if you wish to remove it - */ - skipFormatting: boolean; -} -export interface DiskSpeed { - tested?: boolean; - exitCode?: number; - speedMs?: number; -} -export interface DiskSpeedCheckRequest { - /** - * --filename argument for fio (expects a file or a block device path). - */ - path: string; -} -export interface DiskSpeedCheckResponse { - /** - * The 99th percentile of fdatasync durations in milliseconds. - */ - ioSyncDuration?: number; - /** - * The device path. - */ - path?: string; -} -export interface DomainResolutionRequest { - domains: { - /** - * The domain name that should be resolved - */ - domainName: string; // ^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*[.])+[a-zA-Z]{2,}[.]?$ - }[]; -} -export interface DomainResolutionResponse { - resolutions: { - /** - * The domain that was resolved - */ - domainName: string; - /** - * The IPv4 addresses of the domain, empty if none - */ - ipv4Addresses?: string /* ipv4 */[]; - /** - * The IPv6 addresses of the domain, empty if none - */ - ipv6Addresses?: string /* ipv6 */[]; - }[]; -} -/** - * Information sent to the agent for downloading artifacts to boot a host into discovery. - */ -export interface DownloadBootArtifactsRequest { - /** - * URL address to download the kernel. - */ - kernelUrl: string; - /** - * URL address to download the rootfs. - */ - rootfsUrl: string; - /** - * URL address to download the initrd. - */ - initrdUrl: string; - /** - * The base directory on the host that contains the /boot folder. The host will download boot - * artifacts into a folder in this directory. - */ - hostFsMountDir: string; -} -export type DriveType = - | 'Unknown' - | 'HDD' - | 'FDD' - | 'ODD' - | 'SSD' - | 'virtual' - | 'Multipath' - | 'iSCSI' - | 'FC' - | 'LVM' - | 'RAID'; -export interface Error { - /** - * Indicates the type of this object. Will always be 'Error'. - */ - kind: 'Error'; - /** - * Numeric identifier of the error. - */ - id: number; // int32 - /** - * Self link. - */ - href: string; - /** - * Globally unique code of the error, composed of the unique identifier of the API and the numeric identifier of the error. For example, if the numeric identifier of the error is 93 and the identifier of the API is assistedInstall then the code will be ASSISTED-INSTALL-93. - */ - code: string; - /** - * Human-readable description of the error. - */ - reason: string; -} -export interface Event { - /** - * Event Name. - */ - name?: string; - /** - * Unique identifier of the cluster this event relates to. - */ - clusterId?: string; // uuid - /** - * Unique identifier of the host this event relates to. - */ - hostId?: string; // uuid - /** - * Unique identifier of the infra-env this event relates to. - */ - infraEnvId?: string; // uuid - severity: 'info' | 'warning' | 'error' | 'critical'; - category?: 'user' | 'metrics'; - message: string; - eventTime: string; // date-time - /** - * Unique identifier of the request that caused this event to occur. - */ - requestId?: string; // uuid - /** - * Additional properties for the event in JSON format. - */ - props?: string; -} -export type EventList = Event[]; -/** - * (DEPRECATED) List of features attached to openshift version - */ -export interface FeatureSupportLevel { - /** - * Version of the OpenShift cluster. - */ - openshiftVersion?: string; - features?: { - /** - * (DEPRECATED) The ID of the feature - */ - featureId: - | 'ADDITIONAL_NTP_SOURCE' - | 'REQUESTED_HOSTNAME' - | 'PROXY' - | 'SNO' - | 'DAY2_HOSTS' - | 'VIP_AUTO_ALLOC' - | 'DISK_SELECTION' - | 'OVN_NETWORK_TYPE' - | 'SDN_NETWORK_TYPE' - | 'PLATFORM_SELECTION' - | 'SCHEDULABLE_MASTERS' - | 'AUTO_ASSIGN_ROLE' - | 'CUSTOM_MANIFEST' - | 'DISK_ENCRYPTION' - | 'CLUSTER_MANAGED_NETWORKING_WITH_VMS' - | 'ARM64_ARCHITECTURE' - | 'ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING' - | 'PPC64LE_ARCHITECTURE' - | 'S390X_ARCHITECTURE' - | 'SINGLE_NODE_EXPANSION' - | 'LVM' - | 'DUAL_STACK_NETWORKING' - | 'MULTIARCH_RELEASE_IMAGE' - | 'NUTANIX_INTEGRATION' - | 'DUAL_STACK_VIPS' - | 'USER_MANAGED_NETWORKING_WITH_MULTI_NODE'; - supportLevel: SupportLevel; - }[]; -} -export type FeatureSupportLevelId = - | 'SNO' - | 'VIP_AUTO_ALLOC' - | 'CUSTOM_MANIFEST' - | 'SINGLE_NODE_EXPANSION' - | 'LVM' - | 'ODF' - | 'LSO' - | 'CNV' - | 'MCE' - | 'NUTANIX_INTEGRATION' - | 'VSPHERE_INTEGRATION' - | 'DUAL_STACK_VIPS' - | 'CLUSTER_MANAGED_NETWORKING' - | 'USER_MANAGED_NETWORKING' - | 'MINIMAL_ISO' - | 'FULL_ISO' - | 'EXTERNAL_PLATFORM_OCI'; -/** - * (DEPRECATED) List of objects that containing a list of feature-support level and attached to openshift-version - */ -export type FeatureSupportLevels = FeatureSupportLevel[]; -export type FreeAddressesList = string /* ipv4 */[]; -export type FreeAddressesRequest = - string /* ^([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]|[1-2][0-9]|3[0-2]?$ */[]; -export interface FreeNetworkAddresses { - network?: string; // ^([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]|[1-2][0-9]|3[0-2]?$ - freeAddresses?: string /* ipv4 */[]; -} -export type FreeNetworksAddresses = FreeNetworkAddresses[]; -export interface Gpu { - /** - * The name of the device vendor (for example "Intel Corporation") - */ - vendor?: string; - /** - * ID of the vendor (for example "8086") - */ - vendorId?: string; - /** - * ID of the device (for example "3ea0") - */ - deviceId?: string; - /** - * Product name of the device (for example "UHD Graphics 620 (Whiskey Lake)") - */ - name?: string; - /** - * Device address (for example "0000:00:02.0") - */ - address?: string; -} -export interface Host { - /** - * Indicates the type of this object. Will be 'Host' if this is a complete object or 'HostLink' if it is just a link, or - * 'AddToExistingClusterHost' for host being added to existing OCP cluster, or - * - */ - kind: 'Host' | 'AddToExistingClusterHost'; - /** - * Unique identifier of the object. - */ - id: string; // uuid - /** - * Self link. - */ - href: string; - /** - * The cluster that this host is associated with. - */ - clusterId?: string; // uuid - /** - * The infra-env that this host is associated with. - */ - infraEnvId?: string; // uuid - status: - | 'discovering' - | 'known' - | 'disconnected' - | 'insufficient' - | 'disabled' - | 'preparing-for-installation' - | 'preparing-failed' - | 'preparing-successful' - | 'pending-for-input' - | 'installing' - | 'installing-in-progress' - | 'installing-pending-user-action' - | 'resetting-pending-user-action' - | 'installed' - | 'error' - | 'resetting' - | 'added-to-existing-cluster' - | 'cancelled' - | 'binding' - | 'unbinding' - | 'unbinding-pending-user-action' - | 'known-unbound' - | 'disconnected-unbound' - | 'insufficient-unbound' - | 'disabled-unbound' - | 'discovering-unbound' - | 'reclaiming' - | 'reclaiming-rebooting'; - statusInfo: string; - /** - * JSON-formatted string containing the validation results for each validation id grouped by category (network, hardware, etc.) - */ - validationsInfo?: string; - /** - * The progress of log collection or empty if logs are not applicable - */ - logsInfo?: LogsState; - /** - * The last time that the host status was updated. - */ - statusUpdatedAt?: string; // date-time - progress?: HostProgressInfo; - /** - * Time at which the current progress stage started. - */ - stageStartedAt?: string; // date-time - /** - * Time at which the current progress stage was last updated. - */ - stageUpdatedAt?: string; // date-time - progressStages?: HostStage[]; - connectivity?: string; - /** - * Contains a serialized apiVipConnectivityResponse - */ - apiVipConnectivity?: string; - tangConnectivity?: string; - inventory?: string; - freeAddresses?: string; - /** - * The configured NTP sources on the host. - */ - ntpSources?: string; - /** - * Additional information about disks, formatted as JSON. - */ - disksInfo?: string; - role?: HostRole; - suggestedRole?: HostRole; - bootstrap?: boolean; - logsCollectedAt?: string; // date-time - logsStartedAt?: string; // date-time - /** - * Installer version. - */ - installerVersion?: string; - /** - * Contains the inventory disk path, This field is replaced by installationDiskId field and used for backward compatability with the old UI. - * example: - * /dev/sda - */ - installationDiskPath?: string; - /** - * Contains the inventory disk id to install on. - */ - installationDiskId?: string; - updatedAt?: string; // date-time - createdAt?: string; // date-time - /** - * The last time the host's agent communicated with the service. - */ - checkedInAt?: string; // date-time - /** - * The last time the host's agent tried to register in the service. - */ - registeredAt?: string; // date-time - discoveryAgentVersion?: string; - requestedHostname?: string; - userName?: string; - mediaStatus?: 'connected' | 'disconnected'; - /** - * swagger:ignore - */ - deletedAt?: unknown; - /** - * Json formatted string containing the user overrides for the host's pointer ignition - * example: - * {"ignition": {"version": "3.1.0"}, "storage": {"files": [{"path": "/tmp/example", "contents": {"source": "data:text/plain;base64,aGVscGltdHJhcHBlZGluYXN3YWdnZXJzcGVj"}}]}} - */ - ignitionConfigOverrides?: string; - installerArgs?: string; - /** - * The time on the host as seconds since the Unix epoch. - */ - timestamp?: number; - machineConfigPoolName?: string; - /** - * Array of image statuses. - */ - imagesStatus?: string; - /** - * The domain name resolution result. - */ - domainNameResolutions?: string; - /** - * True if the token to fetch the ignition from ignitionEndpointUrl is set. - */ - ignitionEndpointTokenSet?: boolean; - /** - * Json containing node's labels. - */ - nodeLabels?: string; - /** - * A comma-separated list of disks that will be formatted once - * installation begins, unless otherwise set to be skipped by - * skipFormattingDisks. This means that this list also includes disks - * that appear in skipFormattingDisks. This property is managed by the - * service and cannot be modified by the user. - */ - disksToBeFormatted?: string; - /** - * A comma-seperated list of host disks that the service will avoid - * formatting. - */ - skipFormattingDisks?: string; -} -export interface HostCreateParams { - hostId: string; // uuid - discoveryAgentVersion?: string; -} -export interface HostIgnitionParams { - config?: string; -} -export type HostList = Host[]; -export interface HostNetwork { - cidr?: string; - hostIds?: string /* uuid */[]; -} -export interface HostProgress { - currentStage?: HostStage; - progressInfo?: string; -} -export interface HostProgressInfo { - installationPercentage?: number; - currentStage?: HostStage; - progressInfo?: string; - /** - * Time at which the current progress stage started. - */ - stageStartedAt?: string; // date-time - /** - * Time at which the current progress stage was last updated. - */ - stageUpdatedAt?: string; // date-time -} -export interface HostRegistrationResponse { - /** - * Indicates the type of this object. Will be 'Host' if this is a complete object or 'HostLink' if it is just a link, or - * 'AddToExistingClusterHost' for host being added to existing OCP cluster, or - * - */ - kind: 'Host' | 'AddToExistingClusterHost'; - /** - * Unique identifier of the object. - */ - id: string; // uuid - /** - * Self link. - */ - href: string; - /** - * The cluster that this host is associated with. - */ - clusterId?: string; // uuid - /** - * The infra-env that this host is associated with. - */ - infraEnvId?: string; // uuid - status: - | 'discovering' - | 'known' - | 'disconnected' - | 'insufficient' - | 'disabled' - | 'preparing-for-installation' - | 'preparing-failed' - | 'preparing-successful' - | 'pending-for-input' - | 'installing' - | 'installing-in-progress' - | 'installing-pending-user-action' - | 'resetting-pending-user-action' - | 'installed' - | 'error' - | 'resetting' - | 'added-to-existing-cluster' - | 'cancelled' - | 'binding' - | 'unbinding' - | 'unbinding-pending-user-action' - | 'known-unbound' - | 'disconnected-unbound' - | 'insufficient-unbound' - | 'disabled-unbound' - | 'discovering-unbound' - | 'reclaiming' - | 'reclaiming-rebooting'; - statusInfo: string; - /** - * JSON-formatted string containing the validation results for each validation id grouped by category (network, hardware, etc.) - */ - validationsInfo?: string; - /** - * The progress of log collection or empty if logs are not applicable - */ - logsInfo?: LogsState; - /** - * The last time that the host status was updated. - */ - statusUpdatedAt?: string; // date-time - progress?: HostProgressInfo; - /** - * Time at which the current progress stage started. - */ - stageStartedAt?: string; // date-time - /** - * Time at which the current progress stage was last updated. - */ - stageUpdatedAt?: string; // date-time - progressStages?: HostStage[]; - connectivity?: string; - /** - * Contains a serialized apiVipConnectivityResponse - */ - apiVipConnectivity?: string; - tangConnectivity?: string; - inventory?: string; - freeAddresses?: string; - /** - * The configured NTP sources on the host. - */ - ntpSources?: string; - /** - * Additional information about disks, formatted as JSON. - */ - disksInfo?: string; - role?: HostRole; - suggestedRole?: HostRole; - bootstrap?: boolean; - logsCollectedAt?: string; // date-time - logsStartedAt?: string; // date-time - /** - * Installer version. - */ - installerVersion?: string; - /** - * Contains the inventory disk path, This field is replaced by installationDiskId field and used for backward compatability with the old UI. - * example: - * /dev/sda - */ - installationDiskPath?: string; - /** - * Contains the inventory disk id to install on. - */ - installationDiskId?: string; - updatedAt?: string; // date-time - createdAt?: string; // date-time - /** - * The last time the host's agent communicated with the service. - */ - checkedInAt?: string; // date-time - /** - * The last time the host's agent tried to register in the service. - */ - registeredAt?: string; // date-time - discoveryAgentVersion?: string; - requestedHostname?: string; - userName?: string; - mediaStatus?: 'connected' | 'disconnected'; - /** - * swagger:ignore - */ - deletedAt?: unknown; - /** - * Json formatted string containing the user overrides for the host's pointer ignition - * example: - * {"ignition": {"version": "3.1.0"}, "storage": {"files": [{"path": "/tmp/example", "contents": {"source": "data:text/plain;base64,aGVscGltdHJhcHBlZGluYXN3YWdnZXJzcGVj"}}]}} - */ - ignitionConfigOverrides?: string; - installerArgs?: string; - /** - * The time on the host as seconds since the Unix epoch. - */ - timestamp?: number; - machineConfigPoolName?: string; - /** - * Array of image statuses. - */ - imagesStatus?: string; - /** - * The domain name resolution result. - */ - domainNameResolutions?: string; - /** - * True if the token to fetch the ignition from ignitionEndpointUrl is set. - */ - ignitionEndpointTokenSet?: boolean; - /** - * Json containing node's labels. - */ - nodeLabels?: string; - /** - * A comma-separated list of disks that will be formatted once - * installation begins, unless otherwise set to be skipped by - * skipFormattingDisks. This means that this list also includes disks - * that appear in skipFormattingDisks. This property is managed by the - * service and cannot be modified by the user. - */ - disksToBeFormatted?: string; - /** - * A comma-seperated list of host disks that the service will avoid - * formatting. - */ - skipFormattingDisks?: string; - /** - * Command for starting the next step runner - */ - nextStepRunnerCommand?: { - command?: string; - args?: string[]; - /** - * How long in seconds to wait before retrying registration if the command fails - */ - retrySeconds?: number; - }; -} -export type HostRole = 'auto-assign' | 'master' | 'worker' | 'bootstrap'; -export type HostRoleUpdateParams = 'auto-assign' | 'master' | 'worker'; -export type HostStage = - | 'Starting installation' - | 'Waiting for control plane' - | 'Waiting for bootkube' - | 'Waiting for controller' - | 'Installing' - | 'Writing image to disk' - | 'Rebooting' - | 'Waiting for ignition' - | 'Configuring' - | 'Joined' - | 'Done' - | 'Failed'; -export interface HostStaticNetworkConfig { - /** - * yaml string that can be processed by nmstate - */ - networkYaml?: string; - /** - * mapping of host macs to logical interfaces used in the network yaml - */ - macInterfaceMap?: MacInterfaceMap; -} -export interface HostTypeHardwareRequirements { - /** - * Host requirements that can be quantified - */ - quantitative?: ClusterHostRequirementsDetails; - /** - * Host requirements that cannot be quantified at the time of calculation. Descriptions or formulas of requiements - */ - qualitative?: string[]; -} -export interface HostTypeHardwareRequirementsWrapper { - /** - * Requirements towards a worker node - */ - worker?: HostTypeHardwareRequirements; - /** - * Requirements towards a master node - */ - master?: HostTypeHardwareRequirements; -} -export interface HostUpdateParams { - hostRole?: 'auto-assign' | 'master' | 'worker'; - hostName?: string; - disksSelectedConfig?: DiskConfigParams[]; - /** - * Allows changing the host's skipFormattingDisks parameter - */ - disksSkipFormatting?: DiskSkipFormattingParams[]; - machineConfigPoolName?: string; - /** - * A string which will be used as Authorization Bearer token to fetch the ignition from ignitionEndpointUrl. - */ - ignitionEndpointToken?: string; - /** - * Labels to be added to the corresponding node. - */ - nodeLabels?: NodeLabelParams[]; -} -export type HostValidationId = - | 'connected' - | 'media-connected' - | 'has-inventory' - | 'has-min-cpu-cores' - | 'has-min-valid-disks' - | 'has-min-memory' - | 'machine-cidr-defined' - | 'has-cpu-cores-for-role' - | 'has-memory-for-role' - | 'hostname-unique' - | 'hostname-valid' - | 'belongs-to-machine-cidr' - | 'ignition-downloadable' - | 'belongs-to-majority-group' - | 'valid-platform-network-settings' - | 'ntp-synced' - | 'time-synced-between-host-and-service' - | 'container-images-available' - | 'lso-requirements-satisfied' - | 'ocs-requirements-satisfied' - | 'odf-requirements-satisfied' - | 'lvm-requirements-satisfied' - | 'mce-requirements-satisfied' - | 'sufficient-installation-disk-speed' - | 'cnv-requirements-satisfied' - | 'sufficient-network-latency-requirement-for-role' - | 'sufficient-packet-loss-requirement-for-role' - | 'has-default-route' - | 'api-domain-name-resolved-correctly' - | 'api-int-domain-name-resolved-correctly' - | 'apps-domain-name-resolved-correctly' - | 'release-domain-name-resolved-correctly' - | 'compatible-with-cluster-platform' - | 'dns-wildcard-not-configured' - | 'disk-encryption-requirements-satisfied' - | 'non-overlapping-subnets' - | 'vsphere-disk-uuid-enabled' - | 'compatible-agent' - | 'no-skip-installation-disk' - | 'no-skip-missing-disk' - | 'no-ip-collisions-in-network'; -/** - * Explicit ignition endpoint overrides the default ignition endpoint. - */ -export interface IgnitionEndpoint { - /** - * The URL for the ignition endpoint. - */ - url?: string; - /** - * base64 encoded CA certficate to be used when contacting the URL via https. - */ - caCertificate?: string; -} -export interface IgnoredValidations { - /** - * JSON-formatted list of cluster validation IDs that will be ignored for all hosts that belong to this cluster. It may also contain a list with a single string "all" to ignore all cluster validations. Some validations cannot be ignored. - */ - 'cluster-validation-ids'?: string; // string - /** - * JSON-formatted list of host validation IDs that will be ignored for all hosts that belong to this cluster. It may also contain a list with a single string "all" to ignore all host validations. Some validations cannot be ignored. - */ - 'host-validation-ids'?: string; // string -} -export interface ImageCreateParams { - /** - * SSH public key for debugging the installation. - */ - sshPublicKey?: string; - staticNetworkConfig?: HostStaticNetworkConfig[]; - /** - * Type of image that should be generated. - */ - imageType?: ImageType; -} -export interface ImageInfo { - /** - * SSH public key for debugging the installation. - */ - sshPublicKey?: string; - sizeBytes?: number; - downloadUrl?: string; - /** - * Image generator version. - */ - generatorVersion?: string; - createdAt?: string; // date-time - expiresAt?: string; // date-time - /** - * static network configuration string in the format expected by discovery ignition generation - */ - staticNetworkConfig?: string; - type?: ImageType; -} -export type ImageType = 'full-iso' | 'minimal-iso'; -export interface ImportClusterParams { - /** - * OpenShift cluster name. - */ - name: string; - /** - * The domain name used to reach the OpenShift cluster API. - */ - apiVipDnsname: string; - /** - * Version of the OpenShift cluster. - */ - openshiftVersion?: string; - /** - * The id of the OCP cluster, that hosts will be added to - */ - openshiftClusterId: string; // uuid -} -export interface InfraEnv { - /** - * Indicates the type of this object. - */ - kind: 'InfraEnv'; - /** - * Unique identifier of the object. - */ - id: string; // uuid - /** - * Self link. - */ - href: string; - /** - * Version of the OpenShift cluster (used to infer the RHCOS version - temporary until generic logic implemented). - */ - openshiftVersion?: string; - /** - * Name of the infra-env. - */ - name: string; - userName?: string; - orgId?: string; - emailDomain?: string; - proxy?: Proxy; - /** - * A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - */ - additionalNtpSources?: string; - /** - * SSH public key for debugging the installation. - */ - sshAuthorizedKey?: string; - /** - * True if the pull secret has been added to the cluster. - */ - pullSecretSet?: boolean; - /** - * static network configuration string in the format expected by discovery ignition generation. - */ - staticNetworkConfig?: string; - type: ImageType; - /** - * Json formatted string containing the user overrides for the initial ignition config. - */ - ignitionConfigOverride?: string; - /** - * If set, all hosts that register will be associated with the specified cluster. - */ - clusterId?: string; // uuid - sizeBytes?: number; - downloadUrl?: string; - /** - * Image generator version. - */ - generatorVersion?: string; - /** - * The last time that this infra-env was updated. - */ - updatedAt: string; // date-time - createdAt: string; // date-time - expiresAt?: string; // date-time - /** - * The CPU architecture of the image (x86_64/arm64/etc). - */ - cpuArchitecture?: 'x86_64' | 'aarch64' | 'arm64' | 'ppc64le' | 's390x'; - /** - * JSON formatted string array representing the discovery image kernel arguments. - */ - kernelArguments?: string; - /** - * PEM-encoded X.509 certificate bundle. Hosts discovered by this - * infra-env will trust the certificates in this bundle. Clusters formed - * from the hosts discovered by this infra-env will also trust the - * certificates in this bundle. - */ - additionalTrustBundle?: string; -} -export interface InfraEnvCreateParams { - /** - * Name of the infra-env. - */ - name: string; - proxy?: Proxy; - /** - * A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - */ - additionalNtpSources?: string; - /** - * SSH public key for debugging the installation. - */ - sshAuthorizedKey?: string; - /** - * The pull secret obtained from Red Hat OpenShift Cluster Manager at console.redhat.com/openshift/install/pull-secret. - */ - pullSecret: string; - staticNetworkConfig?: HostStaticNetworkConfig[]; - imageType?: ImageType; - /** - * JSON formatted string containing the user overrides for the initial ignition config. - */ - ignitionConfigOverride?: string; - /** - * If set, all hosts that register will be associated with the specified cluster. - */ - clusterId?: string; // uuid - /** - * Version of the OpenShift cluster (used to infer the RHCOS version - temporary until generic logic implemented). - */ - openshiftVersion?: string; - /** - * The CPU architecture of the image (x86_64/arm64/etc). - */ - cpuArchitecture?: 'x86_64' | 'aarch64' | 'arm64' | 'ppc64le' | 's390x'; - kernelArguments?: KernelArguments; - /** - * PEM-encoded X.509 certificate bundle. Hosts discovered by this - * infra-env will trust the certificates in this bundle. Clusters formed - * from the hosts discovered by this infra-env will also trust the - * certificates in this bundle. - */ - additionalTrustBundle?: string; -} -export type InfraEnvList = InfraEnv[]; -export interface InfraEnvUpdateParams { - proxy?: Proxy; - /** - * A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - */ - additionalNtpSources?: string; - /** - * SSH public key for debugging the installation. - */ - sshAuthorizedKey?: string; - /** - * The pull secret obtained from Red Hat OpenShift Cluster Manager at console.redhat.com/openshift/install/pull-secret. - */ - pullSecret?: string; - staticNetworkConfig?: HostStaticNetworkConfig[]; - imageType?: ImageType; - /** - * JSON formatted string containing the user overrides for the initial ignition config. - */ - ignitionConfigOverride?: string; - kernelArguments?: KernelArguments; - /** - * Allows users to change the additionalTrustBundle infra-env field - */ - additionalTrustBundle?: string; -} -export interface InfraError { - /** - * Numeric identifier of the error. - */ - code: number; // int32 - /** - * Human-readable description of the error. - */ - message: string; -} -export type IngressCertParams = string; -/** - * The virtual IP used for cluster ingress traffic. - */ -export interface IngressVip { - /** - * The cluster that this VIP is associated with. - */ - clusterId?: string; // uuid - /** - * The IP address. - */ - ip?: Ip; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$ - /** - * Ingress VIP verification result. - */ - verification?: VipVerification; -} -export interface InstallCmdRequest { - /** - * Cluster id - */ - clusterId: string; // uuid - /** - * Infra env id - */ - infraEnvId: string; // uuid - /** - * Host id - */ - hostId: string; // uuid - role: HostRole; - /** - * Boot device to write image on - */ - bootDevice: string; - /** - * Assisted installer controller image - */ - controllerImage: string; // ^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$ - /** - * Assisted installer image - */ - installerImage: string; // ^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$ - /** - * Guaranteed availability of the installed cluster. 'Full' installs a Highly-Available cluster - * over multiple master nodes whereas 'None' installs a full cluster over one node. - * - */ - highAvailabilityMode?: 'Full' | 'None'; - proxy?: Proxy; - /** - * Check CVO status if needed - */ - checkCvo?: boolean; - /** - * List of disks to format - */ - disksToFormat?: string[]; - /** - * Must-gather images to use - */ - mustGatherImage?: string; - /** - * Machine config operator image - */ - mcoImage?: string; // ^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$ - /** - * Version of the OpenShift cluster. - */ - openshiftVersion?: string; - /** - * List of service ips - */ - serviceIps?: string /* ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$ */[]; - /** - * Core-os installer addtional args - */ - installerArgs?: string; - /** - * Skip formatting installation disk - */ - skipInstallationDiskCleanup?: boolean; -} -export interface InstallerArgsParams { - /** - * List of additional arguments passed to coreos-installer - * example: - * --append-karg,ip=192.0.2.2::192.0.2.254:255.255.255.0:core0.example.com:enp1s0:none,--save-partindex,1,-n - */ - args?: string[]; -} -export interface Interface { - ipv6Addresses?: string[]; - vendor?: string; - name?: string; - hasCarrier?: boolean; - product?: string; - mtu?: number; - ipv4Addresses?: string[]; - biosdevname?: string; - clientId?: string; - macAddress?: string; - flags?: string[]; - speedMbps?: number; - type?: string; -} -export interface Inventory { - hostname?: string; - bmcAddress?: string; - interfaces?: Interface[]; - disks?: Disk[]; - boot?: Boot; - systemVendor?: SystemVendor; - bmcV6address?: string; - memory?: Memory; - cpu?: Cpu; - gpus?: Gpu[]; - routes?: Route[]; - tpmVersion?: 'none' | '1.2' | '2.0'; -} -export interface IoPerf { - /** - * 99th percentile of fsync duration in milliseconds - */ - syncDuration?: number; -} -export type Ip = string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$ -/** - * pair of [operation, argument] specifying the argument and what operation should be applied on it. - */ -export interface KernelArgument { - /** - * The operation to apply on the kernel argument. - */ - operation?: 'append' | 'replace' | 'delete'; - /** - * Kernel argument can have the form or =. The following examples should - * be supported: - * rd.net.timeout.carrier=60 - * isolcpus=1,2,10-20,100-2000:2/25 - * quiet - * The parsing by the command line parser in linux kernel is much looser and this pattern follows it. - * - */ - value?: string; // ^(?:(?:[^ \t\n\r"]+)|(?:"[^"]*"))+$ -} -/** - * List of kernel arugment objects that define the operations and values to be applied. - */ -export type KernelArguments = KernelArgument[]; -export interface L2Connectivity { - outgoingNic?: string; - outgoingIpAddress?: string; - remoteIpAddress?: string; - remoteMac?: string; - successful?: boolean; -} -export interface L3Connectivity { - outgoingNic?: string; - remoteIpAddress?: string; - successful?: boolean; - /** - * Average round trip time in milliseconds. - */ - averageRttMs?: number; // double - /** - * Percentage of packets lost during connectivity check. - */ - packetLossPercentage?: number; // double -} -export type ListManagedDomains = ManagedDomain[]; -export type ListManifests = Manifest[]; -export interface ListVersions { - versions?: Versions; - releaseTag?: string; -} -export interface LogsGatherCmdRequest { - /** - * Cluster id - */ - clusterId: string; // uuid - /** - * Infra env id - */ - infraEnvId: string; // uuid - /** - * Host id - */ - hostId: string; // uuid - /** - * Host is bootstrap or not - */ - bootstrap: boolean; - /** - * Run installer gather logs - */ - installerGather: boolean; - /** - * List of master ips - */ - masterIps?: string /* ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$ */[]; -} -export interface LogsProgressParams { - /** - * The state of collecting logs. - */ - logsState: LogsState; -} -export type LogsState = 'requested' | 'collecting' | 'completed' | 'timeout' | ''; -export type LogsType = 'host' | 'controller' | 'all' | ''; -export type MacInterfaceMap = { - /** - * mac address present on the host - */ - macAddress?: string; // ^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$ - /** - * nic name used in the yaml, which relates 1:1 to the mac address - */ - logicalNicName?: string; -}[]; -/** - * A network that all hosts belonging to the cluster should have an interface with IP address in. The VIPs (if exist) belong to this network. - */ -export interface MachineNetwork { - /** - * The cluster that this network is associated with. - */ - clusterId?: string; // uuid - /** - * The IP block address pool. - */ - cidr?: Subnet; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ -} -export interface ManagedDomain { - domain?: string; - provider?: 'route53'; -} -export interface Manifest { - /** - * The folder that contains the files. Manifests can be placed in 'manifests' or 'openshift' directories. - */ - folder?: 'manifests' | 'openshift'; - /** - * The file name prefaced by the folder that contains it. - */ - fileName?: string; -} -export interface Memory { - physicalBytes?: number; - usableBytes?: number; - /** - * The method by which the physical memory was set - */ - physicalBytesMethod?: MemoryMethod; -} -export type MemoryMethod = 'dmidecode' | 'ghw' | 'meminfo'; -export interface MonitoredOperator { - /** - * The cluster that this operator is associated with. - */ - clusterId?: string; // uuid - /** - * Unique name of the operator. - */ - name?: string; - /** - * Operator version - */ - version?: string; - /** - * Namespace where to deploy an operator. Only some operators require a namespace. - */ - namespace?: string; - /** - * The name of the subscription of the operator. - */ - subscriptionName?: string; - operatorType?: OperatorType; - /** - * Blob of operator-dependent parameters that are required for installation. - */ - properties?: string; - /** - * Positive number represents a timeout in seconds for the operator to be available. - */ - timeoutSeconds?: number; - status?: OperatorStatus; - /** - * Detailed information about the operator state. - */ - statusInfo?: string; - /** - * Time at which the operator was last updated. - */ - statusUpdatedAt?: string; // date-time -} -export type MonitoredOperatorsList = MonitoredOperator[]; -export interface NextStepCmdRequest { - /** - * Infra env id - */ - infraEnvId: string; // uuid - /** - * Host id - */ - hostId: string; // uuid - /** - * Agent image version - */ - agentVersion: string; // ^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$ -} -export interface NodeLabelParams { - /** - * The key for the label's key-value pair. - */ - key: string; - /** - * The value for the label's key-value pair. - */ - value: string; -} -export interface NtpSource { - /** - * NTP source name or IP. - */ - sourceName?: string; - /** - * Indication of state of an NTP source. - */ - sourceState?: SourceState; -} -export interface NtpSynchronizationRequest { - /** - * A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - */ - ntpSource: string; -} -export interface NtpSynchronizationResponse { - ntpSources?: NtpSource[]; -} -export interface OpenshiftVersion { - /** - * Name of the version to be presented to the user. - */ - displayName: string; - /** - * Level of support of the version. - */ - supportLevel: 'beta' | 'production' | 'maintenance'; - /** - * Indication that the version is the recommended one. - */ - default?: boolean; - /** - * Available CPU architectures. - */ - cpuArchitectures: string[]; -} -export interface OpenshiftVersions { - [name: string]: OpenshiftVersion; -} -export interface OperatorCreateParams { - name?: string; - /** - * Blob of operator-dependent parameters that are required for installation. - */ - properties?: string; -} -export interface OperatorHardwareRequirements { - /** - * Unique name of the operator. Corresponds to name property of the monitored-operator, i.e. "lso", "cnv", etc. - */ - operatorName?: string; - /** - * List of other operator unique names that are required to be installed. Corresponds to name property of the monitored-operator, i.e. "lso", "cnv", etc. - */ - dependencies?: string[]; - requirements?: HostTypeHardwareRequirementsWrapper; -} -export interface OperatorHostRequirements { - /** - * Name of the operator - */ - operatorName?: string; - /** - * Host requirements for the operator - */ - requirements?: ClusterHostRequirementsDetails; -} -export interface OperatorMonitorReport { - /** - * Unique name of the operator. - */ - name?: string; - /** - * operator version. - */ - version?: string; - status?: OperatorStatus; - /** - * Detailed information about the operator state. - */ - statusInfo?: string; -} -export type OperatorProperties = OperatorProperty[]; -export interface OperatorProperty { - /** - * Name of the property - */ - name?: string; - /** - * Type of the property - */ - dataType?: 'boolean' | 'string' | 'integer' | 'float'; - /** - * Indicates whether the property is reqired - */ - mandatory?: boolean; - /** - * Values to select from - */ - options?: string[]; - /** - * Description of a property - */ - description?: string; - /** - * Default value for the property - */ - defaultValue?: string; -} -/** - * Represents the operator state. - */ -export type OperatorStatus = 'failed' | 'progressing' | 'available'; -/** - * Kind of operator. Different types are monitored by the service differently. - */ -export type OperatorType = 'builtin' | 'olm'; -export interface OsImage { - /** - * Version of the operating system image - * example: - * 4.12 - */ - openshiftVersion: string; - /** - * The CPU architecture of the image (x86_64/arm64/etc). - */ - cpuArchitecture: 'x86_64' | 'aarch64' | 'arm64' | 'ppc64le' | 's390x'; - /** - * The base OS image used for the discovery iso. - */ - url: string; - /** - * Build ID of the OS image. - */ - version: string; -} -export type OsImages = OsImage[]; -/** - * The configuration for the specific platform upon which to perform the installation. - */ -export interface Platform { - type: PlatformType; - /** - * Indicates if the underlying platform type is external. - */ - readonly isExternal?: boolean; -} -export type PlatformType = 'baremetal' | 'nutanix' | 'vsphere' | 'none' | 'oci'; -export interface PreflightHardwareRequirements { - /** - * Preflight operators hardware requirements - */ - operators?: OperatorHardwareRequirements[]; - /** - * Preflight OCP requirements - */ - ocp?: HostTypeHardwareRequirementsWrapper; -} -export interface PresignedUrl { - /** - * Pre-signed URL for downloading the infra-env discovery image. - */ - url: string; - /** - * Expiration time for the URL token. - */ - expiresAt?: string; // date-time -} -export interface Proxy { - /** - * A proxy URL to use for creating HTTP connections outside the cluster. - * http://\:\@\:\ - * - */ - httpProxy?: string; - /** - * A proxy URL to use for creating HTTPS connections outside the cluster. - * http://\:\@\:\ - * - */ - httpsProxy?: string; - /** - * An "*" or a comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude from proxying. - */ - noProxy?: string; -} -/** - * Information sent to the agent for rebooting a host into discovery. - */ -export interface RebootForReclaimRequest { - /** - * The base directory on the host that contains the /boot folder. The host needs to - * chroot into this directory in order to properly reboot. - */ - hostFsMountDir: string; -} -export interface ReleaseImage { - /** - * Version of the OpenShift cluster. - */ - openshiftVersion: string; - /** - * (DEPRECATED) The CPU architecture of the image (x86_64/arm64/etc). - */ - cpuArchitecture: 'x86_64' | 'aarch64' | 'arm64' | 'ppc64le' | 's390x' | 'multi'; - /** - * List of CPU architectures provided by the image. - */ - cpuArchitectures?: string[]; - /** - * The installation image of the OpenShift cluster. - */ - url: string; - /** - * OCP version from the release metadata. - */ - version: string; - /** - * Indication that the version is the recommended one. - */ - default?: boolean; - /** - * Level of support of the version. - */ - supportLevel?: 'beta' | 'production' | 'maintenance'; -} -export type ReleaseImages = ReleaseImage[]; -export interface Route { - /** - * Interface to which packets for this route will be sent - */ - interface?: string; - /** - * Gateway address where the packets are sent - */ - gateway?: string; - /** - * The destination network or destination host - */ - destination?: string; - /** - * Defines whether this is an IPv4 (4) or IPv6 route (6) - */ - family?: number; // int32 - /** - * Route priority metric - */ - metric?: number; // int32 -} -/** - * IP address block for service IP blocks. - */ -export interface ServiceNetwork { - /** - * A network to use for service IP addresses. If you need to access the services from an external network, configure load balancers and routers to manage the traffic. - */ - clusterId?: string; // uuid - /** - * The IP block address pool. - */ - cidr?: Subnet; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ -} -export type SourceState = - | 'synced' - | 'combined' - | 'notCombined' - | 'error' - | 'variable' - | 'unreachable'; -export interface Step { - stepType?: StepType; - stepId?: string; - args?: string[]; -} -export interface StepReply { - stepType?: StepType; - stepId?: string; - exitCode?: number; - output?: string; - error?: string; -} -export type StepType = - | 'connectivity-check' - | 'execute' - | 'inventory' - | 'install' - | 'free-network-addresses' - | 'dhcp-lease-allocate' - | 'api-vip-connectivity-check' - | 'tang-connectivity-check' - | 'ntp-synchronizer' - | 'installation-disk-speed-check' - | 'container-image-availability' - | 'domain-resolution' - | 'stop-installation' - | 'logs-gather' - | 'next-step-runner' - | 'upgrade-agent' - | 'download-boot-artifacts' - | 'reboot-for-reclaim' - | 'verify-vips'; -export interface Steps { - nextInstructionSeconds?: number; - /** - * What to do after finishing to run step instructions - */ - postStepAction?: 'exit' | 'continue'; - instructions?: Step[]; -} -export type StepsReply = StepReply[]; -export type Subnet = string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ -export type SupportLevel = - | 'supported' - | 'unsupported' - | 'tech-preview' - | 'dev-preview' - | 'unavailable'; -/** - * Map of feature ID or CPU architecture alongside their support level - */ -export interface SupportLevels { - [name: string]: SupportLevel; -} -export interface SystemVendor { - serialNumber?: string; - productName?: string; - manufacturer?: string; - /** - * Whether the machine appears to be a virtual machine or not - */ - virtual?: boolean; -} -export interface TangConnectivityRequest { - /** - * JSON-formatted string containing additional information regarding tang's configuration - */ - tangServers: string; -} -export interface TangConnectivityResponse { - /** - * Tang check result. - */ - isSuccess?: boolean; - tangServerResponse?: { - /** - * Tang URL. - */ - tangUrl?: string; - /** - * Tang response payload. - */ - payload?: string; - signatures?: { - protected?: string; - signature?: string; - }[]; - }[]; -} -export interface UpdateManifestParams { - /** - * The folder for the manifest to modify. - */ - folder: 'manifests' | 'openshift'; - /** - * The file name for the manifest to modify. - */ - fileName: string; // ^[^/]*\.(yaml|yml|json)$ - /** - * The new folder for the manifest. Manifests can be placed in 'manifests' or 'openshift' directories. - */ - updatedFolder?: 'manifests' | 'openshift'; - /** - * The new file name for the manifest. - */ - updatedFileName?: string; // ^[^/]*\.(yaml|yml|json)$ - /** - * The new base64 encoded manifest content. - */ - updatedContent?: string; -} -export interface UpgradeAgentRequest { - /** - * Full image reference of the image that the agent should upgrade to, for example - * `quay.io/registry-proxy.engineering.redhat.com/rh-osbs/openshift4-assisted-installer-agent-rhel8:v1.0.0-142`. - * - */ - agentImage?: string; -} -export interface UpgradeAgentResponse { - /** - * Full image reference of the image that the agent has upgraded to, for example - * `quay.io/registry-proxy.engineering.redhat.com/rh-osbs/openshift4-assisted-installer-agent-rhel8:v1.0.0-142`. - * - */ - agentImage?: string; - result?: UpgradeAgentResult; -} -/** - * Agent upgrade result. - */ -export type UpgradeAgentResult = 'success' | 'failure'; -export interface Usage { - /** - * Unique idenftifier of the feature - */ - id?: string; - /** - * name of the feature to track - */ - name?: string; - /** - * additional properties of the feature - */ - data?: { - [name: string]: Record; - }; -} -export interface V2ClusterUpdateParams { - /** - * OpenShift cluster name. - */ - name?: string; - /** - * Base domain of the cluster. All DNS records must be sub-domains of this base and include the cluster name. - */ - baseDnsDomain?: string; - /** - * IP address block from which Pod IPs are allocated. This block must not overlap with existing physical networks. These IP addresses are used for the Pod network, and if you need to access the Pods from an external network, configure load balancers and routers to manage the traffic. - */ - clusterNetworkCidr?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ - platform?: Platform; - /** - * The subnet prefix length to assign to each individual node. For example, if clusterNetworkHostPrefix is set to 23, then each node is assigned a /23 subnet out of the given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) - 2) pod IPs addresses. If you are required to provide access to nodes from an external network, configure load balancers and routers to manage the traffic. - */ - clusterNetworkHostPrefix?: number; - /** - * The IP address pool to use for service IP addresses. You can enter only one IP address pool. If you need to access the services from an external network, configure load balancers and routers to manage the traffic. - */ - serviceNetworkCidr?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ - /** - * (DEPRECATED) The virtual IP used to reach the OpenShift cluster's API. - */ - apiVip?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$ - /** - * The virtual IPs used to reach the OpenShift cluster's API. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks. - */ - apiVips?: ApiVip[]; - /** - * (DEPRECATED) The virtual IP used for cluster ingress traffic. - */ - ingressVip?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$ - /** - * The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks. - */ - ingressVips?: IngressVip[]; - /** - * The domain name used to reach the OpenShift cluster API. - */ - apiVipDnsName?: string; - /** - * A CIDR that all hosts belonging to the cluster should have an interfaces with IP address that belongs to this CIDR. The apiVip belongs to this CIDR. - */ - machineNetworkCidr?: string; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ - /** - * The pull secret obtained from Red Hat OpenShift Cluster Manager at console.redhat.com/openshift/install/pull-secret. - */ - pullSecret?: string; - /** - * SSH public key for debugging OpenShift nodes. - */ - sshPublicKey?: string; - /** - * Indicate if virtual IP DHCP allocation mode is enabled. - */ - vipDhcpAllocation?: boolean; - /** - * A proxy URL to use for creating HTTP connections outside the cluster. - * http://\:\@\:\ - * - */ - httpProxy?: string; - /** - * A proxy URL to use for creating HTTPS connections outside the cluster. - * http://\:\@\:\ - * - */ - httpsProxy?: string; - /** - * An "*" or a comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude from proxying. - */ - noProxy?: string; - /** - * Indicate if the networking is managed by the user. - */ - userManagedNetworking?: boolean; - /** - * A comma-separated list of NTP sources (name or IP) going to be added to all the hosts. - */ - additionalNtpSource?: string; - /** - * List of OLM operators to be installed. - */ - olmOperators?: OperatorCreateParams[]; - /** - * Enable/disable hyperthreading on master nodes, worker nodes, or all nodes. - */ - hyperthreading?: 'masters' | 'workers' | 'all' | 'none'; - /** - * The desired network type used. - */ - networkType?: 'OpenShiftSDN' | 'OVNKubernetes'; - /** - * Schedule workloads on masters - */ - schedulableMasters?: boolean; - /** - * Cluster networks that are associated with this cluster. - */ - clusterNetworks?: ClusterNetwork[]; - /** - * Service networks that are associated with this cluster. - */ - serviceNetworks?: ServiceNetwork[]; - /** - * Machine networks that are associated with this cluster. - */ - machineNetworks?: MachineNetwork[]; - /** - * Installation disks encryption mode and host roles to be applied. - */ - diskEncryption?: DiskEncryption; - /** - * Explicit ignition endpoint overrides the default ignition endpoint. - */ - ignitionEndpoint?: IgnitionEndpoint; - /** - * A comma-separated list of tags that are associated to the cluster. - */ - tags?: string; -} -export interface V2Events { - clusterId?: string; - hostId?: string; - hostIds?: string /* uuid */[]; - infraEnvId?: string; - limit?: number; - offset?: number; - order?: 'ascending' | 'descending'; - severities?: ('info' | 'warning' | 'error' | 'critical')[]; - message?: string; - deletedHosts?: boolean; - clusterLevel?: boolean; - categories?: string[]; -} -export interface V2InfraEnvs { - clusterId?: string; - owner?: string; -} -export interface V2SupportLevelsArchitectures { - openshiftVersion: string; -} -export interface V2SupportLevelsFeatures { - openshiftVersion: string; - cpuArchitecture?: 'x86_64' | 'aarch64' | 'arm64' | 'ppc64le' | 's390x' | 'multi'; -} -/** - * Single VIP verification result. - */ -export interface VerifiedVip { - vip?: Ip; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$ - vipType?: VipType; - verification?: VipVerification; -} -/** - * Request to verify single vip. - */ -export interface VerifyVip { - vip?: Ip; // ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$ - vipType?: VipType; -} -/** - * list of vips to be verified. - */ -export type VerifyVipsRequest = VerifyVip[]; -/** - * list of verified vips. - */ -export type VerifyVipsResponse = VerifiedVip[]; -export interface VersionedHostRequirements { - /** - * Version of the component for which requirements are defined - */ - version?: string; - /** - * Master node requirements - */ - master?: ClusterHostRequirementsDetails; - /** - * Worker node requirements - */ - worker?: ClusterHostRequirementsDetails; - /** - * Single node OpenShift node requirements - */ - sno?: ClusterHostRequirementsDetails; - /** - * Edge Worker OpenShift node requirements - */ - 'edge-worker'?: ClusterHostRequirementsDetails; -} -export interface Versions { - [name: string]: string; -} -/** - * The vip type. - */ -export type VipType = 'api' | 'ingress'; -/** - * vip verification result. - */ -export type VipVerification = 'unverified' | 'failed' | 'succeeded'; diff --git a/libs/ui-lib/lib/common/api/utils.ts b/libs/ui-lib/lib/common/api/utils.ts index f3e0c90df8..f1734b721c 100644 --- a/libs/ui-lib/lib/common/api/utils.ts +++ b/libs/ui-lib/lib/common/api/utils.ts @@ -1,7 +1,10 @@ import Axios, { AxiosError } from 'axios'; import * as Sentry from '@sentry/browser'; import pick from 'lodash-es/pick.js'; -import { Error as APIError, InfraError } from './types'; +import { + Error as APIError, + InfraError, +} from '@openshift-assisted/types/assisted-installer-service'; import { getErrorMessage } from '../utils'; import { isAxiosError } from './axiosExtensions'; import { isInOcm } from './axiosClient'; diff --git a/libs/ui-lib/lib/common/components/AddHosts/AddHostsContext.tsx b/libs/ui-lib/lib/common/components/AddHosts/AddHostsContext.tsx index 6304573dd1..dcb29f3dc1 100644 --- a/libs/ui-lib/lib/common/components/AddHosts/AddHostsContext.tsx +++ b/libs/ui-lib/lib/common/components/AddHosts/AddHostsContext.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Cluster } from '../../api'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export type AddHostsContextType = { cluster?: Cluster; diff --git a/libs/ui-lib/lib/common/components/clusterConfiguration/CertificateFields.tsx b/libs/ui-lib/lib/common/components/clusterConfiguration/CertificateFields.tsx index d6c6057460..486a5a9933 100644 --- a/libs/ui-lib/lib/common/components/clusterConfiguration/CertificateFields.tsx +++ b/libs/ui-lib/lib/common/components/clusterConfiguration/CertificateFields.tsx @@ -5,7 +5,7 @@ import { CheckboxField, HelperText, PopoverIcon } from '../ui'; import { TrustedCertificateFieldsType } from '../../types'; import { useTranslation } from '../../hooks/use-translation-wrapper'; -import { InfraEnv } from '../../api'; +import { InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; import CertificatesUploadField from '../ui/formik/CertificatesUploadField'; import './CertificateFields.css'; const FIELD_NAME = 'trustBundle'; diff --git a/libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx b/libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx index 290e5a82d8..3fc234ee4c 100644 --- a/libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +++ b/libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx @@ -12,7 +12,11 @@ import { } from '@patternfly/react-core'; import { ExternalLinkAltIcon } from '@patternfly/react-icons'; import { Formik, FormikHelpers } from 'formik'; -import { ImageCreateParams, ImageType, Proxy } from '../../api'; +import { + ImageCreateParams, + ImageType, + Proxy, +} from '@openshift-assisted/types/assisted-installer-service'; import { AlertFormikError, httpProxyValidationSchema, diff --git a/libs/ui-lib/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionMode.tsx b/libs/ui-lib/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionMode.tsx index 591ae01975..378c1d78aa 100644 --- a/libs/ui-lib/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionMode.tsx +++ b/libs/ui-lib/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionMode.tsx @@ -13,7 +13,7 @@ import { ENCRYPTING_DISK_DURING_INSTALLATION } from '../../../config'; import PopoverIcon from '../../ui/PopoverIcon'; import { RadioField } from '../../ui/formik'; import { TangServers } from './TangServers'; -import { DiskEncryption } from '../../../api'; +import { DiskEncryption } from '@openshift-assisted/types/assisted-installer-service'; import { useTranslation } from '../../../hooks/use-translation-wrapper'; const DiskEncryptionModeTPMv2 = () => { diff --git a/libs/ui-lib/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.ts b/libs/ui-lib/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.ts index cdc0130b88..da8c3227a1 100644 --- a/libs/ui-lib/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.ts +++ b/libs/ui-lib/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.ts @@ -1,4 +1,4 @@ -import { DiskEncryption } from '../../../api'; +import { DiskEncryption } from '@openshift-assisted/types/assisted-installer-service'; export type TangServer = { url: string; diff --git a/libs/ui-lib/lib/common/components/clusterConfiguration/SNODisclaimer.tsx b/libs/ui-lib/lib/common/components/clusterConfiguration/SNODisclaimer.tsx index 2bf6b4cf8f..66b2a3cef1 100644 --- a/libs/ui-lib/lib/common/components/clusterConfiguration/SNODisclaimer.tsx +++ b/libs/ui-lib/lib/common/components/clusterConfiguration/SNODisclaimer.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Alert, AlertVariant, List, ListItem, Stack, StackItem } from '@patternfly/react-core'; import { CheckboxField } from '../ui'; import { useTranslation } from '../../hooks/use-translation-wrapper'; -import { SupportLevel } from '../../api/types'; +import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; type SNODisclaimerProps = { snoSupportLevel: SupportLevel; diff --git a/libs/ui-lib/lib/common/components/clusterConfiguration/SecurityFields.tsx b/libs/ui-lib/lib/common/components/clusterConfiguration/SecurityFields.tsx index 2b51c3f016..3e718d7674 100644 --- a/libs/ui-lib/lib/common/components/clusterConfiguration/SecurityFields.tsx +++ b/libs/ui-lib/lib/common/components/clusterConfiguration/SecurityFields.tsx @@ -4,7 +4,7 @@ import { Checkbox, FormGroup } from '@patternfly/react-core'; import { RenderIf } from '../ui/RenderIf'; import { getFieldId, HelperText, TextAreaField, trimSshPublicKey, ExternalLink } from '../ui'; -import { Cluster } from '../../api'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { NetworkConfigurationValues } from '../../types/clusters'; import { SSH_GENERATION_DOC_LINK } from '../../config'; import { useTranslation } from '../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/clusterConfiguration/utils.ts b/libs/ui-lib/lib/common/components/clusterConfiguration/utils.ts index ac86f84c0e..16b07ce7ad 100644 --- a/libs/ui-lib/lib/common/components/clusterConfiguration/utils.ts +++ b/libs/ui-lib/lib/common/components/clusterConfiguration/utils.ts @@ -8,7 +8,7 @@ import { Inventory, MachineNetwork, ServiceNetwork, -} from '../../api'; +} from '@openshift-assisted/types/assisted-installer-service'; import { NETWORK_TYPE_OVN, NETWORK_TYPE_SDN, NO_SUBNET_SET } from '../../config'; import { selectClusterNetworkCIDR, diff --git a/libs/ui-lib/lib/common/components/clusterDetail/ClusterCredentials.tsx b/libs/ui-lib/lib/common/components/clusterDetail/ClusterCredentials.tsx index 69108d5165..6a1aca5c86 100644 --- a/libs/ui-lib/lib/common/components/clusterDetail/ClusterCredentials.tsx +++ b/libs/ui-lib/lib/common/components/clusterDetail/ClusterCredentials.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { GridItem, ClipboardCopy, clipboardCopyFunc, Button, Alert } from '@patternfly/react-core'; -import { Credentials, Cluster } from '../../api/types'; +import { Credentials, Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { LoadingState, ErrorState } from '../../components/ui/uiState'; import { DetailList, DetailItem } from '../../components/ui/DetailList'; import { TroubleshootingOpenshiftConsoleButton } from './ConsoleModal'; diff --git a/libs/ui-lib/lib/common/components/clusterDetail/ClusterProgress.tsx b/libs/ui-lib/lib/common/components/clusterDetail/ClusterProgress.tsx index f50f90d719..366ab8aa05 100644 --- a/libs/ui-lib/lib/common/components/clusterDetail/ClusterProgress.tsx +++ b/libs/ui-lib/lib/common/components/clusterDetail/ClusterProgress.tsx @@ -6,7 +6,7 @@ import { ProgressMeasureLocation, ProgressVariant, } from '@patternfly/react-core'; -import { Cluster } from '../../api/types'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { DetailItem, DetailList, getHumanizedDateTime } from '../ui'; import { clusterStatusLabels } from '../../config'; import './ClusterProgress.css'; diff --git a/libs/ui-lib/lib/common/components/clusterDetail/ClusterProgressItems.tsx b/libs/ui-lib/lib/common/components/clusterDetail/ClusterProgressItems.tsx index b2a1824933..8c93bc5226 100644 --- a/libs/ui-lib/lib/common/components/clusterDetail/ClusterProgressItems.tsx +++ b/libs/ui-lib/lib/common/components/clusterDetail/ClusterProgressItems.tsx @@ -5,7 +5,7 @@ import { ProgressBarTexts } from './ProgressBarTexts'; import { FinalizingProgress } from './FinalizingProgress'; import OperatorsProgressItem from './OperatorsProgressItem'; import React from 'react'; -import { Cluster } from '../../api'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { EventListFetchProps } from '../../types'; import { selectOlmOperators } from '../../../common'; diff --git a/libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx b/libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx index bc3a71f1df..553435b53f 100644 --- a/libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx +++ b/libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx @@ -8,11 +8,12 @@ import { ExpandableSection, } from '@patternfly/react-core'; import { InfoCircleIcon } from '@patternfly/react-icons'; -import { Cluster, removeProtocolFromURL } from '../../api'; +import { removeProtocolFromURL } from '../../api'; import { ToolbarButton } from '../ui/Toolbar'; import PrismCode from '../ui/PrismCode'; import { useTranslation } from '../../hooks/use-translation-wrapper'; import { selectApiVip, selectIngressVip } from '../../selectors'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; type WebConsoleHintProps = { cluster: Cluster; diff --git a/libs/ui-lib/lib/common/components/clusterDetail/FinalizingProgress.tsx b/libs/ui-lib/lib/common/components/clusterDetail/FinalizingProgress.tsx index d9f5944370..f3c7edd018 100644 --- a/libs/ui-lib/lib/common/components/clusterDetail/FinalizingProgress.tsx +++ b/libs/ui-lib/lib/common/components/clusterDetail/FinalizingProgress.tsx @@ -1,4 +1,4 @@ -import { Cluster } from '../../api/types'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { EventListFetchProps } from '../../types'; import React from 'react'; import { EventsModal } from '../ui'; diff --git a/libs/ui-lib/lib/common/components/clusterDetail/KubeconfigDownload.tsx b/libs/ui-lib/lib/common/components/clusterDetail/KubeconfigDownload.tsx index 9342d4d389..69945e4c0d 100644 --- a/libs/ui-lib/lib/common/components/clusterDetail/KubeconfigDownload.tsx +++ b/libs/ui-lib/lib/common/components/clusterDetail/KubeconfigDownload.tsx @@ -3,7 +3,7 @@ import { saveAs } from 'file-saver'; import { Button, ButtonVariant } from '@patternfly/react-core'; import { canDownloadKubeconfig } from '../hosts/utils'; import { useAlerts } from '../AlertsContextProvider'; -import { Cluster } from '../../api/types'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { isInOcm } from '../../api/axiosClient'; import { getApiErrorMessage, handleApiError } from '../../api/utils'; import ClustersAPI from '../../api/assisted-service/ClustersAPI'; diff --git a/libs/ui-lib/lib/common/components/clusterDetail/OperatorsProgressItem.tsx b/libs/ui-lib/lib/common/components/clusterDetail/OperatorsProgressItem.tsx index 6a6ddf378e..8ba06b22ee 100644 --- a/libs/ui-lib/lib/common/components/clusterDetail/OperatorsProgressItem.tsx +++ b/libs/ui-lib/lib/common/components/clusterDetail/OperatorsProgressItem.tsx @@ -12,7 +12,12 @@ import { } from '@patternfly/react-tokens'; import { pluralize } from 'humanize-plus'; import { TFunction } from 'i18next'; -import { Cluster, MonitoredOperator, MonitoredOperatorsList, OperatorStatus } from '../../api'; +import { + Cluster, + MonitoredOperator, + MonitoredOperatorsList, + OperatorStatus, +} from '@openshift-assisted/types/assisted-installer-service'; import { operatorLabelsCim, OperatorName } from '../../config'; import ClusterProgressItem from './ClusterProgressItem'; import { useTranslation } from '../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/clusterDetail/ProgressBarTexts.tsx b/libs/ui-lib/lib/common/components/clusterDetail/ProgressBarTexts.tsx index afc4a6c353..164aeef5d8 100644 --- a/libs/ui-lib/lib/common/components/clusterDetail/ProgressBarTexts.tsx +++ b/libs/ui-lib/lib/common/components/clusterDetail/ProgressBarTexts.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Host, HostRole } from '../../api/types'; +import { Host, HostRole } from '@openshift-assisted/types/assisted-installer-service'; import { CheckCircleIcon, ExclamationCircleIcon, InProgressIcon } from '@patternfly/react-icons'; import { global_danger_color_100 as dangerColor } from '@patternfly/react-tokens/dist/esm/global_danger_color_100'; import { global_success_color_100 as okColor } from '@patternfly/react-tokens/dist/esm/global_success_color_100'; diff --git a/libs/ui-lib/lib/common/components/clusterWizard/ClusterWizardStepValidationsAlert.tsx b/libs/ui-lib/lib/common/components/clusterWizard/ClusterWizardStepValidationsAlert.tsx index 9cc5cf7550..cca68c7541 100644 --- a/libs/ui-lib/lib/common/components/clusterWizard/ClusterWizardStepValidationsAlert.tsx +++ b/libs/ui-lib/lib/common/components/clusterWizard/ClusterWizardStepValidationsAlert.tsx @@ -10,7 +10,7 @@ import { ListItem, } from '@patternfly/react-core'; import { checkHostValidations, WizardStepsValidationMap } from './validationsInfoUtils'; -import { Cluster } from '../../api/types'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { ValidationsInfo } from '../../types/clusters'; import { ValidationsInfo as HostValidationsInfo } from '../../types/hosts'; import { ClusterWizardStepHostStatusDeterminationObject } from '../../types/hosts'; diff --git a/libs/ui-lib/lib/common/components/clusterWizard/ReviewHostsInventory.tsx b/libs/ui-lib/lib/common/components/clusterWizard/ReviewHostsInventory.tsx index 725531c76d..7176a48b1a 100644 --- a/libs/ui-lib/lib/common/components/clusterWizard/ReviewHostsInventory.tsx +++ b/libs/ui-lib/lib/common/components/clusterWizard/ReviewHostsInventory.tsx @@ -1,6 +1,6 @@ import { Table, TableBody, TableVariant } from '@patternfly/react-table'; import * as React from 'react'; -import type { Inventory, Host } from '../../api'; +import type { Inventory, Host } from '@openshift-assisted/types/assisted-installer-service'; import { getEnabledHosts } from '../hosts'; import { getSimpleHardwareInfo } from '../hosts/hardwareInfo'; import { fileSize, stringToJSON } from '../../utils'; diff --git a/libs/ui-lib/lib/common/components/clusterWizard/ReviewValidations.tsx b/libs/ui-lib/lib/common/components/clusterWizard/ReviewValidations.tsx index d4221b56bc..ac83887bfd 100644 --- a/libs/ui-lib/lib/common/components/clusterWizard/ReviewValidations.tsx +++ b/libs/ui-lib/lib/common/components/clusterWizard/ReviewValidations.tsx @@ -19,7 +19,10 @@ import { ValidationsInfo as HostValidationsInfo, Validation as HostValidation, } from '../../types/hosts'; -import type { ClusterValidationId, HostValidationId } from '../../api'; +import type { + ClusterValidationId, + HostValidationId, +} from '@openshift-assisted/types/assisted-installer-service'; import { clusterValidationLabels, hostValidationLabels } from '../../config'; import { getEnabledHosts } from '../hosts'; import { findValidationFixStep } from './validationsInfoUtils'; diff --git a/libs/ui-lib/lib/common/components/clusterWizard/clusterDetailsValidation.ts b/libs/ui-lib/lib/common/components/clusterWizard/clusterDetailsValidation.ts index abbf43911e..dde1da3de0 100644 --- a/libs/ui-lib/lib/common/components/clusterWizard/clusterDetailsValidation.ts +++ b/libs/ui-lib/lib/common/components/clusterWizard/clusterDetailsValidation.ts @@ -1,6 +1,6 @@ import * as Yup from 'yup'; import { TFunction } from 'i18next'; -import { Cluster, ManagedDomain } from '../../api'; +import { Cluster, ManagedDomain } from '@openshift-assisted/types/assisted-installer-service'; import { getDefaultCpuArchitecture, OpenshiftVersionOptionType } from '../../types'; import { TangServer } from '../clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues'; import { diff --git a/libs/ui-lib/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx b/libs/ui-lib/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx index 59e1ec141b..cf25dee415 100644 --- a/libs/ui-lib/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx +++ b/libs/ui-lib/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Alert, AlertActionLink, AlertVariant, Popover } from '@patternfly/react-core'; import { HostSubnet, HostSubnets } from '../../../types/clusters'; -import { Cluster, Host } from '../../../api'; +import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service'; import { SelectField } from '../../ui'; import { NO_SUBNET_SET } from '../../../config'; import { useTranslation } from '../../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.tsx b/libs/ui-lib/lib/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.tsx index 68814b15ae..402b6a1745 100644 --- a/libs/ui-lib/lib/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.tsx +++ b/libs/ui-lib/lib/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useFormikContext } from 'formik'; import { Spinner, Alert, AlertVariant } from '@patternfly/react-core'; -import { Cluster } from '../../../api'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { HostSubnets, NetworkConfigurationValues } from '../../../types'; import { CheckboxField, FormikStaticField, InputField } from '../../ui'; import { NO_SUBNET_SET } from '../../../config'; diff --git a/libs/ui-lib/lib/common/components/clusterWizard/types.ts b/libs/ui-lib/lib/common/components/clusterWizard/types.ts index 76e3c90385..be69dafa4c 100644 --- a/libs/ui-lib/lib/common/components/clusterWizard/types.ts +++ b/libs/ui-lib/lib/common/components/clusterWizard/types.ts @@ -1,4 +1,9 @@ -import type { DiskEncryption, Host, Cluster, PlatformType } from '../../api'; +import type { + DiskEncryption, + Host, + Cluster, + PlatformType, +} from '@openshift-assisted/types/assisted-installer-service'; import { ValidationGroup as ClusterValidationGroup, diff --git a/libs/ui-lib/lib/common/components/clusterWizard/validationsInfoUtils.ts b/libs/ui-lib/lib/common/components/clusterWizard/validationsInfoUtils.ts index 02a9ae7880..9ce7a15999 100644 --- a/libs/ui-lib/lib/common/components/clusterWizard/validationsInfoUtils.ts +++ b/libs/ui-lib/lib/common/components/clusterWizard/validationsInfoUtils.ts @@ -2,7 +2,12 @@ import lodashValues from 'lodash-es/values.js'; import lodashKeys from 'lodash-es/keys.js'; import reduce from 'lodash-es/reduce.js'; -import type { Cluster, ClusterValidationId, Host, HostValidationId } from '../../api'; +import type { + Cluster, + ClusterValidationId, + Host, + HostValidationId, +} from '@openshift-assisted/types/assisted-installer-service'; import { ClusterWizardStepStatusDeterminationObject, ValidationGroup as ClusterValidationGroup, diff --git a/libs/ui-lib/lib/common/components/clusters/PullSecret.tsx b/libs/ui-lib/lib/common/components/clusters/PullSecret.tsx index fa200fc0ce..1e9ee1f2ec 100644 --- a/libs/ui-lib/lib/common/components/clusters/PullSecret.tsx +++ b/libs/ui-lib/lib/common/components/clusters/PullSecret.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Checkbox } from '@patternfly/react-core'; import { useFormikContext } from 'formik'; -import { ClusterCreateParams } from '../../api'; +import { ClusterCreateParams } from '@openshift-assisted/types/assisted-installer-service'; import { PullSecretField, PullSecretInfo } from '../ui'; import { useTranslation } from '../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/featureSupportLevels/FeatureSupportLevelBadge.tsx b/libs/ui-lib/lib/common/components/featureSupportLevels/FeatureSupportLevelBadge.tsx index c2739085b8..82879b70a6 100644 --- a/libs/ui-lib/lib/common/components/featureSupportLevels/FeatureSupportLevelBadge.tsx +++ b/libs/ui-lib/lib/common/components/featureSupportLevels/FeatureSupportLevelBadge.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { SupportLevel } from '../../api/types'; +import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; import { FeatureId, isPreviewSupportLevel } from '../../types'; import { TechnologyPreview, DeveloperPreview } from '../ui/PreviewBadge'; import { useFeatureSupportLevel } from './FeatureSupportLevelContext'; diff --git a/libs/ui-lib/lib/common/components/featureSupportLevels/FeatureSupportLevelContext.tsx b/libs/ui-lib/lib/common/components/featureSupportLevels/FeatureSupportLevelContext.tsx index 5e8dec2baf..23a2f49db4 100644 --- a/libs/ui-lib/lib/common/components/featureSupportLevels/FeatureSupportLevelContext.tsx +++ b/libs/ui-lib/lib/common/components/featureSupportLevels/FeatureSupportLevelContext.tsx @@ -3,7 +3,7 @@ import { TFunction } from 'i18next'; import { CpuArchitecture, FeatureId, FeatureIdToSupportLevel } from '../../types'; import { useTranslation } from '../../hooks/use-translation-wrapper'; -import { SupportLevel } from '../../api/types'; +import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; export type ActiveFeatureConfiguration = { underlyingCpuArchitecture: CpuArchitecture; diff --git a/libs/ui-lib/lib/common/components/fetching/EventListFetch.tsx b/libs/ui-lib/lib/common/components/fetching/EventListFetch.tsx index cbb333afcf..dc77e3d8ed 100644 --- a/libs/ui-lib/lib/common/components/fetching/EventListFetch.tsx +++ b/libs/ui-lib/lib/common/components/fetching/EventListFetch.tsx @@ -1,7 +1,7 @@ import React from 'react'; import omit from 'lodash-es/omit.js'; import { Pagination, PaginationVariant } from '@patternfly/react-core'; -import { EventList } from '../../api'; +import { EventList } from '@openshift-assisted/types/assisted-installer-service'; import { EVENTS_POLLING_INTERVAL } from '../../config'; import { ClusterEventsFiltersType, EventListFetchProps } from '../../types'; import { useStateSafely } from '../../hooks'; diff --git a/libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx b/libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx index b0120ca2b8..043cdff21a 100644 --- a/libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx +++ b/libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx @@ -11,14 +11,16 @@ import { Button, } from '@patternfly/react-core'; import { - Cluster, - V2ClusterUpdateParams, ntpSourceValidationSchema, AdditionalNTPSourcesField, StatusErrorType, } from '../../../common'; import { AlertFormikError } from '../../../common/components/ui'; import { useTranslation } from '../../hooks/use-translation-wrapper'; +import { + Cluster, + V2ClusterUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; export type AdditionalNTPSourcesFormProps = { additionalNtpSource: Cluster['additionalNtpSource']; diff --git a/libs/ui-lib/lib/common/components/hosts/DiskLimitations.tsx b/libs/ui-lib/lib/common/components/hosts/DiskLimitations.tsx index efddca9564..674f40ce88 100644 --- a/libs/ui-lib/lib/common/components/hosts/DiskLimitations.tsx +++ b/libs/ui-lib/lib/common/components/hosts/DiskLimitations.tsx @@ -8,7 +8,7 @@ import { ListItem, Popover, } from '@patternfly/react-core'; -import { Disk } from '../../api'; +import { Disk } from '@openshift-assisted/types/assisted-installer-service'; import { useTranslation } from '../../hooks/use-translation-wrapper'; type DiskLimitationsProps = { diff --git a/libs/ui-lib/lib/common/components/hosts/DiskRole.tsx b/libs/ui-lib/lib/common/components/hosts/DiskRole.tsx index a6ba0addbe..3f9fa08993 100644 --- a/libs/ui-lib/lib/common/components/hosts/DiskRole.tsx +++ b/libs/ui-lib/lib/common/components/hosts/DiskRole.tsx @@ -1,7 +1,11 @@ import React from 'react'; import { Dropdown, DropdownItem, DropdownToggle } from '@patternfly/react-core'; import { CaretDownIcon } from '@patternfly/react-icons'; -import { Disk, DiskRole as DiskRoleValue, Host } from '../../api'; +import { + Disk, + DiskRole as DiskRoleValue, + Host, +} from '@openshift-assisted/types/assisted-installer-service'; import { diskRoleLabels } from '../../config'; import { useStateSafely } from '../../hooks'; import { useTranslation } from '../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx b/libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx index 7f1af1fc33..a87d978087 100644 --- a/libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx +++ b/libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx @@ -13,7 +13,7 @@ import { import { Formik } from 'formik'; import { TFunction } from 'i18next'; -import { Host, Inventory } from '../../api'; +import { Host, Inventory } from '@openshift-assisted/types/assisted-installer-service'; import { richHostnameValidationSchema, RichInputField, diff --git a/libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx b/libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx index 14ec453663..2b50100ea0 100644 --- a/libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx +++ b/libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Modal, ModalVariant } from '@patternfly/react-core'; -import { Host, Inventory } from '../../api'; +import { Host, Inventory } from '@openshift-assisted/types/assisted-installer-service'; import EditHostForm, { EditHostFormProps } from './EditHostForm'; type EditHostModalProps = Pick< diff --git a/libs/ui-lib/lib/common/components/hosts/FormatDiskCheckbox.tsx b/libs/ui-lib/lib/common/components/hosts/FormatDiskCheckbox.tsx index 01fcbc1c91..30e013278d 100644 --- a/libs/ui-lib/lib/common/components/hosts/FormatDiskCheckbox.tsx +++ b/libs/ui-lib/lib/common/components/hosts/FormatDiskCheckbox.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Checkbox, Tooltip } from '@patternfly/react-core'; -import { Disk, Host } from '../../api'; +import { Disk, Host } from '@openshift-assisted/types/assisted-installer-service'; import { trimCommaSeparatedList } from '../..'; export type DiskFormattingType = ( diff --git a/libs/ui-lib/lib/common/components/hosts/HostProgress.tsx b/libs/ui-lib/lib/common/components/hosts/HostProgress.tsx index bb518f05c1..d7de57d3df 100644 --- a/libs/ui-lib/lib/common/components/hosts/HostProgress.tsx +++ b/libs/ui-lib/lib/common/components/hosts/HostProgress.tsx @@ -5,7 +5,7 @@ import { ProgressMeasureLocation, ProgressSize, } from '@patternfly/react-core'; -import { Host } from '../../api'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; import { getHostProgress, getHostProgressStages, getHostProgressStageNumber } from './utils'; const getProgressVariant = (status: Host['status']) => { diff --git a/libs/ui-lib/lib/common/components/hosts/HostRowDetail.tsx b/libs/ui-lib/lib/common/components/hosts/HostRowDetail.tsx index 69ec7aa26a..342218f8be 100644 --- a/libs/ui-lib/lib/common/components/hosts/HostRowDetail.tsx +++ b/libs/ui-lib/lib/common/components/hosts/HostRowDetail.tsx @@ -11,7 +11,7 @@ import { } from '@patternfly/react-table'; import { ExtraParamsType } from '@patternfly/react-table/dist/js/components/Table/base'; import { DetailItem, DetailList, DetailListProps } from '../ui'; -import type { Disk, Host, Interface } from '../../api'; +import type { Disk, Host, Interface } from '@openshift-assisted/types/assisted-installer-service'; import type { ValidationsInfo } from '../../types/hosts'; import type { WithTestID } from '../../types/index'; import { DASH } from '../constants'; diff --git a/libs/ui-lib/lib/common/components/hosts/HostStatus.tsx b/libs/ui-lib/lib/common/components/hosts/HostStatus.tsx index 88cef690be..0f7e4e3267 100644 --- a/libs/ui-lib/lib/common/components/hosts/HostStatus.tsx +++ b/libs/ui-lib/lib/common/components/hosts/HostStatus.tsx @@ -13,7 +13,7 @@ import { import { PopoverProps } from '@patternfly/react-core/dist/js/components/Popover/Popover'; import hdate from 'human-date'; -import { Host } from '../../api'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; import { ValidationsInfo } from '../../types/hosts'; import { ExternalLink, getHumanizedDateTime } from '../ui'; diff --git a/libs/ui-lib/lib/common/components/hosts/HostValidationGroups.tsx b/libs/ui-lib/lib/common/components/hosts/HostValidationGroups.tsx index 55dfc4348a..2d5035af15 100644 --- a/libs/ui-lib/lib/common/components/hosts/HostValidationGroups.tsx +++ b/libs/ui-lib/lib/common/components/hosts/HostValidationGroups.tsx @@ -6,7 +6,7 @@ import { } from '@patternfly/react-tokens'; import { PendingIcon, CheckCircleIcon, ExclamationTriangleIcon } from '@patternfly/react-icons'; -import { Host, HostValidationId } from '../../api'; +import { Host, HostValidationId } from '@openshift-assisted/types/assisted-installer-service'; import { Validation, ValidationsInfo } from '../../types/hosts'; import { hostValidationFailureHints, diff --git a/libs/ui-lib/lib/common/components/hosts/Hostname.tsx b/libs/ui-lib/lib/common/components/hosts/Hostname.tsx index f7c09c2388..2d5b16e7e9 100644 --- a/libs/ui-lib/lib/common/components/hosts/Hostname.tsx +++ b/libs/ui-lib/lib/common/components/hosts/Hostname.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Button, ButtonVariant, Flex, FlexItem, Popover } from '@patternfly/react-core'; import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens'; -import type { Host, Inventory } from '../../api'; +import type { Host, Inventory } from '@openshift-assisted/types/assisted-installer-service'; import { getHostname } from './utils'; import { DASH } from '../constants'; import { useTranslation } from '../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/hosts/HostsCount.tsx b/libs/ui-lib/lib/common/components/hosts/HostsCount.tsx index 9bf568ceed..f171368987 100644 --- a/libs/ui-lib/lib/common/components/hosts/HostsCount.tsx +++ b/libs/ui-lib/lib/common/components/hosts/HostsCount.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Popover, Level, LevelItem } from '@patternfly/react-core'; -import { Cluster } from '../../api'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { getEnabledHostCount, getReadyHostCount, getTotalHostCount } from './utils'; import { useTranslation } from '../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/hosts/HostsTable.tsx b/libs/ui-lib/lib/common/components/hosts/HostsTable.tsx index 84a04aba98..f574417715 100644 --- a/libs/ui-lib/lib/common/components/hosts/HostsTable.tsx +++ b/libs/ui-lib/lib/common/components/hosts/HostsTable.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { ConnectedIcon } from '@patternfly/react-icons'; import { HostsNotShowingLink, HostsNotShowingLinkProps } from '../clusterConfiguration'; -import { Host } from '../../api'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; import AITable, { ExpandComponentProps, AITableProps, diff --git a/libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx b/libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx index 46dd61eb29..505c94ce10 100644 --- a/libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx +++ b/libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx @@ -29,7 +29,7 @@ import { ModalProgress, FORBIDDEN_HOSTNAMES, } from '../ui'; -import { Host } from '../../api'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; import { getHostname as getHostnameUtils, getInventory } from './utils'; import { ActionCheck } from './types'; import { useTranslation } from '../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/hosts/MassDeleteHostModal.tsx b/libs/ui-lib/lib/common/components/hosts/MassDeleteHostModal.tsx index 5a09dadd9a..56927e117b 100644 --- a/libs/ui-lib/lib/common/components/hosts/MassDeleteHostModal.tsx +++ b/libs/ui-lib/lib/common/components/hosts/MassDeleteHostModal.tsx @@ -10,7 +10,7 @@ import { } from '@patternfly/react-core'; import ModalProgress from '../ui/ModalProgress'; -import { Host } from '../../api'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; import { getErrorMessage } from '../../utils'; import { useTranslation } from '../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/hosts/RoleCell.tsx b/libs/ui-lib/lib/common/components/hosts/RoleCell.tsx index 050f05122f..5acfa87961 100644 --- a/libs/ui-lib/lib/common/components/hosts/RoleCell.tsx +++ b/libs/ui-lib/lib/common/components/hosts/RoleCell.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Host, HostUpdateParams } from '../../api'; +import { Host, HostUpdateParams } from '@openshift-assisted/types/assisted-installer-service'; import RoleDropdown from './RoleDropdown'; export type RoleCellProps = { diff --git a/libs/ui-lib/lib/common/components/hosts/RoleDropdown.tsx b/libs/ui-lib/lib/common/components/hosts/RoleDropdown.tsx index fe9fa0d327..7a885d1a7b 100644 --- a/libs/ui-lib/lib/common/components/hosts/RoleDropdown.tsx +++ b/libs/ui-lib/lib/common/components/hosts/RoleDropdown.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { hostRoles } from '../../config/constants'; -import { Host, HostUpdateParams } from '../../api'; +import { Host, HostUpdateParams } from '@openshift-assisted/types/assisted-installer-service'; import { SimpleDropdown } from '../ui'; import { useStateSafely } from '../../hooks'; import { useTranslation } from '../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/hosts/hardwareInfo.ts b/libs/ui-lib/lib/common/components/hosts/hardwareInfo.ts index d0fe4182b9..236c2b1cda 100644 --- a/libs/ui-lib/lib/common/components/hosts/hardwareInfo.ts +++ b/libs/ui-lib/lib/common/components/hosts/hardwareInfo.ts @@ -1,5 +1,5 @@ import Humanize from 'humanize-plus'; -import { Disk, Inventory } from '../../api'; +import { Disk, Inventory } from '@openshift-assisted/types/assisted-installer-service'; import { DASH, OpticalDiskDriveType } from '../constants'; import { HumanizedSortable } from '../ui/table/utils'; import { fileSize } from '../../utils'; diff --git a/libs/ui-lib/lib/common/components/hosts/status.tsx b/libs/ui-lib/lib/common/components/hosts/status.tsx index 2ad34099d8..8c17e5d5d0 100644 --- a/libs/ui-lib/lib/common/components/hosts/status.tsx +++ b/libs/ui-lib/lib/common/components/hosts/status.tsx @@ -17,7 +17,7 @@ import { global_success_color_100 as okColor, chart_color_blue_300 as blueColor, } from '@patternfly/react-tokens'; -import { Host } from '../../api'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; import { HostStatus } from './types'; export const hostStatus: HostStatus = Object.freeze({ diff --git a/libs/ui-lib/lib/common/components/hosts/tableUtils.tsx b/libs/ui-lib/lib/common/components/hosts/tableUtils.tsx index 7b6aa4154c..b576421916 100644 --- a/libs/ui-lib/lib/common/components/hosts/tableUtils.tsx +++ b/libs/ui-lib/lib/common/components/hosts/tableUtils.tsx @@ -1,7 +1,12 @@ import { breakWord, expandable, sortable } from '@patternfly/react-table'; import * as React from 'react'; import { Address4, Address6 } from 'ip-address'; -import type { Cluster, Host, HostUpdateParams, Interface } from '../../api'; +import type { + Cluster, + Host, + HostUpdateParams, + Interface, +} from '@openshift-assisted/types/assisted-installer-service'; import type { ValidationsInfo as HostValidationsInfo } from '../../types/hosts'; import { getSubnet } from '../clusterConfiguration'; import { DASH } from '../constants'; diff --git a/libs/ui-lib/lib/common/components/hosts/types.ts b/libs/ui-lib/lib/common/components/hosts/types.ts index bb2ba5b7d9..4412bf4e0a 100644 --- a/libs/ui-lib/lib/common/components/hosts/types.ts +++ b/libs/ui-lib/lib/common/components/hosts/types.ts @@ -1,5 +1,10 @@ import React from 'react'; -import { Cluster, Disk, Host, HostUpdateParams } from '../../api'; +import { + Cluster, + Disk, + Host, + HostUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; import { ValidationsInfo } from '../../types/hosts'; import { HostsNotShowingLinkProps } from '../clusterConfiguration'; import { OnDiskRoleType } from './DiskRole'; diff --git a/libs/ui-lib/lib/common/components/hosts/utils.ts b/libs/ui-lib/lib/common/components/hosts/utils.ts index 6164c4ebe0..d1aef105c9 100644 --- a/libs/ui-lib/lib/common/components/hosts/utils.ts +++ b/libs/ui-lib/lib/common/components/hosts/utils.ts @@ -1,6 +1,10 @@ import Fuse from 'fuse.js'; import { TFunction } from 'i18next'; -import type { Host, Cluster, Inventory } from '../../api/types'; +import type { + Host, + Cluster, + Inventory, +} from '@openshift-assisted/types/assisted-installer-service'; import { stringToJSON } from '../../utils'; import { hostRoles, TIME_ZERO } from '../../config'; import { DASH } from '../constants'; diff --git a/libs/ui-lib/lib/common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge.tsx b/libs/ui-lib/lib/common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge.tsx index 8426c787f9..26878a91f2 100644 --- a/libs/ui-lib/lib/common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge.tsx +++ b/libs/ui-lib/lib/common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { SupportLevel } from '../../api'; +import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; import { FeatureId, isPreviewSupportLevel } from '../../types'; import { TechnologyPreview, DeveloperPreview } from '../ui/PreviewBadge'; diff --git a/libs/ui-lib/lib/common/components/newFeatureSupportLevels/types.ts b/libs/ui-lib/lib/common/components/newFeatureSupportLevels/types.ts index 513e823dbd..9a8f755b25 100644 --- a/libs/ui-lib/lib/common/components/newFeatureSupportLevels/types.ts +++ b/libs/ui-lib/lib/common/components/newFeatureSupportLevels/types.ts @@ -1,4 +1,8 @@ -import { ArchitectureSupportLevelId, FeatureSupportLevelId, SupportLevel } from '../../api/types'; +import { + ArchitectureSupportLevelId, + FeatureSupportLevelId, + SupportLevel, +} from '@openshift-assisted/types/assisted-installer-service'; import { CpuArchitecture, FeatureId } from '../../types'; export type NewFeatureSupportLevelMap = Record; diff --git a/libs/ui-lib/lib/common/components/newFeatureSupportLevels/utils.ts b/libs/ui-lib/lib/common/components/newFeatureSupportLevels/utils.ts index 54da4c56df..171e1cbf7a 100644 --- a/libs/ui-lib/lib/common/components/newFeatureSupportLevels/utils.ts +++ b/libs/ui-lib/lib/common/components/newFeatureSupportLevels/utils.ts @@ -1,4 +1,4 @@ -import { Cluster, SupportLevel } from '../../api'; +import { Cluster, SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; import { ClusterFeatureUsage, FeatureId, FeatureIdToSupportLevel } from '../../types'; import type { NewFeatureSupportLevelData, NewFeatureSupportLevelMap } from './types'; import { TFunction } from 'i18next'; diff --git a/libs/ui-lib/lib/common/components/storage/DisksTable.tsx b/libs/ui-lib/lib/common/components/storage/DisksTable.tsx index a9376d5c42..6dbd60b6dd 100644 --- a/libs/ui-lib/lib/common/components/storage/DisksTable.tsx +++ b/libs/ui-lib/lib/common/components/storage/DisksTable.tsx @@ -17,7 +17,7 @@ import { IRow, } from '@patternfly/react-table'; import { ExtraParamsType } from '@patternfly/react-table/dist/js/components/Table/base'; -import type { Disk, Host } from '../../api/types'; +import type { Disk, Host } from '@openshift-assisted/types/assisted-installer-service'; import type { WithTestID } from '../../types/index'; import DiskRole, { OnDiskRoleType } from '../hosts/DiskRole'; import DiskLimitations from '../hosts/DiskLimitations'; diff --git a/libs/ui-lib/lib/common/components/storage/StorageDetail.tsx b/libs/ui-lib/lib/common/components/storage/StorageDetail.tsx index 3c4521402c..d1b4d32eb4 100644 --- a/libs/ui-lib/lib/common/components/storage/StorageDetail.tsx +++ b/libs/ui-lib/lib/common/components/storage/StorageDetail.tsx @@ -1,10 +1,11 @@ import React from 'react'; import { Grid, GridItem } from '@patternfly/react-core'; -import { getInventory, Host } from '../../index'; +import { getInventory } from '../../index'; import { OnDiskRoleType } from '../hosts/DiskRole'; import { DiskFormattingType } from '../hosts/FormatDiskCheckbox'; import { DisksTable } from './DisksTable'; import SectionTitle from '../ui/SectionTitle'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; type StorageDetailProps = { host: Host; diff --git a/libs/ui-lib/lib/common/components/storage/StorageTable.tsx b/libs/ui-lib/lib/common/components/storage/StorageTable.tsx index 006cc8fd41..dd4a156769 100644 --- a/libs/ui-lib/lib/common/components/storage/StorageTable.tsx +++ b/libs/ui-lib/lib/common/components/storage/StorageTable.tsx @@ -1,7 +1,8 @@ import * as React from 'react'; -import { Host, WithTestID } from '../../index'; +import { WithTestID } from '../../index'; import { usePagination } from '../hosts/usePagination'; import AITable, { AITableProps } from '../hosts/AITable'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; const getHostId = (host: Host) => host.id; diff --git a/libs/ui-lib/lib/common/components/storage/StorageUtils.tsx b/libs/ui-lib/lib/common/components/storage/StorageUtils.tsx index d470d6a7d7..e7ee2d82e8 100644 --- a/libs/ui-lib/lib/common/components/storage/StorageUtils.tsx +++ b/libs/ui-lib/lib/common/components/storage/StorageUtils.tsx @@ -1,11 +1,12 @@ import * as React from 'react'; import { sortable } from '@patternfly/react-table'; import { TFunction } from 'i18next'; -import { getHostRole, getInventory, Host, RoleCell } from '../../index'; +import { getHostRole, getInventory, RoleCell } from '../../index'; import { TableRow } from '../hosts/AITable'; import { Popover, Text, TextContent, TextVariants } from '@patternfly/react-core'; import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens/dist/js/global_warning_color_100'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; const SkipFormattingDisks = () => ( diff --git a/libs/ui-lib/lib/common/components/ui/ClusterEventsToolbar.tsx b/libs/ui-lib/lib/common/components/ui/ClusterEventsToolbar.tsx index c803ed3c38..7696c20ffa 100644 --- a/libs/ui-lib/lib/common/components/ui/ClusterEventsToolbar.tsx +++ b/libs/ui-lib/lib/common/components/ui/ClusterEventsToolbar.tsx @@ -21,7 +21,12 @@ import { } from '@patternfly/react-core'; import { SearchIcon, FilterIcon } from '@patternfly/react-icons'; import type { ClusterEventsFiltersType } from '../../types'; -import type { Cluster, Event, Host, Inventory } from '../../api'; +import type { + Cluster, + Event, + Host, + Inventory, +} from '@openshift-assisted/types/assisted-installer-service'; import { EVENT_SEVERITIES } from '../../config'; import { useTranslation } from '../../hooks/use-translation-wrapper'; import { isSelectEventChecked } from './utils'; diff --git a/libs/ui-lib/lib/common/components/ui/EventsList.tsx b/libs/ui-lib/lib/common/components/ui/EventsList.tsx index 178c7b818f..96b46976d6 100644 --- a/libs/ui-lib/lib/common/components/ui/EventsList.tsx +++ b/libs/ui-lib/lib/common/components/ui/EventsList.tsx @@ -8,7 +8,7 @@ import { SearchIcon, } from '@patternfly/react-icons'; import { ExtraParamsType } from '@patternfly/react-table/dist/js/components/Table/base'; -import { Event, EventList } from '../../api'; +import { Event, EventList } from '@openshift-assisted/types/assisted-installer-service'; import { EmptyState } from './uiState'; import { getHumanizedDateTime } from './utils'; import { fitContent, noPadding } from './table'; diff --git a/libs/ui-lib/lib/common/components/ui/ViewClusterEventsButton.tsx b/libs/ui-lib/lib/common/components/ui/ViewClusterEventsButton.tsx index 7384f399c3..f7ddfb4023 100644 --- a/libs/ui-lib/lib/common/components/ui/ViewClusterEventsButton.tsx +++ b/libs/ui-lib/lib/common/components/ui/ViewClusterEventsButton.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { ButtonVariant } from '@patternfly/react-core'; import { EventsModalButton } from './eventsModal'; import { MonitoringIcon } from '@patternfly/react-icons'; -import { Cluster } from '../../api'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { EventListFetchProps } from '../../types'; import { useTranslation } from '../../hooks/use-translation-wrapper'; diff --git a/libs/ui-lib/lib/common/components/ui/WizardFooter.tsx b/libs/ui-lib/lib/common/components/ui/WizardFooter.tsx index b3270b2605..8c13bba5d3 100644 --- a/libs/ui-lib/lib/common/components/ui/WizardFooter.tsx +++ b/libs/ui-lib/lib/common/components/ui/WizardFooter.tsx @@ -12,7 +12,7 @@ import { TextVariants, } from '@patternfly/react-core'; import { useTranslation } from '../../hooks/use-translation-wrapper'; -import { Cluster } from '../../api'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { EventListFetchProps } from '../../types/events'; import ViewClusterEventsButton from './ViewClusterEventsButton'; diff --git a/libs/ui-lib/lib/common/components/ui/eventsModal.tsx b/libs/ui-lib/lib/common/components/ui/eventsModal.tsx index be8ae038e0..08ea14ee63 100644 --- a/libs/ui-lib/lib/common/components/ui/eventsModal.tsx +++ b/libs/ui-lib/lib/common/components/ui/eventsModal.tsx @@ -11,7 +11,7 @@ import { import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import { global_warning_color_100 as globalWarningColor100 } from '@patternfly/react-tokens'; import { ToolbarButton } from './Toolbar'; -import { Cluster, Event } from '../../api'; +import { Cluster, Event } from '@openshift-assisted/types/assisted-installer-service'; import { EventListFetchProps, EventsEntityKind } from '../../types'; import { EventListFetch } from '../fetching/EventListFetch'; import ExternalLink from './ExternalLink'; diff --git a/libs/ui-lib/lib/common/components/ui/formik/SingleNodeCheckbox.tsx b/libs/ui-lib/lib/common/components/ui/formik/SingleNodeCheckbox.tsx index 16c5e67212..5a1c4b75ef 100644 --- a/libs/ui-lib/lib/common/components/ui/formik/SingleNodeCheckbox.tsx +++ b/libs/ui-lib/lib/common/components/ui/formik/SingleNodeCheckbox.tsx @@ -7,7 +7,7 @@ import { getFieldId } from './utils'; import HelperText from './HelperText'; import { CheckboxFieldProps } from './types'; import { FeatureSupportLevelBadge, useFeatureSupportLevel } from '../../featureSupportLevels'; -import { ClusterCreateParams } from '../../../api/types'; +import { ClusterCreateParams } from '@openshift-assisted/types/assisted-installer-service'; import { useTranslation } from '../../../hooks/use-translation-wrapper'; type SingleNodeCheckboxProps = CheckboxFieldProps & { versions: OpenshiftVersionOptionType[] }; diff --git a/libs/ui-lib/lib/common/components/ui/formik/utils.ts b/libs/ui-lib/lib/common/components/ui/formik/utils.ts index 484fa4b2fd..609df81f2b 100644 --- a/libs/ui-lib/lib/common/components/ui/formik/utils.ts +++ b/libs/ui-lib/lib/common/components/ui/formik/utils.ts @@ -5,7 +5,11 @@ import set from 'lodash-es/set.js'; import groupBy from 'lodash-es/groupBy.js'; import pickBy from 'lodash-es/pickBy.js'; import { OpenshiftVersionOptionType } from '../../../types'; -import { ClusterNetwork, MachineNetwork, ServiceNetwork } from '../../../api'; +import { + ClusterNetwork, + MachineNetwork, + ServiceNetwork, +} from '@openshift-assisted/types/assisted-installer-service'; import { getKeys } from '../../../utils'; export const getFieldId = (fieldName: string, fieldType: string, unique?: string) => { diff --git a/libs/ui-lib/lib/common/components/ui/formik/validationSchemas.ts b/libs/ui-lib/lib/common/components/ui/formik/validationSchemas.ts index 8825410c68..655111dddd 100644 --- a/libs/ui-lib/lib/common/components/ui/formik/validationSchemas.ts +++ b/libs/ui-lib/lib/common/components/ui/formik/validationSchemas.ts @@ -11,7 +11,7 @@ import { IngressVip, MachineNetwork, ServiceNetwork, -} from '../../../api/types'; +} from '@openshift-assisted/types/assisted-installer-service'; import { NO_SUBNET_SET } from '../../../config/constants'; import { ProxyFieldsType } from '../../../types'; import { HostSubnets, NetworkConfigurationValues } from '../../../types/clusters'; diff --git a/libs/ui-lib/lib/common/config/constants.ts b/libs/ui-lib/lib/common/config/constants.ts index 77983ba19f..626de565b5 100644 --- a/libs/ui-lib/lib/common/config/constants.ts +++ b/libs/ui-lib/lib/common/config/constants.ts @@ -1,6 +1,12 @@ import { TFunction } from 'i18next'; import { ValidationsInfo, HostRole } from '../types/hosts'; -import { Cluster, ClusterValidationId, DiskRole, Event, HostValidationId } from '../api'; +import { + Cluster, + ClusterValidationId, + DiskRole, + Event, + HostValidationId, +} from '@openshift-assisted/types/assisted-installer-service'; import { ValidationGroup as ClusterValidationGroup } from '../types/clusters'; import { FeatureSupportLevelData } from '../components/featureSupportLevels/FeatureSupportLevelContext'; import type { NewFeatureSupportLevelData } from '../components/newFeatureSupportLevels'; @@ -219,7 +225,7 @@ export const hostValidationFailureHints = ( export const clusterValidationLabels = ( t: TFunction, -): { [key in ClusterValidationId]: string } => ({ +): { [key in ClusterValidationId]?: string } => ({ 'network-type-valid': t('ai:Valid network type'), 'machine-cidr-defined': t('ai:Machine CIDR'), 'cluster-cidr-defined': t('ai:Cluster CIDR'), diff --git a/libs/ui-lib/lib/common/selectors/clusterSelectors.ts b/libs/ui-lib/lib/common/selectors/clusterSelectors.ts index 40f2fd3c1e..a6c7ad6ebb 100644 --- a/libs/ui-lib/lib/common/selectors/clusterSelectors.ts +++ b/libs/ui-lib/lib/common/selectors/clusterSelectors.ts @@ -1,6 +1,6 @@ import head from 'lodash-es/head.js'; import { SupportedPlatformIntegrations, ValidationsInfo } from '../types'; -import { Cluster, Ip } from '../api'; +import { Cluster, Ip } from '@openshift-assisted/types/assisted-installer-service'; import { ExposedOperatorName } from '../config'; import { stringToJSON } from '../utils'; diff --git a/libs/ui-lib/lib/common/types/clusters.ts b/libs/ui-lib/lib/common/types/clusters.ts index 27a2d4f68a..973a37b8f3 100644 --- a/libs/ui-lib/lib/common/types/clusters.ts +++ b/libs/ui-lib/lib/common/types/clusters.ts @@ -5,7 +5,7 @@ import { ClusterValidationId, PlatformType, ImageType, -} from '../api'; +} from '@openshift-assisted/types/assisted-installer-service'; import { Validation as HostValidation } from './hosts'; export type Validation = Omit & { id: ClusterValidationId; diff --git a/libs/ui-lib/lib/common/types/cpuArchitecture.ts b/libs/ui-lib/lib/common/types/cpuArchitecture.ts index 46736579fd..c699f652f7 100644 --- a/libs/ui-lib/lib/common/types/cpuArchitecture.ts +++ b/libs/ui-lib/lib/common/types/cpuArchitecture.ts @@ -1,4 +1,4 @@ -import { ArchitectureSupportLevelId } from '../api'; +import { ArchitectureSupportLevelId } from '@openshift-assisted/types/assisted-installer-service'; export type ClusterCpuArchitecture = 'x86_64' | 'aarch64' | 'arm64' | 'ppc64le' | 's390x' | 'multi'; diff --git a/libs/ui-lib/lib/common/types/events.ts b/libs/ui-lib/lib/common/types/events.ts index ccfdae3140..6f185e6596 100644 --- a/libs/ui-lib/lib/common/types/events.ts +++ b/libs/ui-lib/lib/common/types/events.ts @@ -1,4 +1,9 @@ -import { Cluster, Event, EventList, V2Events } from '../api'; +import { + Cluster, + Event, + EventList, + V2Events, +} from '@openshift-assisted/types/assisted-installer-service'; export type EventsEntityKind = 'cluster' | 'host'; diff --git a/libs/ui-lib/lib/common/types/featureSupportLevel.ts b/libs/ui-lib/lib/common/types/featureSupportLevel.ts index 573eb6e891..756bc53da8 100644 --- a/libs/ui-lib/lib/common/types/featureSupportLevel.ts +++ b/libs/ui-lib/lib/common/types/featureSupportLevel.ts @@ -1,4 +1,8 @@ -import { FeatureSupportLevel, FeatureSupportLevelId, SupportLevel } from '../api/types'; +import { + FeatureSupportLevel, + FeatureSupportLevelId, + SupportLevel, +} from '@openshift-assisted/types/assisted-installer-service'; import { ArrayElementType } from './typescriptExtensions'; type Features = Required>; diff --git a/libs/ui-lib/lib/common/types/generateIsoFields.ts b/libs/ui-lib/lib/common/types/generateIsoFields.ts index ab465e6469..f9ba4868f5 100644 --- a/libs/ui-lib/lib/common/types/generateIsoFields.ts +++ b/libs/ui-lib/lib/common/types/generateIsoFields.ts @@ -1,4 +1,4 @@ -import { Cluster, InfraEnv } from '../api'; +import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; export type ProxyFieldsType = { enableProxy: boolean; diff --git a/libs/ui-lib/lib/common/types/hosts.ts b/libs/ui-lib/lib/common/types/hosts.ts index ad7a73c5db..594d0387cb 100644 --- a/libs/ui-lib/lib/common/types/hosts.ts +++ b/libs/ui-lib/lib/common/types/hosts.ts @@ -1,4 +1,8 @@ -import { Host, HostRoleUpdateParams, HostValidationId } from '../api'; +import { + Host, + HostRoleUpdateParams, + HostValidationId, +} from '@openshift-assisted/types/assisted-installer-service'; export type Validation = { id: HostValidationId; diff --git a/libs/ui-lib/lib/common/types/versions.ts b/libs/ui-lib/lib/common/types/versions.ts index 16b3e5583d..adf22003d5 100644 --- a/libs/ui-lib/lib/common/types/versions.ts +++ b/libs/ui-lib/lib/common/types/versions.ts @@ -1,4 +1,7 @@ -import { ClusterCreateParams, OpenshiftVersion } from '../api/types'; +import { + ClusterCreateParams, + OpenshiftVersion, +} from '@openshift-assisted/types/assisted-installer-service'; import { CpuArchitecture } from './cpuArchitecture'; export type OpenshiftVersionOptionType = { diff --git a/libs/ui-lib/lib/ocm/components/AddHosts/InventoryAddHost.tsx b/libs/ui-lib/lib/ocm/components/AddHosts/InventoryAddHost.tsx index 7011162485..116bf579b6 100644 --- a/libs/ui-lib/lib/ocm/components/AddHosts/InventoryAddHost.tsx +++ b/libs/ui-lib/lib/ocm/components/AddHosts/InventoryAddHost.tsx @@ -2,10 +2,11 @@ import React from 'react'; import { Text, TextContent, Alert, AlertVariant, Stack, StackItem } from '@patternfly/react-core'; import ClusterHostsTable from '../hosts/ClusterHostsTable'; import InformationAndAlerts from '../clusterConfiguration/InformationAndAlerts'; -import { Cluster, CpuArchitecture } from '../../../common'; +import { CpuArchitecture } from '../../../common'; import Day2WizardContextProvider from './day2Wizard/Day2WizardContextProvider'; import Day2DiscoveryImageModalButton from './day2Wizard/Day2DiscoveryImageModalButton'; import Day2Wizard from './day2Wizard/Day2Wizard'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const InventoryAddHosts = ({ cluster, diff --git a/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.tsx b/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.tsx index 82d2f4c77d..07c6453ed8 100644 --- a/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.tsx +++ b/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.tsx @@ -2,7 +2,6 @@ import { Alert, Grid, GridItem } from '@patternfly/react-core'; import { Form, Formik } from 'formik'; import React from 'react'; import { - Cluster, ClusterCpuArchitecture, ClusterWizardStep, ClusterWizardStepHeader, @@ -11,8 +10,6 @@ import { ExternalLink, getSupportedCpuArchitectures, HOW_TO_KNOW_IF_CLUSTER_SUPPORTS_MULTIPLE_CPU_ARCHS, - InfraEnv, - InfraEnvCreateParams, LoadingState, SupportedCpuArchitecture, useFeature, @@ -28,6 +25,11 @@ import Day2HostStaticIpConfigurations from './Day2StaticIpHostConfigurations'; import { mapClusterCpuArchToInfraEnvCpuArch } from '../../../services/CpuArchitectureService'; import CpuArchitectureDropdown from '../../clusterConfiguration/CpuArchitectureDropdown'; import { useOpenshiftVersions, usePullSecret } from '../../../hooks'; +import { + Cluster, + InfraEnv, + InfraEnvCreateParams, +} from '@openshift-assisted/types/assisted-installer-service'; const getDay2ClusterDetailInitialValues = async ( clusterId: Cluster['id'], diff --git a/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2DiscoveryImageModalButton.tsx b/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2DiscoveryImageModalButton.tsx index 70ac1217c8..7e08b1c0f5 100644 --- a/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2DiscoveryImageModalButton.tsx +++ b/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2DiscoveryImageModalButton.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { Button, ButtonVariant } from '@patternfly/react-core'; -import { AddHostsContext, Cluster } from '../../../../common'; +import { AddHostsContext } from '../../../../common'; import { useModalDialogsContext } from '../../hosts/ModalDialogsContext'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const Day2DiscoveryImageModalButton = ({ cluster }: { cluster: Cluster }) => { const { day2DiscoveryImageDialog } = useModalDialogsContext(); diff --git a/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2StaticIP.tsx b/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2StaticIP.tsx index dbcc07173a..81d1da38fd 100644 --- a/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2StaticIP.tsx +++ b/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2StaticIP.tsx @@ -9,13 +9,7 @@ import { Button, ButtonVariant, } from '@patternfly/react-core'; -import { - ClusterWizardStep, - ErrorState, - InfraEnv, - InfraEnvUpdateParams, - LoadingState, -} from '../../../../common'; +import { ClusterWizardStep, ErrorState, LoadingState } from '../../../../common'; import { HostsNetworkConfigurationType, InfraEnvsService } from '../../../services'; import { FormViewHosts } from '../../clusterConfiguration/staticIp/components/FormViewHosts/FormViewHosts'; import { FormViewNetworkWide } from '../../clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWide'; @@ -32,6 +26,10 @@ import { useModalDialogsContext } from '../../hosts/ModalDialogsContext'; import { useDay2WizardContext } from './Day2WizardContext'; import Day2WizardNav from './Day2WizardNav'; import Day2WizardFooter from './Day2WizardFooter'; +import { + InfraEnv, + InfraEnvUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; const Day2StaticIP = () => { const { day2DiscoveryImageDialog } = useModalDialogsContext(); diff --git a/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2WizardContextProvider.tsx b/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2WizardContextProvider.tsx index ac61b316bb..c1d9c5292c 100644 --- a/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2WizardContextProvider.tsx +++ b/libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2WizardContextProvider.tsx @@ -2,14 +2,13 @@ import React, { PropsWithChildren } from 'react'; import Day2WizardContext, { Day2WizardContextType } from './Day2WizardContext'; import { AssistedInstallerOCMPermissionTypesListType, - Cluster, CpuArchitecture, getDefaultCpuArchitecture, - InfraEnv, } from '../../../../common'; import { Day2WizardStepsType, defaultWizardSteps, staticIpFormViewSubSteps } from './constants'; import { HostsNetworkConfigurationType } from '../../../services'; import { StaticIpView } from '../../clusterConfiguration/staticIp/data/dataTypes'; +import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; const getWizardStepIds = (staticIpView?: string): Day2WizardStepsType[] => { const stepIds: Day2WizardStepsType[] = [...defaultWizardSteps]; diff --git a/libs/ui-lib/lib/ocm/components/AddHosts/types.ts b/libs/ui-lib/lib/ocm/components/AddHosts/types.ts index 463a803bbb..da41af567f 100644 --- a/libs/ui-lib/lib/ocm/components/AddHosts/types.ts +++ b/libs/ui-lib/lib/ocm/components/AddHosts/types.ts @@ -1,6 +1,7 @@ -import { Cluster, OcmCpuArchitecture, SupportedCpuArchitecture } from '../../../common'; +import { OcmCpuArchitecture, SupportedCpuArchitecture } from '../../../common'; import { HostsNetworkConfigurationType } from '../../services'; import { FeaturesSupportsLevel } from '../../../common/components/featureSupportLevels/types'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; /* The type is reverse engineered. The OCM object contains additional data. diff --git a/libs/ui-lib/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.tsx b/libs/ui-lib/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.tsx index a16da6f93f..f04b5e275b 100644 --- a/libs/ui-lib/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.tsx +++ b/libs/ui-lib/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.tsx @@ -2,7 +2,6 @@ import React, { ReactNode } from 'react'; import { useStateSafely } from '../../../common/hooks'; import { AddHostsContextProvider, - Cluster, CpuArchitecture, ErrorState, LoadingState, @@ -25,6 +24,7 @@ import { } from './HostsClusterDetailTabContentErrors'; import useInfraEnv from '../../hooks/useInfraEnv'; import { mapOcmArchToCpuArchitecture } from '../../services/CpuArchitectureService'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export const HostsClusterDetailTabContent = ({ cluster: ocmCluster, diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/ClusterDefaultConfigurationContext.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/ClusterDefaultConfigurationContext.tsx index a733c0a1ba..ecd524dae7 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/ClusterDefaultConfigurationContext.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/ClusterDefaultConfigurationContext.tsx @@ -1,6 +1,6 @@ import pick from 'lodash-es/pick.js'; import React, { PropsWithChildren, useContext, useEffect } from 'react'; -import { ClusterDefaultConfig } from '../../../common'; +import { ClusterDefaultConfig } from '@openshift-assisted/types/assisted-installer-service'; import { ClustersAPI } from '../../services/apis'; type State = { status: 'idle' | 'loading' | 'succeeded' | 'failed'; data: T }; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx index f4ee839f7c..a04c519e07 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx @@ -3,13 +3,13 @@ import { Dropdown, DropdownItem, DropdownToggle, FormGroup } from '@patternfly/r import { CaretDownIcon } from '@patternfly/react-icons'; import { useField } from 'formik'; import { - Cluster, CpuArchitecture, FeatureId, getDefaultCpuArchitecture, getFieldId, SupportedCpuArchitecture, } from '../../../common'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export type CpuArchitectureItem = { description: string; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageForm.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageForm.tsx index 3560d44e0a..0725d1f6da 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageForm.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageForm.tsx @@ -3,7 +3,7 @@ import { useDispatch } from 'react-redux'; import Axios, { CancelTokenSource } from 'axios'; import { FormikHelpers } from 'formik'; import { getApiErrorMessage, handleApiError, isUnknownServerError } from '../../api'; -import { Cluster, CpuArchitecture, ErrorState, LoadingState } from '../../../common'; +import { CpuArchitecture, ErrorState, LoadingState } from '../../../common'; import { forceReload, setServerUpdateError, updateCluster } from '../../reducers/clusters'; import useInfraEnv from '../../hooks/useInfraEnv'; import { DiscoveryImageFormService } from '../../services'; @@ -13,6 +13,7 @@ import { } from './OcmDiscoveryImageConfigForm'; import { mapClusterCpuArchToInfraEnvCpuArch } from '../../services/CpuArchitectureService'; import { usePullSecret } from '../../hooks'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; type DiscoveryImageFormProps = { cluster: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx index 4b4afd17af..58afd3285e 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx @@ -1,21 +1,14 @@ import React from 'react'; import { Button, ButtonVariant, Modal, ModalVariant } from '@patternfly/react-core'; import { pluralize } from 'humanize-plus'; -import { - Cluster, - CpuArchitecture, - DownloadIso, - ErrorState, - isSNO, - ToolbarButton, -} from '../../../common'; +import { CpuArchitecture, DownloadIso, ErrorState, isSNO, ToolbarButton } from '../../../common'; import DiscoveryImageForm from './DiscoveryImageForm'; import { useModalDialogsContext } from '../hosts/ModalDialogsContext'; import useInfraEnvImageUrl from '../../hooks/useInfraEnvImageUrl'; import useInfraEnvIpxeImageUrl from '../../hooks/useInfraEnvIpxeImageUrl'; import DownloadIpxeScript from '../../../common/components/clusterConfiguration/DownloadIpxeScript'; - import './DiscoveryImageModal.css'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; type DiscoveryImageModalButtonProps = { ButtonComponent?: typeof Button | typeof ToolbarButton; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/HostInventory.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/HostInventory.tsx index 14a68b0484..ee078c0942 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/HostInventory.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/HostInventory.tsx @@ -11,7 +11,6 @@ import { } from '@patternfly/react-core'; import { useFormikContext } from 'formik'; import { - Cluster, HostDiscoveryValues, PopoverIcon, useFeature, @@ -24,6 +23,7 @@ import { DiscoveryImageModalButton } from './DiscoveryImageModal'; import InformationAndAlerts from './InformationAndAlerts'; import { OcmSwitchField } from '../ui/OcmFormFields'; import { selectCurrentClusterPermissionsState } from '../../selectors'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const schedulableMastersTooltip = 'Workloads must be run on control plane nodes when less than 5 hosts are discovered'; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/InformationAndAlerts.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/InformationAndAlerts.tsx index bc21acc3dd..0fb23e4a20 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/InformationAndAlerts.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/InformationAndAlerts.tsx @@ -1,12 +1,13 @@ import React from 'react'; import { Alert, AlertVariant } from '@patternfly/react-core'; -import { Cluster, isSNO } from '../../../common'; +import { isSNO } from '../../../common'; import { isAHostVM } from '../hosts/utils'; import { isAddHostsCluster } from '../clusters/utils'; import HostRequirementsContent from '../hosts/HostRequirementsContent'; import HostsDiscoveryTroubleshootingInfoLinkWithModal from '../hosts/HostsDiscoveryTroubleshootingInfoLinkWithModal'; import VMRebootConfigurationLinkWithModal from '../hosts/VMRebootConfigurationLinkWithModal'; import InfoLinkWithModal from '../ui/InfoLinkWithModal'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const InformationAndAlerts = ({ cluster }: { cluster: Cluster }) => { const isVM = React.useMemo(() => isAHostVM(cluster.hosts || []), [cluster.hosts]); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx index 3816d51eb1..82b4c1aa23 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx @@ -6,7 +6,6 @@ import { HostsNetworkConfigurationControlGroup } from './HostsNetworkConfigurati import { ClusterDetailsValues, isSNO, - ManagedDomain, OpenshiftVersionOptionType, PullSecret, ocmClusterNameValidationMessages, @@ -15,7 +14,6 @@ import { StaticTextField, useFeature, getSupportedCpuArchitectures, - PlatformType, } from '../../../common'; import DiskEncryptionControlGroup from '../../../common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; @@ -41,6 +39,7 @@ import { useClusterWizardContext } from '../clusterWizard/ClusterWizardContext'; import { HostsNetworkConfigurationType } from '../../services/types'; import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels'; import { ExternalPlatformLabels } from './platformIntegration/constants'; +import { ManagedDomain, PlatformType } from '@openshift-assisted/types/assisted-installer-service'; export type OcmClusterDetailsFormFieldsProps = { forceOpenshiftVersion?: string; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmClusterProgressItems.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmClusterProgressItems.tsx index 1e11f1e044..b4bed772c4 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmClusterProgressItems.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmClusterProgressItems.tsx @@ -1,7 +1,6 @@ import { Grid, GridItem } from '@patternfly/react-core'; import React from 'react'; import { - Cluster, EventListFetchProps, getEnabledHosts, RenderIf, @@ -10,6 +9,7 @@ import { import { FinalizingProgress } from '../../../common/components/clusterDetail/FinalizingProgress'; import { ProgressBarTexts } from '../../../common/components/clusterDetail/ProgressBarTexts'; import OcmOperatorsProgressItem from './OcmOperatorProgressItem'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; type OcmClusterProgressItemsProps = { cluster: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx index f054e61c62..4ef5ea9ee1 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx @@ -11,7 +11,12 @@ import { StackItem, } from '@patternfly/react-core'; import { Formik, FormikHelpers } from 'formik'; -import { HostStaticNetworkConfig, ImageType, InfraEnv, Proxy } from '../../../common/api'; +import { + HostStaticNetworkConfig, + ImageType, + InfraEnv, + Proxy, +} from '@openshift-assisted/types/assisted-installer-service'; import { AlertFormikError, httpProxyValidationSchema, diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmOperatorProgressItem.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmOperatorProgressItem.tsx index a01093ed6c..f0280addaa 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmOperatorProgressItem.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmOperatorProgressItem.tsx @@ -16,15 +16,14 @@ import { TFunction } from 'i18next'; import './OcmOperatorsProgressItem.css'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import ClusterProgressItem from '../../../common/components/clusterDetail/ClusterProgressItem'; +import { operatorLabels, OperatorName } from '../../../common'; +import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels'; import { Cluster, MonitoredOperator, MonitoredOperatorsList, - operatorLabels, - OperatorName, OperatorStatus, -} from '../../../common'; -import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels'; +} from '@openshift-assisted/types/assisted-installer-service'; export function getAggregatedStatus(operators: MonitoredOperatorsList) { const operatorStates: (OperatorStatus | 'pending')[] = operators.map( diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmSNODisclaimer.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmSNODisclaimer.tsx index bfaa2b4661..adcae95859 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmSNODisclaimer.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmSNODisclaimer.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { Alert, AlertVariant, List, ListItem, Stack, StackItem } from '@patternfly/react-core'; -import { CheckboxField, SupportLevel } from '../../../common'; +import { CheckboxField } from '../../../common'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; +import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; type OcmSNODisclaimerProps = { snoSupportLevel: SupportLevel; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.tsx index ff4946bbf3..2f6ce63869 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.tsx @@ -1,17 +1,15 @@ import * as React from 'react'; import { useField, useFormikContext } from 'formik'; import { Checkbox, FormGroup, Tooltip } from '@patternfly/react-core'; -import { - ClusterCreateParams, - getFieldId, - HelperText, - SupportLevel, - useFeature, -} from '../../../common'; +import { getFieldId, HelperText, useFeature } from '../../../common'; import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels'; import { CheckboxFieldProps } from '../../../common/components/ui/formik/types'; import NewFeatureSupportLevelBadge from '../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; +import { + ClusterCreateParams, + SupportLevel, +} from '@openshift-assisted/types/assisted-installer-service'; export interface OcmCheckboxProps extends CheckboxFieldProps { disabledReason?: string; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx index 832f073328..171d05581b 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Text, TextContent, TextVariants, Alert, Grid } from '@patternfly/react-core'; import { CustomManifests } from './components/CustomManifests'; -import { Cluster } from '../../../../common'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { CustomManifestFormState } from './components/propTypes'; export const CustomManifestsPage = ({ diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.tsx index 9b86518ee0..7417d9d3fa 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.tsx @@ -2,9 +2,9 @@ import React from 'react'; import { ListManifestsExtended } from '../data/dataTypes'; import { CustomManifestsFormProps, CustomManifestFormState } from './propTypes'; import { getFormViewManifestsValidationSchema } from './customManifestsValidationSchema'; -import { Cluster } from '../../../../../common'; import { CustomManifestsForm } from './CustomManifestsForm'; import { getEmptyFormViewManifestsValues, getFormViewManifestValues } from './utils'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export const CustomManifests = ({ cluster, diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/propTypes.ts b/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/propTypes.ts index 6dcd71c745..6598aa8f44 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/propTypes.ts +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/propTypes.ts @@ -1,6 +1,6 @@ import { FormikErrors, FormikTouched } from 'formik'; import Yup from 'yup'; -import { Cluster } from '../../../../../common'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { ManifestFormData, ListManifestsExtended } from '../data/dataTypes'; export type CustomManifestFormState = { diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/data/dataTypes.ts b/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/data/dataTypes.ts index dc9a823b71..3930e01f93 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/data/dataTypes.ts +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/data/dataTypes.ts @@ -1,4 +1,4 @@ -import { Manifest } from '../../../../../common'; +import { Manifest } from '@openshift-assisted/types/assisted-installer-service'; export type FormViewManifestFolder = 'manifests' | 'openshift'; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.tsx index c4831673a1..51f9a1c239 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.tsx @@ -5,8 +5,6 @@ import { FieldArray, useFormikContext, FormikHelpers } from 'formik'; import { Address4, Address6 } from 'ip-address'; import { - Cluster, - MachineNetwork, HostSubnet, NetworkConfigurationValues, DUAL_STACK, @@ -14,6 +12,7 @@ import { } from '../../../../common'; import { selectCurrentClusterPermissionsState } from '../../../selectors'; import { SubnetsDropdown } from './SubnetsDropdown'; +import { Cluster, MachineNetwork } from '@openshift-assisted/types/assisted-installer-service'; const subnetSort = (subA: HostSubnet, subB: HostSubnet) => subA.humanized.localeCompare(subB.humanized); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.tsx index e204ddf56b..1b8580d1c9 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.tsx @@ -7,8 +7,6 @@ import { VirtualIPControlGroup, VirtualIPControlGroupProps } from './VirtualIPCo import { canBeDualStack, canSelectNetworkTypeSDN, - Cluster, - ClusterDefaultConfig, clusterNetworksEqual, DUAL_STACK, HostSubnets, @@ -35,6 +33,10 @@ import { useNewFeatureSupportLevel, } from '../../../../common/components/newFeatureSupportLevels'; import { SupportedPlatformIntegrationType } from '../../../hooks/useClusterSupportedPlatforms'; +import { + Cluster, + ClusterDefaultConfig, +} from '@openshift-assisted/types/assisted-installer-service'; export type NetworkConfigurationProps = VirtualIPControlGroupProps & { hostSubnets: HostSubnets; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx index cd65d05ad4..397b2b640d 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx @@ -3,15 +3,12 @@ import { useDispatch, useSelector } from 'react-redux'; import { Formik, FormikConfig, useFormikContext } from 'formik'; import { Form, Grid, GridItem, Text, TextContent } from '@patternfly/react-core'; import { - Cluster, - ClusterDefaultConfig, ClusterWizardStep, ClusterWizardStepHeader, CpuArchitecture, getFormikErrorFields, getHostSubnets, HostSubnets, - InfraEnv, IPV4_STACK, isSNO, LoadingState, @@ -21,7 +18,6 @@ import { selectIngressVip, useAlerts, useFormikAutoSave, - V2ClusterUpdateParams, } from '../../../../common'; import { useDefaultConfiguration } from '../ClusterDefaultConfigurationContext'; import { useClusterWizardContext } from '../../clusterWizard/ClusterWizardContext'; @@ -41,6 +37,12 @@ import { ClustersService } from '../../../services'; import { setServerUpdateError, updateClusterBase } from '../../../reducers/clusters'; import { isUnknownServerError, getApiErrorMessage, handleApiError } from '../../../api'; import { useClusterSupportedPlatforms, usePullSecret } from '../../../hooks'; +import { + Cluster, + ClusterDefaultConfig, + InfraEnv, + V2ClusterUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; const NetworkConfigurationForm: React.FC<{ cluster: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationTableBase.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationTableBase.tsx index 0403287fcd..f1133df31e 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationTableBase.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationTableBase.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { sortable } from '@patternfly/react-table'; -import { Cluster, Host, HostsTableActions, selectSchedulableMasters } from '../../../../common'; +import { HostsTableActions, selectSchedulableMasters } from '../../../../common'; import NetworkingStatus from '../../hosts/NetworkingStatus'; import { useTranslation } from '../../../../common/hooks/use-translation-wrapper'; import { @@ -19,6 +19,7 @@ import HostsTable from '../../../../common/components/hosts/HostsTable'; import { ValidationsInfo } from '../../../../common/types/hosts'; import { useClusterWizardContext } from '../../clusterWizard/ClusterWizardContext'; import { stringToJSON } from '../../../../common/utils'; +import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service'; export const networkingStatusColumn = ( onEditHostname?: HostsTableActions['onEditHost'], diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx index a065a369d1..a66fc44501 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx @@ -13,15 +13,17 @@ import { NETWORK_TYPE_OVN, NETWORK_TYPE_SDN, NO_SUBNET_SET, - Cluster, - ClusterNetwork, - MachineNetwork, - ServiceNetwork, } from '../../../../common'; import { ConfirmationModal, PopoverIcon } from '../../../../common/components/ui'; import { useDefaultConfiguration } from '../ClusterDefaultConfigurationContext'; import { selectCurrentClusterPermissionsState } from '../../../selectors'; import { OcmRadioField } from '../../ui/OcmFormFields'; +import { + Cluster, + ClusterNetwork, + MachineNetwork, + ServiceNetwork, +} from '@openshift-assisted/types/assisted-installer-service'; type StackTypeControlGroupProps = { clusterId: Cluster['id']; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.tsx index a733daad06..3f26f37d76 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.tsx @@ -11,23 +11,21 @@ import { StackItem, } from '@patternfly/react-core'; import { - Cluster, NetworkConfigurationValues, FormikStaticField, NETWORK_TYPE_SDN, selectMachineNetworkCIDR, getVipValidationsById, DUAL_STACK, - SupportLevel, PopoverIcon, selectApiVip, selectIngressVip, - Ip, } from '../../../../common'; import { selectCurrentClusterPermissionsState } from '../../../selectors'; import { OcmCheckboxField, OcmInputField } from '../../ui/OcmFormFields'; import { useTranslation } from '../../../../common/hooks/use-translation-wrapper'; import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge'; +import { Cluster, Ip, SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; interface VipStaticValueProps { id?: string; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts index 8003bf5a50..46b1709b1c 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts @@ -1,6 +1,5 @@ import * as Yup from 'yup'; import { - Cluster, clusterNetworksValidationSchema, dualStackValidationSchema, getDefaultNetworkType, @@ -14,11 +13,14 @@ import { sshPublicKeyListValidationSchema, IPV4_STACK, DUAL_STACK, - ClusterDefaultConfig, - ApiVip, - IngressVip, vipArrayValidationSchema, } from '../../../../common'; +import { + ApiVip, + Cluster, + ClusterDefaultConfig, + IngressVip, +} from '@openshift-assisted/types/assisted-installer-service'; export const getNetworkInitialValues = ( cluster: Cluster, diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/CnvHostRequirements.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/CnvHostRequirements.tsx index 554044f556..852f20f4df 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/CnvHostRequirements.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/CnvHostRequirements.tsx @@ -2,8 +2,9 @@ import React from 'react'; import { useSelector } from 'react-redux'; import { List, ListItem } from '@patternfly/react-core'; import { useClusterPreflightRequirements } from '../../../hooks'; -import { Cluster, ErrorState, LoadingState, OPERATOR_NAME_CNV, RenderIf } from '../../../../common'; +import { ErrorState, LoadingState, OPERATOR_NAME_CNV, RenderIf } from '../../../../common'; import { selectIsCurrentClusterSNO } from '../../../selectors'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const CnvHostRequirements = ({ clusterId }: { clusterId: Cluster['id'] }) => { const { preflightRequirements, error, isLoading } = useClusterPreflightRequirements(clusterId); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/LvmCheckbox.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/LvmCheckbox.tsx index cfc9d24a19..37be1f38fd 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/LvmCheckbox.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/LvmCheckbox.tsx @@ -12,7 +12,6 @@ import { ExternalLink, LVMS_LINK, OPERATOR_NAME_LVMS, - SupportLevel, } from '../../../../common'; import LvmHostRequirements from './LvmHostRequirements'; import { OcmCheckboxField } from '../../ui/OcmFormFields'; @@ -20,6 +19,7 @@ import { useTranslation } from '../../../../common/hooks/use-translation-wrapper import { getLvmIncompatibleWithCnvReason } from '../../featureSupportLevels/featureStateUtils'; import { useNewFeatureSupportLevel } from '../../../../common/components/newFeatureSupportLevels'; import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge'; +import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; const LVM_FIELD_NAME = 'useOdfLogicalVolumeManager'; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/LvmHostRequirements.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/LvmHostRequirements.tsx index 1b79d3d99c..a0b7913097 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/LvmHostRequirements.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/LvmHostRequirements.tsx @@ -2,12 +2,12 @@ import React from 'react'; import { List, ListItem } from '@patternfly/react-core'; import { useClusterPreflightRequirements } from '../../../hooks'; import { - HostTypeHardwareRequirements, ClusterOperatorProps, ErrorState, LoadingState, OPERATOR_NAME_LVM, } from '../../../../common'; +import { HostTypeHardwareRequirements } from '@openshift-assisted/types/assisted-installer-service'; const LvmHostRequirements = ({ clusterId }: { clusterId: ClusterOperatorProps['clusterId'] }) => { const { preflightRequirements, error, isLoading } = useClusterPreflightRequirements(clusterId); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/utils.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/utils.tsx index e5afac0a1d..1ef6f33ab8 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/utils.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/utils.tsx @@ -1,10 +1,10 @@ import { OPERATOR_NAME_LVM, - Cluster, FeatureSupportLevelData, ExposedOperatorName, OPERATOR_NAME_LVMS, } from '../../../../common'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export const getActualLVMOperatorName = ({ openshiftVersion, diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx index 75d552ab71..1f43077b3e 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx @@ -11,12 +11,13 @@ import { } from '@patternfly/react-core'; import { CaretDownIcon } from '@patternfly/react-icons'; import { useField } from 'formik'; -import { PlatformType, getFieldId } from '../../../../common'; +import { getFieldId } from '../../../../common'; import { ExternalPlatformLabels, ExternalPlatformLinks, ExternalPlatformTooltips, } from './constants'; +import { PlatformType } from '@openshift-assisted/types/assisted-installer-service'; const INPUT_NAME = 'platform'; const fieldId = getFieldId(INPUT_NAME, 'input'); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/platformIntegration/constants.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/platformIntegration/constants.tsx index df140fbb2b..b532dc5e0d 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/platformIntegration/constants.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/platformIntegration/constants.tsx @@ -1,5 +1,5 @@ import { NUTANIX_CONFIG_LINK, VSPHERE_CONFIG_LINK } from '../../../../common'; -import { PlatformType } from '../../../api'; +import { PlatformType } from '@openshift-assisted/types/assisted-installer-service'; export const ExternalPlatformLabels: { [key in PlatformType]: string } = { baremetal: 'No platform integration', diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewClusterDetailTable.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewClusterDetailTable.tsx index b82d0c0490..5a2be15159 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewClusterDetailTable.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewClusterDetailTable.tsx @@ -1,9 +1,10 @@ import React from 'react'; import { Table, TableBody, TableVariant } from '@patternfly/react-table'; -import { Cluster, genericTableRowKey, getDefaultCpuArchitecture } from '../../../../common'; +import { genericTableRowKey, getDefaultCpuArchitecture } from '../../../../common'; import { getDiskEncryptionEnabledOnStatus } from '../../clusterDetail/ClusterProperties'; import OpenShiftVersionDetail from '../../clusterDetail/OpenShiftVersionDetail'; import { useNewFeatureSupportLevel } from '../../../../common/components/newFeatureSupportLevels'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export const ReviewClusterDetailTable = ({ cluster }: { cluster: Cluster }) => { const { activeFeatureConfiguration } = useNewFeatureSupportLevel(); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.tsx index 7a2a6541a2..855c4c52f1 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.tsx @@ -2,7 +2,6 @@ import { Title } from '@patternfly/react-core'; import { Table, TableVariant, TableBody } from '@patternfly/react-table'; import React from 'react'; import { - Cluster, genericTableRowKey, isDualStack, selectApiVip, @@ -13,6 +12,7 @@ import { getStackTypeLabel, getNetworkType, } from '../../clusterDetail/ClusterProperties'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const dummyCells = ['', '', '']; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx index 4a8e5fd73a..25c9b7271a 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { Table, TableVariant, TableBody } from '@patternfly/react-table'; import { - Cluster, ExposedOperatorNames, hasEnabledOperators, genericTableRowKey, @@ -9,6 +8,7 @@ import { } from '../../../../common'; import { useTranslation } from '../../../../common/hooks/use-translation-wrapper'; import { useNewFeatureSupportLevel } from '../../../../common/components/newFeatureSupportLevels'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export const ReviewOperatorsTable = ({ cluster }: { cluster: Cluster }) => { const { t } = useTranslation(); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.tsx index 1a2f43ed21..77f9616794 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.tsx @@ -21,13 +21,7 @@ import { global_warning_color_100 as warningColor, } from '@patternfly/react-tokens'; -import { - Cluster, - ClusterValidations, - DetailItem, - DetailList, - HostsValidations, -} from '../../../../common'; +import { ClusterValidations, DetailItem, DetailList, HostsValidations } from '../../../../common'; import { useClusterWizardContext } from '../../clusterWizard/ClusterWizardContext'; import { useOpenshiftVersions } from '../../../hooks'; import { wizardStepNames } from '../../clusterWizard/constants'; @@ -47,6 +41,7 @@ import { ValidationsInfo as ClusterValidationsInfo } from '../../../../common/ty import { ValidationsInfo as HostValidationsInfo } from '../../../../common/types/hosts'; import { useNewFeatureSupportLevel } from '../../../../common/components/newFeatureSupportLevels'; import { stringToJSON } from '../../../../common/utils'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const PreflightChecksDetailExpanded = ({ cluster }: { cluster: Cluster }) => { const clusterWizardContext = useClusterWizardContext(); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewStep.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewStep.tsx index ae835bfe49..2549df87ee 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewStep.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewStep.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { ActionListItem, Button, ButtonVariant, Grid, GridItem } from '@patternfly/react-core'; -import { Cluster, ClusterWizardStepHeader, useAlerts, ClusterWizardStep } from '../../../../common'; +import { ClusterWizardStepHeader, useAlerts, ClusterWizardStep } from '../../../../common'; import { useClusterWizardContext } from '../../clusterWizard/ClusterWizardContext'; import { getApiErrorMessage, handleApiError } from '../../../api'; import { updateCluster } from '../../../reducers/clusters'; @@ -13,6 +13,7 @@ import { selectCurrentClusterPermissionsState } from '../../../selectors'; import ReviewPreflightChecks from './ReviewPreflightChecks'; import ReviewSummary from './ReviewSummary'; import './ReviewCluster.css'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const ReviewStep = ({ cluster }: { cluster: Cluster }) => { const { addAlert } = useAlerts(); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewSummary.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewSummary.tsx index e22186533f..65c46d6622 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewSummary.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/review/ReviewSummary.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { ExpandableSection } from '@patternfly/react-core'; import { - Cluster, DetailItem, DetailList, hasEnabledOperators, @@ -23,6 +22,7 @@ import { import { ReviewCustomManifestsTable } from './ReviewCustomManifestsTable'; import PlatformIntegrationNote from '../platformIntegration/PlatformIntegrationNote'; import useClusterCustomManifests from '../../../hooks/useClusterCustomManifests'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export const ReviewSummaryContent = ({ cluster }: { cluster: Cluster }) => { const showOperatorsSummary = diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHosts.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHosts.tsx index 42c34e5800..08d2684043 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHosts.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHosts.tsx @@ -8,7 +8,7 @@ import { getFormViewHostsValidationSchema } from './formViewHostsValidationSchem import { formViewHostsToInfraEnvField } from '../../data/formDataToInfraEnvField'; import { getEmptyFormViewHostsValues } from '../../data/emptyData'; import { getFormViewHostsValues, getFormViewNetworkWideValues } from '../../data/fromInfraEnv'; -import { InfraEnv } from '../../../../../../common/api'; +import { InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; export const FormViewHosts: React.FC = ({ infraEnv, ...props }) => { const [protocolType, setProtocolType] = React.useState(); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.tsx index be4b47be54..47f7afd153 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.tsx @@ -7,7 +7,7 @@ import { networkWideToInfraEnvField } from '../../data/formDataToInfraEnvField'; import { FormViewNetworkWideFields } from './FormViewNetworkWideFields'; import { getFormData, getFormViewNetworkWideValues } from '../../data/fromInfraEnv'; import { getEmptyNetworkWideConfigurations } from '../../data/emptyData'; -import { InfraEnv } from '../../../../../../common'; +import { InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; export const FormViewNetworkWide: React.FC = ({ infraEnv, ...props }) => { const [formProps, setFormProps] = React.useState>(); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpHostsArray.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpHostsArray.tsx index 3de904e3d7..ab03a2e30b 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpHostsArray.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpHostsArray.tsx @@ -14,16 +14,13 @@ import { import { MinusCircleIcon } from '@patternfly/react-icons'; import { FieldArray, FieldArrayRenderProps, useField } from 'formik'; import cloneDeep from 'lodash-es/cloneDeep.js'; -import { - getFormikArrayItemFieldName, - HostStaticNetworkConfig, - LoadingState, -} from '../../../../../common'; +import { getFormikArrayItemFieldName, LoadingState } from '../../../../../common'; import ConfirmationModal from '../../../../../common/components/ui/ConfirmationModal'; import { selectIsCurrentClusterSNO, selectCurrentClusterPermissionsState, } from '../../../../selectors'; +import { HostStaticNetworkConfig } from '@openshift-assisted/types/assisted-installer-service'; const fieldName = 'hosts'; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/MacIpMapping.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/MacIpMapping.tsx index 155d2f6430..988488e9d8 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/MacIpMapping.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/MacIpMapping.tsx @@ -2,14 +2,11 @@ import React from 'react'; import { GridItem, Grid, Button } from '@patternfly/react-core'; import { ArrayHelpers, FieldArray } from 'formik'; import { PlusCircleIcon } from '@patternfly/react-icons'; -import { - getFormikArrayItemFieldName, - MacInterfaceMap, - RemovableField, -} from '../../../../../../common'; +import { getFormikArrayItemFieldName, RemovableField } from '../../../../../../common'; import { OcmInputField } from '../../../../ui/OcmFormFields'; import { useSelector } from 'react-redux'; import { selectCurrentClusterPermissionsState } from '../../../../../selectors'; +import { MacInterfaceMap } from '@openshift-assisted/types/assisted-installer-service'; const AddMapping: React.FC<{ onPush: ArrayHelpers['push']; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlView.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlView.tsx index c9a96513c1..5a31950bf9 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlView.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlView.tsx @@ -5,7 +5,7 @@ import { yamlViewValidationSchema } from './yamlViewValidationSchema'; import { YamlViewValues } from '../../data/dataTypes'; import { YamlViewFields } from './YamlViewFields'; import { getEmptyYamlValues } from '../../data/emptyData'; -import { InfraEnv } from '../../../../../../common'; +import { InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; import { getYamlViewValues } from '../../data/fromInfraEnv'; export const YamlView: React.FC = ({ ...props }) => { diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlViewFields.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlViewFields.tsx index b6907b7055..4a1a63ca76 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlViewFields.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlViewFields.tsx @@ -3,17 +3,13 @@ import { TextVariants, TextContent, Text, FormGroup, Grid } from '@patternfly/re import { ExternalLinkAltIcon } from '@patternfly/react-icons'; import { Language } from '@patternfly/react-code-editor'; import { useField } from 'formik'; -import { - getFieldId, - HostStaticNetworkConfig, - NMSTATE_EXAMPLES_LINK, - PopoverIcon, -} from '../../../../../../common'; +import { getFieldId, NMSTATE_EXAMPLES_LINK, PopoverIcon } from '../../../../../../common'; import StaticIpHostsArray, { HostComponentProps } from '../StaticIpHostsArray'; import HostSummary from '../CollapsedHost'; import { MacIpMapping } from './MacIpMapping'; import { getEmptyYamlHost } from '../../data/emptyData'; import { OcmCodeField } from '../../../../ui/OcmFormFields'; +import { HostStaticNetworkConfig } from '@openshift-assisted/types/assisted-installer-service'; const CollapsedHost: React.FC = ({ fieldName, hostIdx }) => { const mapFieldName = `${fieldName}.macInterfaceMap`; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/yamlViewValidationSchema.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/yamlViewValidationSchema.tsx index efda064661..b30a639e7e 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/yamlViewValidationSchema.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/yamlViewValidationSchema.tsx @@ -1,10 +1,5 @@ import * as Yup from 'yup'; -import { - ArrayElementType, - HostStaticNetworkConfig, - macAddressValidationSchema, - MacInterfaceMap, -} from '../../../../../../common'; +import { ArrayElementType, macAddressValidationSchema } from '../../../../../../common'; import { YamlViewValues } from '../../data/dataTypes'; import { getUniqueValidationSchema, @@ -16,6 +11,10 @@ import { validateFileSize, validateFileType, } from '../../../../../../common/utils'; +import { + HostStaticNetworkConfig, + MacInterfaceMap, +} from '@openshift-assisted/types/assisted-installer-service'; const requiredMsg = 'A value is required'; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/propTypes.ts b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/propTypes.ts index 80ee4dd425..e5d72ec7ef 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/propTypes.ts +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/propTypes.ts @@ -1,4 +1,8 @@ -import { HostStaticNetworkConfig, InfraEnv, InfraEnvUpdateParams } from '../../../../../common'; +import { + HostStaticNetworkConfig, + InfraEnv, + InfraEnvUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; import Yup from 'yup'; import { FormikErrors, FormikTouched } from 'formik'; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/dataTypes.ts b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/dataTypes.ts index ced6d49a58..dc3672e803 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/dataTypes.ts +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/dataTypes.ts @@ -1,4 +1,4 @@ -import { HostStaticNetworkConfig } from '../../../../../common'; +import { HostStaticNetworkConfig } from '@openshift-assisted/types/assisted-installer-service'; export enum StaticIpView { YAML = 'yaml', diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/dummyData.ts b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/dummyData.ts index 658c9f699c..e399560aca 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/dummyData.ts +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/dummyData.ts @@ -1,4 +1,7 @@ -import { HostStaticNetworkConfig, MacInterfaceMap } from '../../../../../common'; +import { + HostStaticNetworkConfig, + MacInterfaceMap, +} from '@openshift-assisted/types/assisted-installer-service'; import { ProtocolVersion, StaticIpInfo, StaticIpView } from './dataTypes'; import { NmstateEthernetInterface, NmstateInterfaceType } from './nmstateTypes'; import { FORM_VIEW_PREFIX, getNmstateProtocolConfig, toYamlWithComments } from './nmstateYaml'; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/emptyData.ts b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/emptyData.ts index 971ac1e2c6..0548a7cf9c 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/emptyData.ts +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/emptyData.ts @@ -1,4 +1,4 @@ -import { HostStaticNetworkConfig } from '../../../../../common'; +import { HostStaticNetworkConfig } from '@openshift-assisted/types/assisted-installer-service'; import { FormViewHost, IpConfig, diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/formDataFromInfraEnvField.ts b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/formDataFromInfraEnvField.ts index 22e43958ee..6fd1543450 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/formDataFromInfraEnvField.ts +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/formDataFromInfraEnvField.ts @@ -1,4 +1,4 @@ -import { HostStaticNetworkConfig } from '../../../../../common'; +import { HostStaticNetworkConfig } from '@openshift-assisted/types/assisted-installer-service'; import { FormViewHost, diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts index 7a71ddca1c..dcebe7ca62 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts @@ -1,5 +1,8 @@ import { dump } from 'js-yaml'; -import { HostStaticNetworkConfig, InfraEnv } from '../../../../../common'; +import { + HostStaticNetworkConfig, + InfraEnv, +} from '@openshift-assisted/types/assisted-installer-service'; import { ProtocolVersion, FormViewHost, diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/fromInfraEnv.ts b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/fromInfraEnv.ts index 76e3822440..a615527c19 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/fromInfraEnv.ts +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/fromInfraEnv.ts @@ -1,4 +1,7 @@ -import { HostStaticNetworkConfig, InfraEnv } from '../../../../../common'; +import { + HostStaticNetworkConfig, + InfraEnv, +} from '@openshift-assisted/types/assisted-installer-service'; import { FORM_VIEW_PREFIX, getProtocolType, getYamlComments } from './nmstateYaml'; import { StaticIpInfo, diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx index 326153eeec..2b252f2617 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx @@ -6,7 +6,6 @@ import { OCM_CLUSTER_LIST_LINK } from '../../config'; import { AlertsContextProvider, AssistedInstallerOCMPermissionTypesListType, - Cluster, CpuArchitecture, ErrorState, FeatureGateContextProvider, @@ -29,6 +28,7 @@ import ClusterWizardContextProvider from '../clusterWizard/ClusterWizardContextP import { BackButton } from '../ui/Buttons/BackButton'; import { NewFeatureSupportLevelProvider } from '../featureSupportLevels'; import { usePullSecret } from '../../hooks'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; type AssistedInstallerDetailCardProps = { aiClusterId: string; diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetail.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetail.tsx index 4a6764d7ca..9f22941109 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetail.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetail.tsx @@ -17,7 +17,7 @@ import { isSNO, useFeature, } from '../../../common'; -import { Cluster } from '../../../common/api/types'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import ClusterToolbar from '../clusters/ClusterToolbar'; import { getClusterDetailId } from './utils'; import { routeBasePath } from '../../config'; diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusMessages.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusMessages.tsx index bfb165be2b..7a11a30d7d 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusMessages.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusMessages.tsx @@ -6,8 +6,6 @@ import { canDownloadKubeconfig, isSNO, isClusterPlatformTypeVM, - PlatformType, - Cluster, } from '../../../common'; import { useDefaultConfiguration } from '../clusterConfiguration/ClusterDefaultConfigurationContext'; @@ -16,6 +14,7 @@ import { calculateClusterDateDiff } from '../../../common/sevices/DateAndTime'; import { isInOcm } from '../../api'; import { ExternalPlatformLinks } from '../clusterConfiguration/platformIntegration/constants'; import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels'; +import { Cluster, PlatformType } from '@openshift-assisted/types/assisted-installer-service'; type ClusterDetailStatusMessagesProps = { cluster: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusVarieties.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusVarieties.tsx index 1177c475a2..233cbd193b 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusVarieties.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusVarieties.tsx @@ -1,11 +1,7 @@ import React from 'react'; import { - Cluster, - Credentials, selectOlmOperators, selectMonitoredOperators, - MonitoredOperator, - MonitoredOperatorsList, ClusterCredentials, hasEnabledOperators, OPERATOR_NAME_MCE, @@ -15,6 +11,12 @@ import { ClustersAPI } from '../../services/apis'; import ClusterDetailStatusMessages from './ClusterDetailStatusMessages'; import { Grid } from '@patternfly/react-core'; import { getErrorMessage } from '../../../common/utils'; +import { + Cluster, + Credentials, + MonitoredOperator, + MonitoredOperatorsList, +} from '@openshift-assisted/types/assisted-installer-service'; type ClusterStatusVarieties = { credentials?: Credentials; diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailsButtonGroup.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailsButtonGroup.tsx index 24c4d00f2e..3acaecf857 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailsButtonGroup.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailsButtonGroup.tsx @@ -1,12 +1,10 @@ import { Flex, FlexItem, Button, ButtonVariant } from '@patternfly/react-core'; import React from 'react'; import { - Cluster, canDownloadClusterLogs, useAlerts, KubeconfigDownload, RenderIf, - Credentials, canOpenConsole, } from '../../../common'; import { downloadClusterInstallationLogs } from './utils'; @@ -15,6 +13,7 @@ import { canAbortInstallation } from '../clusters/utils'; import { onFetchEvents } from '../fetching/fetchEvents'; import ViewClusterEventsButton from '../../../common/components/ui/ViewClusterEventsButton'; import { LaunchOpenshiftConsoleButton } from '../../../common/components/clusterDetail/ConsoleModal'; +import { Cluster, Credentials } from '@openshift-assisted/types/assisted-installer-service'; type ClusterDetailsButtonGroupProps = { cluster: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterInstallationError.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterInstallationError.tsx index e73232935b..4ec2767a66 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterInstallationError.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterInstallationError.tsx @@ -7,15 +7,10 @@ import { TextContent, Text, } from '@patternfly/react-core'; -import { - Cluster, - getReportIssueLink, - canDownloadClusterLogs, - useAlerts, - toSentence, -} from '../../../common'; +import { getReportIssueLink, canDownloadClusterLogs, useAlerts, toSentence } from '../../../common'; import { downloadClusterInstallationLogs } from './utils'; import { useModalDialogsContext } from '../hosts/ModalDialogsContext'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; type ClusterInstallationErrorProps = { cluster: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterInstallationProgressCard.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterInstallationProgressCard.tsx index a2b45c7aa5..6d15e5fb18 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterInstallationProgressCard.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterInstallationProgressCard.tsx @@ -8,13 +8,14 @@ import { Grid, GridItem, } from '@patternfly/react-core'; -import { Cluster, ClusterProgress } from '../../../common'; +import { ClusterProgress } from '../../../common'; import ClusterHostsTable from '../hosts/ClusterHostsTable'; import ClusterDetailsButtonGroup from './ClusterDetailsButtonGroup'; import { ClusterStatusIcon } from '../clusters/ClusterStatus'; import ClusterDetailStatusVarieties, { useClusterStatusVarieties, } from './ClusterDetailStatusVarieties'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const ClusterInstallationProgressCard: React.FC<{ cluster: Cluster }> = ({ cluster }) => { const [isCardExpanded, setIsCardExpanded] = React.useState(true); diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterProperties.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterProperties.tsx index 39979d1151..a91ac775af 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterProperties.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterProperties.tsx @@ -1,10 +1,8 @@ import React from 'react'; import { GridItem, Text, TextContent } from '@patternfly/react-core'; import { - Cluster, DetailItem, DetailList, - DiskEncryption, getDefaultCpuArchitecture, isDualStack, NETWORK_TYPE_SDN, @@ -19,6 +17,7 @@ import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { ClusterFeatureSupportLevelsDetailItem } from '../featureSupportLevels'; import OpenShiftVersionDetail from './OpenShiftVersionDetail'; import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels'; +import { Cluster, DiskEncryption } from '@openshift-assisted/types/assisted-installer-service'; type ClusterPropertiesProps = { cluster: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterSummaryExpandable.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterSummaryExpandable.tsx index 3cf9f6fd8f..5c08f44a2d 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterSummaryExpandable.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterSummaryExpandable.tsx @@ -1,6 +1,6 @@ import { ExpandableSection } from '@patternfly/react-core'; import React, { useState } from 'react'; -import { Cluster } from '../../../common'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { ReviewSummaryContent } from '../clusterConfiguration/review/ReviewSummary'; import { ClusterFeatureSupportLevelsDetailItem } from '../featureSupportLevels'; import './ClusterSummaryExpandable.css'; diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/HostInventoryExpandable.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/HostInventoryExpandable.tsx index 2869075bac..7ca2ebd49e 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/HostInventoryExpandable.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/HostInventoryExpandable.tsx @@ -1,9 +1,10 @@ import React, { useState } from 'react'; -import { Cluster, hostStatus } from '../../../common'; +import { hostStatus } from '../../../common'; import ClusterHostsTable from '../hosts/ClusterHostsTable'; import { getMostSevereHostStatus } from './utils'; import { ExpandableSection } from '@patternfly/react-core'; import './HostInventoryExpandable.css'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; type HostInventoryExpandableProps = { cluster: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/OpenShiftVersionDetail.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/OpenShiftVersionDetail.tsx index 237c0b8e58..a2b144420b 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/OpenShiftVersionDetail.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/OpenShiftVersionDetail.tsx @@ -1,10 +1,11 @@ import React from 'react'; -import { Cluster, getOpenshiftVersionText } from '../../../common'; +import { getOpenshiftVersionText } from '../../../common'; import { useOpenshiftVersions } from '../../hooks'; import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens/dist/js/global_warning_color_100'; import { Popover, Text, TextContent, TextVariants } from '@patternfly/react-core'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const UnsupportedVersion = ({ version }: { version: string }) => { const { t } = useTranslation(); diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx index def49eb4a0..df93c1abf9 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx @@ -3,8 +3,6 @@ import { Alert, AlertActionLink, Text, TextContent } from '@patternfly/react-cor import { pluralize } from 'humanize-plus'; import { TFunction } from 'i18next'; import { - Cluster, - MonitoredOperator, RenderIf, toSentence, canDownloadClusterLogs, @@ -21,6 +19,7 @@ import { NewFeatureSupportLevelData, useNewFeatureSupportLevel, } from '../../../common/components/newFeatureSupportLevels'; +import { Cluster, MonitoredOperator } from '@openshift-assisted/types/assisted-installer-service'; type InstallationProgressWarningProps = { cluster: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/RebootNodeZeroModal.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/RebootNodeZeroModal.tsx index 21fda66061..bfd2f37a36 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/RebootNodeZeroModal.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/RebootNodeZeroModal.tsx @@ -2,9 +2,10 @@ import React from 'react'; import { Button, Checkbox, Modal, ModalVariant, Text, TextContent } from '@patternfly/react-core'; import { useClusterStatusVarieties } from './ClusterDetailStatusVarieties'; -import { Cluster, KubeconfigDownload, ClusterCredentials } from '../../../common'; +import { KubeconfigDownload, ClusterCredentials } from '../../../common'; import './RebootNodeZeroModal.css'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; // TODO(mlibra): Following will be reimplemented based on future decisions in https://issues.redhat.com/browse/AGENT-522 export const RebootNodeZeroModal: React.FC<{ cluster: Cluster }> = ({ cluster }) => { diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/getProgressBarAlerts.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/getProgressBarAlerts.tsx index 954729a51c..e435ae608d 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/getProgressBarAlerts.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/getProgressBarAlerts.tsx @@ -1,4 +1,4 @@ -import { Cluster, Host, HostRole, MonitoredOperator, RenderIf } from '../../../common'; +import { RenderIf } from '../../../common'; import React from 'react'; import { Stack, StackItem } from '@patternfly/react-core'; import { @@ -6,6 +6,12 @@ import { HostInstallationWarning, HostsInstallationSuccess, } from './ProgressBarAlerts'; +import { + Cluster, + Host, + HostRole, + MonitoredOperator, +} from '@openshift-assisted/types/assisted-installer-service'; const hostsStatus = (hosts: Host[], hostRole: HostRole) => { const totalHosts = hosts.filter((host) => host.role && host.role === hostRole); diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/utils.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/utils.tsx index 75e01b9a47..fd792160f7 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/utils.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/utils.tsx @@ -1,17 +1,16 @@ import { saveAs } from 'file-saver'; import get from 'lodash-es/get.js'; import { isInOcm, handleApiError, getApiErrorMessage } from '../../api'; +import { AlertsContextType, hostStatusOrder } from '../../../common'; +import { ClustersAPI } from '../../services/apis'; +import { ClustersService } from '../../services'; +import { stringToJSON } from '../../../common/utils'; import { Cluster, Host, HostRole, Inventory, - AlertsContextType, - hostStatusOrder, -} from '../../../common'; -import { ClustersAPI } from '../../services/apis'; -import { ClustersService } from '../../services'; -import { stringToJSON } from '../../../common/utils'; +} from '@openshift-assisted/types/assisted-installer-service'; export const downloadClusterInstallationLogs = async ( addAlert: AlertsContextType['addAlert'], diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetails.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetails.tsx index e8b383cd9a..99fcc05c93 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetails.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetails.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useHistory } from 'react-router-dom'; import { useDispatch } from 'react-redux'; -import { Cluster, useAlerts, LoadingState, ClusterWizardStep, InfraEnv } from '../../../common'; +import { useAlerts, LoadingState, ClusterWizardStep } from '../../../common'; import { usePullSecret } from '../../hooks'; import { getApiErrorMessage, handleApiError, isUnknownServerError } from '../../api'; import { setServerUpdateError, updateCluster } from '../../reducers/clusters'; @@ -17,6 +17,7 @@ import { ClusterCreateParamsWithStaticNetworking, } from '../../services'; import useClusterCustomManifests from '../../hooks/useClusterCustomManifests'; +import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; type ClusterDetailsProps = { cluster?: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx index 3993375ef0..93f1476bd0 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx @@ -5,13 +5,9 @@ import { Grid, GridItem } from '@patternfly/react-core'; import isUndefined from 'lodash-es/isUndefined.js'; import { Formik, FormikHelpers } from 'formik'; import { - Cluster, - ClusterCreateParams, - ManagedDomain, ClusterWizardStep, ClusterWizardStepHeader, getClusterDetailsValidationSchema, - InfraEnv, getRichTextValidation, CpuArchitecture, } from '../../../common'; @@ -29,6 +25,12 @@ import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { selectCurrentClusterPermissionsState } from '../../selectors'; import { useClusterWizardContext } from './ClusterWizardContext'; import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels'; +import { + Cluster, + ClusterCreateParams, + InfraEnv, + ManagedDomain, +} from '@openshift-assisted/types/assisted-installer-service'; type ClusterDetailsFormProps = { cluster?: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizard.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizard.tsx index 0f30e8efda..61f0770094 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizard.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizard.tsx @@ -1,6 +1,6 @@ import React from 'react'; import classNames from 'classnames'; -import { Cluster, InfraEnv, InfraEnvUpdateParams, LoadingState } from '../../../common'; +import { LoadingState } from '../../../common'; import NetworkConfigurationPage from '../clusterConfiguration/networkConfiguration/NetworkConfigurationForm'; import ReviewStep from '../clusterConfiguration/review/ReviewStep'; import { useClusterWizardContext } from './ClusterWizardContext'; @@ -11,6 +11,11 @@ import StaticIp from './StaticIp'; import Operators from './Operators'; import { WithErrorBoundary } from '../../../common/components/ErrorHandling/WithErrorBoundary'; import CustomManifestStep from './CustomManifestStep'; +import { + Cluster, + InfraEnv, + InfraEnvUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; type ClusterWizardProps = { cluster: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx index 4554a1a4c0..9e484c6b3c 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx @@ -13,8 +13,6 @@ import { defaultWizardSteps, staticIpFormViewSubSteps } from './constants'; import { StaticIpView } from '../clusterConfiguration/staticIp/data/dataTypes'; import { getStaticIpInfo } from '../clusterConfiguration/staticIp/data/fromInfraEnv'; import { - Cluster, - InfraEnv, AssistedInstallerOCMPermissionTypesListType, useFeature, useAlerts, @@ -22,6 +20,7 @@ import { import useSetClusterPermissions from '../../hooks/useSetClusterPermissions'; import useClusterCustomManifests from '../../hooks/useClusterCustomManifests'; import { ListManifestsExtended } from '../clusterConfiguration/manifestsConfiguration/data/dataTypes'; +import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; const addStepToClusterWizard = ( wizardStepIds: ClusterWizardStepsType[], diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardFooter.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardFooter.tsx index 40024bd30c..cee3c9e240 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardFooter.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardFooter.tsx @@ -2,7 +2,6 @@ import React from 'react'; import { useHistory } from 'react-router-dom'; import { Alert, AlertGroup, AlertVariant } from '@patternfly/react-core'; import { - Cluster, WizardFooter, WizardFooterGenericProps, Alerts, @@ -16,6 +15,7 @@ import { useClusterWizardContext } from './ClusterWizardContext'; import ClusterWizardStepValidationsAlert from '../../../common/components/clusterWizard/ClusterWizardStepValidationsAlert'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { onFetchEvents } from '../fetching/fetchEvents'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; type ClusterValidationSectionProps = { cluster?: Cluster; diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardNavigation.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardNavigation.tsx index 65b0d3443a..ac1d2cad70 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardNavigation.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardNavigation.tsx @@ -1,6 +1,5 @@ import React, { ReactNode } from 'react'; import { WizardNav } from '@patternfly/react-core'; -import { Cluster } from '../../../common'; import { canNextClusterDetails, canNextHostDiscovery, @@ -12,6 +11,7 @@ import { import { useClusterWizardContext } from './ClusterWizardContext'; import { staticIpFormViewSubSteps, wizardStepNames } from './constants'; import WizardNavItem from '../../../common/components/ui/WizardNavItem'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const isStepValid = (stepId: ClusterWizardStepsType, cluster?: Cluster): boolean => { if (!cluster) { diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/CustomManifestStep.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/CustomManifestStep.tsx index 547c6d2218..060f73274f 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/CustomManifestStep.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/CustomManifestStep.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Cluster, ClusterWizardStep, getFormikErrorFields, useAlerts } from '../../../common'; +import { ClusterWizardStep, getFormikErrorFields, useAlerts } from '../../../common'; import { useClusterWizardContext } from './ClusterWizardContext'; import ClusterWizardFooter from './ClusterWizardFooter'; import ClusterWizardNavigation from './ClusterWizardNavigation'; @@ -8,6 +8,7 @@ import { CustomManifestsPage } from '../clusterConfiguration/manifestsConfigurat import { CustomManifestFormState } from '../clusterConfiguration/manifestsConfiguration/components/propTypes'; import { useSelector } from 'react-redux'; import { selectCurrentClusterPermissionsState } from '../../selectors'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const getInitialFormStateProps = () => { return { diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/HostDiscovery.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/HostDiscovery.tsx index 139d14d064..9ce3c601ab 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/HostDiscovery.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/HostDiscovery.tsx @@ -2,8 +2,6 @@ import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { Formik, FormikConfig, useFormikContext } from 'formik'; import { - Cluster, - V2ClusterUpdateParams, getFormikErrorFields, ClusterWizardStep, HostDiscoveryValues, @@ -20,6 +18,10 @@ import ClusterWizardFooter from './ClusterWizardFooter'; import ClusterWizardNavigation from './ClusterWizardNavigation'; import { ClustersService, HostDiscoveryService } from '../../services'; import { selectCurrentClusterPermissionsState } from '../../selectors'; +import { + Cluster, + V2ClusterUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; const HostDiscoveryForm = ({ cluster }: { cluster: Cluster }) => { const { alerts } = useAlerts(); diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/Operators.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/Operators.tsx index fb13a6fb16..3ff250ad30 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/Operators.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/Operators.tsx @@ -3,10 +3,8 @@ import { useDispatch } from 'react-redux'; import { useHistory, useLocation } from 'react-router-dom'; import { Formik, FormikConfig, useFormikContext } from 'formik'; import { - Cluster, ClusterWizardStep, getFormikErrorFields, - MonitoredOperator, OPERATOR_NAME_CNV, OPERATOR_NAME_LVM, OPERATOR_NAME_MCE, @@ -24,6 +22,7 @@ import { ClustersService, OperatorsService } from '../../services'; import { setServerUpdateError, updateCluster } from '../../reducers/clusters'; import { getApiErrorMessage, handleApiError, isUnknownServerError } from '../../api'; import { canNextOperators } from './wizardTransition'; +import { Cluster, MonitoredOperator } from '@openshift-assisted/types/assisted-installer-service'; export const getOperatorsInitialValues = ( monitoredOperators: MonitoredOperator[], diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/StaticIp.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/StaticIp.tsx index debb153e9c..3b801a7606 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/StaticIp.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/StaticIp.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { useSelector } from 'react-redux'; -import { Cluster, ClusterWizardStep, getFormikErrorFields, useAlerts } from '../../../common'; +import { ClusterWizardStep, getFormikErrorFields, useAlerts } from '../../../common'; import { useClusterWizardContext } from './ClusterWizardContext'; import ClusterWizardFooter from './ClusterWizardFooter'; import ClusterWizardNavigation from './ClusterWizardNavigation'; @@ -11,6 +11,7 @@ import { import { StaticIpPage } from '../clusterConfiguration/staticIp/components/StaticIpPage'; import { WithErrorBoundary } from '../../../common/components/ErrorHandling/WithErrorBoundary'; import { selectCurrentClusterPermissionsState } from '../../selectors'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const getInitialFormStateProps = () => { return { diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/Storage.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/Storage.tsx index 715c6c8322..be98c08d68 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/Storage.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/Storage.tsx @@ -2,7 +2,6 @@ import React from 'react'; import { StackItem } from '@patternfly/react-core'; import { Formik, FormikConfig, useFormikContext } from 'formik'; import { - Cluster, getFormikErrorFields, FormikAutoSave, ClusterWizardStep, @@ -17,6 +16,7 @@ import { useClusterWizardContext } from './ClusterWizardContext'; import ClusterWizardNavigation from './ClusterWizardNavigation'; import { canNextStorage } from './wizardTransition'; import HostsStorageTable from '../hosts/HostsStorageTable'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const StorageForm = ({ cluster }: { cluster: Cluster }) => { const { alerts } = useAlerts(); diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/wizardTransition.ts b/libs/ui-lib/lib/ocm/components/clusterWizard/wizardTransition.ts index 6d55d9dc4c..3ea0f3f457 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/wizardTransition.ts +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/wizardTransition.ts @@ -1,10 +1,7 @@ import { - Cluster, findValidationStep, getAllClusterWizardSoftValidationIds, getWizardStepClusterStatus, - Host, - HostValidationId, WizardStepsValidationMap, WizardStepValidationMap, } from '../../../common'; @@ -15,6 +12,11 @@ import { Validation as HostValidation, } from '../../../common/types/hosts'; import { getKeys, stringToJSON } from '../../../common/utils'; +import { + Cluster, + Host, + HostValidationId, +} from '@openshift-assisted/types/assisted-installer-service'; export type ClusterWizardStepsType = | 'cluster-details' diff --git a/libs/ui-lib/lib/ocm/components/clusters/ClusterPage.tsx b/libs/ui-lib/lib/ocm/components/clusters/ClusterPage.tsx index e9608cea46..f6c33044e8 100644 --- a/libs/ui-lib/lib/ocm/components/clusters/ClusterPage.tsx +++ b/libs/ui-lib/lib/ocm/components/clusters/ClusterPage.tsx @@ -5,10 +5,8 @@ import { PageSection, PageSectionVariants, Text, TextContent } from '@patternfly import { AddHostsContextProvider, AlertsContextProvider, - Cluster, CpuArchitecture, ErrorState, - InfraEnv, ResourceUIState, } from '../../../common'; import ClusterDetail from '../clusterDetail/ClusterDetail'; @@ -33,6 +31,7 @@ import ClusterUpdateErrorModal from '../clusterDetail/ClusterUpdateErrorModal'; import { BackButton } from '../ui/Buttons/BackButton'; import { NewFeatureSupportLevelProvider } from '../featureSupportLevels'; import { usePullSecret } from '../../hooks'; +import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; type MatchParams = { clusterId: string; diff --git a/libs/ui-lib/lib/ocm/components/clusters/ClusterStatus.tsx b/libs/ui-lib/lib/ocm/components/clusters/ClusterStatus.tsx index b8298d1cb6..1bdc25f19b 100644 --- a/libs/ui-lib/lib/ocm/components/clusters/ClusterStatus.tsx +++ b/libs/ui-lib/lib/ocm/components/clusters/ClusterStatus.tsx @@ -12,9 +12,10 @@ import { InProgressIcon, BanIcon, } from '@patternfly/react-icons'; -import { Cluster, clusterStatusLabels, WithTestID } from '../../../common'; +import { clusterStatusLabels, WithTestID } from '../../../common'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { TFunction } from 'i18next'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; type ClusterStatusProps = { status: Cluster['status']; diff --git a/libs/ui-lib/lib/ocm/components/clusters/Clusters.tsx b/libs/ui-lib/lib/ocm/components/clusters/Clusters.tsx index 4c0285c94b..c9e9c607ac 100644 --- a/libs/ui-lib/lib/ocm/components/clusters/Clusters.tsx +++ b/libs/ui-lib/lib/ocm/components/clusters/Clusters.tsx @@ -20,7 +20,6 @@ import { EmptyState, useAlerts, AlertsContextProvider, - Cluster, } from '../../../common'; import ClustersTable from './ClustersTable'; import { @@ -34,6 +33,7 @@ import { routeBasePath } from '../../config'; import { ClustersService } from '../../services'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import ClusterPollingErrorModal from '../clusterDetail/ClusterPollingErrorModal'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; type ClustersProps = RouteComponentProps; diff --git a/libs/ui-lib/lib/ocm/components/clusters/ClustersListToolbar.tsx b/libs/ui-lib/lib/ocm/components/clusters/ClustersListToolbar.tsx index bc2db8993c..f31bd06d75 100644 --- a/libs/ui-lib/lib/ocm/components/clusters/ClustersListToolbar.tsx +++ b/libs/ui-lib/lib/ocm/components/clusters/ClustersListToolbar.tsx @@ -20,7 +20,7 @@ import { Tooltip, } from '@patternfly/react-core'; import { FilterIcon, SyncIcon } from '@patternfly/react-icons'; -import { Cluster, clusterStatusLabels, isSelectEventChecked, ToolbarButton } from '../../../common'; +import { clusterStatusLabels, isSelectEventChecked, ToolbarButton } from '../../../common'; import { ResourceUIState } from '../../../common'; import { selectClustersUIState } from '../../selectors'; import { ClustersDispatch, fetchClustersAsync } from '../../reducers/clusters'; @@ -28,6 +28,7 @@ import { routeBasePath } from '../../config'; import omit from 'lodash-es/omit.js'; import { TFunction } from 'i18next'; import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export type ClusterFiltersType = { [key: string]: string[]; // value from clusterStatusLabels diff --git a/libs/ui-lib/lib/ocm/components/clusters/clusterPolling.ts b/libs/ui-lib/lib/ocm/components/clusters/clusterPolling.ts index bcdded5037..cf7fb22484 100644 --- a/libs/ui-lib/lib/ocm/components/clusters/clusterPolling.ts +++ b/libs/ui-lib/lib/ocm/components/clusters/clusterPolling.ts @@ -1,6 +1,6 @@ import React from 'react'; import { useSelector, useDispatch } from 'react-redux'; -import { Cluster, ResourceUIState, POLLING_INTERVAL } from '../../../common'; +import { ResourceUIState, POLLING_INTERVAL } from '../../../common'; import { fetchClusterAsync, cleanCluster, @@ -10,6 +10,7 @@ import { ClusterDispatch, } from '../../reducers/clusters'; import { selectCurrentClusterState } from '../../selectors'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const shouldRefetch = (uiState: ResourceUIState, hasClusterData: boolean) => { if (uiState === ResourceUIState.POLLING_ERROR) { diff --git a/libs/ui-lib/lib/ocm/components/clusters/utils.ts b/libs/ui-lib/lib/ocm/components/clusters/utils.ts index 31cd440848..c024141059 100644 --- a/libs/ui-lib/lib/ocm/components/clusters/utils.ts +++ b/libs/ui-lib/lib/ocm/components/clusters/utils.ts @@ -1,11 +1,11 @@ import { Cluster, - selectOlmOperators, LogsState, MonitoredOperator, MonitoredOperatorsList, OperatorCreateParams, -} from '../../../common'; +} from '@openshift-assisted/types/assisted-installer-service'; +import { selectOlmOperators } from '../../../common'; // The Day2 cluster export const isAddHostsCluster = (cluster: Cluster) => cluster.kind === 'AddHostsCluster'; diff --git a/libs/ui-lib/lib/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.tsx b/libs/ui-lib/lib/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.tsx index ac7f1a7d8e..6c0131f7ab 100644 --- a/libs/ui-lib/lib/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.tsx +++ b/libs/ui-lib/lib/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.tsx @@ -1,12 +1,9 @@ import React, { PropsWithChildren } from 'react'; import { ActiveFeatureConfiguration, - Cluster, CpuArchitecture, FeatureId, getDefaultCpuArchitecture, - SupportLevel, - SupportLevels, } from '../../../common'; import { useOpenshiftVersions, usePullSecret } from '../../hooks'; import { getNewFeatureDisabledReason, isFeatureSupportedAndAvailable } from './featureStateUtils'; @@ -17,6 +14,11 @@ import { NewFeatureSupportLevelMap, } from '../../../common/components/newFeatureSupportLevels'; import useSupportLevelsAPI from '../../hooks/useSupportLevelsAPI'; +import { + Cluster, + SupportLevel, + SupportLevels, +} from '@openshift-assisted/types/assisted-installer-service'; export type NewSupportLevelProviderProps = PropsWithChildren<{ clusterFeatureUsage?: string; diff --git a/libs/ui-lib/lib/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.tsx b/libs/ui-lib/lib/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.tsx index 2f1f28085a..db2cca986c 100644 --- a/libs/ui-lib/lib/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.tsx +++ b/libs/ui-lib/lib/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.tsx @@ -10,7 +10,7 @@ import { } from '../../../common/types'; import { TECH_SUPPORT_LEVEL_LINK } from '../../../common/config/constants'; import ExternalLink from '../../../common/components/ui/ExternalLink'; -import { Cluster } from '../../../common/api/types'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; import { DetailItem } from '../../../common'; import { getLimitedFeatureSupportLevels } from '../../../common/components/newFeatureSupportLevels/utils'; import { WithErrorBoundary } from '../../../common/components/ErrorHandling/WithErrorBoundary'; diff --git a/libs/ui-lib/lib/ocm/components/featureSupportLevels/featureStateUtils.ts b/libs/ui-lib/lib/ocm/components/featureSupportLevels/featureStateUtils.ts index 56cfba090e..35491d6ccc 100644 --- a/libs/ui-lib/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +++ b/libs/ui-lib/lib/ocm/components/featureSupportLevels/featureStateUtils.ts @@ -1,14 +1,13 @@ import { ActiveFeatureConfiguration, - Cluster, CpuArchitecture, FeatureId, isSNO, OperatorsValues, - SupportLevel, SupportedCpuArchitecture, } from '../../../common'; import { architectureData } from '../clusterConfiguration/CpuArchitectureDropdown'; +import { Cluster, SupportLevel } from '@openshift-assisted/types/assisted-installer-service'; const CNV_OPERATOR_LABEL = 'Openshift Virtualization'; const LVMS_OPERATOR_LABEL = 'Logical Volume Manager Storage'; diff --git a/libs/ui-lib/lib/ocm/components/fetching/fetchEvents.ts b/libs/ui-lib/lib/ocm/components/fetching/fetchEvents.ts index 68927ec941..91f2d7da26 100644 --- a/libs/ui-lib/lib/ocm/components/fetching/fetchEvents.ts +++ b/libs/ui-lib/lib/ocm/components/fetching/fetchEvents.ts @@ -1,9 +1,9 @@ import { AxiosError, AxiosResponseHeaders } from 'axios'; -import { EVENT_SEVERITIES, Event, EventListFetchProps } from '../../../common'; +import { EVENT_SEVERITIES, EventListFetchProps } from '../../../common'; import { handleApiError } from '../../api'; import { EventsAPI } from '../../services/apis'; import { SeverityCountsType } from '../../../common/components/ui/ClusterEventsToolbar'; - +import { Event } from '@openshift-assisted/types/assisted-installer-service'; const parseHeaders = (headers: AxiosResponseHeaders) => { const severities: Record = { error: 0, diff --git a/libs/ui-lib/lib/ocm/components/hosts/ClusterHostsTable.tsx b/libs/ui-lib/lib/ocm/components/hosts/ClusterHostsTable.tsx index 0cdc75754c..ff223a7a49 100644 --- a/libs/ui-lib/lib/ocm/components/hosts/ClusterHostsTable.tsx +++ b/libs/ui-lib/lib/ocm/components/hosts/ClusterHostsTable.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Cluster, selectSchedulableMasters, Host, isSNO } from '../../../common'; +import { selectSchedulableMasters, isSNO } from '../../../common'; import { AdditionalNTPSourcesDialogToggle } from './AdditionaNTPSourceDialogToggle'; import { discoveredAtColumn, @@ -24,6 +24,7 @@ import { } from '../../../common/components/hosts/HostsTableDetailContext'; import { TableVariant } from '@patternfly/react-table'; import { useClusterWizardContext } from '../clusterWizard/ClusterWizardContext'; +import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service'; export function ExpandComponent({ obj: host }: ExpandComponentProps) { const { onDiskRole, canEditDisks, updateDiskSkipFormatting } = useHostsTableDetailContext(); diff --git a/libs/ui-lib/lib/ocm/components/hosts/HardwareStatus.tsx b/libs/ui-lib/lib/ocm/components/hosts/HardwareStatus.tsx index 008b213a8a..b626682774 100644 --- a/libs/ui-lib/lib/ocm/components/hosts/HardwareStatus.tsx +++ b/libs/ui-lib/lib/ocm/components/hosts/HardwareStatus.tsx @@ -4,7 +4,6 @@ import { areOnlySoftValidationsOfWizardStepFailing, getWizardStepHostStatus, getWizardStepHostValidationsInfo, - Host, HostsTableActions, hostStatus, HostStatus, @@ -14,6 +13,7 @@ import { ValidationsInfo } from '../../../common/types/hosts'; import { wizardStepsValidationsMap } from '../clusterWizard/wizardTransition'; import { AdditionalNTPSourcesDialogToggle } from './AdditionaNTPSourceDialogToggle'; import { stringToJSON } from '../../../common/utils'; +import { Host } from '@openshift-assisted/types/assisted-installer-service'; type HardwareStatusProps = { host: Host; diff --git a/libs/ui-lib/lib/ocm/components/hosts/HostRequirementsContent.tsx b/libs/ui-lib/lib/ocm/components/hosts/HostRequirementsContent.tsx index c37e8de276..c771a0c9fe 100644 --- a/libs/ui-lib/lib/ocm/components/hosts/HostRequirementsContent.tsx +++ b/libs/ui-lib/lib/ocm/components/hosts/HostRequirementsContent.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { List, ListItem, Text, TextContent } from '@patternfly/react-core'; -import { Cluster, ErrorState, ExternalLink, LoadingState } from '../../../common'; +import { ErrorState, ExternalLink, LoadingState } from '../../../common'; import { useClusterPreflightRequirements } from '../../hooks'; import { fileSize } from '../../../common/utils'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const DISK_WRITE_SPEED_LINK = 'https://access.redhat.com/solutions/4885641'; diff --git a/libs/ui-lib/lib/ocm/components/hosts/HostsDiscoveryTable.tsx b/libs/ui-lib/lib/ocm/components/hosts/HostsDiscoveryTable.tsx index 996a0b3851..4a37ca05a5 100644 --- a/libs/ui-lib/lib/ocm/components/hosts/HostsDiscoveryTable.tsx +++ b/libs/ui-lib/lib/ocm/components/hosts/HostsDiscoveryTable.tsx @@ -3,8 +3,6 @@ import { Stack, StackItem } from '@patternfly/react-core'; import { ChangeHostnameAction, selectSchedulableMasters, - Cluster, - Host, isSNO, DeleteHostAction, TableToolbar, @@ -30,6 +28,7 @@ import HostsTableEmptyState from '../hosts/HostsTableEmptyState'; import { useSelector } from 'react-redux'; import { selectCurrentClusterPermissionsState } from '../../selectors'; import { useClusterWizardContext } from '../clusterWizard/ClusterWizardContext'; +import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service'; const HostRowDetailExpand = ({ obj: host }: ExpandComponentProps) => ( ) { const { onDiskRole, canEditDisks, updateDiskSkipFormatting } = useHostsTableDetailContext(); diff --git a/libs/ui-lib/lib/ocm/components/hosts/ModalDialogsContext.tsx b/libs/ui-lib/lib/ocm/components/hosts/ModalDialogsContext.tsx index a5f8cf6f66..0d63da354b 100644 --- a/libs/ui-lib/lib/ocm/components/hosts/ModalDialogsContext.tsx +++ b/libs/ui-lib/lib/ocm/components/hosts/ModalDialogsContext.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Host, Inventory, Cluster } from '../../../common'; import { dialogsSlice } from '../../../common'; +import { Cluster, Host, Inventory } from '@openshift-assisted/types/assisted-installer-service'; const { openDialog: openDialogAction, closeDialog: closeDialogAction } = dialogsSlice.actions; const dialogsReducer = dialogsSlice.reducer; diff --git a/libs/ui-lib/lib/ocm/components/hosts/StorageAlerts.tsx b/libs/ui-lib/lib/ocm/components/hosts/StorageAlerts.tsx index 3686f62d9d..d806555f7c 100644 --- a/libs/ui-lib/lib/ocm/components/hosts/StorageAlerts.tsx +++ b/libs/ui-lib/lib/ocm/components/hosts/StorageAlerts.tsx @@ -1,16 +1,15 @@ import * as React from 'react'; import { Alert, AlertVariant, List, ListItem, Stack, StackItem } from '@patternfly/react-core'; import { - Cluster, FormatDiskWarning, getInventory, hasEnabledOperators, - Host, OPERATOR_NAME_ODF, } from '../../../common'; import { isAddHostsCluster, isSomeDisksSkipFormatting } from '../clusters/utils'; import OdfDisksManualFormattingHint from './OdfDisksManualFormattingHint'; import { getDiskLimitation } from '../../../common/components/storage/DisksTable'; +import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service'; const StorageAlerts = ({ cluster }: { cluster: Cluster }) => { const showFormattingHint = diff --git a/libs/ui-lib/lib/ocm/components/hosts/use-hosts-table.tsx b/libs/ui-lib/lib/ocm/components/hosts/use-hosts-table.tsx index 1c0a6c5c4e..6a8614494c 100644 --- a/libs/ui-lib/lib/ocm/components/hosts/use-hosts-table.tsx +++ b/libs/ui-lib/lib/ocm/components/hosts/use-hosts-table.tsx @@ -2,12 +2,7 @@ import * as React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { useAlerts, - Cluster, - Disk, - DiskRole, EventsModal, - Host, - HostUpdateParams, AddHostsContext, MassChangeHostnameModal, getInventory, @@ -55,6 +50,13 @@ import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; import { selectCurrentClusterPermissionsState, selectCurrentClusterState } from '../../selectors'; import { hardwareStatusColumn } from './HardwareStatus'; import { useClusterWizardContext } from '../clusterWizard/ClusterWizardContext'; +import { + Cluster, + Disk, + DiskRole, + Host, + HostUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; export const useHostsTable = (cluster: Cluster) => { const { addAlert } = useAlerts(); diff --git a/libs/ui-lib/lib/ocm/components/hosts/utils.ts b/libs/ui-lib/lib/ocm/components/hosts/utils.ts index e3629af1bf..964f6c9c89 100644 --- a/libs/ui-lib/lib/ocm/components/hosts/utils.ts +++ b/libs/ui-lib/lib/ocm/components/hosts/utils.ts @@ -1,17 +1,17 @@ import { saveAs } from 'file-saver'; -import type { - AlertsContextType, - Cluster, - V2ClusterUpdateParams, - Host, - Inventory, -} from '../../../common'; +import type { AlertsContextType } from '../../../common'; import { isInOcm, handleApiError, getApiErrorMessage } from '../../api'; import { updateCluster } from '../../reducers/clusters'; import { ClustersService } from '../../services'; import ClustersAPI from '../../../common/api/assisted-service/ClustersAPI'; import { stringToJSON } from '../../../common/utils'; +import { + Cluster, + Host, + Inventory, + V2ClusterUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; export const downloadHostInstallationLogs = async ( addAlert: AlertsContextType['addAlert'], diff --git a/libs/ui-lib/lib/ocm/config/constants.ts b/libs/ui-lib/lib/ocm/config/constants.ts index f04d4b6448..1f7392b32a 100644 --- a/libs/ui-lib/lib/ocm/config/constants.ts +++ b/libs/ui-lib/lib/ocm/config/constants.ts @@ -1,8 +1,8 @@ import { AssistedInstallerOCMPermissionTypesListType, AssistedInstallerPermissionTypesListType, - Cluster, } from '../../common'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; /* Used from Integration tests so we can mock the permissions */ export type ExtendedCluster = Cluster & { diff --git a/libs/ui-lib/lib/ocm/hooks/useClusterCustomManifests.ts b/libs/ui-lib/lib/ocm/hooks/useClusterCustomManifests.ts index cb7305670a..e47510ad9c 100644 --- a/libs/ui-lib/lib/ocm/hooks/useClusterCustomManifests.ts +++ b/libs/ui-lib/lib/ocm/hooks/useClusterCustomManifests.ts @@ -1,6 +1,10 @@ import React from 'react'; import { alertsSlice } from '../../common/reducers'; -import { Cluster, ListManifests, Manifest } from '../../common/api/types'; +import { + Cluster, + ListManifests, + Manifest, +} from '@openshift-assisted/types/assisted-installer-service'; import { ClustersAPI } from '../services/apis'; import { getApiErrorMessage, handleApiError } from '../api'; import { getErrorMessage } from '../../common/utils'; diff --git a/libs/ui-lib/lib/ocm/hooks/useClusterPreflightRequirements.ts b/libs/ui-lib/lib/ocm/hooks/useClusterPreflightRequirements.ts index b48ea178c9..a102d3eb1d 100644 --- a/libs/ui-lib/lib/ocm/hooks/useClusterPreflightRequirements.ts +++ b/libs/ui-lib/lib/ocm/hooks/useClusterPreflightRequirements.ts @@ -1,6 +1,9 @@ import React from 'react'; import { alertsSlice } from '../../common/reducers'; -import { Cluster, PreflightHardwareRequirements } from '../../common/api/types'; +import { + Cluster, + PreflightHardwareRequirements, +} from '@openshift-assisted/types/assisted-installer-service'; import { ClustersAPI } from '../services/apis'; import { getApiErrorMessage, handleApiError } from '../api'; import { getErrorMessage } from '../../common/utils'; diff --git a/libs/ui-lib/lib/ocm/hooks/useClusterSupportedPlatforms.ts b/libs/ui-lib/lib/ocm/hooks/useClusterSupportedPlatforms.ts index 96a717c943..92f896ed45 100644 --- a/libs/ui-lib/lib/ocm/hooks/useClusterSupportedPlatforms.ts +++ b/libs/ui-lib/lib/ocm/hooks/useClusterSupportedPlatforms.ts @@ -4,7 +4,6 @@ import useSWR from 'swr'; import { getApiErrorMessage, handleApiError } from '../api'; import { ClustersAPI } from '../services/apis'; import { - PlatformType, POLLING_INTERVAL, NonPlatformIntegrations, isClusterPlatformTypeVM, @@ -12,6 +11,7 @@ import { SupportedPlatformType, } from '../../common'; import { APIErrorMixin } from '../../common/api/utils'; +import { PlatformType } from '@openshift-assisted/types/assisted-installer-service'; export type SupportedPlatformIntegrationType = 'no-active-integrations' | SupportedPlatformType; diff --git a/libs/ui-lib/lib/ocm/hooks/useInfraEnv.ts b/libs/ui-lib/lib/ocm/hooks/useInfraEnv.ts index 14e09857a5..4ee0eca127 100644 --- a/libs/ui-lib/lib/ocm/hooks/useInfraEnv.ts +++ b/libs/ui-lib/lib/ocm/hooks/useInfraEnv.ts @@ -1,9 +1,14 @@ import React from 'react'; import { useInfraEnvId } from '.'; -import { Cluster, CpuArchitecture, InfraEnv, InfraEnvUpdateParams } from '../../common'; +import { CpuArchitecture } from '../../common'; import { getErrorMessage } from '../../common/utils'; import { InfraEnvsAPI } from '../services/apis'; import InfraEnvIdsCacheService from '../services/InfraEnvIdsCacheService'; +import { + Cluster, + InfraEnv, + InfraEnvUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; export default function useInfraEnv( clusterId: Cluster['id'], diff --git a/libs/ui-lib/lib/ocm/hooks/useInfraEnvId.ts b/libs/ui-lib/lib/ocm/hooks/useInfraEnvId.ts index 35dc3c987c..12f238f9b9 100644 --- a/libs/ui-lib/lib/ocm/hooks/useInfraEnvId.ts +++ b/libs/ui-lib/lib/ocm/hooks/useInfraEnvId.ts @@ -1,7 +1,12 @@ import React from 'react'; -import { Cluster, CpuArchitecture, InfraEnv, InfraEnvCreateParams } from '../../common'; +import { CpuArchitecture } from '../../common'; import { getErrorMessage } from '../../common/utils'; import { InfraEnvsService } from '../services'; +import { + Cluster, + InfraEnv, + InfraEnvCreateParams, +} from '@openshift-assisted/types/assisted-installer-service'; export default function useInfraEnvId( clusterId: Cluster['id'], diff --git a/libs/ui-lib/lib/ocm/hooks/useInfraEnvImageUrl.ts b/libs/ui-lib/lib/ocm/hooks/useInfraEnvImageUrl.ts index c974e467f8..170278c4e7 100644 --- a/libs/ui-lib/lib/ocm/hooks/useInfraEnvImageUrl.ts +++ b/libs/ui-lib/lib/ocm/hooks/useInfraEnvImageUrl.ts @@ -1,8 +1,9 @@ import React from 'react'; -import { Cluster, CpuArchitecture, PresignedUrl } from '../../common'; +import { CpuArchitecture } from '../../common'; import { InfraEnvsAPI } from '../services/apis'; import { getErrorMessage } from '../../common/utils'; import { InfraEnvsService } from '../services'; +import { Cluster, PresignedUrl } from '@openshift-assisted/types/assisted-installer-service'; type ImgUrl = { url: PresignedUrl['url']; diff --git a/libs/ui-lib/lib/ocm/hooks/useInfraEnvIpxeImageUrl.ts b/libs/ui-lib/lib/ocm/hooks/useInfraEnvIpxeImageUrl.ts index f8299989e7..5f7363e05a 100644 --- a/libs/ui-lib/lib/ocm/hooks/useInfraEnvIpxeImageUrl.ts +++ b/libs/ui-lib/lib/ocm/hooks/useInfraEnvIpxeImageUrl.ts @@ -1,8 +1,9 @@ import React from 'react'; -import { Cluster, CpuArchitecture, PresignedUrl } from '../../common'; +import { CpuArchitecture } from '../../common'; import { InfraEnvsAPI } from '../services/apis'; import { getErrorMessage } from '../../common/utils'; import { InfraEnvsService } from '../services'; +import { Cluster, PresignedUrl } from '@openshift-assisted/types/assisted-installer-service'; type ImgUrl = { url: PresignedUrl['url']; diff --git a/libs/ui-lib/lib/ocm/hooks/useManagedDomains.ts b/libs/ui-lib/lib/ocm/hooks/useManagedDomains.ts index 9bf19b1660..9fa0e84261 100644 --- a/libs/ui-lib/lib/ocm/hooks/useManagedDomains.ts +++ b/libs/ui-lib/lib/ocm/hooks/useManagedDomains.ts @@ -1,7 +1,8 @@ import React from 'react'; -import { ManagedDomain, useAlerts } from '../../common'; +import { useAlerts } from '../../common'; import { getApiErrorMessage, handleApiError } from '../api'; import { ManagedDomainsAPI } from '../services/apis'; +import { ManagedDomain } from '@openshift-assisted/types/assisted-installer-service'; export default function useManagedDomains() { const [managedDomains, setManagedDomains] = React.useState(); diff --git a/libs/ui-lib/lib/ocm/hooks/useOpenshiftVersions.tsx b/libs/ui-lib/lib/ocm/hooks/useOpenshiftVersions.tsx index e50aea75f6..c964baab3a 100644 --- a/libs/ui-lib/lib/ocm/hooks/useOpenshiftVersions.tsx +++ b/libs/ui-lib/lib/ocm/hooks/useOpenshiftVersions.tsx @@ -1,14 +1,13 @@ import React from 'react'; +import { CpuArchitecture, OpenshiftVersionOptionType } from '../../common'; +import { getApiErrorMessage, handleApiError } from '../api'; +import { SupportedOpenshiftVersionsAPI } from '../services/apis'; +import { getKeys } from '../../common/utils'; import { Cluster, - CpuArchitecture, ImportClusterParams, OpenshiftVersion, - OpenshiftVersionOptionType, -} from '../../common'; -import { getApiErrorMessage, handleApiError } from '../api'; -import { SupportedOpenshiftVersionsAPI } from '../services/apis'; -import { getKeys } from '../../common/utils'; +} from '@openshift-assisted/types/assisted-installer-service'; type OpenShiftVersion = Cluster['openshiftVersion']; diff --git a/libs/ui-lib/lib/ocm/hooks/usePullSecret.ts b/libs/ui-lib/lib/ocm/hooks/usePullSecret.ts index 54b1959515..c43f79aed5 100644 --- a/libs/ui-lib/lib/ocm/hooks/usePullSecret.ts +++ b/libs/ui-lib/lib/ocm/hooks/usePullSecret.ts @@ -1,7 +1,7 @@ import React from 'react'; -import { getApiErrorMessage, handleApiError, getOcmClient } from '../api'; +import { getApiErrorMessage, handleApiError } from '../api'; import { useAlerts } from '../../common'; -import { OcmClientRequestResponse } from '../types'; +import { AccessTokenAPI } from '../../common/api/accounts-management-service/access-token-api'; export default function usePullSecret() { const [pullSecret, setPullSecret] = React.useState(); @@ -9,15 +9,11 @@ export default function usePullSecret() { const getPullSecret = React.useCallback(async () => { try { - const ocmClient = getOcmClient(); - if (ocmClient) { - const response: OcmClientRequestResponse = await ocmClient.post( - '/api/accounts_mgmt/v1/access_token', - ); - const data = response?.request?.response; - setPullSecret(data || ''); // unmarshalled response as a string + const accessTokenCfg = await AccessTokenAPI.fetchPullSecret(); + if (accessTokenCfg) { + setPullSecret(JSON.stringify(accessTokenCfg)); // unmarshalled response as a string } else { - setPullSecret(''); + setPullSecret(() => ''); } } catch (e) { handleApiError(e, (e) => { diff --git a/libs/ui-lib/lib/ocm/hooks/useSetClusterPermissions.ts b/libs/ui-lib/lib/ocm/hooks/useSetClusterPermissions.ts index 6eab45db91..ba442680c7 100644 --- a/libs/ui-lib/lib/ocm/hooks/useSetClusterPermissions.ts +++ b/libs/ui-lib/lib/ocm/hooks/useSetClusterPermissions.ts @@ -1,7 +1,8 @@ import { useDispatch } from 'react-redux'; -import { AssistedInstallerOCMPermissionTypesListType, Cluster } from '../../common'; +import { AssistedInstallerOCMPermissionTypesListType } from '../../common'; import { ExtendedCluster, getBasePermissions, ocmPermissionsToAIPermissions } from '../config'; import { updateClusterPermissions } from '../reducers/clusters'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export default function useSetClusterPermissions() { const dispatch = useDispatch(); diff --git a/libs/ui-lib/lib/ocm/hooks/useUsedClusterNames.ts b/libs/ui-lib/lib/ocm/hooks/useUsedClusterNames.ts index f437604fc1..3a158470e4 100644 --- a/libs/ui-lib/lib/ocm/hooks/useUsedClusterNames.ts +++ b/libs/ui-lib/lib/ocm/hooks/useUsedClusterNames.ts @@ -1,7 +1,8 @@ import React from 'react'; import { getApiErrorMessage, handleApiError } from '../api'; import { ClustersAPI } from '../services/apis'; -import { Cluster, useAlerts } from '../../common'; +import { useAlerts } from '../../common'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export default function useUsedClusterNames(clusterId: Cluster['id']) { const [usedClusterNames, setUsedClusterNames] = React.useState(); diff --git a/libs/ui-lib/lib/ocm/reducers/clusters/clustersSlice.ts b/libs/ui-lib/lib/ocm/reducers/clusters/clustersSlice.ts index e5c968fb2e..e62bba4d79 100644 --- a/libs/ui-lib/lib/ocm/reducers/clusters/clustersSlice.ts +++ b/libs/ui-lib/lib/ocm/reducers/clusters/clustersSlice.ts @@ -6,9 +6,10 @@ import { AnyAction, Dispatch, } from '@reduxjs/toolkit'; -import { Cluster, ResourceUIState } from '../../../common'; +import { ResourceUIState } from '../../../common'; import { ClustersAPI } from '../../services/apis'; import { handleApiError, isInOcm } from '../../api'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export const fetchClustersAsync = createAsyncThunk( 'clusters/fetchClustersAsync', diff --git a/libs/ui-lib/lib/ocm/reducers/clusters/currentClusterSlice.ts b/libs/ui-lib/lib/ocm/reducers/clusters/currentClusterSlice.ts index 0131d27c47..14a8b6ec70 100644 --- a/libs/ui-lib/lib/ocm/reducers/clusters/currentClusterSlice.ts +++ b/libs/ui-lib/lib/ocm/reducers/clusters/currentClusterSlice.ts @@ -9,12 +9,7 @@ import { PayloadAction, ThunkDispatch, } from '@reduxjs/toolkit'; -import { - AssistedInstallerPermissionTypesListType, - Cluster, - Host, - ResourceUIState, -} from '../../../common'; +import { AssistedInstallerPermissionTypesListType, ResourceUIState } from '../../../common'; import { getApiErrorMessage, getApiErrorCode, @@ -22,6 +17,7 @@ import { FETCH_ABORTED_ERROR_CODE, } from '../../api'; import { ClustersService } from '../../services'; +import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service'; export type FetchErrorType = { code: string | number; diff --git a/libs/ui-lib/lib/ocm/selectors/clusters.tsx b/libs/ui-lib/lib/ocm/selectors/clusters.tsx index c9be306d9f..fccf1a61a9 100644 --- a/libs/ui-lib/lib/ocm/selectors/clusters.tsx +++ b/libs/ui-lib/lib/ocm/selectors/clusters.tsx @@ -5,7 +5,6 @@ import { Link } from 'react-router-dom'; import { TFunction } from 'i18next'; import { - Cluster, DASH, getDateTimeCell, getEnabledHostCount, @@ -19,6 +18,7 @@ import { import ClusterStatus, { getClusterStatusText } from '../components/clusters/ClusterStatus'; import { routeBasePath } from '../config'; import { RootState } from '../store'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const selectClusters = (state: RootState) => state.clusters.data; const clustersUIState = (state: RootState) => state.clusters.uiState; diff --git a/libs/ui-lib/lib/ocm/services/ClusterDetailsService.ts b/libs/ui-lib/lib/ocm/services/ClusterDetailsService.ts index baa961794b..39456f17cf 100644 --- a/libs/ui-lib/lib/ocm/services/ClusterDetailsService.ts +++ b/libs/ui-lib/lib/ocm/services/ClusterDetailsService.ts @@ -1,13 +1,9 @@ import { AI_UI_TAG, - Cluster, CpuArchitecture, - InfraEnv, - ManagedDomain, OpenshiftVersionOptionType, getClusterDetailsInitialValues, ClusterCpuArchitecture, - PlatformType, } from '../../common'; import DiskEncryptionService from './DiskEncryptionService'; import { @@ -19,6 +15,12 @@ import { import { getDummyInfraEnvField } from '../components/clusterConfiguration/staticIp/data/dummyData'; import { isInOcm } from '../api'; import { getDefaultCpuArchitecture } from './CpuArchitectureService'; +import { + Cluster, + InfraEnv, + ManagedDomain, + PlatformType, +} from '@openshift-assisted/types/assisted-installer-service'; const getNewClusterCpuArchitecture = (urlSearchParams: string) => { const params = new URLSearchParams(urlSearchParams); diff --git a/libs/ui-lib/lib/ocm/services/ClustersService.ts b/libs/ui-lib/lib/ocm/services/ClustersService.ts index 1d7aa310f9..d91af92b13 100644 --- a/libs/ui-lib/lib/ocm/services/ClustersService.ts +++ b/libs/ui-lib/lib/ocm/services/ClustersService.ts @@ -1,15 +1,7 @@ import { ClustersAPI } from '../services/apis'; import HostsService from './HostsService'; import InfraEnvsService from './InfraEnvsService'; -import { - AI_UI_TAG, - Cluster, - CreateManifestParams, - Host, - InfraEnvCreateParams, - UpdateManifestParams, - V2ClusterUpdateParams, -} from '../../common'; +import { AI_UI_TAG } from '../../common'; import { isInOcm } from '../api'; import { ClusterCreateParamsWithStaticNetworking } from './types'; import omit from 'lodash-es/omit.js'; @@ -17,6 +9,14 @@ import { CustomManifestValues, ListManifestsExtended, } from '../components/clusterConfiguration/manifestsConfiguration/data/dataTypes'; +import { + Cluster, + CreateManifestParams, + Host, + InfraEnvCreateParams, + UpdateManifestParams, + V2ClusterUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; const ClustersService = { findHost(hosts: Cluster['hosts'] = [], hostId: Host['id']) { diff --git a/libs/ui-lib/lib/ocm/services/CpuArchitectureService.ts b/libs/ui-lib/lib/ocm/services/CpuArchitectureService.ts index d475c89381..48667d36de 100644 --- a/libs/ui-lib/lib/ocm/services/CpuArchitectureService.ts +++ b/libs/ui-lib/lib/ocm/services/CpuArchitectureService.ts @@ -1,10 +1,10 @@ import { - Cluster, CpuArchitecture, OcmCpuArchitecture, getDefaultCpuArchitecture, SupportedCpuArchitecture, } from '../../common'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; const mapOcmArchToCpuArchitecture = ( ocmArch: OcmCpuArchitecture | string, diff --git a/libs/ui-lib/lib/ocm/services/Day2ClusterService.ts b/libs/ui-lib/lib/ocm/services/Day2ClusterService.ts index 42c213e0ea..3f5b267665 100644 --- a/libs/ui-lib/lib/ocm/services/Day2ClusterService.ts +++ b/libs/ui-lib/lib/ocm/services/Day2ClusterService.ts @@ -1,8 +1,9 @@ import { InfraEnvsService } from '.'; import { ClustersAPI } from './apis'; -import { Cluster, CpuArchitecture, SupportedCpuArchitecture } from '../../common'; +import { CpuArchitecture, SupportedCpuArchitecture } from '../../common'; import { OcmClusterType } from '../components/AddHosts/types'; import { mapOcmArchToCpuArchitecture } from './CpuArchitectureService'; +import { Cluster } from '@openshift-assisted/types/assisted-installer-service'; export const getApiVipDnsName = (ocmCluster: OcmClusterType) => { let apiVipDnsname = ''; diff --git a/libs/ui-lib/lib/ocm/services/DiscoveryImageFormService.ts b/libs/ui-lib/lib/ocm/services/DiscoveryImageFormService.ts index f4ec395be5..6bc7254661 100644 --- a/libs/ui-lib/lib/ocm/services/DiscoveryImageFormService.ts +++ b/libs/ui-lib/lib/ocm/services/DiscoveryImageFormService.ts @@ -4,7 +4,7 @@ import { Cluster, InfraEnv, ImageType, -} from '../../common/api/types'; +} from '@openshift-assisted/types/assisted-installer-service'; import { InfraEnvsAPI } from './apis'; import ClustersService from './ClustersService'; import { OcmDiscoveryImageFormValues } from '../components/clusterConfiguration/OcmDiscoveryImageConfigForm'; diff --git a/libs/ui-lib/lib/ocm/services/DiskEncryptionService.ts b/libs/ui-lib/lib/ocm/services/DiskEncryptionService.ts index 0ecd172135..fc849e15d8 100644 --- a/libs/ui-lib/lib/ocm/services/DiskEncryptionService.ts +++ b/libs/ui-lib/lib/ocm/services/DiskEncryptionService.ts @@ -1,4 +1,8 @@ -import { ClusterCreateParams, ClusterDetailsValues, DiskEncryption } from '../../common'; +import { ClusterDetailsValues } from '../../common'; +import { + ClusterCreateParams, + DiskEncryption, +} from '@openshift-assisted/types/assisted-installer-service'; const DiskEncryptionService = { diskEncryptionEnableOn( diff --git a/libs/ui-lib/lib/ocm/services/HostDiscoveryService.ts b/libs/ui-lib/lib/ocm/services/HostDiscoveryService.ts index 9473cf8f4f..409bf1d349 100644 --- a/libs/ui-lib/lib/ocm/services/HostDiscoveryService.ts +++ b/libs/ui-lib/lib/ocm/services/HostDiscoveryService.ts @@ -1,9 +1,8 @@ +import { HostDiscoveryValues, selectMastersMustRunWorkloads } from '../../common'; import { Cluster, V2ClusterUpdateParams, - HostDiscoveryValues, - selectMastersMustRunWorkloads, -} from '../../common'; +} from '@openshift-assisted/types/assisted-installer-service'; const HostDiscoveryService = { setSchedulableMasters( diff --git a/libs/ui-lib/lib/ocm/services/HostsService.ts b/libs/ui-lib/lib/ocm/services/HostsService.ts index 76a2a13b90..a4f3bcbace 100644 --- a/libs/ui-lib/lib/ocm/services/HostsService.ts +++ b/libs/ui-lib/lib/ocm/services/HostsService.ts @@ -1,4 +1,9 @@ -import { Disk, DiskRole, Host, HostUpdateParams } from '../../common'; +import { + Disk, + DiskRole, + Host, + HostUpdateParams, +} from '@openshift-assisted/types/assisted-installer-service'; import { HostsAPI } from '../services/apis'; const HostsService = { diff --git a/libs/ui-lib/lib/ocm/services/InfraEnvIdsCacheService.ts b/libs/ui-lib/lib/ocm/services/InfraEnvIdsCacheService.ts index 8312a44ed6..fbc7f2d6d1 100644 --- a/libs/ui-lib/lib/ocm/services/InfraEnvIdsCacheService.ts +++ b/libs/ui-lib/lib/ocm/services/InfraEnvIdsCacheService.ts @@ -1,4 +1,5 @@ -import { Cluster, CpuArchitecture, InfraEnv, getAllCpuArchitectures } from '../../common'; +import { CpuArchitecture, getAllCpuArchitectures } from '../../common'; +import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; const CACHE_KEY = 'infra-env-ids-cache-v2'; diff --git a/libs/ui-lib/lib/ocm/services/InfraEnvsService.ts b/libs/ui-lib/lib/ocm/services/InfraEnvsService.ts index 5e6e6a5cc4..bd40a37c98 100644 --- a/libs/ui-lib/lib/ocm/services/InfraEnvsService.ts +++ b/libs/ui-lib/lib/ocm/services/InfraEnvsService.ts @@ -1,14 +1,14 @@ import { AxiosResponse } from 'axios'; +import { CpuArchitecture } from '../../common'; +import { InfraEnvsAPI } from './apis'; +import InfraEnvCache from './InfraEnvIdsCacheService'; +import { getDummyInfraEnvField } from '../components/clusterConfiguration/staticIp/data/dummyData'; import { Cluster, - CpuArchitecture, HostStaticNetworkConfig, InfraEnv, InfraEnvCreateParams, -} from '../../common'; -import { InfraEnvsAPI } from './apis'; -import InfraEnvCache from './InfraEnvIdsCacheService'; -import { getDummyInfraEnvField } from '../components/clusterConfiguration/staticIp/data/dummyData'; +} from '@openshift-assisted/types/assisted-installer-service'; const InfraEnvsService = { async getInfraEnvId( diff --git a/libs/ui-lib/lib/ocm/services/OperatorsService.tsx b/libs/ui-lib/lib/ocm/services/OperatorsService.tsx index d5e2c64e45..7878733469 100644 --- a/libs/ui-lib/lib/ocm/services/OperatorsService.tsx +++ b/libs/ui-lib/lib/ocm/services/OperatorsService.tsx @@ -1,7 +1,5 @@ import { - Cluster, OperatorsValues, - OperatorCreateParams, OPERATOR_NAME_CNV, OPERATOR_NAME_ODF, OPERATOR_NAME_LSO, @@ -11,6 +9,10 @@ import { } from '../../common'; import { getOlmOperatorCreateParamsByName } from '../components/clusters/utils'; import { getKeys } from '../../common/utils'; +import { + Cluster, + OperatorCreateParams, +} from '@openshift-assisted/types/assisted-installer-service'; const hasActiveOperators = (values: OperatorsValues) => { return getKeys(values).some((operatorParam) => values[operatorParam]); diff --git a/libs/ui-lib/lib/ocm/services/types.ts b/libs/ui-lib/lib/ocm/services/types.ts index f37c1d6983..11e129acc4 100644 --- a/libs/ui-lib/lib/ocm/services/types.ts +++ b/libs/ui-lib/lib/ocm/services/types.ts @@ -1,9 +1,9 @@ +import { ClusterDetailsValues } from '../../common'; import { ClusterCreateParams, - ClusterDetailsValues, HostStaticNetworkConfig, V2ClusterUpdateParams, -} from '../../common'; +} from '@openshift-assisted/types/assisted-installer-service'; export type ClusterDetailsUpdateParams = Pick< V2ClusterUpdateParams, diff --git a/libs/ui-lib/lib/ocm/store/slices/infraEnvs/slice.ts b/libs/ui-lib/lib/ocm/store/slices/infraEnvs/slice.ts index 17d4ce57cd..7c93e66698 100644 --- a/libs/ui-lib/lib/ocm/store/slices/infraEnvs/slice.ts +++ b/libs/ui-lib/lib/ocm/store/slices/infraEnvs/slice.ts @@ -1,4 +1,4 @@ -import type { InfraEnv } from '../../../../common'; +import type { InfraEnv } from '@openshift-assisted/types/assisted-installer-service'; import { createSlice } from '@reduxjs/toolkit'; // This slice holds a list of infra-envs where each one has a different cpuArchitecture. diff --git a/libs/ui-lib/lib/ocm/store/slices/infraEnvs/thunks.ts b/libs/ui-lib/lib/ocm/store/slices/infraEnvs/thunks.ts index 912c4b11a8..340ed83930 100644 --- a/libs/ui-lib/lib/ocm/store/slices/infraEnvs/thunks.ts +++ b/libs/ui-lib/lib/ocm/store/slices/infraEnvs/thunks.ts @@ -1,15 +1,14 @@ import { createAsyncThunk } from '@reduxjs/toolkit'; +import { CpuArchitecture, WithRequired } from '../../../../common'; +import { InfraEnvsAPI } from '../../../services/apis'; +import { RootState } from '../../index'; +import { selectInfraEnvByCpuArchitecture } from './selectors'; import { Cluster, - CpuArchitecture, InfraEnv, InfraEnvCreateParams, InfraEnvUpdateParams, - WithRequired, -} from '../../../../common'; -import { InfraEnvsAPI } from '../../../services/apis'; -import { RootState } from '../../index'; -import { selectInfraEnvByCpuArchitecture } from './selectors'; +} from '@openshift-assisted/types/assisted-installer-service'; export const listInfraEnvsByClusterId = createAsyncThunk( 'infraEnvs/listByClusterId', diff --git a/libs/ui-lib/lib/ocm/types.ts b/libs/ui-lib/lib/ocm/types.ts deleted file mode 100644 index 4812a693e7..0000000000 --- a/libs/ui-lib/lib/ocm/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type OcmClientRequestResponse = { - request?: { response?: string }; -}; diff --git a/libs/ui-lib/package.json b/libs/ui-lib/package.json index 374f4d6439..0c247a5ed8 100644 --- a/libs/ui-lib/package.json +++ b/libs/ui-lib/package.json @@ -1,5 +1,7 @@ { "dependencies": { + "@openshift-assisted/locales": "workspace:^", + "@openshift-assisted/types": "workspace:^", "axios-case-converter": "^0.11.1", "camel-case": "^4.1.2", "cidr-tools": "^4.3.0", diff --git a/yarn.lock b/yarn.lock index cf7ff183d3..4f30df92a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -439,7 +439,7 @@ __metadata: languageName: unknown linkType: soft -"@openshift-assisted/locales@workspace:*, @openshift-assisted/locales@workspace:libs/locales": +"@openshift-assisted/locales@workspace:*, @openshift-assisted/locales@workspace:^, @openshift-assisted/locales@workspace:libs/locales": version: 0.0.0-use.local resolution: "@openshift-assisted/locales@workspace:libs/locales" dependencies: @@ -461,7 +461,7 @@ __metadata: languageName: unknown linkType: soft -"@openshift-assisted/types@workspace:libs/types": +"@openshift-assisted/types@workspace:^, @openshift-assisted/types@workspace:libs/types": version: 0.0.0-use.local resolution: "@openshift-assisted/types@workspace:libs/types" dependencies: @@ -491,6 +491,8 @@ __metadata: resolution: "@openshift-assisted/ui-lib@workspace:libs/ui-lib" dependencies: "@openshift-assisted/eslint-config-assisted-ui": "workspace:^" + "@openshift-assisted/locales": "workspace:^" + "@openshift-assisted/types": "workspace:^" "@tsconfig/recommended": ^1.0.2 "@types/file-saver": ^2.0.1 "@types/human-date": ^1.4.0