From 2d04fedd569f1efbd3a054bf84e30c916337cb9f Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Tue, 5 Sep 2023 16:07:09 +0530 Subject: [PATCH] PLT-658:Added sdk support for clusterMetaAttribute --- client/cluster_metadata_config.go | 10 ++++++++++ go.mod | 4 ++-- go.sum | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/client/cluster_metadata_config.go b/client/cluster_metadata_config.go index 699b927f..d940d919 100644 --- a/client/cluster_metadata_config.go +++ b/client/cluster_metadata_config.go @@ -15,3 +15,13 @@ func (h *V1Client) UpdateClusterMetadata(uid string, config *models.V1ObjectMeta _, err = client.V1SpectroClustersUIDMetadataUpdate(params) return err } + +func (h *V1Client) UpdateAdditionalClusterMetadata(uid string, additionalMeta *models.V1ClusterMetaAttributeEntity) error { + client, err := h.GetClusterClient() + if err != nil { + return err + } + params := clusterC.NewV1SpectroClustersUIDClusterMetaAttributeUpdateParams().WithContext(h.Ctx).WithUID(uid).WithBody(additionalMeta) + _, err = client.V1SpectroClustersUIDClusterMetaAttributeUpdate(params) + return err +} diff --git a/go.mod b/go.mod index 96a588e3..46eabcc2 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/go-openapi/strfmt v0.20.0 github.com/pkg/errors v0.9.1 github.com/spectrocloud/gomi v1.14.1-0.20230412095143-b0595c6c6f08 - github.com/spectrocloud/hapi v1.14.1-0.20230814141242-394093e7fedb + github.com/spectrocloud/hapi v1.14.1-0.20230904110035-ed2b1df599dc github.com/stretchr/testify v1.7.0 ) @@ -40,4 +40,4 @@ require ( gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) -//replace github.com/spectrocloud/hapi => ../hapi +//replace github.com/spectrocloud/hapi => ../hapi \ No newline at end of file diff --git a/go.sum b/go.sum index aea7aa5f..a31f1ae3 100644 --- a/go.sum +++ b/go.sum @@ -213,6 +213,8 @@ github.com/spectrocloud/hapi v1.14.1-0.20230809113851-e533537baa55 h1:0V4LeAlh+/ github.com/spectrocloud/hapi v1.14.1-0.20230809113851-e533537baa55/go.mod h1:O/Bkbw92QPSGPNQPqKt7Qlkn+9BKK/a22KTUlk76KHI= github.com/spectrocloud/hapi v1.14.1-0.20230814141242-394093e7fedb h1:Y/TDXfEZ6GJbYi4bKxFS0HFvmOL6Xs653BoxuZjuKEQ= github.com/spectrocloud/hapi v1.14.1-0.20230814141242-394093e7fedb/go.mod h1:O/Bkbw92QPSGPNQPqKt7Qlkn+9BKK/a22KTUlk76KHI= +github.com/spectrocloud/hapi v1.14.1-0.20230904110035-ed2b1df599dc h1:3dC4+8RimiF6hlVPdA6fgMeEUIYEbE1Z08ad4f9153Q= +github.com/spectrocloud/hapi v1.14.1-0.20230904110035-ed2b1df599dc/go.mod h1:O/Bkbw92QPSGPNQPqKt7Qlkn+9BKK/a22KTUlk76KHI= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=