logic

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

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

Go to latest
Published: Mar 27, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ReactionsYAML = `` /* 2501-byte string literal not displayed */

ReactionsYAML reaction map stored as yaml

Variables

This section is empty.

Functions

This section is empty.

Types

type FloatingIPIntent

type FloatingIPIntent struct {
	intent.BaseIntent
	*models.FloatingIP
	// contains filtered or unexported fields
}

FloatingIPIntent contains Intent Compiler state for FloatingIP.

func LoadFloatingIPIntent

func LoadFloatingIPIntent(loader intent.Loader, query intent.Query) *FloatingIPIntent

LoadFloatingIPIntent loads a floating IP intent from cache.

func (*FloatingIPIntent) GetObject

func (i *FloatingIPIntent) GetObject() asfmodels.Object

GetObject returns embedded resource object.

type LogicalRouterIntent

type LogicalRouterIntent struct {
	intent.BaseIntent
	*models.LogicalRouter
	// contains filtered or unexported fields
}

LogicalRouterIntent contains Intent Compiler state for LogicalRouter.

func LoadLogicalRouterIntent

func LoadLogicalRouterIntent(loader intent.Loader, query intent.Query) *LogicalRouterIntent

LoadLogicalRouterIntent loads a logical router intent from cache.

func NewLogicalRouterIntent

func NewLogicalRouterIntent(
	ctx context.Context,
	ReadService services.ReadService,
	request *services.CreateLogicalRouterRequest,
) *LogicalRouterIntent

NewLogicalRouterIntent creates LogicalRouterIntent from CreateLogicalRouterRequest

func (*LogicalRouterIntent) Evaluate

func (i *LogicalRouterIntent) Evaluate(
	ctx context.Context,
	evaluateCtx *intent.EvaluateContext,
) error

Evaluate updates references from default routing instances of virtual networks to the logical router's route target.

func (*LogicalRouterIntent) GetObject

func (i *LogicalRouterIntent) GetObject() asfmodels.Object

GetObject returns embedded resource object

type NetworkPolicyIntent

type NetworkPolicyIntent struct {
	intent.BaseIntent
	*models.NetworkPolicy
}

NetworkPolicyIntent intent

func (*NetworkPolicyIntent) GetObject

func (i *NetworkPolicyIntent) GetObject() asfmodels.Object

GetObject returns embedded resource object

type RoutingInstanceIntent

type RoutingInstanceIntent struct {
	intent.BaseIntent
	*models.RoutingInstance
}

RoutingInstanceIntent contains Intent Compiler state for RoutingInstance.

func LoadRoutingInstanceIntent

func LoadRoutingInstanceIntent(loader intent.Loader, query intent.Query) *RoutingInstanceIntent

LoadRoutingInstanceIntent loads a routing instance intent from cache.

func (*RoutingInstanceIntent) Evaluate

func (i *RoutingInstanceIntent) Evaluate(
	ctx context.Context, evaluateContext *intent.EvaluateContext,
) error

Evaluate may create default Route Target.

func (*RoutingInstanceIntent) GetObject

func (i *RoutingInstanceIntent) GetObject() asfmodels.Object

GetObject returns embedded resource object

type SecurityGroupIntent

type SecurityGroupIntent struct {
	intent.BaseIntent
	*models.SecurityGroup
	// contains filtered or unexported fields
}

SecurityGroupIntent contains Intent Compiler state for SecurityGroup

func LoadSecurityGroupIntent

func LoadSecurityGroupIntent(loader intent.Loader, query intent.Query) *SecurityGroupIntent

LoadSecurityGroupIntent loads a security group intent from cache.

func (*SecurityGroupIntent) DefaultACLs

func (i *SecurityGroupIntent) DefaultACLs(ec *intent.EvaluateContext) (
	ingressACL *models.AccessControlList, egressACL *models.AccessControlList)

DefaultACLs returns default ACLs corresponding to the security group's policy rules.

func (*SecurityGroupIntent) Evaluate

Evaluate Creates default AccessControlList's for the already created SecurityGroup.

func (*SecurityGroupIntent) GetObject

func (i *SecurityGroupIntent) GetObject() asfmodels.Object

