v1.5.0-delta
This commit is contained in:
@@ -8,6 +8,38 @@ import (
|
||||
|
||||
// Request struct for getting list of VGPU
|
||||
type ListRequest struct {
|
||||
// Find by id
|
||||
// Required: false
|
||||
ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
|
||||
|
||||
// Find by vgpu status
|
||||
// Required: false
|
||||
Status string `url:"status,omitempty" json:"status,omitempty"`
|
||||
|
||||
// Find by vgpu type
|
||||
// Required: false
|
||||
Type string `url:"type,omitempty" json:"type,omitempty"`
|
||||
|
||||
// Find by vgpu mode
|
||||
// Required: false
|
||||
Mode string `url:"mode,omitempty" json:"mode,omitempty"`
|
||||
|
||||
// Find by id resgroup
|
||||
// Required: false
|
||||
RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`
|
||||
|
||||
// Find by account id
|
||||
// Required: false
|
||||
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
||||
|
||||
// Find by compute id
|
||||
// Required: false
|
||||
ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"`
|
||||
|
||||
// Find by pgpu id
|
||||
// Required: false
|
||||
PGPUID uint64 `url:"pgpuId,omitempty" json:"pgpuId,omitempty"`
|
||||
|
||||
// Page number
|
||||
// Required: false
|
||||
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
|
||||
@@ -18,7 +50,7 @@ type ListRequest struct {
|
||||
}
|
||||
|
||||
// List gets list all VGPU
|
||||
func (v VGPU) List(ctx context.Context, req ListRequest) (ListVGPU, error) {
|
||||
func (v VGPU) List(ctx context.Context, req ListRequest) (*ListVGPU, error) {
|
||||
url := "/cloudbroker/vgpu/list"
|
||||
|
||||
res, err := v.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
@@ -33,5 +65,5 @@ func (v VGPU) List(ctx context.Context, req ListRequest) (ListVGPU, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return list, nil
|
||||
return &list, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user