access

package
v1.41.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SecurityGroupIDSelf special placeholder for self secgroup ID
	SecurityGroupIDSelf = "self"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Network

type Network struct {
	ID           string
	Name         string
	AdminStateUp bool

	Status string
}

Network is a simplified network resource

type NetworkingAccess

type NetworkingAccess interface {
	// Routers
	CreateRouter(desired *Router) (*Router, error)
	GetRouterByID(id string) (*Router, error)
	GetRouterByName(name string) ([]*Router, error)
	UpdateRouter(desired, current *Router) (modified bool, err error)
	LookupFloatingPoolSubnetIDs(networkID, floatingPoolSubnetNameRegex string) ([]string, error)
	AddRouterInterfaceAndWait(ctx context.Context, routerID, subnetID string) error
	GetRouterInterfacePortID(routerID, subnetID string) (portID *string, err error)
	RemoveRouterInterfaceAndWait(ctx context.Context, routerID, subnetID, portID string) error

	// Networks
	CreateNetwork(desired *Network) (*Network, error)
	GetNetworkByID(id string) (*Network, error)
	GetNetworkByName(name string) ([]*Network, error)
	UpdateNetwork(desired, current *Network) (modified bool, err error)

	// Subnets
	CreateSubnet(desired *subnets.Subnet) (*subnets.Subnet, error)
	GetSubnetByID(id string) (*subnets.Subnet, error)
	GetSubnetByName(networkID, name string) ([]*subnets.Subnet, error)
	UpdateSubnet(desired, current *subnets.Subnet) (modified bool, err error)

	// SecurityGroups
	CreateSecurityGroup(desired *groups.SecGroup) (*groups.SecGroup, error)
	GetSecurityGroupByID(id string) (*groups.SecGroup, error)
	GetSecurityGroupByName(name string) ([]*groups.SecGroup, error)
	UpdateSecurityGroupRules(group *groups.SecGroup, desiredRules []rules.SecGroupRule, allowDelete func(rule *rules.SecGroupRule) bool) (modified bool, err error)
}

NetworkingAccess provides methods for managing routers and networks

func NewNetworkingAccess

func NewNetworkingAccess(networking client.Networking, log logr.Logger) (NetworkingAccess, error)

NewNetworkingAccess creates a new access object

type Router

type Router struct {
	ID                string
	Name              string
	ExternalNetworkID string
	EnableSNAT        *bool
	ExternalSubnetIDs []string

	Status           string                    // only output
	ExternalFixedIPs []routers.ExternalFixedIP // only output
}

Router is a simplified router resource

Jump to

Keyboard shortcuts

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