api

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddressIdx = iota
	PortIdx
)
View Source
const (
	StatusOK       = http.StatusOK
	StatusAccepted = http.StatusAccepted
)

Variables

View Source
var KnownVersions = []map[string]string{
	{
		"name":        "v1beta",
		"description": "v1beta version",
		"status":      "CURRENT",
		"updatedAt":   "2017-07-10T14:36:58.014Z",
	},
}

KnownVersions

Functions

func CreateReplicationDBEntry added in v0.5.1

func CreateReplicationDBEntry(ctx *c.Context, in *model.ReplicationSpec) (*model.ReplicationSpec, error)

func CreateVolumeAttachmentDBEntry added in v0.1.6

func CreateVolumeAttachmentDBEntry(ctx *c.Context, in *model.VolumeAttachmentSpec) (*model.VolumeAttachmentSpec, error)

func CreateVolumeDBEntry added in v0.1.6

func CreateVolumeDBEntry(ctx *c.Context, in *model.VolumeSpec) (*model.VolumeSpec, error)

func CreateVolumeGroupDBEntry added in v0.1.8

func CreateVolumeGroupDBEntry(ctx *c.Context, in *model.VolumeGroupSpec) (*model.VolumeGroupSpec, error)

func CreateVolumeSnapshotDBEntry added in v0.1.6

func CreateVolumeSnapshotDBEntry(ctx *c.Context, in *model.VolumeSnapshotSpec) (*model.VolumeSnapshotSpec, error)

func DeleteReplicationDBEntry added in v0.1.8

func DeleteReplicationDBEntry(ctx *c.Context, in *model.ReplicationSpec) error

DeleteReplicationDBEntry just modifies the state of the volume replication to be deleting in the DB, the real deletion operation would be executed in another new thread.

func DeleteVolumeDBEntry added in v0.1.6

func DeleteVolumeDBEntry(ctx *c.Context, in *model.VolumeSpec) error

DeleteVolumeDBEntry just modifies the state of the volume to be deleting in the DB, the real deletion operation would be executed in another new thread.

func DeleteVolumeGroupDBEntry added in v0.1.8

func DeleteVolumeGroupDBEntry(ctx *c.Context, volumeGroupId string) error

func DeleteVolumeSnapshotDBEntry added in v0.1.6

func DeleteVolumeSnapshotDBEntry(ctx *c.Context, in *model.VolumeSnapshotSpec) error

DeleteVolumeSnapshotDBEntry just modifies the state of the volume snapshot to be deleting in the DB, the real deletion operation would be executed in another new thread.

func DisableReplicationDBEntry added in v0.1.8

func DisableReplicationDBEntry(ctx *c.Context, in *model.ReplicationSpec) error

DisableReplicationDBEntry just modifies the state of the volume replication to be disabling in the DB, the real deletion operation would be executed in another new thread.

func EnableReplicationDBEntry added in v0.1.8

func EnableReplicationDBEntry(ctx *c.Context, in *model.ReplicationSpec) error

EnableReplicationDBEntry just modifies the state of the volume replication to be enabling in the DB, the real deletion operation would be executed in another new thread.

func ExtendVolumeDBEntry added in v0.1.6

func ExtendVolumeDBEntry(ctx *c.Context, volID string, in *model.ExtendVolumeSpec) (*model.VolumeSpec, error)

ExtendVolumeDBEntry just modifies the state of the volume to be extending in the DB, the real operation would be executed in another new thread, and the new size would be updated in controller module.

func FailoverReplicationDBEntry added in v0.1.8

func FailoverReplicationDBEntry(ctx *c.Context, in *model.ReplicationSpec, secondaryBackendId string) error

FailoverReplicationDBEntry just modifies the state of the volume replication to be failing_over or failing_back in the DB, the real deletion operation would be executed in another new thread.

func Run

func Run(apiServerCfg cfg.OsdsApiServer)

func UpdateVolumeGroupDBEntry added in v0.1.8

func UpdateVolumeGroupDBEntry(ctx *c.Context, vgUpdate *model.VolumeGroupSpec) (*model.VolumeGroupSpec, error)

func ValidateAddVolumes added in v0.1.8

func ValidateAddVolumes(ctx *c.Context, volumes []*model.VolumeSpec, addVolumes []string, vg *model.VolumeGroupSpec) ([]string, error)

func ValidateRemoveVolumes added in v0.1.8

func ValidateRemoveVolumes(ctx *c.Context, volumes []*model.VolumeSpec, removeVolumes []string, vg *model.VolumeGroupSpec) ([]string, error)

Types

type BasePortal added in v0.1.4

type BasePortal struct {
	beego.Controller
}

func (*BasePortal) ErrorHandle added in v0.1.8

func (b *BasePortal) ErrorHandle(errType int, errMsg string)

func (*BasePortal) GetParameters added in v0.1.4

func (b *BasePortal) GetParameters() (map[string][]string, error)

func (*BasePortal) SuccessHandle added in v0.1.8

func (b *BasePortal) SuccessHandle(status int, body []byte)

type DockPortal

type DockPortal struct {
	BasePortal
}

DockPortal

func (*DockPortal) GetDock

func (d *DockPortal) GetDock()

GetDock

func (*DockPortal) ListDocks

func (d *DockPortal) ListDocks()

ListDocks

type PoolPortal

type PoolPortal struct {
	BasePortal
}

func (*PoolPortal) GetPool

func (p *PoolPortal) GetPool()

func (*PoolPortal) ListAvailabilityZones added in v0.3.0

func (p *PoolPortal) ListAvailabilityZones()

func (*PoolPortal) ListPools

func (p *PoolPortal) ListPools()

type ProfilePortal

type ProfilePortal struct {
	BasePortal
}

func (*ProfilePortal) AddCustomProperty added in v0.3.1

func (p *ProfilePortal) AddCustomProperty()

func (*ProfilePortal) CreateProfile

func (p *ProfilePortal) CreateProfile()

func (*ProfilePortal) DeleteProfile

func (p *ProfilePortal) DeleteProfile()

func (*ProfilePortal) GetProfile

func (p *ProfilePortal) GetProfile()

func (*ProfilePortal) ListCustomProperties added in v0.3.1

func (p *ProfilePortal) ListCustomProperties()

func (*ProfilePortal) ListProfiles

func (p *ProfilePortal) ListProfiles()

func (*ProfilePortal) RemoveCustomProperty added in v0.3.1

func (p *ProfilePortal) RemoveCustomProperty()

func (*ProfilePortal) UpdateProfile

func (p *ProfilePortal) UpdateProfile()

type ReplicationPortal added in v0.1.8

type ReplicationPortal struct {
	BasePortal

	CtrClient client.Client
}

func NewReplicationPortal added in v0.1.8

func NewReplicationPortal() *ReplicationPortal

func (*ReplicationPortal) CreateReplication added in v0.1.8

func (r *ReplicationPortal) CreateReplication()

func (*ReplicationPortal) DeleteReplication added in v0.1.8

func (r *ReplicationPortal) DeleteReplication()

func (*ReplicationPortal) DisableReplication added in v0.1.8

func (r *ReplicationPortal) DisableReplication()

func (*ReplicationPortal) EnableReplication added in v0.1.8

func (r *ReplicationPortal) EnableReplication()

func (*ReplicationPortal) FailoverReplication added in v0.1.8

func (r *ReplicationPortal) FailoverReplication()

func (*ReplicationPortal) GetReplication added in v0.1.8

func (r *ReplicationPortal) GetReplication()

func (*ReplicationPortal) ListReplications added in v0.1.8

func (r *ReplicationPortal) ListReplications()

func (*ReplicationPortal) ListReplicationsDetail added in v0.1.8

func (r *ReplicationPortal) ListReplicationsDetail()

func (*ReplicationPortal) UpdateReplication added in v0.1.8

func (r *ReplicationPortal) UpdateReplication()

type VersionPortal

type VersionPortal struct {
	BasePortal
}

VersionPortal

func (*VersionPortal) GetVersion

