Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion internal/featuresupport/feature_support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@ var _ = Describe("V2ListFeatureSupportLevels API", func() {
Entry(
"external platform",
[]SupportLevelFeature{&ExternalPlatformFeature{}},
false,
true,
),

Entry(
"external platform oci",
[]SupportLevelFeature{&OciIntegrationFeature{}},
true,
),

Entry(
Expand Down Expand Up @@ -224,6 +230,7 @@ var _ = Describe("V2ListFeatureSupportLevels API", func() {
false,
),
)

})

Context("Test TNA", func() {
Expand Down Expand Up @@ -1030,6 +1037,36 @@ var _ = Describe("V2ListFeatureSupportLevels API", func() {
err := ValidateIncompatibleFeatures(log, models.ClusterCPUArchitectureS390x, &cluster, &infraEnv, nil)
Expect(err).To(Not(BeNil()))
})
It("3 CP with external platform - pass", func() {
cluster := common.Cluster{Cluster: models.Cluster{
OpenshiftVersion: common.MinimumVersionForNonStandardHAOCPControlPlane,
CPUArchitecture: models.ClusterCPUArchitectureX8664,
ControlPlaneCount: 3,
UserManagedNetworking: swag.Bool(true),
Platform: &models.Platform{Type: common.PlatformTypePtr(models.PlatformTypeExternal)},
}}
Expect(ValidateIncompatibleFeatures(log, models.ClusterCPUArchitectureX8664, &cluster, nil, nil)).To(BeNil())
})
It("4 CP with external platform - pass", func() {
cluster := common.Cluster{Cluster: models.Cluster{
OpenshiftVersion: common.MinimumVersionForNonStandardHAOCPControlPlane,
CPUArchitecture: models.ClusterCPUArchitectureX8664,
ControlPlaneCount: 4,
UserManagedNetworking: swag.Bool(true),
Platform: &models.Platform{Type: common.PlatformTypePtr(models.PlatformTypeExternal)},
}}
Expect(ValidateIncompatibleFeatures(log, models.ClusterCPUArchitectureX8664, &cluster, nil, nil)).To(BeNil())
})
It("5 CP with external platform - pass", func() {
cluster := common.Cluster{Cluster: models.Cluster{
OpenshiftVersion: common.MinimumVersionForNonStandardHAOCPControlPlane,
CPUArchitecture: models.ClusterCPUArchitectureX8664,
ControlPlaneCount: 5,
UserManagedNetworking: swag.Bool(true),
Platform: &models.Platform{Type: common.PlatformTypePtr(models.PlatformTypeExternal)},
}}
Expect(ValidateIncompatibleFeatures(log, models.ClusterCPUArchitectureX8664, &cluster, nil, nil)).To(BeNil())
})
It("Nutanix with incompatible features - fail", func() {
operatorsCNV := []*models.MonitoredOperator{
{
Expand Down
4 changes: 1 addition & 3 deletions internal/featuresupport/features_misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ func (f *NonStandardHAControlPlane) getSupportLevel(filters SupportLevelFilters)
}

if filters.PlatformType != nil &&
(*filters.PlatformType != models.PlatformTypeBaremetal && *filters.PlatformType != models.PlatformTypeNone) {
(*filters.PlatformType != models.PlatformTypeBaremetal && *filters.PlatformType != models.PlatformTypeNone && *filters.PlatformType != models.PlatformTypeExternal) {
return models.SupportLevelUnavailable, models.IncompatibilityReasonPlatform
}

Expand All @@ -416,10 +416,8 @@ func (f *NonStandardHAControlPlane) getSupportLevel(filters SupportLevelFilters)

func (f *NonStandardHAControlPlane) getIncompatibleFeatures(openshiftVersion string) []models.FeatureSupportLevelID {
return []models.FeatureSupportLevelID{
models.FeatureSupportLevelIDEXTERNALPLATFORM,
models.FeatureSupportLevelIDNUTANIXINTEGRATION,
models.FeatureSupportLevelIDVSPHEREINTEGRATION,
models.FeatureSupportLevelIDEXTERNALPLATFORMOCI,
}
}

Expand Down
2 changes: 0 additions & 2 deletions internal/featuresupport/features_platforms.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ func (feature *OciIntegrationFeature) getIncompatibleFeatures(string) []models.F
models.FeatureSupportLevelIDVIPAUTOALLOC,
models.FeatureSupportLevelIDDUALSTACKVIPS,
models.FeatureSupportLevelIDFULLISO,
models.FeatureSupportLevelIDNONSTANDARDHACONTROLPLANE,
models.FeatureSupportLevelIDUSERMANAGEDLOADBALANCER,
models.FeatureSupportLevelIDNMSTATE,
models.FeatureSupportLevelIDODF,
Expand Down Expand Up @@ -367,7 +366,6 @@ func (feature *ExternalPlatformFeature) getIncompatibleFeatures(string) []models
models.FeatureSupportLevelIDTNF,
models.FeatureSupportLevelIDCLUSTERMANAGEDNETWORKING,
models.FeatureSupportLevelIDVIPAUTOALLOC,
models.FeatureSupportLevelIDNONSTANDARDHACONTROLPLANE,
models.FeatureSupportLevelIDUSERMANAGEDLOADBALANCER,
models.FeatureSupportLevelIDNMSTATE,
models.FeatureSupportLevelIDDUALSTACKPRIMARYIPV6,
Expand Down