Documentation
¶
Index ¶
- func NewAddSubnetsCache(api Backing) *addSubnetsCache
- func NewStateShim(st *state.State) (*stateShim, error)
- type API
- func (api *API) AddSubnets(args params.AddSubnetsParams) (params.ErrorResults, error)
- func (api *API) AllSpaces(_, _ struct{})
- func (api *API) AllZones() (params.ZoneResults, error)
- func (api *API) ListSubnets(args params.SubnetsFilters) (results params.ListSubnetsResults, err error)
- func (api *API) SubnetsByCIDR(arg params.CIDRParams) (params.SubnetsResults, error)
- type APIv2
- type APIv3
- type Backing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAddSubnetsCache ¶
func NewAddSubnetsCache(api Backing) *addSubnetsCache
func NewStateShim ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API provides the subnets API facade for version 4.
func (*API) AddSubnets ¶
func (api *API) AddSubnets(args params.AddSubnetsParams) (params.ErrorResults, error)
AddSubnets adds existing subnets to Juju.
func (*API) AllSpaces ¶
func (api *API) AllSpaces(_, _ struct{})
AllSpaces does not belong on this API facade. If you need it, use the spaces facade.
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 APIv2 ¶
type APIv2 struct {
*APIv3
}
APIv2 provides the subnets API facade for versions < 3.
func (*APIv2) AddSubnets ¶
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 ¶
type APIv3 struct {
*API
}
APIv3 provides the subnets API facade for versions 3.
func (*APIv3) AllSpaces ¶
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 ¶
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.