Skip to content

Commit

Permalink
Merge pull request #2787 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2786-to-release_1.2.50

[release_1.2.50] OCM-13516 | fix: Rename key values used for migration API request
  • Loading branch information
hunterkepley authored Feb 11, 2025
2 parents 79448f2 + 3f0c2d1 commit 15602ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 6 additions & 6 deletions pkg/ocm/clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,14 +630,14 @@ func (c *Client) UpdateCluster(clusterKey string, creator *aws.Creator, config S
if len(config.OvnInternalSubnetConfiguration) > 0 {
// Create a builder for the specific migration type's configuration if necessary
sdnToOvnBuilder := &v1.SdnToOvnClusterMigrationBuilder{}
if _, ok := config.OvnInternalSubnetConfiguration[JoinIpv4]; ok {
sdnToOvnBuilder.JoinIpv4(config.OvnInternalSubnetConfiguration[JoinIpv4])
if _, ok := config.OvnInternalSubnetConfiguration[SubnetConfigJoin]; ok {
sdnToOvnBuilder.JoinIpv4(config.OvnInternalSubnetConfiguration[SubnetConfigJoin])
}
if _, ok := config.OvnInternalSubnetConfiguration[TransitIpv4]; ok {
sdnToOvnBuilder.TransitIpv4(config.OvnInternalSubnetConfiguration[TransitIpv4])
if _, ok := config.OvnInternalSubnetConfiguration[SubnetConfigTransit]; ok {
sdnToOvnBuilder.TransitIpv4(config.OvnInternalSubnetConfiguration[SubnetConfigTransit])
}
if _, ok := config.OvnInternalSubnetConfiguration[MasqueradeIpv4]; ok {
sdnToOvnBuilder.MasqueradeIpv4(config.OvnInternalSubnetConfiguration[MasqueradeIpv4])
if _, ok := config.OvnInternalSubnetConfiguration[SubnetConfigMasquerade]; ok {
sdnToOvnBuilder.MasqueradeIpv4(config.OvnInternalSubnetConfiguration[SubnetConfigMasquerade])
}
requestBuilder.SdnToOvn(sdnToOvnBuilder)
}
Expand Down
4 changes: 0 additions & 4 deletions pkg/ocm/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import (
)

const (
TransitIpv4 = "transit_ipv4"
JoinIpv4 = "join_ipv4"
MasqueradeIpv4 = "masquerade_ipv4"

SubnetConfigTransit = "transit"
SubnetConfigMasquerade = "masquerade"
SubnetConfigJoin = "join"
Expand Down

0 comments on commit 15602ce

Please sign in to comment.