subnets

package
v0.0.0-...-3d086f3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddSubnetsCache

func NewAddSubnetsCache(api Backing) *addSubnetsCache

func NewStateShim

func NewStateShim(st *state.State) (*stateShim, error)

func Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

Types

type API

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

API provides the subnets API facade for version 5.

func (*API) AllZones

func (api *API) AllZones() (params.ZoneResults, error)

AllZones returns all availability zones known to Juju. If a zone is unusable, unavailable, or deprecated the Available field will be false.

func (*API) ListSubnets

func (api *API) ListSubnets(args params.SubnetsFilters) (results params.ListSubnetsResults, err error)

ListSubnets returns the matching subnets after applying optional filters.

func (*API) SubnetsByCIDR

func (api *API) SubnetsByCIDR(arg params.CIDRParams) (params.SubnetsResults, error)

SubnetsByCIDR returns the collection of subnets matching each CIDR in the input.

type Backing

type Backing interface {
	environs.EnvironConfigGetter

	// AvailabilityZones returns all cached availability zones (i.e.
	// not from the provider, but in state).
	AvailabilityZones() (network.AvailabilityZones, error)

	// SetAvailabilityZones replaces the cached list of availability
	// zones with the given zones.
	SetAvailabilityZones(network.AvailabilityZones) error

	// AllSubnets returns all backing subnets.
	AllSubnets() ([]networkingcommon.BackingSubnet, error)

	// SubnetByCIDR returns a unique subnet based on the input CIDR.
	SubnetByCIDR(cidr string) (networkingcommon.BackingSubnet, error)

	// SubnetsByCIDR returns any subnets with the input CIDR.
	SubnetsByCIDR(cidr string) ([]networkingcommon.BackingSubnet, error)

	// AllSpaces returns all known Juju network spaces.
	AllSpaces() ([]networkingcommon.BackingSpace, error)

	// ModelTag returns the tag of the model this state is associated to.
	ModelTag() names.ModelTag
}

Backing contains the state methods used in this package.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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