Skip to content

Commit

Permalink
PLT-698: Addressed edge native day2 operations fix (#349)
Browse files Browse the repository at this point in the history
* PLT-698: Addressed edgenative day2 operations fix

* Added unit test

* PLT-698: merging back main.

---------

Co-authored-by: nikolay-spectro <[email protected]>
  • Loading branch information
SivaanandM and nikchern authored Oct 5, 2023
1 parent 01fa2e9 commit 161ef0f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/hashicorp/terraform-plugin-docs v0.13.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1
github.com/robfig/cron v1.2.0
github.com/spectrocloud/hapi v1.14.1-0.20230928114741-1670ab9a5e2b
github.com/spectrocloud/hapi v1.14.1-0.20231003132647-052140fbb298
github.com/spectrocloud/palette-sdk-go v0.0.0-20230925161114-b76840d1207d
github.com/stretchr/testify v1.8.0
gotest.tools v2.2.0+incompatible
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,8 @@ github.com/spectrocloud/gomi v1.14.1-0.20230412095143-b0595c6c6f08 h1:AnOC0U+Exl
github.com/spectrocloud/gomi v1.14.1-0.20230412095143-b0595c6c6f08/go.mod h1:UnhUDpFEvtYh6m384r3xzj8/+Z6/hMp2O8whEMYVHec=
github.com/spectrocloud/hapi v1.14.1-0.20230928114741-1670ab9a5e2b h1:Ws5/fRo/EDEt1rJgNEtd2E/w/IOOA+jOVWv3tw6aT+s=
github.com/spectrocloud/hapi v1.14.1-0.20230928114741-1670ab9a5e2b/go.mod h1:aI54jbfaSec1ikHSMOJQ7mMOTaRKpQTRCoMKamhBE9s=
github.com/spectrocloud/hapi v1.14.1-0.20231003132647-052140fbb298 h1:jJllo8S53hBovVcRHGtTDlWMobpF/H0X3xQTgKXmA4U=
github.com/spectrocloud/hapi v1.14.1-0.20231003132647-052140fbb298/go.mod h1:aI54jbfaSec1ikHSMOJQ7mMOTaRKpQTRCoMKamhBE9s=
github.com/spectrocloud/palette-sdk-go v0.0.0-20230925161114-b76840d1207d h1:4VBWbaMTnMbURawJcOPlDrhNpxj78cxrPwMuh52pegw=
github.com/spectrocloud/palette-sdk-go v0.0.0-20230925161114-b76840d1207d/go.mod h1:Om6X/eH6h787jrynu9NTAeuxFpC15E/Atco5kQwiM90=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
Expand Down
2 changes: 1 addition & 1 deletion spectrocloud/resource_cluster_edge_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func flattenMachinePoolConfigsEdgeNative(machinePools []*models.V1EdgeNativeMach

FlattenAdditionalLabelsAndTaints(machinePool.AdditionalLabels, machinePool.Taints, oi)
FlattenControlPlaneAndRepaveInterval(&machinePool.IsControlPlane, oi, machinePool.NodeRepaveInterval)

oi["control_plane"] = machinePool.IsControlPlane
oi["control_plane_as_worker"] = machinePool.UseControlPlaneAsWorker
oi["name"] = machinePool.Name
var hosts []map[string]string
Expand Down
2 changes: 1 addition & 1 deletion spectrocloud/resource_cluster_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func toClusterGroup(d *schema.ResourceData) *models.V1ClusterGroupEntity {
UID: d.Id(),
Labels: toTags(d),
},
Spec: &models.V1ClusterGroupSpec{
Spec: &models.V1ClusterGroupSpecEntity{
Type: "hostCluster",
ClusterRefs: clusterRefs,
ClustersConfig: GetClusterGroupConfig(clusterGroupLimitConfig, hostClusterConfig, endpointType, values),
Expand Down
2 changes: 1 addition & 1 deletion spectrocloud/resource_cluster_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func TestToClusterGroupUpdate(t *testing.T) {
Values: "my_values",
}
clusterGroupEntity := &models.V1ClusterGroupEntity{
Spec: &models.V1ClusterGroupSpec{
Spec: &models.V1ClusterGroupSpecEntity{
ClusterRefs: clusterRefs,
ClustersConfig: clustersConfig,
},
Expand Down

0 comments on commit 161ef0f

Please sign in to comment.