ibmvpc

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Copyright 2023- IBM Inc. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoadBalancerRule added in v0.5.1

func NewLoadBalancerRule(lb *LoadBalancer, deny bool, src, dst vpcmodel.Node) vpcmodel.LoadBalancerRule

Types

type FloatingIP

type FloatingIP struct {
	vpcmodel.VPCResource
	// contains filtered or unexported fields
}

func (*FloatingIP) AllowedConnectivity

func (fip *FloatingIP) AllowedConnectivity(src, dst vpcmodel.VPCResourceIntf) (*netset.TransportSet, error)

func (*FloatingIP) Destinations

func (fip *FloatingIP) Destinations() []vpcmodel.Node

func (*FloatingIP) ExternalIP added in v0.4.0

func (fip *FloatingIP) ExternalIP() string

func (*FloatingIP) GenerateDrawioTreeNode added in v0.2.0

func (fip *FloatingIP) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface

func (*FloatingIP) IsMultipleVPCs added in v0.6.1

func (fip *FloatingIP) IsMultipleVPCs() bool

func (*FloatingIP) RouterDefined added in v0.4.0

func (fip *FloatingIP) RouterDefined(src, dst vpcmodel.Node) bool

func (*FloatingIP) RulesInConnectivity added in v0.5.0

func (fip *FloatingIP) RulesInConnectivity(src, dst vpcmodel.Node) []vpcmodel.RulesInTable

func (*FloatingIP) SetExternalDestinations added in v0.6.0

func (fip *FloatingIP) SetExternalDestinations(destinations []vpcmodel.Node)

func (*FloatingIP) ShowOnSubnetMode added in v0.3.0

func (fip *FloatingIP) ShowOnSubnetMode() bool

func (*FloatingIP) Sources added in v0.3.0

func (fip *FloatingIP) Sources() []vpcmodel.Node

func (*FloatingIP) SourcesSubnets added in v0.6.0

func (fip *FloatingIP) SourcesSubnets() []vpcmodel.Subnet

func (*FloatingIP) StringOfRouterRules added in v0.5.1

func (fip *FloatingIP) StringOfRouterRules(listRulesInFilter []vpcmodel.RulesInTable,
	verbose bool) (string, error)

type GlobalRTAnalyzer added in v0.5.1

type GlobalRTAnalyzer struct {
	// contains filtered or unexported fields
}

GlobalRTAnalyzer analyzes routing in a cross-vpc config

func NewGlobalRTAnalyzer added in v0.5.1

func NewGlobalRTAnalyzer(configs *vpcmodel.MultipleVPCConfigs) *GlobalRTAnalyzer

func (*GlobalRTAnalyzer) GetRoutingPath added in v0.5.1

func (ga *GlobalRTAnalyzer) GetRoutingPath(src vpcmodel.InternalNodeIntf, dest *netset.IPBlock) (vpcmodel.Path, error)

type IBMNACLAnalyzer added in v0.6.0

type IBMNACLAnalyzer struct {
	// contains filtered or unexported fields
}

IBMNACLAnalyzer implements commonvpc.SpecificNACLAnalyzer

func NewIBMNACLAnalyzer added in v0.6.0

func NewIBMNACLAnalyzer(nacl *vpc1.NetworkACL) *IBMNACLAnalyzer

func (*IBMNACLAnalyzer) GetNACLRule added in v0.6.0

func (na *IBMNACLAnalyzer) GetNACLRule(index int) (ruleStr string, ruleRes *commonvpc.NACLRule, isIngress bool, err error)

GetNACLRule gets index of the rule and returns the rule results line and obj

func (*IBMNACLAnalyzer) GetNACLRules added in v0.6.0

func (na *IBMNACLAnalyzer) GetNACLRules() (ingressRules, egressRules []*commonvpc.NACLRule, err error)

GetNACLRules returns ingress and egress rule objects

func (*IBMNACLAnalyzer) GetNumberOfRules added in v0.6.0

func (na *IBMNACLAnalyzer) GetNumberOfRules() int

return number of ingress and egress rules

func (*IBMNACLAnalyzer) Name added in v0.6.0

func (na *IBMNACLAnalyzer) Name() *string

func (*IBMNACLAnalyzer) ReferencedIPblocks added in v0.6.0

func (na *IBMNACLAnalyzer) ReferencedIPblocks() []*netset.IPBlock

func (*IBMNACLAnalyzer) SetReferencedIPblocks added in v0.6.0

