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

package spaces

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

Index

Package Files

shims.go spaces.go

func NewStateShim Uses

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

NewStateShim returns a new state shim.

type API Uses

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

API provides the spaces API facade for version 5.

func NewAPI Uses

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

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

func (*API) CreateSpaces Uses

func (api *API) CreateSpaces(args params.CreateSpacesParams) (results params.ErrorResults, err error)

CreateSpaces creates a new Juju network space, associating the specified subnets with it (optional; can be empty).

func (*API) ListSpaces Uses

func (api *API) ListSpaces() (results params.ListSpacesResults, err error)

ListSpaces lists all the available spaces and their associated subnets.

func (*API) ReloadSpaces Uses

func (api *API) ReloadSpaces() error

RefreshSpaces refreshes spaces from substrate

type APIv2 Uses

type APIv2 struct {
    *APIv3
}

APIv2 provides the spaces 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 spaces API.

func (*APIv2) ReloadSpaces Uses

func (u *APIv2) ReloadSpaces(_, _ struct{})

ReloadSpaces is not available via the V2 API.

type APIv3 Uses

type APIv3 struct {
    *APIv4
}

APIv3 provides the spaces API facade for version 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 spaces API.

type APIv4 Uses

type APIv4 struct {
    *API
}

APIv4 provides the spaces API facade for version 4.

func NewAPIv4 Uses

func NewAPIv4(st *state.State, res facade.Resources, auth facade.Authorizer) (*APIv4, error)

NewAPIv4 is a wrapper that creates a V4 spaces API.

func (*APIv4) CreateSpaces Uses

func (api *APIv4) CreateSpaces(args params.CreateSpacesParamsV4) (params.ErrorResults, error)

CreateSpaces creates a new Juju network space, associating the specified subnets with it (optional; can be empty).

type Backing Uses

type Backing interface {
    environs.EnvironConfigGetter

    // ModelTag returns the tag of this model.
    ModelTag() names.ModelTag

    // Subnet return a subnet based on the given cidr.
    Subnet(cidr string) (networkingcommon.BackingSubnet, error)

    // AddSpace creates a space.
    AddSpace(Name string, ProviderId network.Id, Subnets []string, Public bool) error

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

    // ReloadSpaces loads spaces from backing environ.
    ReloadSpaces(environ environs.BootstrapEnviron) error
}

Backend contains the state methods used in this package.

type BlockChecker Uses

type BlockChecker interface {
    ChangeAllowed() error
    RemoveAllowed() error
}

BlockChecker defines the block-checking functionality required by the spaces facade. This is implemented by apiserver/common.BlockChecker.

Package spaces imports 14 packages (graph) and is imported by 3 packages. Updated 2019-09-29. Refresh now. Tools for package owners.