manila

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const QuotaClassGetDefault = `` /* 150-byte string literal not displayed */
View Source
const QuotaGetAllByProject = `` /* 161-byte string literal not displayed */
View Source
const QuotaGetAllByProjectAndShareType = `` /* 356-byte string literal not displayed */
View Source
const QuotaGetAllByProjectAndUser = `` /* 199-byte string literal not displayed */
View Source
const QuotaUsageGetAllByProject = `` /* 222-byte string literal not displayed */
View Source
const QuotaUsageGetAllByProjectAndShareType = `` /* 410-byte string literal not displayed */
View Source
const ShareGetAllWithInstances = `` /* 603-byte string literal not displayed */
View Source
const ShareGetInventory = `` /* 2822-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type AvailabilityZone

type AvailabilityZone struct {
	CreatedAt sql.NullTime
	UpdatedAt sql.NullTime
	DeletedAt sql.NullTime
	Deleted   sql.NullString
	ID        string
	Name      sql.NullString
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type ProjectShareTypeQuota added in v0.4.0

type ProjectShareTypeQuota struct {
	CreatedAt   sql.NullTime
	UpdatedAt   sql.NullTime
	DeletedAt   sql.NullTime
	Deleted     sql.NullInt32
	ID          int32
	ProjectID   string
	ShareTypeID string
	Resource    string
	HardLimit   sql.NullInt32
}

type ProjectUserQuota added in v0.4.0

type ProjectUserQuota struct {
	CreatedAt sql.NullTime
	UpdatedAt sql.NullTime
	DeletedAt sql.NullTime
	Deleted   sql.NullInt32
	ID        int32
	ProjectID string
	UserID    string
	Resource  string
	HardLimit sql.NullInt32
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) QuotaClassGetDefault added in v0.4.0

func (q *Queries) QuotaClassGetDefault(ctx context.Context) ([]QuotaClassGetDefaultRow, error)

Upstream quota_class_get_default. The persisted 'default' class overrides service configuration defaults.

func (*Queries) QuotaGetAllByProject added in v0.4.0

func (q *Queries) QuotaGetAllByProject(ctx context.Context) ([]QuotaGetAllByProjectRow, error)

Upstream quota_get_all_by_project for every project. Quota tables use integer soft deletion: active = 0, soft-deleted = the row's id.

func (*Queries) QuotaGetAllByProjectAndShareType added in v0.4.0

func (q *Queries) QuotaGetAllByProjectAndShareType(ctx context.Context) ([]QuotaGetAllByProjectAndShareTypeRow, error)

Upstream quota_get_all_by_project_and_share_type for every project and type. share_type_name is NULL when the share type is deleted or missing; the override row is still returned.

func (*Queries) QuotaGetAllByProjectAndUser added in v0.4.0

func (q *Queries) QuotaGetAllByProjectAndUser(ctx context.Context) ([]QuotaGetAllByProjectAndUserRow, error)

Upstream quota_get_all_by_project_and_user for every project and user. User overrides are independent of project and share-type overrides.

func (*Queries) QuotaUsageGetAllByProject added in v0.4.0

func (q *Queries) QuotaUsageGetAllByProject(ctx context.Context) ([]QuotaUsageGetAllByProjectRow, error)

Upstream quota_usage_get_all_by_project for every project: raw per-user rows with share_type_id IS NULL. Share-type accounting describes the same allocations and is excluded; it is read by QuotaUsageGetAllByProjectAndShareType. A NULL user_id is a legacy project-level row. in_use and reserved are returned as stored, including NULL.

func (*Queries) QuotaUsageGetAllByProjectAndShareType added in v0.4.0

func (q *Queries) QuotaUsageGetAllByProjectAndShareType(ctx context.Context) ([]QuotaUsageGetAllByProjectAndShareTypeRow, error)

Upstream quota_usage_get_all_by_project_and_share_type for every project and type: raw rows with a share_type_id. share_type_name is NULL when the share type is deleted or missing; the accounting row is still returned.

func (*Queries) ShareGetAllWithInstances

func (q *Queries) ShareGetAllWithInstances(ctx context.Context) ([]ShareGetAllWithInstancesRow, error)

Multi-instance view: returns one row per nondeleted instance (or a NULL instance for shares with none). Use ShareGetInventory for logical shares.

func (*Queries) ShareGetInventory added in v0.4.0

func (q *Queries) ShareGetInventory(ctx context.Context) ([]ShareGetInventoryRow, error)

One row per nondeleted logical share, including shares with no instances. Mirrors Manila Share.instance (manila/db/sqlalchemy/models.py): sort by status, then prefer active replicas unless the first sorted status is replication_change. Reverting sorts before replication_change, so its presence restores active-replica preference. Upstream leaves equal or unknown-status ties to relationship order; instance ID is the stable tie break. All instance metadata comes from the same winner. The transitional ranks copy constants.TRANSITIONAL_STATUSES in order (manila/common/constants.py, checked against master 2026-11-18). Re-check both files when moving to a new Manila release: a missing transitional status falls into the unlisted bucket and would be preferred over transitional ones. Retain the existing inventory deletion scope, including retained shares with is_soft_deleted set; that flag is distinct from the row's deleted marker.

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Quota added in v0.4.0

type Quota struct {
	CreatedAt sql.NullTime
	UpdatedAt sql.NullTime
	DeletedAt sql.NullTime
	Deleted   sql.NullInt32
	ID        int32
	ProjectID sql.NullString
	Resource  sql.NullString
	HardLimit sql.NullInt32
}

type QuotaClass added in v0.4.0

type QuotaClass struct {
	CreatedAt sql.NullTime
	UpdatedAt sql.NullTime
	DeletedAt sql.NullTime
	Deleted   sql.NullInt32
	ID        int32
	ClassName sql.NullString
	Resource  sql.NullString
	HardLimit sql.NullInt32
}

type QuotaClassGetDefaultRow added in v0.4.0

type QuotaClassGetDefaultRow struct {
	Resource  sql.NullString
	HardLimit sql.NullInt32
}

type QuotaGetAllByProjectAndShareTypeRow added in v0.4.0

type QuotaGetAllByProjectAndShareTypeRow struct {
	ProjectID     string
	ShareTypeID   string
	ShareTypeName sql.NullString
	Resource      string
	HardLimit     sql.NullInt32
}

type QuotaGetAllByProjectAndUserRow added in v0.4.0

type QuotaGetAllByProjectAndUserRow struct {
	ProjectID string
	UserID    string
	Resource  string
	HardLimit sql.NullInt32
}

type QuotaGetAllByProjectRow added in v0.4.0

type QuotaGetAllByProjectRow struct {
	ProjectID sql.NullString
	Resource  sql.NullString
	HardLimit sql.NullInt32
}

type QuotaUsage added in v0.4.0

type QuotaUsage struct {
	CreatedAt    sql.NullTime
	UpdatedAt    sql.NullTime
	DeletedAt    sql.NullTime
	Deleted      sql.NullInt32
	ID           int32
	ProjectID    sql.NullString
	UserID       sql.NullString
	ShareTypeID  sql.NullString
	Resource     sql.NullString
	InUse        sql.NullInt32
	Reserved     sql.NullInt32
	UntilRefresh sql.NullInt32
}

type QuotaUsageGetAllByProjectAndShareTypeRow added in v0.4.0

type QuotaUsageGetAllByProjectAndShareTypeRow struct {
	ProjectID     sql.NullString
	ShareTypeID   sql.NullString
	ShareTypeName sql.NullString
	UserID        sql.NullString
	Resource      sql.NullString
	InUse         sql.NullInt32
	Reserved      sql.NullInt32
}

type QuotaUsageGetAllByProjectRow added in v0.4.0

type QuotaUsageGetAllByProjectRow struct {
	ProjectID sql.NullString
	UserID    sql.NullString
	Resource  sql.NullString
	InUse     sql.NullInt32
	Reserved  sql.NullInt32
}

type Share

type Share struct {
	CreatedAt                        sql.NullTime
	UpdatedAt                        sql.NullTime
	DeletedAt                        sql.NullTime
	Deleted                          sql.NullString
	ID                               string
	UserID                           sql.NullString
	ProjectID                        sql.NullString
	Size                             sql.NullInt32
	DisplayName                      sql.NullString
	DisplayDescription               sql.NullString
	SnapshotID                       sql.NullString
	ShareProto                       sql.NullString
	IsPublic                         sql.NullBool
	SnapshotSupport                  sql.NullBool
	ShareGroupID                     sql.NullString
	SourceShareGroupSnapshotMemberID sql.NullString
	TaskState                        sql.NullString
	ReplicationType                  sql.NullString
	CreateShareFromSnapshotSupport   sql.NullBool
	RevertToSnapshotSupport          sql.NullBool
	MountSnapshotSupport             sql.NullBool
	IsSoftDeleted                    bool
	ScheduledToBeDeletedAt           sql.NullTime
	SourceBackupID                   sql.NullString
}

type ShareGetAllWithInstancesRow

type ShareGetAllWithInstancesRow struct {
	ID               string
	Name             sql.NullString
	ProjectID        sql.NullString
	Size             sql.NullInt32
	ShareProto       sql.NullString
	Status           sql.NullString
	ShareType        string
	ShareTypeName    string
	AvailabilityZone string
}

type ShareGetInventoryRow added in v0.4.0

type ShareGetInventoryRow struct {
	ID               string
	Name             sql.NullString
	ProjectID        sql.NullString
	Size             sql.NullInt32
	ShareProto       sql.NullString
	Status           sql.NullString
	ShareType        string
	ShareTypeName    string
	AvailabilityZone string
}

type ShareInstance

type ShareInstance struct {
	CreatedAt           sql.NullTime
	UpdatedAt           sql.NullTime
	DeletedAt           sql.NullTime
	Deleted             sql.NullString
	ID                  string
	ShareID             sql.NullString
	Host                sql.NullString
	Status              sql.NullString
	ScheduledAt         sql.NullTime
	LaunchedAt          sql.NullTime
	TerminatedAt        sql.NullTime
	ShareNetworkID      sql.NullString
	ShareServerID       sql.NullString
	AvailabilityZoneID  sql.NullString
	AccessRulesStatus   sql.NullString
	ReplicaState        sql.NullString
	ShareTypeID         sql.NullString
	CastRulesToReadonly bool
	Progress            sql.NullString
	MountPointName      sql.NullString
}

type ShareType

type ShareType struct {
	CreatedAt   sql.NullTime
	UpdatedAt   sql.NullTime
	DeletedAt   sql.NullTime
	Deleted     sql.NullString
	ID          string
	Name        sql.NullString
	IsPublic    sql.NullBool
	Description sql.NullString
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL