opennebula

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MPL-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppTypeImage   = "IMAGE"
	AppTypeVM      = "VMTEMPLATE"
	AppTypeService = "SERVICE_TEMPLATE"
)
View Source
const (
	DefaultQuotaValue = -1

	DSFlag  uint8 = 1
	NetFlag       = 2
	VMFlag        = 4
	ImgFlag       = 8

	DatastoreQuota = "datastore"
	NetworkQuota   = "network"
	ImageQuota     = "image"
	VMQuota        = "vm"
)
View Source
const (
	One             string = "one"
	Http                   = "http"
	S3                     = "s3"
	LinuxContainers        = "linuxcontainers"
	TurnkeyLinux           = "turnkeylinux"
	DockerHub              = "dockerhub"
)

Variables

View Source
var S3Types = []string{"aws", "minio", "ceph"}

Functions

func ARFields added in v0.4.0

func ARFields() map[string]*schema.Schema

func ApplianceTypeToString added in v1.4.0

func ApplianceTypeToString(appType int) string

func ArrayToString

func ArrayToString(list []interface{}, delim string) string

func FeaturesFields added in v0.5.0

func FeaturesFields() map[string]*schema.Schema

func LockLevelToString

func LockLevelToString(lock int) string

func NewVMStateConf added in v0.5.1

func NewVMStateConf(timeout time.Duration, pending, target []string) resource.StateChangeConf

NewVMStateConf initialize a state change struct

func NewVMUpdateStateConf added in v0.5.1

func NewVMUpdateStateConf(timeout time.Duration, pending, target []string) resource.StateChangeConf

NewVMUpdateStateConf initialize a state change struct

func NoExists

func NoExists(err error) bool

NoExists indicate if an entity exists in checking the error code returned from an Info call

func ParseIntFromInterface added in v1.4.1

func ParseIntFromInterface(i interface{}) (int, error)

func Provider

func Provider() *schema.Provider

func SetTagsDiff added in v1.0.0

func SetTagsDiff(_ context.Context, diff *schema.ResourceDiff, meta interface{}) error

func SetVMTagsDiff added in v1.0.0

func SetVMTagsDiff(_ context.Context, diff *schema.ResourceDiff, meta interface{}) error

func StringToLockLevel

func StringToLockLevel(str string, lock *shared.LockLevel) error

Types

type ApplianceType added in v1.4.0

type ApplianceType string

type Configuration added in v0.5.0

type Configuration struct {
	OneVersion *ver.Version
	Controller *goca.Controller
	// contains filtered or unexported fields
}

type MutexKV added in v0.5.0

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

MutexKV is a simple key/value store for arbitrary mutexes. It can be used to serialize changes across arbitrary collaborators that share knowledge of the keys they must serialize on.

The initial use case is to let aws_security_group_rule resources serialize their access to individual security groups based on SG ID.

func NewMutexKV added in v0.5.0

func NewMutexKV() *MutexKV

Returns a properly initialized MutexKV

func (*MutexKV) Lock added in v0.5.0

func (m *MutexKV) Lock(key fmt.Stringer)

Locks the mutex for the given key. Caller is responsible for calling Unlock for the same key

func (*MutexKV) RLock added in v0.5.0

func (m *MutexKV) RLock(key fmt.Stringer)

Rlock

func (*MutexKV) RUnlock added in v0.5.0

func (m *MutexKV) RUnlock(key fmt.Stringer)

RUnlock

func (*MutexKV) Unlock added in v0.5.0

func (m *MutexKV) Unlock(key fmt.Stringer)

Unlock the mutex for the given key. Caller must have called Lock for the same key first

type ResourceKey added in v0.5.0

type ResourceKey struct {
	Type string
	ID   int
}

func (*ResourceKey) String added in v0.5.0

func (k *ResourceKey) String() string

type SubResourceKey added in v0.5.0

type SubResourceKey struct {
	Type    string
	ID      int
	SubType string
}

func (*SubResourceKey) String added in v0.5.0

func (k *SubResourceKey) String() string

type Template added in v1.0.0

type Template string
const (
	ReservationSize           Template = "SIZE"
	ReservationFirstIP        Template = "IP"
	ReservationAddressRangeID Template = "AR_ID"
)

type VMStates added in v0.5.1

type VMStates struct {
	States []vm.State
	LCMs   []vm.LCMState
}

VMStates represents a collection of VM states

func NewVMLCMState added in v0.5.1

func NewVMLCMState(lcms ...vm.LCMState) VMStates

func NewVMState added in v0.5.1

func NewVMState(states ...vm.State) VMStates

func (VMStates) Append added in v0.5.1

func (s VMStates) Append(states VMStates) VMStates

func (VMStates) ToStrings added in v0.5.1

func (s VMStates) ToStrings() []string

Source Files

Jump to

Keyboard shortcuts

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