Skip to content

Commit

Permalink
add UpdatePCGVsphere API
Browse files Browse the repository at this point in the history
  • Loading branch information
devang-gaur committed Aug 21, 2024
1 parent 7dd5858 commit dc92769
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions client/private_cloud_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ func (h *V1Client) CreatePCGVsphere(uid string, cloudConfig *models.V1OverlordVs
return *resp.Payload.UID, nil
}

// CreatePCGVsphere creates a new vSphere Private Cloud Gateway.
func (h *V1Client) UpdatePCGVsphere(uid string, cloudConfig *models.V1OverlordVsphereCloudConfig) (bool, error) {
params := clientv1.NewV1OverlordsUIDVsphereCloudConfigUpdateParamsWithContext(h.ctx).
WithUID(uid).
WithBody(cloudConfig)
resp, err := h.Client.V1OverlordsUIDVsphereCloudConfigUpdate(params)
if err != nil {
return "", err

Check failure on line 108 in client/private_cloud_gateway.go

View workflow job for this annotation

GitHub Actions / build-with-coverage

cannot use "" (untyped string constant) as bool value in return statement
}
if resp != nil {
return true, nil
}
return false, nil
}

// CreatePCGCloudAccountVsphere creates a new vSphere PCG cloud account.
func (h *V1Client) CreatePCGCloudAccountVsphere(uid string, account *models.V1OverlordVsphereAccountCreate) (string, error) {
params := clientv1.NewV1OverlordsUIDVsphereAccountCreateParamsWithContext(h.ctx).
Expand Down

0 comments on commit dc92769

Please sign in to comment.