Documentation ¶
Index ¶
- func NewModelFirewallRulesWatcher(st State) (*modelFirewallRulesWatcher, error)
- func Register(registry facade.FacadeRegistry)
- func StateShim(st *state.State, m *state.Model) stateShim
- type ControllerConfigAPI
- type FirewallerAPI
- func (f *FirewallerAPI) AreManuallyProvisioned(args params.Entities) (params.BoolResults, error)
- func (f *FirewallerAPI) GetAssignedMachine(args params.Entities) (params.StringResults, error)
- func (f *FirewallerAPI) GetExposeInfo(args params.Entities) (params.ExposeInfoResults, error)
- func (f *FirewallerAPI) MacaroonForRelations(args params.Entities) (params.MacaroonResults, error)
- func (f *FirewallerAPI) ModelFirewallRules() (params.IngressRulesResult, error)
- func (f *FirewallerAPI) OpenedMachinePortRanges(args params.Entities) (params.OpenMachinePortRangesResults, error)
- func (f *FirewallerAPI) SetRelationsStatus(args params.SetStatus) (params.ErrorResults, error)
- func (f *FirewallerAPI) SpaceInfos(args params.SpaceInfosParams) (params.SpaceInfos, error)
- func (f *FirewallerAPI) WatchEgressAddressesForRelations(relations params.Entities) (params.StringsWatchResults, error)
- func (f *FirewallerAPI) WatchIngressAddressesForRelations(relations params.Entities) (params.StringsWatchResults, error)
- func (f *FirewallerAPI) WatchModelFirewallRules() (params.NotifyWatchResult, error)
- func (f *FirewallerAPI) WatchOpenedPorts(args params.Entities) (params.StringsWatchResults, error)
- func (f *FirewallerAPI) WatchSubnets(args params.Entities) (params.StringsWatchResult, error)
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModelFirewallRulesWatcher ¶
NewModelFirewallRulesWatcher returns a worker that notifies when a change to something determining the model firewall rules takes place
NOTE: At this time, ssh-allow model config item is the only thing that needs to be watched
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type ControllerConfigAPI ¶
type ControllerConfigAPI interface { // ControllerConfig returns the controller's configuration. ControllerConfig() (params.ControllerConfigResult, error) // ControllerAPIInfoForModels returns the controller api connection details for the specified models. ControllerAPIInfoForModels(args params.Entities) (params.ControllerAPIInfoResults, error) }
ControllerConfigAPI provides the subset of common.ControllerConfigAPI required by the remote firewaller facade
type FirewallerAPI ¶
type FirewallerAPI struct { *common.LifeGetter *common.ModelWatcher *common.AgentEntityWatcher *common.UnitsWatcher *common.ModelMachinesWatcher *common.InstanceIdGetter ControllerConfigAPI cloudspec.CloudSpecer // contains filtered or unexported fields }
FirewallerAPI provides access to the Firewaller API facade.
func NewStateFirewallerAPI ¶
func NewStateFirewallerAPI( st State, resources facade.Resources, authorizer facade.Authorizer, cloudSpecAPI cloudspec.CloudSpecer, controllerConfigAPI ControllerConfigAPI, ) (*FirewallerAPI, error)
NewStateFirewallerAPI creates a new server-side FirewallerAPIV7 facade.
func (*FirewallerAPI) AreManuallyProvisioned ¶
func (f *FirewallerAPI) AreManuallyProvisioned(args params.Entities) (params.BoolResults, error)
AreManuallyProvisioned returns whether each given entity is manually provisioned or not. Only machine tags are accepted.
func (*FirewallerAPI) GetAssignedMachine ¶
func (f *FirewallerAPI) GetAssignedMachine(args params.Entities) (params.StringResults, error)
GetAssignedMachine returns the assigned machine tag (if any) for each given unit.
func (*FirewallerAPI) GetExposeInfo ¶
func (f *FirewallerAPI) GetExposeInfo(args params.Entities) (params.ExposeInfoResults, error)
GetExposeInfo returns the expose flag and per-endpoint expose settings for the specified applications.
func (*FirewallerAPI) MacaroonForRelations ¶
func (f *FirewallerAPI) MacaroonForRelations(args params.Entities) (params.MacaroonResults, error)
MacaroonForRelations returns the macaroon for the specified relations.
func (*FirewallerAPI) ModelFirewallRules ¶
func (f *FirewallerAPI) ModelFirewallRules() (params.IngressRulesResult, error)
ModelFirewallRules returns the firewall rules that this model is configured to open
func (*FirewallerAPI) OpenedMachinePortRanges ¶
func (f *FirewallerAPI) 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 (*FirewallerAPI) SetRelationsStatus ¶
func (f *FirewallerAPI) SetRelationsStatus(args params.SetStatus) (params.ErrorResults, error)
SetRelationsStatus sets the status for the specified relations.
func (*FirewallerAPI) SpaceInfos ¶
func (f *FirewallerAPI) SpaceInfos(args params.SpaceInfosParams) (params.SpaceInfos, error)
SpaceInfos returns a comprehensive representation of either all spaces or a filtered subset of the known spaces and their associated subnet details.
func (*FirewallerAPI) WatchEgressAddressesForRelations ¶
func (f *FirewallerAPI) 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 (*FirewallerAPI) WatchIngressAddressesForRelations ¶
func (f *FirewallerAPI) WatchIngressAddressesForRelations(relations params.Entities) (params.StringsWatchResults, error)
WatchIngressAddressesForRelations creates a watcher that returns the ingress networks that have been recorded against the specified relations.
func (*FirewallerAPI) WatchModelFirewallRules ¶
func (f *FirewallerAPI) WatchModelFirewallRules() (params.NotifyWatchResult, error)
WatchModelFirewallRules returns a NotifyWatcher that notifies of potential changes to a model's configured firewall rules
func (*FirewallerAPI) WatchOpenedPorts ¶
func (f *FirewallerAPI) WatchOpenedPorts(args params.Entities) (params.StringsWatchResults, error)
WatchOpenedPorts returns a new StringsWatcher for each given model tag.
func (*FirewallerAPI) WatchSubnets ¶
func (f *FirewallerAPI) 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 ControllerConfig() (controller.Config, error) IsController() bool ModelUUID() string GetMacaroon(entity names.Tag) (*macaroon.Macaroon, error) WatchOpenedPorts() state.StringsWatcher FindEntity(tag names.Tag) (state.Entity, 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.