v1.5.0
This commit is contained in:
@@ -13,10 +13,26 @@ type ListComputesRequest struct {
|
||||
// Filter by account ID
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`
|
||||
|
||||
// Find by rg ID
|
||||
// Required: false
|
||||
RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`
|
||||
|
||||
// Find by compute ID
|
||||
// Required: false
|
||||
ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"`
|
||||
|
||||
// Page number
|
||||
// Required: false
|
||||
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
|
||||
|
||||
// Page size
|
||||
// Required: false
|
||||
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
|
||||
}
|
||||
|
||||
// ListComputes gets computes from account with extnets
|
||||
func (e ExtNet) ListComputes(ctx context.Context, req ListComputesRequest) (ListExtNetComputes, error) {
|
||||
func (e ExtNet) ListComputes(ctx context.Context, req ListComputesRequest) (*ListExtNetComputes, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
@@ -38,5 +54,5 @@ func (e ExtNet) ListComputes(ctx context.Context, req ListComputesRequest) (List
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return list, nil
|
||||
return &list, nil
|
||||
}
|
||||
|
||||
@@ -59,7 +59,13 @@ type ItemExtNetCompute struct {
|
||||
}
|
||||
|
||||
// List of information about computes with external network
|
||||
type ListExtNetComputes []ItemExtNetCompute
|
||||
type ListExtNetComputes struct {
|
||||
// Data
|
||||
Data []ItemExtNetCompute `json:"data"`
|
||||
|
||||
// Entry count
|
||||
EntryCount uint64 `json:"entryCount"`
|
||||
}
|
||||
|
||||
// QOS
|
||||
type QOS struct {
|
||||
@@ -118,6 +124,12 @@ type Excluded struct {
|
||||
// ClientType
|
||||
ClientType string `json:"clientType"`
|
||||
|
||||
// Domain name
|
||||
DomainName string `json:"domainname"`
|
||||
|
||||
// Host name
|
||||
HostName string `json:"hostname"`
|
||||
|
||||
// IP
|
||||
IP string `json:"ip"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user