zone

package
v0.0.0-...-e0df0e5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultProvider

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

DefaultProvider implements the Zone Provider

func NewDefaultProvider

func NewDefaultProvider(csClient csapi.CloudStackAPI, cache *cache.Cache) *DefaultProvider

NewDefaultProvider creates a new zone provider

func (*DefaultProvider) Get

func (p *DefaultProvider) Get(ctx context.Context, id string) (*Zone, error)

Get returns a zone by ID

func (*DefaultProvider) GetByName

func (p *DefaultProvider) GetByName(ctx context.Context, name string) (*Zone, error)

GetByName returns a zone by name

func (*DefaultProvider) List

func (p *DefaultProvider) List(ctx context.Context) ([]*Zone, error)

List returns all available zones

func (*DefaultProvider) ValidateZone

func (p *DefaultProvider) ValidateZone(ctx context.Context, zoneIdentifier string) error

ValidateZone validates that a zone exists and is available

type Provider

type Provider interface {
	List(ctx context.Context) ([]*Zone, error)
	Get(ctx context.Context, id string) (*Zone, error)
	GetByName(ctx context.Context, name string) (*Zone, error)
}

Provider provides zone information

type Zone

type Zone struct {
	ID                    string
	Name                  string
	NetworkType           string
	AllocationState       string
	LocalStorageEnabled   bool
	SecurityGroupsEnabled bool
}

Zone represents a CloudStack zone

Jump to

Keyboard shortcuts

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