Skip to content

Commit

Permalink
PLT-1396:Fixed edge native cloud config type to VIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM committed Sep 17, 2024
1 parent 308d1da commit 5ed3849
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spectrocloud/resource_cluster_edge_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ func toOverlayNetworkConfigAndVip(cloudConfig map[string]interface{}) (*models.V
controlPlaneEndpoint =
&models.V1EdgeNativeControlPlaneEndPoint{
Host: vip,
Type: "IP",
Type: "VIP",
}
} else {
if overlayConfig.Enable {
Expand All @@ -692,7 +692,7 @@ func toOverlayNetworkConfigAndVip(cloudConfig map[string]interface{}) (*models.V
controlPlaneEndpoint =
&models.V1EdgeNativeControlPlaneEndPoint{
Host: autoGenVip,
Type: "IP",
Type: "VIP",
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions spectrocloud/resource_cluster_edge_native_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func TestToOverlayNetworkConfigAndVip(t *testing.T) {
assert.NoError(t, errValid)
assert.Equal(t, &models.V1EdgeNativeControlPlaneEndPoint{
Host: "192.168.1.1",
Type: "IP",
Type: "VIP",
}, controlPlaneEndpointValid)
assert.Equal(t, &models.V1EdgeNativeOverlayNetworkConfiguration{
Cidr: "10.0.0.0/16",
Expand All @@ -547,7 +547,7 @@ func TestToOverlayNetworkConfigAndVip(t *testing.T) {
assert.NoError(t, errOverlayOnly)
assert.Equal(t, &models.V1EdgeNativeControlPlaneEndPoint{
Host: "10.0.0.1", // Automatically generated VIP
Type: "IP",
Type: "VIP",
}, controlPlaneEndpointOverlayOnly)
assert.Equal(t, &models.V1EdgeNativeOverlayNetworkConfiguration{
Cidr: "10.0.0.0/16",
Expand All @@ -565,7 +565,7 @@ func TestToOverlayNetworkConfigAndVip(t *testing.T) {
assert.NoError(t, errVipOnly)
assert.Equal(t, &models.V1EdgeNativeControlPlaneEndPoint{
Host: "192.168.1.1",
Type: "IP",
Type: "VIP",
}, controlPlaneEndpointVipOnly)
assert.Equal(t, &models.V1EdgeNativeOverlayNetworkConfiguration{
Cidr: "", // Empty CIDR since overlay_cidr_range is missing
Expand Down

0 comments on commit 5ed3849

Please sign in to comment.