Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLT-658:Added sdk support for clusterMetaAttribute #53

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions client/cluster_metadata_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
nikchern marked this conversation as resolved.
Show resolved Hide resolved
_, err = client.V1SpectroClustersUIDClusterMetaAttributeUpdate(params)
return err
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down