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

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 4.

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(_, _ struct{})

AllSpaces does not belong on this API facade. If you need it, use the spaces facade.

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.

func (*API) SubnetsByCIDR Uses

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

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

type APIv2 Uses

type APIv2 struct {
    *APIv3
}

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 APIv3 Uses

type APIv3 struct {
    *API
}

APIv3 provides the subnets API facade for versions 3.

func NewAPIv3 Uses

func NewAPIv3(st *state.State, res facade.Resources, auth facade.Authorizer) (*APIv3, error)

NewAPIv3 is a wrapper that creates a V3 subnets API.

func (*APIv3) AllSpaces Uses

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

AllSpaces returns the tags of all network spaces known to Juju. This is not recruited by any Juju client code and should not actually exist. It is preserved for versions 3 and below of the facade, but blanked for later versions to ensure it is not used.

type Backing Uses

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

    // AddSubnet creates a backing subnet for an existing subnet.
    AddSubnet(networkingcommon.BackingSubnetInfo) (networkingcommon.BackingSubnet, 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
}

Backend contains the state methods used in this package.

Directories

PathSynopsis
mocksPackage mocks is a generated GoMock package.

Package subnets imports 19 packages (graph) and is imported by 4 packages. Updated 2020-08-05. Refresh now. Tools for package owners.