func (v *VersionPortal) GetVersion()

GetVersion

func (*VersionPortal) ListVersions

func (v *VersionPortal) ListVersions()

ListVersions

type VolumeAttachmentPortal

type VolumeAttachmentPortal struct {
	BasePortal

	CtrClient client.Client
}

func NewVolumeAttachmentPortal added in v0.5.1

func NewVolumeAttachmentPortal() *VolumeAttachmentPortal

func (*VolumeAttachmentPortal) CreateVolumeAttachment

func (v *VolumeAttachmentPortal) CreateVolumeAttachment()

func (*VolumeAttachmentPortal) DeleteVolumeAttachment

func (v *VolumeAttachmentPortal) DeleteVolumeAttachment()

func (*VolumeAttachmentPortal) GetVolumeAttachment

func (v *VolumeAttachmentPortal) GetVolumeAttachment()

func (*VolumeAttachmentPortal) ListVolumeAttachments

func (v *VolumeAttachmentPortal) ListVolumeAttachments()

func (*VolumeAttachmentPortal) UpdateVolumeAttachment

func (v *VolumeAttachmentPortal) UpdateVolumeAttachment()

type VolumeGroupPortal added in v0.1.8

type VolumeGroupPortal struct {
	BasePortal

	CtrClient client.Client
}

func NewVolumeGroupPortal added in v0.5.1

func NewVolumeGroupPortal() *VolumeGroupPortal

func (*VolumeGroupPortal) CreateVolumeGroup added in v0.1.8

func (v *VolumeGroupPortal) CreateVolumeGroup()

func (*VolumeGroupPortal) DeleteVolumeGroup added in v0.1.8

func (v *VolumeGroupPortal) DeleteVolumeGroup()

func (*VolumeGroupPortal) GetVolumeGroup added in v0.1.8

func (v *VolumeGroupPortal) GetVolumeGroup()

func (*VolumeGroupPortal) ListVolumeGroups added in v0.1.10

func (v *VolumeGroupPortal) ListVolumeGroups()

func (*VolumeGroupPortal) UpdateVolumeGroup added in v0.1.8

func (v *VolumeGroupPortal) UpdateVolumeGroup()

type VolumePortal

type VolumePortal struct {
	BasePortal

	CtrClient client.Client
}

func NewVolumePortal added in v0.5.1

func NewVolumePortal() *VolumePortal

func (*VolumePortal) CreateVolume

func (v *VolumePortal) CreateVolume()

func (*VolumePortal) DeleteVolume

func (v *VolumePortal) DeleteVolume()

func (*VolumePortal) ExtendVolume added in v0.1.1

func (v *VolumePortal) ExtendVolume()

ExtendVolume ...

func (*VolumePortal) GetVolume

func (v *VolumePortal) GetVolume()

func (*VolumePortal) ListVolumes

func (v *VolumePortal) ListVolumes()

func (*VolumePortal) UpdateVolume

func (v *VolumePortal) UpdateVolume()

type VolumeSnapshotPortal

type VolumeSnapshotPortal struct {
	BasePortal

	CtrClient client.Client
}

func NewVolumeSnapshotPortal added in v0.5.1

func NewVolumeSnapshotPortal() *VolumeSnapshotPortal

func (*VolumeSnapshotPortal) CreateVolumeSnapshot

func (v *VolumeSnapshotPortal) CreateVolumeSnapshot()

func (*VolumeSnapshotPortal) DeleteVolumeSnapshot

func (v *VolumeSnapshotPortal) DeleteVolumeSnapshot()

func (*VolumeSnapshotPortal) GetVolumeSnapshot

func (v *VolumeSnapshotPortal) GetVolumeSnapshot()

func (*VolumeSnapshotPortal) ListVolumeSnapshots

func (v *VolumeSnapshotPortal) ListVolumeSnapshots()

func (*VolumeSnapshotPortal) UpdateVolumeSnapshot

func (v *VolumeSnapshotPortal) UpdateVolumeSnapshot()

Directories

Path Synopsis
filter

Jump to

Keyboard shortcuts

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