GetObject returns embedded resource object

type Service

type Service struct {
	services.BaseService
	// WriteService is used to create/update/delete lower-level resources
	WriteService     services.WriteService
	IntPoolAllocator services.IntPoolAllocator
	ReadService      services.ReadService
	// contains filtered or unexported fields
}

Service implementing Intent Compiler's type-specific logic.

func NewService

func NewService(
	apiClient services.WriteService,
	readService services.ReadService,
	allocator services.IntPoolAllocator,
	cache *intent.Cache,
	dependencyProcessor *dependencies.DependencyProcessor,
) *Service

NewService creates a Service

func (*Service) CreateFloatingIP

CreateFloatingIP stores newly created floating ip resource in cache

func (*Service) CreateLogicalRouter

CreateLogicalRouter evaluates logical router dependencies.

func (*Service) CreateRoutingInstance

CreateRoutingInstance evaluates RoutingInstance dependencies.

func (*Service) CreateSecurityGroup

CreateSecurityGroup evaluates SecurityGroup dependencies.

func (*Service) CreateVirtualMachineInterface

CreateVirtualMachineInterface evaluates VirtualMachineInterface dependencies.

func (*Service) CreateVirtualNetwork

CreateVirtualNetwork evaluates VirtualNetwork dependencies.

func (*Service) DeleteFloatingIP

DeleteFloatingIP deletes FloatingIP from cache.

func (*Service) DeleteSecurityGroup

DeleteSecurityGroup evaluates SecurityGroup dependencies.

func (*Service) EvaluateDependencies

func (s *Service) EvaluateDependencies(
	ctx context.Context,
	evaluateCtx *intent.EvaluateContext,
	i intent.Intent,
) error

EvaluateDependencies evaluates the dependencies upon object change

func (*Service) UpdateFloatingIP

UpdateFloatingIP evaluates FloatingIP dependencies.

func (*Service) UpdateLogicalRouter

UpdateLogicalRouter evaluates logical router dependencies.

func (*Service) UpdateRoutingInstance

UpdateRoutingInstance evaluates routing instance dependencies.

func (*Service) UpdateSecurityGroup

UpdateSecurityGroup evaluates SecurityGroup dependencies.

func (*Service) UpdateVirtualMachineInterface

UpdateVirtualMachineInterface evaluates UpdateMachineInterface dependencies.

type VirtualMachineInterfaceIntent

type VirtualMachineInterfaceIntent struct {
	intent.BaseIntent
	*models.VirtualMachineInterface
}

VirtualMachineInterfaceIntent intent

func LoadVirtualMachineInterfaceIntent

func LoadVirtualMachineInterfaceIntent(loader intent.Loader, query intent.Query) *VirtualMachineInterfaceIntent

LoadVirtualMachineInterfaceIntent loads a virtual machine interface intent from cache.

func NewVirtualMachineInterfaceIntent

NewVirtualMachineInterfaceIntent returns a new virtual machine interface intent.

func (*VirtualMachineInterfaceIntent) GetObject

GetObject returns embedded resource object

type VirtualNetworkIntent

type VirtualNetworkIntent struct {
	intent.BaseIntent
	*models.VirtualNetwork
}

VirtualNetworkIntent intent

func LoadVirtualNetworkIntent

func LoadVirtualNetworkIntent(loader intent.Loader, query intent.Query) *VirtualNetworkIntent

LoadVirtualNetworkIntent loads a virtual network intent from cache.

func NewVirtualNetworkIntent

NewVirtualNetworkIntent returns a new virtual network intent.

func (*VirtualNetworkIntent) GetObject

func (i *VirtualNetworkIntent) GetObject() asfmodels.Object

GetObject returns embedded resource object

func (*VirtualNetworkIntent) GetPrimaryRoutingInstanceIntent

func (i *VirtualNetworkIntent) GetPrimaryRoutingInstanceIntent(
	_ context.Context,
	ec *intent.EvaluateContext,
) *RoutingInstanceIntent

GetPrimaryRoutingInstanceIntent returns the virtual network's default routing instance intent.

Jump to

Keyboard shortcuts

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