Documentation
¶
Overview ¶
Operator actions for handling interventions on a storage endpoint provider
Index ¶
- type AccessGrantRequest
- type AccessGrantToPoolRequest
- type AccessRevokeRequest
- type AccessRevokeToPoolRequest
- type AddConsumerNodesRequest
- type AddPoolRequest
- type AddProviderNodesRequest
- type ByPool
- type ConfigFieldEditRequest
- type ConfigInsertRequest
- type ConfigValidateRequest
- type ConsumptionRequest
- type CreateRequest
- type DecommissionRequest
- type DelConsumerNodesRequest
- type DelPoolRequest
- type DeleteRequest
- type DisableRequest
- type DiskListRequest
- type EnableRequest
- type GetConfigRequest
- type GetPoolRequest
- type GetRequest
- type ItemURI
- type ListRequest
- type ListSEP
- func (lsep ListSEP) FilterByID(id uint64) ListSEP
- func (lsep ListSEP) FilterByName(name string) ListSEP
- func (lsep ListSEP) FilterByObjStatus(objStatus string) ListSEP
- func (lsep ListSEP) FilterByTechStatus(techStatus string) ListSEP
- func (lsep ListSEP) FilterByType(sepType string) ListSEP
- func (lsep ListSEP) FilterFunc(predicate func(RecordSEP) bool) ListSEP
- func (lsep ListSEP) FindOne() RecordSEP
- func (ls ListSEP) IDs() []uint64
- func (lsep ListSEP) Serialize(params ...string) (serialization.Serialized, error)
- type ListURIs
- type RecordConsumption
- type RecordPool
- type RecordSEP
- type SEP
- func (s SEP) AccessGrant(ctx context.Context, req AccessGrantRequest) (bool, error)
- func (s SEP) AccessGrantToPool(ctx context.Context, req AccessGrantToPoolRequest) (bool, error)
- func (s SEP) AccessRevoke(ctx context.Context, req AccessRevokeRequest) (bool, error)
- func (s SEP) AccessRevokeToPool(ctx context.Context, req AccessRevokeToPoolRequest) (bool, error)
- func (s SEP) AddConsumerNodes(ctx context.Context, req AddConsumerNodesRequest) (bool, error)
- func (s SEP) AddPool(ctx context.Context, req AddPoolRequest) (string, error)
- func (s SEP) AddProviderNodes(ctx context.Context, req AddProviderNodesRequest) (bool, error)
- func (s SEP) ConfigFieldEdit(ctx context.Context, req ConfigFieldEditRequest) (bool, error)
- func (s SEP) ConfigInsert(ctx context.Context, req ConfigInsertRequest) (bool, error)
- func (s SEP) ConfigValidate(ctx context.Context, req ConfigValidateRequest) (bool, error)
- func (s SEP) Consumption(ctx context.Context, req ConsumptionRequest) (*RecordConsumption, error)
- func (s SEP) Create(ctx context.Context, req CreateRequest) (uint64, error)
- func (s SEP) Decommission(ctx context.Context, req DecommissionRequest) (bool, error)
- func (s SEP) DelConsumerNodes(ctx context.Context, req DelConsumerNodesRequest) (bool, error)
- func (s SEP) DelPool(ctx context.Context, req DelPoolRequest) (bool, error)
- func (s SEP) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (s SEP) Disable(ctx context.Context, req DisableRequest) (bool, error)
- func (s SEP) DiskList(ctx context.Context, req DiskListRequest) ([]uint64, error)
- func (s SEP) Enable(ctx context.Context, req EnableRequest) (bool, error)
- func (s SEP) Get(ctx context.Context, req GetRequest) (*RecordSEP, error)
- func (s SEP) GetConfig(ctx context.Context, req GetConfigRequest) (*SEPConfig, error)
- func (s SEP) GetPool(ctx context.Context, req GetPoolRequest) (*RecordPool, error)
- func (s SEP) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)
- func (s SEP) List(ctx context.Context, req ListRequest) (*ListSEP, error)
- func (s SEP) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)
- func (s SEP) SharedLockStart(ctx context.Context, req SharedLockStartRequest) (bool, error)
- func (s SEP) SharedLockStartAsync(ctx context.Context, req SharedLockStartRequest) (string, error)
- func (s SEP) SharedLockStop(ctx context.Context, req SharedLockStopRequest) (bool, error)
- func (s SEP) SharedLockStopAsync(ctx context.Context, req SharedLockStopRequest) (string, error)
- type SEPConfig
- type SharedLockStartRequest
- type SharedLockStopRequest
- type Total
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessGrantRequest ¶
type AccessGrantRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Account ID to grant access to the specified SEP. If 0, // the SEP will be available for all accounts with no exceptions // Required: true AccountID uint64 `url:"account_id" json:"account_id" validate:"required"` }
AccessGrantRequest struct to grant access to SEP
type AccessGrantToPoolRequest ¶
type AccessGrantToPoolRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Pool name // Required: true PoolName string `url:"pool_name" json:"pool_name" validate:"required"` // Account ID to grant access to the specified pool SEP // Required: false AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"` // Resource group to grant access to the specified pool SEP // Required: false RGID uint64 `url:"resgroup_id,omitempty" json:"resgroup_id,omitempty"` }
AccessGrantToPoolRequest struct to grant access to pool SEP
type AccessRevokeRequest ¶
type AccessRevokeRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Account ID to revoke access to the specified SEP // Required: true AccountID uint64 `url:"account_id" json:"account_id" validate:"required"` }
AccessRevokeRequest struct to revoke access to SEP
type AccessRevokeToPoolRequest ¶
type AccessRevokeToPoolRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Pool name // Required: true PoolName string `url:"pool_name" json:"pool_name" validate:"required"` // Account ID to grant access to the specified pool SEP // Required: false AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"` // Resource group ID to grant access to the specified pool SEP // Required: false RGID uint64 `url:"resgroup_id,omitempty" json:"resgroup_id,omitempty"` }
AccessRevokeToPoolRequest struct to revoke access to pool SEP
type AddConsumerNodesRequest ¶
type AddConsumerNodesRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // List of nodes IDs // Required: true ConsumerNIDs []uint64 `url:"consumer_nids" json:"consumer_nids" validate:"min=1"` }
AddConsumerNodesRequest struct to add consumer nodes
type AddPoolRequest ¶ added in v1.8.0
type AddPoolRequest struct { // ID of SEP to add new pool // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // method Async/Sync // Default: true // Required: false Sync bool `url:"sync" json:"sync"` // Pool structure which contains fields such as "name", "types", "accessAccountIds", "accessResGroupIds" // Required: true Pool string `url:"pool" json:"pool" validate:"required"` }
AddPoolRequest struct to add pool to storage endpoint (SEP)
type AddProviderNodesRequest ¶
type AddProviderNodesRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // List of node IDs // Required: true ProviderNIDs []uint64 `url:"provider_nids" json:"provider_nids" validate:"min=1"` }
AddProviderNodesRequest struct to add provider nodes
type ByPool ¶ added in v1.5.5
type ByPool struct { // Disk count DiskCount uint64 `json:"disk_count"` // Disk usage DiskUsage uint64 `json:"disk_usage"` // Snapshot count SnapshotCount uint64 `json:"snapshot_count"` // Snapshot usage SnapshotUsage uint64 `json:"snapshot_usage"` // Usage Usage uint64 `json:"usage"` // Usage limit UsageLimit uint64 `json:"usage_limit"` }
type ConfigFieldEditRequest ¶
type ConfigFieldEditRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Field name // Required: true FieldName string `url:"field_name" json:"field_name" validate:"required"` // Field value // Required: true FieldValue string `url:"field_value" json:"field_value" validate:"required"` // Field type // Should be one of: // - int // - str // - bool // - list // - dict // Required: true FieldType string `url:"field_type" json:"field_type" validate:"sepFieldType"` }
ConfigFieldEditRequest struct to edit config fields
type ConfigInsertRequest ¶
type ConfigInsertRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Storage provider config // Required: true Config string `url:"config" json:"config" validate:"required"` }
ConfigInsertRequest struct to insert config
type ConfigValidateRequest ¶
type ConfigValidateRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Storage provider config // Required: true Config string `url:"config" json:"config" validate:"required"` }
ConfigValidateRequest struct to validate config
type ConsumptionRequest ¶
type ConsumptionRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` }
ConsumptionRequest struct to get consumption info
type CreateRequest ¶
type CreateRequest struct { // Grid ID // Required: true GID uint64 `url:"gid" json:"gid" validate:"required"` // SEP name // Required: true Name string `url:"name" json:"name" validate:"required"` // Type of storage // Required: true SEPType string `url:"sep_type" json:"sep_type" validate:"required"` // SEP config // Required: true Config string `url:"config" json:"config" validate:"required"` // Description // Required: false Description string `url:"description,omitempty" json:"description,omitempty"` // List of provider node IDs // Required: false ProviderNIDs []uint64 `url:"provider_nids,omitempty" json:"provider_nids,omitempty"` // List of consumer node IDs // Required: false ConsumerNIDs []uint64 `url:"consumer_nids,omitempty" json:"consumer_nids,omitempty"` // Enable SEP after creation // Required: false Enable bool `url:"enable,omitempty" json:"enable,omitempty"` }
CreateRequest struct to create SEP object
type DecommissionRequest ¶
type DecommissionRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Clear disks and images physically // Required: false ClearPhisically bool `url:"clear_physically,omitempty" json:"clear_physically,omitempty"` }
DecommissionRequest struct for decommission
type DelConsumerNodesRequest ¶
type DelConsumerNodesRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // List of consumer node IDs // Required: true ConsumerNIDs []uint64 `url:"consumer_nids" json:"consumer_nids" validate:"min=1"` }
DelConsumerNodesRequest struct to exclude consumer nodes
type DelPoolRequest ¶ added in v1.8.0
type DelPoolRequest struct { // ID of SEP to delete pool // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Name of pool to delete // Required: true PoolName string `url:"pool_name" json:"pool_name" validate:"required"` }
DelPoolRequest struct to delete pool from storage endpoint (SEP)
type DeleteRequest ¶
type DeleteRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` }
DeleteRequest struct to delete SEP
type DisableRequest ¶
type DisableRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` }
DisableRequest struct to disable SEP
type DiskListRequest ¶
type DiskListRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Pool name // Required: false PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"` }
DiskListRequest struct to get list of disk IDs
type EnableRequest ¶
type EnableRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` }
EnableRequest struct to enable SEP
type GetConfigRequest ¶
type GetConfigRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` }
GetConfigRequest struct to get SEP config
type GetPoolRequest ¶
type GetPoolRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Pool name // Required: true PoolName string `url:"pool_name" json:"pool_name" validate:"required"` }
GetPoolRequest struct to get SEP pool config by name
type GetRequest ¶
type GetRequest struct { // Storage endpoint provider ID // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` }
GetRequest struct to get SEP parameters
type ListRequest ¶
type ListRequest struct { // Find by ID // Required: false ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Find by gId // Required: false GID uint64 `url:"gid,omitempty" json:"gid,omitempty"` // Find by sep type // Required: false Type string `url:"type,omitempty" json:"type,omitempty"` // Find by provided physical node id // Required: false ProvidedBy uint64 `url:"providedBy,omitempty" json:"providedBy,omitempty"` // Find by techStatus // Required: false TechStatus string `url:"techStatus,omitempty" json:"techStatus,omitempty"` // Find by consumed physical node id // Required: false ConsumedBy uint64 `url:"consumedBy,omitempty" json:"consumedBy,omitempty"` // Sort by one of supported fields, format +|-(field) // Required: false SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` }
ListRequest struct to get list of SEPs
type ListSEP ¶
type ListSEP struct { // Data Data []RecordSEP `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List SEPs
func (ListSEP) FilterByID ¶
FilterByID returns ListSEP with specified ID.
func (ListSEP) FilterByName ¶
FilterByName returns ListSEP with specified Name.
func (ListSEP) FilterByObjStatus ¶
FilterByObjStatus returns ListSEP with specified ObjStatus.
func (ListSEP) FilterByTechStatus ¶
FilterByTechStatus returns ListSEP with specified TechStatus.
func (ListSEP) FilterByType ¶
FilterByType returns ListSEP with specified Type.
func (ListSEP) FilterFunc ¶
FilterFunc allows filtering ListSEP based on user-specified predicate.
func (ListSEP) FindOne ¶
FindOne returns first found RecordSEP If none was found, returns an empty struct.
func (ListSEP) Serialize ¶
func (lsep ListSEP) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
type RecordConsumption ¶
type RecordConsumption struct { // By pool ByPool map[string]ByPool `json:"byPool"` // Total resource information Total Total `json:"total"` // Type Type string `json:"type"` }
Main information about consumption
type RecordPool ¶
type RecordPool struct { // List access account IDs AccessAccountIDs []uint64 `json:"accessAccountIds"` // List access resource group IDs AccessResGroupIDs []uint64 `json:"accessResGroupIds"` // Name Name string `json:"name"` // Page cache ratio PageCacheRatio uint64 `json:"pagecache_ratio"` // Reference ID ReferenceID string `json:"referenceId"` // List types Types []string `json:"types"` // List URIs URIs ListURIs `json:"uris"` // Usage Limit UsageLimit uint64 `json:"usage_limit"` }
Detailed information about SEP pool
type RecordSEP ¶
type RecordSEP struct { // Config Config SEPConfig `json:"config"` // Consumed by ConsumedBy []uint64 `json:"consumedBy"` // Description Description string `json:"desc"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // Milestones Milestones uint64 `json:"milestones"` // MultipathNum MultipathNum uint64 `json:"multipathNum"` // Name Name string `json:"name"` // Object status ObjStatus string `json:"objStatus"` // Provided by ProvidedBy []uint64 `json:"providedBy"` SharedWith []uint64 `json:"sharedWith"` // Tech status TechStatus string `json:"techStatus"` // Type Type string `json:"type"` }
Detailed information about SEP
func (RecordSEP) Serialize ¶
func (rsep RecordSEP) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
type SEP ¶
type SEP struct {
// contains filtered or unexported fields
}
Structure for creating request to storage endpoint provider
func (SEP) AccessGrant ¶
AccessGrant grants access to SEP
func (SEP) AccessGrantToPool ¶
AccessGrantToPool grants access to pool SEP
func (SEP) AccessRevoke ¶
AccessRevoke revokes access to SEP
func (SEP) AccessRevokeToPool ¶
AccessRevokeToPool revokes access to pool SEP
func (SEP) AddConsumerNodes ¶
AddConsumerNodes adds consumer nodes to SEP parameters
func (SEP) AddProviderNodes ¶
AddProviderNodes adds provider nodes to SEP parameters
func (SEP) ConfigFieldEdit ¶
ConfigFieldEdit edits SEP config field value
func (SEP) ConfigInsert ¶
ConfigInsert inserts config to SEP
func (SEP) ConfigValidate ¶
ConfigValidate verifies config for the SEP
func (SEP) Consumption ¶
func (s SEP) Consumption(ctx context.Context, req ConsumptionRequest) (*RecordConsumption, error)
Consumption gets SEP consumption info
func (SEP) Decommission ¶
Decommission unlink everything that exists from SEP
func (SEP) DelConsumerNodes ¶
DelConsumerNodes excludes consumer nodes from SEP parameters
func (SEP) GetPool ¶
func (s SEP) GetPool(ctx context.Context, req GetPoolRequest) (*RecordPool, error)
GetPool gets SEP pool config by name
func (SEP) SharedLockStart ¶ added in v1.9.0
SharedLockStart start shared locks without AsyncMode
func (SEP) SharedLockStartAsync ¶ added in v1.9.0
SharedLockStartAsync start shared locks with AsyncMode
func (SEP) SharedLockStop ¶ added in v1.9.0
SharedLockStop stop shared locks without AsyncMode
func (SEP) SharedLockStopAsync ¶ added in v1.9.0
SharedLockStopAsync stop shared locks with AsyncMode
type SharedLockStartRequest ¶ added in v1.9.0
type SharedLockStartRequest struct { // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Required: false Nodes []uint64 `url:"nodes,omitempty" json:"nodes,omitempty"` // Required: false VGNames []string `url:"vg_names,omitempty" json:"vg_names,omitempty"` // Default: false // Required: false IgnoreStartedLock bool `url:"ignore_started_lock" json:"ignore_started_lock"` }
SharedLockStartRequest struct to start shared locks
type SharedLockStopRequest ¶ added in v1.9.0
type SharedLockStopRequest struct { // Required: true SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Required: false Nodes []uint64 `url:"nodes,omitempty" json:"nodes,omitempty"` // Required: false VGNames []string `url:"vg_names,omitempty" json:"vg_names,omitempty"` }
SharedLockStopRequest struct to stop shared locks
type Total ¶
type Total struct { // Capacity limit CapacityLimit uint64 `json:"capacity_limit"` // Disk count DiskCount uint64 `json:"disk_count"` // Disk usage DiskUsage uint64 `json:"disk_usage"` // Snapshot count SnapshotCount uint64 `json:"snapshot_count"` // Snapshot usage SnapshotUsage uint64 `json:"snapshot_usage"` // Usage Usage uint64 `json:"usage"` // Usage limit UsageLimit uint64 `json:"usage_limit"` }
Total resource information
Source Files
¶
- access_grant.go
- access_grant_to_pool.go
- access_revoke.go
- access_revoke_to_pool.go
- add_consumer_nodes.go
- add_pool.go
- add_provider_nodes.go
- config_field_edit.go
- config_insert.go
- config_validate.go
- consumption.go
- create.go
- decommission.go
- del_consumer_nodes.go
- del_pool.go
- delete.go
- disable.go
- disk_list.go
- enable.go
- filter.go
- get.go
- get_config.go
- get_pool.go
- ids.go
- list.go
- models.go
- sep.go
- serialize.go
- shared_lock_start.go
- shared_lock_stop.go