firewaller

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 13 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) GetExposed

func (f *FirewallerAPIV3) GetExposed(args params.Entities) (params.BoolResults, error)

GetExposed returns the exposed flag value for each given application.

func (*FirewallerAPIV3) GetMachineActiveSubnets

func (f *FirewallerAPIV3) GetMachineActiveSubnets(args params.Entities) (params.StringsResults, error)

GetMachineActiveSubnets returns the tags of the all subnets that each machine (in args) has open ports on.

func (*FirewallerAPIV3) GetMachinePorts

GetMachinePorts returns the port ranges opened on a machine for the specified subnet as a map mapping port ranges to the tags of the units that opened them.

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 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 state.WellKnownServiceType) (*state.FirewallRule, 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