Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MGMT-15691: Remove platform type oci #5787

Merged
merged 16 commits into from Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions client/installer/get_supported_features_parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions internal/bminventory/inventory.go
Expand Up @@ -1578,7 +1578,7 @@ func (b *bareMetalInventory) GetClusterSupportedPlatforms(ctx context.Context, p
}

func (b *bareMetalInventory) GetFeatureSupportLevelListInternal(_ context.Context, params installer.GetSupportedFeaturesParams) (models.SupportLevels, error) {
return featuresupport.GetFeatureSupportList(params.OpenshiftVersion, params.CPUArchitecture, (*models.PlatformType)(params.PlatformType)), nil
return featuresupport.GetFeatureSupportList(params.OpenshiftVersion, params.CPUArchitecture, (*models.PlatformType)(params.PlatformType), params.ExternalPlatformName), nil
}

func (b *bareMetalInventory) GetArchitecturesSupportLevelListInternal(_ context.Context, params installer.GetSupportedArchitecturesParams) (models.SupportLevels, error) {
Expand Down Expand Up @@ -2548,7 +2548,6 @@ func (b *bareMetalInventory) updateNetworkTables(db *gorm.DB, cluster *common.Cl

func setUpdatesForPlatformParams(params installer.V2UpdateClusterParams, updates map[string]interface{}) {
updates["platform_type"] = params.ClusterUpdateParams.Platform.Type
updates["platform_is_external"] = swag.BoolValue(params.ClusterUpdateParams.Platform.IsExternal)
if *params.ClusterUpdateParams.Platform.Type != models.PlatformTypeExternal {
// clear any existing values in external settings
updates["platform_external_platform_name"] = nil
Expand All @@ -2570,8 +2569,7 @@ func (b *bareMetalInventory) updatePlatformParams(params installer.V2UpdateClust
}

setUpdatesForPlatformParams(params, updates)
err := b.providerRegistry.SetPlatformUsages(
common.PlatformTypeValue(params.ClusterUpdateParams.Platform.Type), usages, b.usageApi)
err := b.providerRegistry.SetPlatformUsages(params.ClusterUpdateParams.Platform, usages, b.usageApi)
if err != nil {
return fmt.Errorf("failed setting platform usages, error is: %w", err)
}
Expand Down Expand Up @@ -2732,7 +2730,7 @@ func (b *bareMetalInventory) setDefaultUsage(cluster *models.Cluster) error {
&map[string]interface{}{"hyperthreading_enabled": cluster.Hyperthreading}, usages)
b.setUserManagedNetworkingAndMultiNodeUsage(swag.BoolValue(cluster.UserManagedNetworking), swag.StringValue(cluster.HighAvailabilityMode), usages)
//write all the usages to the cluster object
err := b.providerRegistry.SetPlatformUsages(common.PlatformTypeValue(cluster.Platform.Type), usages, b.usageApi)
err := b.providerRegistry.SetPlatformUsages(cluster.Platform, usages, b.usageApi)
if err != nil {
return fmt.Errorf("failed setting platform usages, error is: %w", err)
}
Expand Down