Skip to content

Commit

Permalink
PLT-765:Added sdk support for repave approval
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM committed Nov 22, 2023
1 parent 4c5cb4f commit b8c7b07
Showing 1 changed file with 16 additions and 0 deletions.
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":
params = clusterC.NewV1SpectroClustersUIDRepaveApproveUpdateParams().WithUID(clusterUID)
}
_, err = client.V1SpectroClustersUIDRepaveApproveUpdate(params)
return err
}

0 comments on commit b8c7b07

Please sign in to comment.