From 5ed384956fd491f93dbeb6056ca58b218bcab84e Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Tue, 17 Sep 2024 17:54:29 +0530 Subject: [PATCH] PLT-1396:Fixed edge native cloud config type to VIP. --- spectrocloud/resource_cluster_edge_native.go | 4 ++-- spectrocloud/resource_cluster_edge_native_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spectrocloud/resource_cluster_edge_native.go b/spectrocloud/resource_cluster_edge_native.go index 9679d518..4216e573 100644 --- a/spectrocloud/resource_cluster_edge_native.go +++ b/spectrocloud/resource_cluster_edge_native.go @@ -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 { @@ -692,7 +692,7 @@ func toOverlayNetworkConfigAndVip(cloudConfig map[string]interface{}) (*models.V controlPlaneEndpoint = &models.V1EdgeNativeControlPlaneEndPoint{ Host: autoGenVip, - Type: "IP", + Type: "VIP", } } } diff --git a/spectrocloud/resource_cluster_edge_native_test.go b/spectrocloud/resource_cluster_edge_native_test.go index ba5d2989..f470887e 100644 --- a/spectrocloud/resource_cluster_edge_native_test.go +++ b/spectrocloud/resource_cluster_edge_native_test.go @@ -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", @@ -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", @@ -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