Documentation
¶
Overview ¶
Operator actions for handling interventions on a storage endpoint provider
Index ¶
- type AccessGrantRequest
- type AccessGrantToPoolRequest
- type AccessRevokeRequest
- type AccessRevokeToPoolRequest
- type AddConsumerNodesRequest
- type AddProviderNodesRequest
- type ConfigFieldEditRequest
- type ConfigInsertRequest
- type ConfigValidateRequest
- type ConsumptionRequest
- type CreateRequest
- type DecommissionRequest
- type DelConsumerNodesRequest
- type DeleteRequest
- type DisableRequest
- type DiskListRequest
- type EnableRequest
- type GetConfigRequest
- type GetPoolRequest
- type GetRequest
- type ItemURI
- type ListRequest
- type ListSEP
- 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) 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) 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) List(ctx context.Context, req ListRequest) (ListSEP, error)
- func (s SEP) UpdateCapacityLimit(ctx context.Context, req UpdateCapacityLimitRequest) (uint64, error)
- type SEPConfig
- type Total
- type UpdateCapacityLimitRequest
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"`
// 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"`
}
Request struct for grant access to SEP
type AccessGrantToPoolRequest ¶
type AccessGrantToPoolRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Pool name
// Required: true
PoolName string `url:"pool_name" json:"pool_name"`
// 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"`
}
Request struct for grant access to pool SEP
type AccessRevokeRequest ¶
type AccessRevokeRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Account ID to revoke access to the specified SEP
// Required: true
AccountID uint64 `url:"account_id" json:"account_id"`
}
Request struct for revoke access to SEP
type AccessRevokeToPoolRequest ¶
type AccessRevokeToPoolRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Pool name
// Required: true
PoolName string `url:"pool_name" json:"pool_name"`
// 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"`
}
Request struct for revoke access to pool SEP
type AddConsumerNodesRequest ¶
type AddConsumerNodesRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// List of nodes IDs
// Required: true
ConsumerNIDs []uint64 `url:"consumer_nids" json:"consumer_nids"`
}
Request struct for add consumer nodes
type AddProviderNodesRequest ¶
type AddProviderNodesRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// List of node IDs
// Required: true
ProviderNIDs []uint64 `url:"provider_nids" json:"provider_nids"`
}
Request struct for add provider nodes
type ConfigFieldEditRequest ¶
type ConfigFieldEditRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Field name
// Required: true
FieldName string `url:"field_name" json:"field_name"`
// Field value
// Required: true
FieldValue string `url:"field_value" json:"field_value"`
// Field type
// Should be one of:
// - int
// - str
// - bool
// - list
// - dict
// Required: true
FieldType string `url:"field_type" json:"field_type"`
}
Request struct for edit config fields
type ConfigInsertRequest ¶
type ConfigInsertRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Storage provider config
// Required: true
Config string `url:"config" json:"config"`
}
Request struct for insert config
type ConfigValidateRequest ¶
type ConfigValidateRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Storage provider config
// Required: true
Config string `url:"config" json:"config"`
}
Request struct for validate config
type ConsumptionRequest ¶
type ConsumptionRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
Request struct for get consumption info
type CreateRequest ¶
type CreateRequest struct {
// Grid ID
// Required: true
GID uint64 `url:"gid" json:"gid"`
// SEP name
// Required: true
Name string `url:"name" json:"name"`
// Type of storage
// Required: true
SEPType string `url:"sep_type" json:"sep_type"`
// Description
// Required: false
Description string `url:"description,omitempty" json:"description,omitempty"`
// SEP config
// Required: false
Config string `url:"config,omitempty" json:"config,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"`
}
Request struct for create SEP object
type DecommissionRequest ¶
type DecommissionRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Clear disks and images physically
// Required: false
ClearPhisically bool `url:"clear_physically,omitempty" json:"clear_physically,omitempty"`
}
Request struct for decommission
type DelConsumerNodesRequest ¶
type DelConsumerNodesRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// List of consumer node IDs
// Required: true
ConsumerNIDs []uint64 `url:"consumer_nids" json:"consumer_nids"`
}
Request struct for exclude consumer nodes
type DeleteRequest ¶
type DeleteRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
Request struct for delete SEP
type DisableRequest ¶
type DisableRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
Request struct for disable SEP
type DiskListRequest ¶
type DiskListRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Pool name
// Required: false
PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"`
}
Request struct for get list of disk IDs
type EnableRequest ¶
type EnableRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
Request struct for enable SEP
type GetConfigRequest ¶
type GetConfigRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
Request struct for get SEP config
type GetPoolRequest ¶
type GetPoolRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Pool name
// Required: true
PoolName string `url:"pool_name" json:"pool_name"`
}
Request struct for 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"`
}
Request struct for get SEP parameters
type ListRequest ¶
type ListRequest struct {
// Page size
// Required: false
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
// Page number
// Required: false
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
}
Request struct for get list of SEPs
type RecordConsumption ¶
type RecordConsumption struct {
// By pool
ByPool map[string]interface{} `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"`
}
Detailed information about SEP pool
type RecordSEP ¶
type RecordSEP struct {
// CKey
CKey string `json:"_ckey"`
// Meta
Meta []interface{} `json:"_meta"`
// 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"`
// 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
type SEP ¶
type SEP struct {
// contains filtered or unexported fields
}
Structure for creating request to storage endpoint provider
func (SEP) AccessGrant ¶
AccessGrant grant access to SEP
func (SEP) AccessGrantToPool ¶
AccessGrantToPool grant access to pool SEP
func (SEP) AccessRevoke ¶
AccessRevoke revoke access to SEP
func (SEP) AccessRevokeToPool ¶
AccessRevokeToPool revoke access to pool SEP
func (SEP) AddConsumerNodes ¶
AddConsumerNodes add consumer nodes to SEP parameters
func (SEP) AddProviderNodes ¶
AddProviderNodes add provider nodes to SEP parameters
func (SEP) ConfigFieldEdit ¶
ConfigFieldEdit edit SEP config field value
func (SEP) ConfigInsert ¶
ConfigInsert insert config to SEP
func (SEP) ConfigValidate ¶
ConfigValidate verify config for the SEP
func (SEP) Consumption ¶
func (s SEP) Consumption(ctx context.Context, req ConsumptionRequest) (*RecordConsumption, error)
Consumption get SEP consumption info
func (SEP) Decommission ¶
Decommission unlink everything that exists from SEP
func (SEP) DelConsumerNodes ¶
DelConsumerNodes exclude 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) UpdateCapacityLimit ¶
func (s SEP) UpdateCapacityLimit(ctx context.Context, req UpdateCapacityLimitRequest) (uint64, error)
UpdateCapacityLimit updates SEP capacity limit
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
type UpdateCapacityLimitRequest ¶
type UpdateCapacityLimitRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
Request struct for update capacity limits
Source Files
¶
- access_grant.go
- access_grant_to_pool.go
- access_revoke.go
- access_revoke_to_pool.go
- add_consumer_nodes.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
- delete.go
- disable.go
- disk_list.go
- enable.go
- get.go
- get_config.go
- get_pool.go
- list.go
- models.go
- sep.go
- update_capacity_limit.go