Skip to content

Commit 91d24e5

Browse files
committed
PowerVS: update supported regions
Switch to using the "github.com/ppc64le-cloud/powervs-utils" package and the COSRegionForPowerVSRegion function provided.
1 parent 3f33142 commit 91d24e5

File tree

2 files changed

+4
-67
lines changed

2 files changed

+4
-67
lines changed

pkg/storage/ibmcos/ibmcos.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import (
3838
"github.com/openshift/cluster-image-registry-operator/pkg/envvar"
3939
"github.com/openshift/cluster-image-registry-operator/pkg/storage/util"
4040
"github.com/openshift/cluster-image-registry-operator/pkg/version"
41+
powerUtils "github.com/ppc64le-cloud/powervs-utils"
4142
)
4243

4344
const (
@@ -134,7 +135,7 @@ func (d *driver) UpdateEffectiveConfig() (*imageregistryv1.ImageRegistryConfigSt
134135
clusterLocation = infra.Status.PlatformStatus.IBMCloud.Location
135136
}
136137
if infra.Status.PlatformStatus.Type == configapiv1.PowerVSPlatformType && infra.Status.PlatformStatus.PowerVS != nil {
137-
clusterLocation, err = cosRegionForPowerVSRegion(infra.Status.PlatformStatus.PowerVS.Region)
138+
clusterLocation, err = powerUtils.COSRegionForPowerVSRegion(infra.Status.PlatformStatus.PowerVS.Region)
138139
if err != nil {
139140
return nil, err
140141
}
@@ -168,7 +169,7 @@ func (d *driver) CreateStorage(cr *imageregistryv1.Config) error {
168169
d.Config.ResourceGroupName = infra.Status.PlatformStatus.IBMCloud.ResourceGroupName
169170
}
170171
if infra.Status.PlatformStatus.Type == configapiv1.PowerVSPlatformType && infra.Status.PlatformStatus.PowerVS != nil {
171-
d.Config.Location, err = cosRegionForPowerVSRegion(infra.Status.PlatformStatus.PowerVS.Region)
172+
d.Config.Location, err = powerUtils.COSRegionForPowerVSRegion(infra.Status.PlatformStatus.PowerVS.Region)
172173
if err != nil {
173174
return err
174175
}
@@ -782,7 +783,7 @@ func (d *driver) getIBMCOSClient(serviceInstanceCRN string) (*s3.S3, error) {
782783
IBMCOSLocation = infra.Status.PlatformStatus.IBMCloud.Location
783784
}
784785
if infra.Status.PlatformStatus.Type == configapiv1.PowerVSPlatformType && infra.Status.PlatformStatus.PowerVS != nil {
785-
IBMCOSLocation, err = cosRegionForPowerVSRegion(infra.Status.PlatformStatus.PowerVS.Region)
786+
IBMCOSLocation, err = powerUtils.COSRegionForPowerVSRegion(infra.Status.PlatformStatus.PowerVS.Region)
786787
if err != nil {
787788
return nil, err
788789
}

pkg/storage/ibmcos/powervs_regions.go

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)