func (na *IBMNACLAnalyzer) SetReferencedIPblocks(referencedIPblocks []*netset.IPBlock)

SetReferencedIPblocks updates referenced ip blocks

type IBMSGAnalyzer added in v0.6.0

type IBMSGAnalyzer struct {
	SgResource *vpc1.SecurityGroup
	// contains filtered or unexported fields
}

IBMSGAnalyzer implements commonvpc.SpecificSGAnalyzer

func NewIBMSGAnalyzer added in v0.6.0

func NewIBMSGAnalyzer(sg *vpc1.SecurityGroup) *IBMSGAnalyzer

func (*IBMSGAnalyzer) GetNumberOfRules added in v0.6.0

func (sga *IBMSGAnalyzer) GetNumberOfRules() int

GetNumberOfRules returns number of egress and ingress rules of the securityGroup obj in IBMSGAnalyzer

func (*IBMSGAnalyzer) GetSGRule added in v0.6.0

func (sga *IBMSGAnalyzer) GetSGRule(index int) (
	ruleStr string, ruleRes *commonvpc.SGRule, isIngress bool, err error)

GetSGRule gets index of the rule and returns the rule results line and obj

func (*IBMSGAnalyzer) GetSGRules added in v0.6.0

func (sga *IBMSGAnalyzer) GetSGRules() (ingressRules, egressRules []*commonvpc.SGRule, err error)

GetSGRules returns ingress and egress rule objects

func (*IBMSGAnalyzer) Name added in v0.6.0

func (sga *IBMSGAnalyzer) Name() *string

func (*IBMSGAnalyzer) ReferencedIPblocks added in v0.6.0

func (sga *IBMSGAnalyzer) ReferencedIPblocks() []*netset.IPBlock

ReferencedIPblocks returns referencedIPblocks filed

func (*IBMSGAnalyzer) SetSGmap added in v0.6.0

func (sga *IBMSGAnalyzer) SetSGmap(sgMap map[string]*commonvpc.SecurityGroup)

SetSGmap gets sgMap (a map from sg name to SecurityGroup obj) and save it in IBMSGAnalyzer

type IBMresourcesContainer added in v0.6.0

type IBMresourcesContainer struct {
	datamodel.ResourcesContainerModel
}

IBMresourcesContainer implements commonvpc.ResourceContainer

func CopyIBMresourcesContainer added in v0.7.0

func CopyIBMresourcesContainer(rc common.ResourcesContainerInf) (*IBMresourcesContainer, error)

func NewIBMresourcesContainer added in v0.6.0

func NewIBMresourcesContainer() *IBMresourcesContainer

NewIBMresourcesContainer is used to return empty IBMresourcesContainer and also initialize vpcmodel.NetworkAddressLists with ibm Public internet and service network if you do not use this function, you need to initialize vpcmodel.NetworkAddressLists

func (*IBMresourcesContainer) ParseResourcesFromFile added in v0.6.0

func (rc *IBMresourcesContainer) ParseResourcesFromFile(fileName string) error

parseResourcesFromFile returns IBMresourcesContainer object, containing the configured resources structs from the input JSON file

func (*IBMresourcesContainer) VPCConfigsFromResources added in v0.6.0

func (rc *IBMresourcesContainer) VPCConfigsFromResources(resourceGroup string, vpcIDs, regions []string) (
	*vpcmodel.MultipleVPCConfigs, error)

VPCConfigsFromResources returns a map from VPC UID (string) to its corresponding VPCConfig object, containing the parsed resources in the relevant model objects

func (*IBMresourcesContainer) VpcConfigsFromFiles added in v0.6.0

func (rc *IBMresourcesContainer) VpcConfigsFromFiles(fileNames []string, resourceGroup string, vpcIDs, regions []string) (
	*vpcmodel.MultipleVPCConfigs, error)

VpcConfigsFromFiles gets file names and returns vpc configs from it vpcID, resourceGroup and regions are used to filter the vpc configs

type IKSNode

type IKSNode struct {
	vpcmodel.VPCResource
	vpcmodel.InternalNode
}

IKSNode implements vpcmodel.Node interface

func (*IKSNode) GenerateDrawioTreeNode added in v0.2.0

func (n *IKSNode) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface

func (*IKSNode) NameForAnalyzerOut added in v0.7.0

func (n *IKSNode) NameForAnalyzerOut(c *vpcmodel.VPCConfig) string

func (*IKSNode) ShowOnSubnetMode added in v0.3.0

func (n *IKSNode) ShowOnSubnetMode() bool

func (*IKSNode) VsiName

func (n *IKSNode) VsiName() string

type LoadBalancer added in v0.4.0

type LoadBalancer struct {
	vpcmodel.VPCResource
	// contains filtered or unexported fields
}

func (*LoadBalancer) AbstractionInfo added in v0.5.0

func (lb *LoadBalancer) AbstractionInfo() *vpcmodel.AbstractionInfo

func (*LoadBalancer) AddressRange added in v0.4.0

func (lb *LoadBalancer) AddressRange() *netset.IPBlock

func (*LoadBalancer) GenerateDrawioTreeNode added in v0.4.0

func (lb *LoadBalancer) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface

func (*LoadBalancer) GetLoadBalancerRule added in v0.5.1

func (lb *LoadBalancer) GetLoadBalancerRule(src, dst vpcmodel.Node) vpcmodel.LoadBalancerRule

func (*LoadBalancer) NameForAnalyzerOut added in v0.7.0

func (lb *LoadBalancer) NameForAnalyzerOut(c *vpcmodel.VPCConfig) string

func (*LoadBalancer) Nodes added in v0.4.0

func (lb *LoadBalancer) Nodes() []vpcmodel.Node

func (*LoadBalancer) SetAbstractionInfo added in v0.5.0

func (lb *LoadBalancer) SetAbstractionInfo(abstractionInfo *vpcmodel.AbstractionInfo)

func (*LoadBalancer) ShowOnSubnetMode added in v0.4.0

func (lb *LoadBalancer) ShowOnSubnetMode() bool

func (*LoadBalancer) Zone added in v0.4.0

func (lb *LoadBalancer) Zone() (*commonvpc.Zone, error)

lb is per vpc and not per zone...

type LoadBalancerListener added in v0.4.0

type LoadBalancerListener []LoadBalancerPool

type LoadBalancerPool added in v0.4.0

type LoadBalancerPool []vpcmodel.Node

LoadBalancerPool ////////////////////////////////////////// Load Balancer the nodes are the private IPs the listeners hold the pools that holds the backend servers (aka pool members)

type LoadBalancerRule added in v0.5.1

type LoadBalancerRule struct {
	// contains filtered or unexported fields
}

//////////////////////////////////////////////////////////////////////////////// LoadBalancerRule is a rule applied to all private IPs of a given load balancer: these private IPs can only init connection to pool members of the load balancer.

func (*LoadBalancerRule) Deny added in v0.5.1

func (lbr *LoadBalancerRule) Deny(isIngress bool) bool

func (*LoadBalancerRule) IsIngress added in v0.6.0

func (lbr *LoadBalancerRule) IsIngress() bool

IsIngress load balancer potentially blocks egress connection

func (*LoadBalancerRule) String added in v0.5.1

func (lbr *LoadBalancerRule) String(detail bool) string

todo: use detail to get a concise printing for !detail

type PrivateIP added in v0.4.0

type PrivateIP struct {
	vpcmodel.VPCResource
	vpcmodel.InternalNode
	// contains filtered or unexported fields
}

PrivateIP implements vpcmodel.Node interface

func (*PrivateIP) AbstractedToNodeSet added in v0.5.1

func (pip *PrivateIP) AbstractedToNodeSet() vpcmodel.NodeSet

AbstractedToNodeSet returns the pip load balancer if it was abstracted

func (*PrivateIP) GenerateDrawioTreeNode added in v0.4.0

func (pip *PrivateIP) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface

func (*PrivateIP) NameForAnalyzerOut added in v0.7.0

func (pip *PrivateIP) NameForAnalyzerOut(c *vpcmodel.VPCConfig) string

func (*PrivateIP) RepresentedByAddress added in v0.5.1

func (pip *PrivateIP) RepresentedByAddress() bool

func (*PrivateIP) ShowOnSubnetMode added in v0.4.0

func (pip *PrivateIP) ShowOnSubnetMode() bool

type PublicGateway

type PublicGateway struct {
	vpcmodel.VPCResource
	// contains filtered or unexported fields
}

func (*PublicGateway) AllowedConnectivity

func (pgw *PublicGateway) AllowedConnectivity(src, dst vpcmodel.VPCResourceIntf) (*netset.TransportSet, error)

func (*PublicGateway) Destinations

func (pgw *PublicGateway) Destinations() []vpcmodel.Node

func (*PublicGateway) ExternalIP added in v0.4.0

