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-765:Added sdk support for repave approval #71

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Changes from 1 commit
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
16 changes: 16 additions & 0 deletions client/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,19 @@ func (h *V1Client) ImportClusterGeneric(meta *models.V1ObjectMetaInputEntity) (s

return *success.Payload.UID, nil
}

func (h *V1Client) ApproveClusterRepave(clusterUID string, context string) error {
client, err := h.GetClusterClient()
if err != nil {
return err
}
var params *clusterC.V1SpectroClustersUIDRepaveApproveUpdateParams
switch context {
case "project":
params = clusterC.NewV1SpectroClustersUIDRepaveApproveUpdateParamsWithContext(h.Ctx).WithUID(clusterUID)
case "tenant":
SivaanandM marked this conversation as resolved.
Show resolved Hide resolved
params = clusterC.NewV1SpectroClustersUIDRepaveApproveUpdateParams().WithUID(clusterUID)
}
_, err = client.V1SpectroClustersUIDRepaveApproveUpdate(params)
return err
}