Documentation ¶
Index ¶
- type Logic
- func (l *Logic) BuildServiceInfo(ctx context.Context) (liquid.ServiceInfo, error)
- func (l *Logic) Init(ctx context.Context, provider *gophercloud.ProviderClient, ...) (err error)
- func (l *Logic) ScanCapacity(ctx context.Context, req liquid.ServiceCapacityRequest, ...) (liquid.ServiceCapacityReport, error)
- func (l *Logic) ScanUsage(ctx context.Context, projectUUID string, req liquid.ServiceUsageRequest, ...) (liquid.ServiceUsageReport, error)
- func (l *Logic) SetQuota(ctx context.Context, projectUUID string, req liquid.ServiceQuotaRequest, ...) error
- type Pool
- type QuotaDetail
- type QuotaSet
- type QuotaSetDetail
- type RealShareType
- type StoragePoolAttributes
- type VirtualShareType
- func (vst VirtualShareType) AllRealShareTypes() (result []RealShareType)
- func (vst VirtualShareType) RealShareTypeIn(project liquid.ProjectMetadata) (rst RealShareType, omit bool)
- func (vst VirtualShareType) ShareCapacityResourceName() liquid.ResourceName
- func (vst VirtualShareType) SharesResourceName() liquid.ResourceName
- func (vst VirtualShareType) SnapmirrorCapacityResourceName() liquid.ResourceName
- func (vst VirtualShareType) SnapshotCapacityResourceName() liquid.ResourceName
- func (vst VirtualShareType) SnapshotsResourceName() liquid.ResourceName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logic ¶
type Logic struct { // configuration CapacityCalculation struct { CapacityBalance float64 `json:"capacity_balance"` ShareNetworks uint64 `json:"share_networks"` SharesPerPool uint64 `json:"shares_per_pool"` SnapshotsPerShare uint64 `json:"snapshots_per_share"` WithSubcapacities bool `json:"with_subcapacities"` } `json:"capacity_calculation"` PrometheusAPIConfigForAZAwareness *promquery.Config `json:"prometheus_api_for_az_awareness"` PrometheusAPIConfigForNetappMetrics *promquery.Config `json:"prometheus_api_for_netapp_metrics"` // connections ManilaV2 *gophercloud.ServiceClient `json:"-"` AZMetrics *promquery.BulkQueryCache[azMetricsKey, azMetrics] `json:"-"` NetappMetrics *promquery.BulkQueryCache[netappMetricsKey, netappMetrics] `json:"-"` ShareTypeIDByName liquidapi.State[map[RealShareType]string] `json:"-"` }
func (*Logic) BuildServiceInfo ¶
BuildServiceInfo implements the liquidapi.Logic interface.
func (*Logic) Init ¶
func (l *Logic) Init(ctx context.Context, provider *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (err error)
Init implements the liquidapi.Logic interface.
func (*Logic) ScanCapacity ¶
func (l *Logic) ScanCapacity(ctx context.Context, req liquid.ServiceCapacityRequest, serviceInfo liquid.ServiceInfo) (liquid.ServiceCapacityReport, error)
ScanCapacity implements the liquidapi.Logic interface.
func (*Logic) ScanUsage ¶
func (l *Logic) ScanUsage(ctx context.Context, projectUUID string, req liquid.ServiceUsageRequest, serviceInfo liquid.ServiceInfo) (liquid.ServiceUsageReport, error)
ScanUsage implements the liquidapi.Logic interface.
type Pool ¶
type Pool struct { Name string `json:"name"` Host string `json:"host"` Capabilities struct { // standard fields TotalCapacityGB liquids.Float64WithStringErrors `json:"total_capacity_gb"` AllocatedCapacityGB liquids.Float64WithStringErrors `json:"allocated_capacity_gb"` // CCloud extension fields HardwareState string `json:"hardware_state"` } `json:"capabilities,omitempty"` }
Pool is a custom extension of the type `schedulerstats.Pool`.
func (Pool) CountsUnusedCapacity ¶
CountsUnusedCapacity returns whether this pool has all its capacity count towards the total (instead of just the used capacity).
type QuotaDetail ¶
QuotaDetail appears in type QuotaSetDetail.
func (QuotaDetail) PrepareForBreakdownInto ¶
func (q QuotaDetail) PrepareForBreakdownInto(allAZs []liquid.AvailabilityZone) *liquid.ResourceUsageReport
PrepareForBreakdownInto converts this QuotaDetail into a ResourceUsageReport.
func (QuotaDetail) ToResourceReport ¶
func (q QuotaDetail) ToResourceReport(allAZs []liquid.AvailabilityZone, withAZMetrics bool) *liquid.ResourceUsageReport
ToResourceReport converts this QuotaDetail into a ResourceUsageReport.
type QuotaSet ¶
type QuotaSet struct { Snapshots uint64 `json:"snapshots"` Gigabytes uint64 `json:"gigabytes"` SnapshotGigabytes uint64 `json:"snapshot_gigabytes"` Replicas *uint64 `json:"share_replicas,omitempty"` ReplicaGigabytes *uint64 `json:"replica_gigabytes,omitempty"` }
QuotaSet is used when writing quotas.
type QuotaSetDetail ¶
type QuotaSetDetail struct { Snapshots QuotaDetail `json:"snapshots"` Gigabytes QuotaDetail `json:"gigabytes"` SnapshotGigabytes QuotaDetail `json:"snapshot_gigabytes"` Replicas QuotaDetail `json:"share_replicas"` ReplicaGigabytes QuotaDetail `json:"replica_gigabytes"` }
QuotaSetDetail is used when reading quota and usage.
type RealShareType ¶
type RealShareType string
RealShareType is a share type name that can be used in the Manila API.
type StoragePoolAttributes ¶
type StoragePoolAttributes struct { ExclusionReason string `json:"exclusion_reason,omitempty"` // Only set when ExclusionReason is set. RealCapacity uint64 `json:"real_capacity,omitempty"` }
StoragePoolAttributes is the Attributes payload type for a Manila subcapacity.
type VirtualShareType ¶
type VirtualShareType struct { regexpext.BoundedRegexp `json:"match_project_name"` Name RealShareType `json:"name"` } `json:"mapping_rules"` }FullProjectNamePattern
VirtualShareType is the configuration for a virtual share type.
func (VirtualShareType) AllRealShareTypes ¶
func (vst VirtualShareType) AllRealShareTypes() (result []RealShareType)
AllRealShareTypes returns all real share types that can be used on the Manila API to set quota or read usage for this virtual share type.
func (VirtualShareType) RealShareTypeIn ¶
func (vst VirtualShareType) RealShareTypeIn(project liquid.ProjectMetadata) (rst RealShareType, omit bool)
RealShareTypeIn returns the real share type that we have to use on the Manila API for this particular project, or "" if this share type shall be skipped for this project.
func (VirtualShareType) ShareCapacityResourceName ¶
func (vst VirtualShareType) ShareCapacityResourceName() liquid.ResourceName
func (VirtualShareType) SharesResourceName ¶
func (vst VirtualShareType) SharesResourceName() liquid.ResourceName
func (VirtualShareType) SnapmirrorCapacityResourceName ¶
func (vst VirtualShareType) SnapmirrorCapacityResourceName() liquid.ResourceName
func (VirtualShareType) SnapshotCapacityResourceName ¶
func (vst VirtualShareType) SnapshotCapacityResourceName() liquid.ResourceName
func (VirtualShareType) SnapshotsResourceName ¶
func (vst VirtualShareType) SnapshotsResourceName() liquid.ResourceName