func (pgw *PublicGateway) ExternalIP() string

func (*PublicGateway) GenerateDrawioTreeNode added in v0.2.0

func (pgw *PublicGateway) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface

func (*PublicGateway) IsMultipleVPCs added in v0.6.1

func (pgw *PublicGateway) IsMultipleVPCs() bool

func (*PublicGateway) RouterDefined added in v0.4.0

func (pgw *PublicGateway) RouterDefined(src, dst vpcmodel.Node) bool

func (*PublicGateway) RulesInConnectivity added in v0.5.0

func (pgw *PublicGateway) RulesInConnectivity(src, dst vpcmodel.Node) []vpcmodel.RulesInTable

func (*PublicGateway) SetExternalDestinations added in v0.6.0

func (pgw *PublicGateway) SetExternalDestinations(destinations []vpcmodel.Node)

func (*PublicGateway) ShowOnSubnetMode added in v0.3.0

func (pgw *PublicGateway) ShowOnSubnetMode() bool

func (*PublicGateway) Sources added in v0.3.0

func (pgw *PublicGateway) Sources() []vpcmodel.Node

func (*PublicGateway) SourcesSubnets added in v0.6.0

func (pgw *PublicGateway) SourcesSubnets() []vpcmodel.Subnet

func (*PublicGateway) StringOfRouterRules added in v0.5.1

func (pgw *PublicGateway) StringOfRouterRules(listRulesInFilter []vpcmodel.RulesInTable,
	verbose bool) (string, error)

func (*PublicGateway) Zone

func (pgw *PublicGateway) Zone() (*commonvpc.Zone, error)

type RTAnalyzer added in v0.4.0

type RTAnalyzer struct {
	// contains filtered or unexported fields
}

RTAnalyzer analyzes routing in a certain vpc config

type ReservedIP added in v0.2.0

type ReservedIP struct {
	vpcmodel.VPCResource
	vpcmodel.InternalNode
	// contains filtered or unexported fields
}

ReservedIP implements vpcmodel.Node interface

func (*ReservedIP) GenerateDrawioTreeNode added in v0.2.0

func (r *ReservedIP) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface

func (*ReservedIP) NameForAnalyzerOut added in v0.7.0

func (r *ReservedIP) NameForAnalyzerOut(c *vpcmodel.VPCConfig) string

func (*ReservedIP) ShowOnSubnetMode added in v0.3.0

func (r *ReservedIP) ShowOnSubnetMode() bool

func (*ReservedIP) SynthesisKind added in v0.6.0

func (r *ReservedIP) SynthesisKind() spec.ResourceType

func (*ReservedIP) SynthesisResourceName added in v0.6.0

func (r *ReservedIP) SynthesisResourceName() string

used for synthesis output

type ServiceNetworkGateway added in v0.7.0

type ServiceNetworkGateway struct {
	vpcmodel.VPCResource
	// contains filtered or unexported fields
}

ServiceNetworkGateway is a virtual gateway we add it for convenience - it is not a resource that appears in the input configuration file.

func (*ServiceNetworkGateway) AllowedConnectivity added in v0.7.0

func (sgw *ServiceNetworkGateway) AllowedConnectivity(src, dst vpcmodel.VPCResourceIntf) (*netset.TransportSet, error)

func (*ServiceNetworkGateway) Cidr added in v0.7.0

func (sgw *ServiceNetworkGateway) Cidr() *netset.IPBlock

func (*ServiceNetworkGateway) Destinations added in v0.7.0

func (sgw *ServiceNetworkGateway) Destinations() []vpcmodel.Node

func (*ServiceNetworkGateway) ExternalIP added in v0.7.0

func (sgw *ServiceNetworkGateway) ExternalIP() string

func (*ServiceNetworkGateway) GenerateDrawioTreeNode added in v0.7.0

func (sgw *ServiceNetworkGateway) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface

func (*ServiceNetworkGateway) IsMultipleVPCs added in v0.7.0

func (sgw *ServiceNetworkGateway) IsMultipleVPCs() bool

func (*ServiceNetworkGateway) RouterDefined added in v0.7.0

func (sgw *ServiceNetworkGateway) RouterDefined(src, dst vpcmodel.Node) bool

func (*ServiceNetworkGateway) RulesInConnectivity added in v0.7.0

func (sgw *ServiceNetworkGateway) RulesInConnectivity(src, dst vpcmodel.Node) []vpcmodel.RulesInTable

