v1.0.0
This commit is contained in:
68
pkg/cluster/requests/request_list.go
Normal file
68
pkg/cluster/requests/request_list.go
Normal file
@@ -0,0 +1,68 @@
|
||||
package requests
|
||||
|
||||
import "time"
|
||||
|
||||
// ListClusterRequest struct to get a list of clusters
|
||||
type ListClusterRequest struct {
|
||||
// Cluster name. Searching by partial matching. Ignored if NameExact is provided.
|
||||
// Required: false
|
||||
Name string `url:"name,omitempty" json:"name,omitempty"`
|
||||
|
||||
// Exact cluster name.
|
||||
// Required: false
|
||||
NameExact string `url:"name_exact,omitempty" json:"name_exact,omitempty"`
|
||||
|
||||
// VStorage Cluster ID.
|
||||
// Required: false
|
||||
VStorageClusterID int `url:"vstorage_cluster_id,omitempty" json:"vstorage_cluster_id,omitempty"`
|
||||
|
||||
// External Storage ID.
|
||||
// Required: false
|
||||
ExternalStorageID int `url:"external_storage_id,omitempty" json:"external_storage_id,omitempty"`
|
||||
|
||||
// List of cluster IDs to exclude from listing.
|
||||
// Required: false
|
||||
ExcludeIDs []int `url:"exclude_ids,omitempty" json:"exclude_ids,omitempty"`
|
||||
|
||||
// Template for filtering by any text field.
|
||||
// Required: false
|
||||
FilterText string `url:"filter_text,omitempty" json:"filter_text,omitempty"`
|
||||
|
||||
// Filter clusters created before this date.
|
||||
// Required: false
|
||||
CreatedBefore time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
|
||||
|
||||
// Filter clusters created after this date.
|
||||
// Required: false
|
||||
CreatedAfter time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
|
||||
|
||||
// List columns which will be used by FilterText.
|
||||
// Required: false
|
||||
FilterColumns string `url:"filter_columns,omitempty" json:"filter_columns,omitempty"`
|
||||
|
||||
// Field name or list of field names used for sorting. Ascending sort is default. For descending sort, use "-" before name.
|
||||
// Default sorting field: "name".
|
||||
// Required: false
|
||||
Sort []string `url:"sort,omitempty" json:"sort,omitempty"`
|
||||
|
||||
// Visibility options: "visible" - Only active clusters, "deleted" - Only removed clusters, "all" - All clusters.
|
||||
// Required: false
|
||||
Visibility string `url:"visibility,omitempty" json:"visibility,omitempty" validate:"omitempty,visibility"`
|
||||
|
||||
// Add resource metrics.
|
||||
// Required: false
|
||||
WithResourceMetrics bool `url:"with_resource_metrics,omitempty" json:"with_resource_metrics,omitempty"`
|
||||
|
||||
// Include external resource's clusters.
|
||||
// Default: false
|
||||
// Required: false
|
||||
IncludeExternal bool `url:"include_external,omitempty" json:"include_external,omitempty"`
|
||||
|
||||
// Number of returning page.
|
||||
// Required: false
|
||||
Page int `url:"page,omitempty" json:"page,omitempty"`
|
||||
|
||||
// Number of items on page.
|
||||
// Required: false
|
||||
Limit int `url:"limit,omitempty" json:"limit,omitempty"`
|
||||
}
|
||||
57
pkg/cluster/requests/request_v_network.go
Normal file
57
pkg/cluster/requests/request_v_network.go
Normal file
@@ -0,0 +1,57 @@
|
||||
package requests
|
||||
|
||||
import "time"
|
||||
|
||||
type ListVNetworksRequest struct {
|
||||
// Cluster id where virtual net is attached
|
||||
// Required: true
|
||||
ClusterID int `url:"cluster_id" json:"cluster_id" validate:"required"`
|
||||
|
||||
// ID of alias
|
||||
// Required: false
|
||||
AliasID int `url:"alias_id,omitempty" json:"alias_id,omitempty"`
|
||||
|
||||
// Name of the vnet
|
||||
// Required: false
|
||||
Name string `url:"name,omitempty" json:"name,omitempty"`
|
||||
|
||||
// Virtual networks for filtering by and text field
|
||||
// Required: false
|
||||
FilterText string `url:"filter_text,omitempty" json:"filter_text,omitempty"`
|
||||
|
||||
// List columns which will be used by filter_text
|
||||
// Required: false
|
||||
FilterColumns string `url:"filter_columns,omitempty" json:"filter_columns,omitempty"`
|
||||
|
||||
// Filter entities created before this date.
|
||||
// Required: false
|
||||
CreatedBefore time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
|
||||
|
||||
// Filter entities created after this date.
|
||||
// Required: false
|
||||
CreatedAfter time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
|
||||
|
||||
// List of columns for sorting.
|
||||
// Required: false
|
||||
Sort []string `url:"sort,omitempty" json:"sort,omitempty"`
|
||||
|
||||
// Visibility status of the interface (visible, all, deleted).
|
||||
// Required: false
|
||||
Visibility string `url:"visibility,omitempty" json:"visibility,omitempty" validate:"omitempty,visibility"`
|
||||
|
||||
// NetworkType type of virtual network (HOST_ONLY, CLUSTER_NETWORK, BRIDGED_ETHERNET).
|
||||
// Required: false
|
||||
NetworkType string `url:"network_type,omitempty" json:"network_type,omitempty" validate:"omitempty,network_type"`
|
||||
|
||||
// NetworkType type of virtual network (HOST_ONLY, CLUSTER_NETWORK, BRIDGED_ETHERNET).
|
||||
// Required: false
|
||||
FilterByUsePermission bool `url:"filter_by_use_permission,omitempty" json:"filter_by_use_permission,omitempty"`
|
||||
|
||||
// Number of the page to return.
|
||||
// Required: false
|
||||
Page int `url:"page,omitempty" json:"page,omitempty"`
|
||||
|
||||
// Number of items to return per page.
|
||||
// Required: false
|
||||
Limit int `url:"limit,omitempty" json:"limit,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user