v1.0.0
This commit is contained in:
130
pkg/node/requests/request_list.go
Normal file
130
pkg/node/requests/request_list.go
Normal file
@@ -0,0 +1,130 @@
|
||||
package requests
|
||||
|
||||
import "time"
|
||||
|
||||
// ListNodesRequest struct to filter nodes based on given parameters
|
||||
type ListNodesRequest struct {
|
||||
// Name of the node to filter by partial matching. Ignored if NameExact is provided.
|
||||
// Required: false
|
||||
Name string `url:"name,omitempty" json:"name,omitempty"`
|
||||
|
||||
// Exact name of the node to filter.
|
||||
// Required: false
|
||||
NameExact string `url:"name_exact,omitempty" json:"name_exact,omitempty"`
|
||||
|
||||
// Cluster ID where the node is attached.
|
||||
// Required: false
|
||||
ClusterID int `url:"cluster_id,omitempty" json:"cluster_id,omitempty"`
|
||||
|
||||
// VStorage cluster ID where the node is attached.
|
||||
// Required: false
|
||||
VStorageClusterID int `url:"vstorage_cluster_id,omitempty" json:"vstorage_cluster_id,omitempty"`
|
||||
|
||||
// Include nodes that do not belong to any cluster or VStorage cluster.
|
||||
// Required: false
|
||||
AddWithoutCluster bool `url:"add_without_cluster,omitempty" json:"add_without_cluster,omitempty"`
|
||||
|
||||
// Online status filter (multiple choices).
|
||||
// Required: false
|
||||
Status []string `url:"status,omitempty" json:"status,omitempty"`
|
||||
|
||||
// Maintenance status filter (multiple choices).
|
||||
// Required: false
|
||||
MaintenanceStatus []string `url:"maintenance_status,omitempty" json:"maintenance_status,omitempty" validate:"omitempty,maintenance_status"`
|
||||
|
||||
// Agent update status filter (multiple choices).
|
||||
// Required: false
|
||||
AgentUpdateStatus []string `url:"agent_update_status,omitempty" json:"agent_update_status,omitempty" validate:"omitempty,agent_update_status"`
|
||||
|
||||
// Name of the node’s cluster.
|
||||
// Required: false
|
||||
ClusterName string `url:"cluster_name,omitempty" json:"cluster_name,omitempty"`
|
||||
|
||||
// Text to search within the nodes.
|
||||
// Required: false
|
||||
FilterText string `url:"filter_text,omitempty" json:"filter_text,omitempty"`
|
||||
|
||||
// Columns to be used for filtering based on FilterText.
|
||||
// Required: false
|
||||
FilterColumns string `url:"filter_columns,omitempty" json:"filter_columns,omitempty"`
|
||||
|
||||
// OS type filter for the node.
|
||||
// Required: false
|
||||
OS string `url:"os,omitempty" json:"os,omitempty"`
|
||||
|
||||
// HA status filter (multiple choices).
|
||||
// Required: false
|
||||
HAStatus []string `url:"ha_status,omitempty" json:"ha_status,omitempty" validate:"omitempty,ha_multi_status"`
|
||||
|
||||
// HA status in Fenix cluster filter (multiple choices).
|
||||
// Required: false
|
||||
NodeStatusInHACluster []string `url:"node_status_in_ha_cluster,omitempty" json:"node_status_in_ha_cluster,omitempty" validate:"omitempty,node_status_in_ha_cluster"`
|
||||
|
||||
// Filter by IP address.
|
||||
// Required: false
|
||||
IPAddress string `url:"ip_address,omitempty" json:"ip_address,omitempty"`
|
||||
|
||||
// Filter by node architecture.
|
||||
// Required: false
|
||||
Arch string `url:"arch,omitempty" json:"arch,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"`
|
||||
|
||||
// Include node’s current metrics in the response.
|
||||
// Required: false
|
||||
WithMetrics bool `url:"with_metrics,omitempty" json:"with_metrics,omitempty"`
|
||||
|
||||
// Include current resource scheduler metrics info.
|
||||
// Required: false
|
||||
WithResourceMetrics bool `url:"with_resource_metrics,omitempty" json:"with_resource_metrics,omitempty"`
|
||||
|
||||
// Include external resource’s nodes.
|
||||
// Required: false
|
||||
IncludeExternal bool `url:"include_external,omitempty" json:"include_external,omitempty"`
|
||||
|
||||
// Include nodes with enabled traffic shaping.
|
||||
// Required: false
|
||||
TrafficShaping bool `url:"traffic_shaping,omitempty" json:"traffic_shaping,omitempty"`
|
||||
|
||||
// List of node IDs to exclude from the listing.
|
||||
// Required: false
|
||||
ExcludeIDs []int `url:"exclude_ids,omitempty" json:"exclude_ids,omitempty"`
|
||||
|
||||
// Column sorting order.
|
||||
// Required: false
|
||||
Sort []string `url:"sort,omitempty" json:"sort,omitempty"`
|
||||
|
||||
// Visibility options: "visible" (default), "deleted", or "all".
|
||||
// Required: false
|
||||
Visibility string `url:"visibility,omitempty" json:"visibility,omitempty" validate:"omitempty,visibility"`
|
||||
|
||||
// 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"`
|
||||
|
||||
// Show SDK license information.
|
||||
// Required: false
|
||||
WithLicense bool `url:"with_license,omitempty" json:"with_license,omitempty"`
|
||||
|
||||
// Storage status filter.
|
||||
// Required: false
|
||||
StorageStatus string `url:"storage_status,omitempty" json:"storage_status,omitempty"`
|
||||
|
||||
// List of virtual network IDs to filter nodes by.
|
||||
// Required: false
|
||||
VirtualNetworkIDs []int `url:"virtual_network_ids,omitempty" json:"virtual_network_ids,omitempty"`
|
||||
|
||||
// List of external storage IDs to filter nodes by. Only READY storages are included.
|
||||
// Required: false
|
||||
ExternalStorageIDs []int `url:"external_storage_ids,omitempty" json:"external_storage_ids,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user