func (*ServiceNetworkGateway) SetExternalDestinations added in v0.7.0

func (sgw *ServiceNetworkGateway) SetExternalDestinations(destinations []vpcmodel.Node)

func (*ServiceNetworkGateway) ShowOnSubnetMode added in v0.7.0

func (sgw *ServiceNetworkGateway) ShowOnSubnetMode() bool

func (*ServiceNetworkGateway) Sources added in v0.7.0

func (sgw *ServiceNetworkGateway) Sources() []vpcmodel.Node

func (*ServiceNetworkGateway) SourcesSubnets added in v0.7.0

func (sgw *ServiceNetworkGateway) SourcesSubnets() []vpcmodel.Subnet

func (*ServiceNetworkGateway) StringOfRouterRules added in v0.7.0

func (sgw *ServiceNetworkGateway) StringOfRouterRules(listRulesInFilter []vpcmodel.RulesInTable,
	verbose bool) (string, error)

type TransitGateway added in v0.3.0

type TransitGateway struct {
	vpcmodel.VPCResource
	// contains filtered or unexported fields
}

func (*TransitGateway) AllowedConnectivity added in v0.3.0

func (tgw *TransitGateway) AllowedConnectivity(src, dst vpcmodel.VPCResourceIntf) (*netset.TransportSet, error)

func (*TransitGateway) Destinations added in v0.3.0

func (tgw *TransitGateway) Destinations() (res []vpcmodel.Node)

func (*TransitGateway) ExternalIP added in v0.4.0

func (tgw *TransitGateway) ExternalIP() string

func (*TransitGateway) GenerateDrawioTreeNode added in v0.3.0

func (tgw *TransitGateway) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface

func (*TransitGateway) IsMultipleVPCs added in v0.6.1

func (tgw *TransitGateway) IsMultipleVPCs() bool

func (*TransitGateway) Region added in v0.4.0

func (tgw *TransitGateway) Region() *commonvpc.Region

func (*TransitGateway) RouterDefined added in v0.4.0

func (tgw *TransitGateway) RouterDefined(src, dst vpcmodel.Node) bool

func (*TransitGateway) RulesInConnectivity added in v0.5.0

func (tgw *TransitGateway) RulesInConnectivity(src, dst vpcmodel.Node) []vpcmodel.RulesInTable

RulesInConnectivity returns the prefix filters relevant for <src, dst>. src/dst could be a cidr, so for a single <src,dst> query there could be more than one relevant prefix filter (in a single transit connection) However, each src/dst maps to a set of endpoints (Nodes) and the query is for the Cartesian product of these. Specifically, this functionality is between <src, dst> where each is a single endpoint (single IP addr) and prefix filter rules do not include protocol or ports (unlike nacls and sgs) Thus, for each such <src, dst> there is a single prefix filter

func (*TransitGateway) SetExternalDestinations added in v0.6.0

func (tgw *TransitGateway) SetExternalDestinations(destinations []vpcmodel.Node)

func (*TransitGateway) ShowOnSubnetMode added in v0.3.0

func (tgw *TransitGateway) ShowOnSubnetMode() bool

func (*TransitGateway) Sources added in v0.3.0

func (tgw *TransitGateway) Sources() (res []vpcmodel.Node)

func (*TransitGateway) SourcesSubnets added in v0.6.0

func (tgw *TransitGateway) SourcesSubnets() []vpcmodel.Subnet

func (*TransitGateway) StringOfRouterRules added in v0.5.1

func (tgw *TransitGateway) StringOfRouterRules(listRulesInTransitConns []vpcmodel.RulesInTable, verbose bool) (string, error)

type Vpe added in v0.2.0

type Vpe struct {
	vpcmodel.VPCResource
	// contains filtered or unexported fields
}

vpe can be in multiple zones - depending on the zones of its network interfaces..

func (*Vpe) AddressRange added in v0.2.0

func (v *Vpe) AddressRange() *netset.IPBlock

func (*Vpe) GenerateDrawioTreeNode added in v0.2.0

func (v *Vpe) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface

func (*Vpe) Nodes added in v0.2.0

func (v *Vpe) Nodes() []vpcmodel.Node

func (*Vpe) ShowOnSubnetMode added in v0.3.0

func (v *Vpe) ShowOnSubnetMode() bool

func (*Vpe) Zone added in v0.2.0

func (v *Vpe) Zone() (*commonvpc.Zone, error)

vpe is per vpc and not per zone...

Jump to

Keyboard shortcuts

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