juju: github.com/juju/juju/apiserver/facades/client/subnets Index | Files

package subnets

import "github.com/juju/juju/apiserver/facades/client/subnets"

Index

Package Files

cache.go shims.go subnets.go

func NewAddSubnetsCache Uses

func NewAddSubnetsCache(api Backing) *addSubnetsCache

func NewStateShim Uses

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

type API Uses

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

API provides the subnets API facade for version 3.

func NewAPI Uses

func NewAPI(st *state.State, res facade.Resources, auth facade.Authorizer) (*API, error)

NewAPI creates a new Subnets API server-side facade with a state.State backing.

func (*API) AddSubnets Uses

func (api *API) AddSubnets(args params.AddSubnetsParams) (params.ErrorResults, error)

AddSubnets adds existing subnets to Juju.

func (*API) AllSpaces Uses

func (api *API) AllSpaces() (params.SpaceResults, error)

AllSpaces returns the tags of all network spaces known to Juju.

func (*API) AllZones Uses

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 Uses

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

ListSubnets returns the matching subnets after applying optional filters.

type APIv2 Uses

type APIv2 struct {
    *API
}

APIv2 provides the subnets API facade for versions < 3.

func NewAPIv2 Uses

func NewAPIv2(st *state.State, res facade.Resources, auth facade.Authorizer) (*APIv2, error)

NewAPIv2 is a wrapper that creates a V2 subnets API.

func (*APIv2) AddSubnets Uses

func (api *APIv2) AddSubnets(args params.AddSubnetsParamsV2) (params.ErrorResults, error)

AddSubnets adds existing subnets to Juju. Args are converted to the new form for compatibility

type Backing Uses

type Backing interface {
    environs.EnvironConfigGetter

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

    // SetAvailabilityZones replaces the cached list of availability
    // zones with the given zones.
    SetAvailabilityZones([]providercommon.AvailabilityZone) error

    // AddSubnet creates a backing subnet for an existing subnet.
    AddSubnet(networkingcommon.BackingSubnetInfo) (networkingcommon.BackingSubnet, error)

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

    Subnet(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
}

Backend contains the state methods used in this package.

Package subnets imports 19 packages (graph) and is imported by 3 packages. Updated 2019-09-17. Refresh now. Tools for package owners.