Skip to content

Commit fac430d

Browse files
Merge pull request #275 from russellb/baremetal-api
Use BareMetal platform constant from openshift/api
2 parents 1dfc752 + 79a0aff commit fac430d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Gopkg.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/operator/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const (
1616
clusterAPIControllerKubemark = "docker.io/gofed/kubemark-machine-controllers:v1.0"
1717
clusterAPIControllerNoOp = "no-op"
1818
kubemarkPlatform = configv1.PlatformType("kubemark")
19-
bareMetalPlatform = configv1.PlatformType("BareMetal")
2019
)
2120

2221
type Provider string
@@ -74,7 +73,7 @@ func getProviderControllerFromImages(platform configv1.PlatformType, images Imag
7473
return images.ClusterAPIControllerOpenStack, nil
7574
case configv1.AzurePlatformType:
7675
return images.ClusterAPIControllerAzure, nil
77-
case bareMetalPlatform:
76+
case configv1.BareMetalPlatformType:
7877
return images.ClusterAPIControllerBareMetal, nil
7978
case kubemarkPlatform:
8079
return clusterAPIControllerKubemark, nil

pkg/operator/config_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ func TestGetProviderFromInfrastructure(t *testing.T) {
5252
}, {
5353
infra: &configv1.Infrastructure{
5454
Status: configv1.InfrastructureStatus{
55-
Platform: bareMetalPlatform,
55+
Platform: configv1.BareMetalPlatformType,
5656
},
5757
},
58-
expected: bareMetalPlatform,
58+
expected: configv1.BareMetalPlatformType,
5959
}, {
6060
infra: &configv1.Infrastructure{
6161
Status: configv1.InfrastructureStatus{
@@ -129,7 +129,7 @@ func TestGetProviderControllerFromImages(t *testing.T) {
129129
expectedImage: expectedOpenstackImage,
130130
},
131131
{
132-
provider: bareMetalPlatform,
132+
provider: configv1.BareMetalPlatformType,
133133
expectedImage: expectedBareMetalImage,
134134
},
135135
{

pkg/operator/operator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestOperatorSync_NoOp(t *testing.T) {
5050
expectedNoop: false,
5151
},
5252
{
53-
platform: bareMetalPlatform,
53+
platform: configv1.BareMetalPlatformType,
5454
expectedNoop: false,
5555
},
5656
{

0 commit comments

Comments
 (0)