firewaller

package
v0.0.0-...-9ec3720 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StateShim

func StateShim(st *state.State, m *state.Model) stateShim

TODO(wallyworld) - for tests, remove when remaining firewaller tests become unit tests.

Types

type FirewallerAPIV3

FirewallerAPIV3 provides access to the Firewaller v3 API facade.

func NewFirewallerAPI

func NewFirewallerAPI(
	st State,
	resources facade.Resources,
	authorizer facade.Authorizer,
	cloudSpecAPI cloudspec.CloudSpecAPI,
) (*FirewallerAPIV3, error)

NewFirewallerAPI creates a new server-side FirewallerAPIV3 facade.

func NewStateFirewallerAPIV3

func NewStateFirewallerAPIV3(context facade.Context) (*FirewallerAPIV3, error)

NewStateFirewallerAPIV3 creates a new server-side FirewallerAPIV3 facade.

func (*FirewallerAPIV3) GetAssignedMachine

func (f *FirewallerAPIV3) GetAssignedMachine(args params.Entities) (params.StringResults, error)

GetAssignedMachine returns the assigned machine tag (if any) for each given unit.

func (*FirewallerAPIV3) WatchOpenedPorts

func (f *FirewallerAPIV3) WatchOpenedPorts(args params.Entities) (params.StringsWatchResults, error)

WatchOpenedPorts returns a new StringsWatcher for each given model tag.

type FirewallerAPIV4

type FirewallerAPIV4 struct {
	*FirewallerAPIV3
	*common.ControllerConfigAPI
}

FirewallerAPIV4 provides access to the Firewaller v4 API facade.

func NewStateFirewallerAPIV4

func NewStateFirewallerAPIV4(context facade.Context) (*FirewallerAPIV4, error)

NewStateFirewallerAPIV4 creates a new server-side FirewallerAPIV4 facade.

func (*FirewallerAPIV4) FirewallRules

FirewallRules returns the firewall rules for the specified well known service types.

func (*FirewallerAPIV4) MacaroonForRelations

func (f *FirewallerAPIV4) MacaroonForRelations(args params.Entities) (params.MacaroonResults, error)

MacaroonForRelations returns the macaroon for the specified relations.

func (*FirewallerAPIV4) SetRelationsStatus

func (f *FirewallerAPIV4) SetRelationsStatus(args params.SetStatus) (params.ErrorResults, error)

SetRelationsStatus sets the status for the specified relations.

func (*FirewallerAPIV4) WatchEgressAddressesForRelations

func (f *FirewallerAPIV4) WatchEgressAddressesForRelations(relations params.Entities) (params.StringsWatchResults, error)

WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which connections will originate for the relation, change. Each event contains the entire set of addresses which are required for ingress for the relation.

func (*FirewallerAPIV4) WatchIngressAddressesForRelations

func (f *FirewallerAPIV4) WatchIngressAddressesForRelations(relations params.Entities) (params.StringsWatchResults, error)

WatchIngressAddressesForRelations creates a watcher that returns the ingress networks that have been recorded against the specified relations.

type FirewallerAPIV5

type FirewallerAPIV5 struct {
	*FirewallerAPIV4
}

FirewallerAPIV5 provides access to the Firewaller v5 API facade.

func NewStateFirewallerAPIV5

func NewStateFirewallerAPIV5(context facade.Context) (*FirewallerAPIV5, error)

NewStateFirewallerAPIV5 creates a new server-side FirewallerAPIV5 facade.

func (*FirewallerAPIV5) AreManuallyProvisioned

func (f *FirewallerAPIV5) AreManuallyProvisioned(args params.Entities) (params.BoolResults, error)

AreManuallyProvisioned returns whether each given entity is manually provisioned or not. Only machine tags are accepted.

type FirewallerAPIV6

type FirewallerAPIV6 struct {
	*FirewallerAPIV5
}

FirewallerAPIV6 provides access to the Firewaller v6 API facade.

func NewStateFirewallerAPIV6

func NewStateFirewallerAPIV6(context facade.Context) (*FirewallerAPIV6, error)

NewStateFirewallerAPIV6 creates a new server-side FirewallerAPIV6 facade.

func (*FirewallerAPIV6) GetExposeInfo

func (f *FirewallerAPIV6) GetExposeInfo(args params.Entities) (params.ExposeInfoResults, error)

GetExposeInfo returns the expose flag and per-endpoint expose settings for the specified applications.

func (*FirewallerAPIV6) OpenedMachinePortRanges

func (f *FirewallerAPIV6) OpenedMachinePortRanges(args params.Entities) (params.OpenMachinePortRangesResults, error)

OpenedMachinePortRanges returns a list of the opened port ranges for the specified machines where each result is broken down by unit. The list of opened ports for each unit is further grouped by endpoint name and includes the subnet CIDRs that belong to the space that each endpoint is bound to.

func (*FirewallerAPIV6) SpaceInfos

SpaceInfos returns a comprehensive representation of either all spaces or a filtered subset of the known spaces and their associated subnet details.

func (*FirewallerAPIV6) WatchSubnets

func (f *FirewallerAPIV6) WatchSubnets(args params.Entities) (params.StringsWatchResult, error)

WatchSubnets returns a new StringsWatcher that watches the specified subnet tags or all tags if no entities are specified.

type State

type State interface {
	firewall.State

	ModelUUID() string
	GetMacaroon(entity names.Tag) (*macaroon.Macaroon, error)
	WatchOpenedPorts() state.StringsWatcher
	FindEntity(tag names.Tag) (state.Entity, error)
	FirewallRule(service corefirewall.WellKnownServiceType) (*state.FirewallRule, error)
	AllEndpointBindings() (map[string]map[string]string, error)
	SpaceInfos() (network.SpaceInfos, error)
}

State provides the subset of global state required by the remote firewaller facade.

Jump to

Keyboard shortcuts

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