v1

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFilterMultipleLocations is returned when trying to List VLANs with multiple locations configured
	// for filtering - which is not implemented.
	ErrFilterMultipleLocations = fmt.Errorf("%w: cannot filter on multiple locations", apiTypes.ErrInvalidFilter)

	// ErrLocationCount is returned when trying to create a VLAN with no or more than one location.
	ErrLocationCount = errors.New("VLANs have to be created with exactly one Location")
)

Functions

This section is empty.

Types

type Status

type Status string

Status describe the deployment status of a VLAN.

const (
	// StatusInvalid is a client-internal, invalid status which is only used to check if a status is set for filtering.
	StatusInvalid Status = ""

	// StatusActive means the VLAN is fully deployed and ready to be used.
	StatusActive Status = "Active"

	// StatusPending is set when a VLAN is newly created and not yet ready to be used.
	StatusPending Status = "Pending"

	// StatusMarkedForDeletion means the VLAN was requested to be deleted, which is still pending.
	StatusMarkedForDeletion Status = "Marked for deletion"
)

type VLAN

type VLAN struct {
	Identifier          string `json:"identifier,omitempty" anxcloud:"identifier"`
	Name                string `json:"name,omitempty"`
	DescriptionCustomer string `json:"description_customer,omitempty"`
	RoleText            string `json:"role_text,omitempty"`
	Status              Status `json:"status,omitempty" anxcloud:"filterable"`
	VMProvisioning      bool   `json:"vm_provisioning"`

	// The API returns an array of locations, but there is no way to configure more than one location via the API.
	// Additionally, not even the one location can be updated via API.
	// When creating a VLAN pass a single Location object, only the Identifier needs to be set on it.
	Locations []corev1.Location `json:"locations,omitempty" anxcloud:"filterable"`
}

VLAN describes a virtual network IP prefixes, virtual machines (if VMProvisioning is true) and alike can be deployed into.

func (*VLAN) EndpointURL

func (v *VLAN) EndpointURL(ctx context.Context) (*url.URL, error)

func (*VLAN) FilterAPIRequestBody

func (v *VLAN) FilterAPIRequestBody(ctx context.Context) (interface{}, error)

func (*VLAN) GetIdentifier added in v0.4.5

func (o *VLAN) GetIdentifier(ctx context.Context) (string, error)

GetIdentifier returns the primary identifier of a VLAN object

Jump to

Keyboard shortcuts

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