Skip to content

Commit

Permalink
merging main
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM committed Feb 18, 2025
2 parents 08e2034 + 7d05e15 commit c0f4003
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions client/cluster_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,23 @@ func (h *V1Client) GetClusterProfile(uid string) (*models.V1ClusterProfile, erro
return resp.Payload, nil
}

// DownloadClusterProfileUIDSpc retrieves an existing cluster profile by UID.
func (h *V1Client) DownloadClusterProfileUIDSpc(profileUID string) (*bytes.Buffer, string, error) {
params := clientv1.NewV1ClusterProfilesUIDSpcDownloadParamsWithContext(h.ctx).
WithUID(profileUID)

var buf bytes.Buffer
writer := io.Writer(&buf)

resp, err := h.Client.V1ClusterProfilesUIDSpcDownload(params, writer)
if apiutil.Is404(err) {
return &buf, "", nil
} else if err != nil {
return &buf, "", err
}
return &buf, resp.ContentDisposition, nil
}

// GetClusterProfiles retrieves all cluster profiles.
func (h *V1Client) GetClusterProfiles() ([]*models.V1ClusterProfileMetadata, error) {
params := clientv1.NewV1ClusterProfilesMetadataParamsWithContext(h.ctx)
Expand Down

0 comments on commit c0f4003

Please sign in to comment.