Documentation ¶
Index ¶
- Constants
- func AnalyzeNACLRulesPerDisjointTargets(rules []*NACLRule, subnet *ipblock.IPBlock, isIngress bool) map[string]*ConnectivityResult
- func NewEmptyVPCConfig() *vpcmodel.VPCConfig
- func ParseResourcesFromFile(fileName string) (*datamodel.ResourcesContainerModel, error)
- func VPCConfigsFromResources(rc *datamodel.ResourcesContainerModel, vpcID, resourceGroup string, ...) (*vpcmodel.MultipleVPCConfigs, error)
- type AnalysisResultPerSubnet
- type ConnectivityResult
- type ConnectivityResultMap
- type FloatingIP
- func (fip *FloatingIP) AllowedConnectivity(src, dst vpcmodel.VPCResourceIntf) (*connection.Set, error)
- func (fip *FloatingIP) AppliedFiltersKinds() map[string]bool
- func (fip *FloatingIP) Destinations() []vpcmodel.Node
- func (fip *FloatingIP) ExternalIP() string
- func (fip *FloatingIP) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
- func (fip *FloatingIP) RouterDefined(src, dst vpcmodel.Node) bool
- func (fip *FloatingIP) RulesInConnectivity(src, dst vpcmodel.Node) []vpcmodel.RulesInTable
- func (fip *FloatingIP) ShowOnSubnetMode() bool
- func (fip *FloatingIP) Sources() []vpcmodel.Node
- func (fip *FloatingIP) StringDetailsOfRules(listRulesInFilter []vpcmodel.RulesInTable, verbose bool) (string, error)
- type IKSNode
- type LoadBalancer
- func (lb *LoadBalancer) AbstractionInfo() *vpcmodel.AbstractionInfo
- func (lb *LoadBalancer) AddressRange() *ipblock.IPBlock
- func (lb *LoadBalancer) DenyConnectivity(src, dst vpcmodel.Node) bool
- func (lb *LoadBalancer) ExtendedName(c *vpcmodel.VPCConfig) string
- func (lb *LoadBalancer) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
- func (lb *LoadBalancer) Name() string
- func (lb *LoadBalancer) Nodes() []vpcmodel.Node
- func (lb *LoadBalancer) SetAbstractionInfo(abstractionInfo *vpcmodel.AbstractionInfo)
- func (lb *LoadBalancer) ShowOnSubnetMode() bool
- func (lb *LoadBalancer) Zone() (*Zone, error)
- type LoadBalancerListener
- type LoadBalancerPool
- type NACL
- type NACLAnalyzer
- func (na *NACLAnalyzer) AllowedConnectivity(subnet *Subnet, nodeInSubnet, targetNode vpcmodel.Node, isIngress bool) (*connection.Set, error)
- func (na *NACLAnalyzer) AnalyzeNACL(subnet *ipblock.IPBlock) (ingressResConnectivity, egressResConnectivity map[string]*ConnectivityResult)
- func (na *NACLAnalyzer) AnalyzeNACLRules(rules []*NACLRule, subnet *ipblock.IPBlock, isIngress bool, ...) (string, *ConnectivityResult)
- func (na *NACLAnalyzer) GeneralConnectivityPerSubnet(subnet *Subnet) (strResult string, ...)
- func (na *NACLAnalyzer) StringRules(rules []int) string
- type NACLRule
- type NaclLayer
- func (nl *NaclLayer) AllowedConnectivity(src, dst vpcmodel.Node, isIngress bool) (*connection.Set, error)
- func (nl *NaclLayer) ConnectivityMap() (map[string]*vpcmodel.IPbasedConnectivityResult, error)
- func (nl *NaclLayer) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
- func (nl *NaclLayer) GetConnectivityOutputPerEachElemSeparately() string
- func (nl *NaclLayer) ListFilterWithAction(listRulesInFilter []vpcmodel.RulesInTable) (filters map[string]bool)
- func (nl *NaclLayer) Name() string
- func (nl *NaclLayer) ReferencedIPblocks() []*ipblock.IPBlock
- func (nl *NaclLayer) RulesInConnectivity(src, dst vpcmodel.Node, conn *connection.Set, isIngress bool) (allowRes []vpcmodel.RulesInTable, denyRes []vpcmodel.RulesInTable, err error)
- func (nl *NaclLayer) ShowOnSubnetMode() bool
- func (nl *NaclLayer) StringDetailsOfRules(listRulesInFilter []vpcmodel.RulesInTable) string
- type NetworkInterface
- func (ni *NetworkInterface) ExtendedName(c *vpcmodel.VPCConfig) string
- func (ni *NetworkInterface) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
- func (ni *NetworkInterface) Name() string
- func (ni *NetworkInterface) ShowOnSubnetMode() bool
- func (ni *NetworkInterface) VsiName() string
- type PrivateIP
- type PublicGateway
- func (pgw *PublicGateway) AllowedConnectivity(src, dst vpcmodel.VPCResourceIntf) (*connection.Set, error)
- func (pgw *PublicGateway) AppliedFiltersKinds() map[string]bool
- func (pgw *PublicGateway) Destinations() []vpcmodel.Node
- func (pgw *PublicGateway) ExternalIP() string
- func (pgw *PublicGateway) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
- func (pgw *PublicGateway) RouterDefined(src, dst vpcmodel.Node) bool
- func (pgw *PublicGateway) RulesInConnectivity(src, dst vpcmodel.Node) []vpcmodel.RulesInTable
- func (pgw *PublicGateway) ShowOnSubnetMode() bool
- func (pgw *PublicGateway) Sources() []vpcmodel.Node
- func (pgw *PublicGateway) StringDetailsOfRules(listRulesInFilter []vpcmodel.RulesInTable, verbose bool) (string, error)
- func (pgw *PublicGateway) Zone() (*Zone, error)
- type RTAnalyzer
- type Region
- type ReservedIP
- type SGAnalyzer
- type SGRule
- type SecurityGroup
- type SecurityGroupLayer
- func (sgl *SecurityGroupLayer) AllowedConnectivity(src, dst vpcmodel.Node, isIngress bool) (*connection.Set, error)
- func (sgl *SecurityGroupLayer) ConnectivityMap() (map[string]*vpcmodel.IPbasedConnectivityResult, error)
- func (sgl *SecurityGroupLayer) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
- func (sgl *SecurityGroupLayer) GetConnectivityOutputPerEachElemSeparately() string
- func (sgl *SecurityGroupLayer) ListFilterWithAction(listRulesInFilter []vpcmodel.RulesInTable) (filters map[string]bool)
- func (sgl *SecurityGroupLayer) Name() string
- func (sgl *SecurityGroupLayer) ReferencedIPblocks() []*ipblock.IPBlock
- func (sgl *SecurityGroupLayer) RulesInConnectivity(src, dst vpcmodel.Node, conn *connection.Set, isIngress bool) (allowRes []vpcmodel.RulesInTable, denyRes []vpcmodel.RulesInTable, err error)
- func (sgl *SecurityGroupLayer) ShowOnSubnetMode() bool
- func (sgl *SecurityGroupLayer) StringDetailsOfRules(listRulesInFilter []vpcmodel.RulesInTable) string
- type Subnet
- type TransitGateway
- func (tgw *TransitGateway) AllowedConnectivity(src, dst vpcmodel.VPCResourceIntf) (*connection.Set, error)
- func (tgw *TransitGateway) AppliedFiltersKinds() map[string]bool
- func (tgw *TransitGateway) Destinations() (res []vpcmodel.Node)
- func (tgw *TransitGateway) ExternalIP() string
- func (tgw *TransitGateway) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
- func (tgw *TransitGateway) Region() *Region
- func (tgw *TransitGateway) RouterDefined(src, dst vpcmodel.Node) bool
- func (tgw *TransitGateway) RulesInConnectivity(src, dst vpcmodel.Node) []vpcmodel.RulesInTable
- func (tgw *TransitGateway) ShowOnSubnetMode() bool
- func (tgw *TransitGateway) Sources() (res []vpcmodel.Node)
- func (tgw *TransitGateway) StringDetailsOfRules(listRulesInTransitConns []vpcmodel.RulesInTable, verbose bool) (string, error)
- type VPC
- type Vpe
- type Vsi
- type Zone
Constants ¶
const ( ALLOW string = "allow" DENY string = "deny" )
const ( ResourceTypeVSI = "VSI" ResourceTypeNetworkInterface = "NetworkInterface" ResourceTypeSubnet = "Subnet" ResourceTypePublicGateway = "PublicGateway" ResourceTypeFloatingIP = "FloatingIP" ResourceTypeVPC = "VPC" ResourceTypeSG = "SG" ResourceTypeNACL = "NACL" ResourceTypeIKSNode = "IKSNodeNetworkInterface" ResourceTypeVPE = "VPE" ResourceTypeTGW = "TGW" ResourceTypeReservedIP = "ReservedIP" ResourceTypeLoadBalancer = "LoadBalancer" ResourceTypePrivateIP = "PrivateIP" )
Resource types const strings, used in the generated resources of this pkg
Variables ¶
This section is empty.
Functions ¶
func AnalyzeNACLRulesPerDisjointTargets ¶ added in v0.3.0
func AnalyzeNACLRulesPerDisjointTargets( rules []*NACLRule, subnet *ipblock.IPBlock, isIngress bool) map[string]*ConnectivityResult
AnalyzeNACLRulesPerDisjointTargets get connectivity result for each disjoint target in the subnet
func NewEmptyVPCConfig ¶ added in v0.2.0
func ParseResourcesFromFile ¶ added in v0.2.0
func ParseResourcesFromFile(fileName string) (*datamodel.ResourcesContainerModel, error)
ParseResourcesFromFile returns datamodel.ResourcesContainerModel object, containing the configured resources structs from the input JSON file
func VPCConfigsFromResources ¶ added in v0.2.0
func VPCConfigsFromResources(rc *datamodel.ResourcesContainerModel, vpcID, resourceGroup string, regions []string, debug bool) ( *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
Types ¶
type AnalysisResultPerSubnet ¶
type AnalysisResultPerSubnet struct {
// contains filtered or unexported fields
}
func NewAnalysisResultPerSubnet ¶
func NewAnalysisResultPerSubnet(subnet string, ingressRes, egressRes map[string]*ConnectivityResult) (res *AnalysisResultPerSubnet)
type ConnectivityResult ¶
type ConnectivityResult struct {
// contains filtered or unexported fields
}
ConnectivityResult is built on disjoint ip-blocks for targets of all relevant sg/nacl results ConnectivityResult is per VSI network interface: contains allowed connectivity (with connection attributes) per target
func AnalyzeSGRules ¶
func AnalyzeSGRules(rules []*SGRule, isIngress bool) *ConnectivityResult
func (*ConnectivityResult) Equal ¶ added in v0.5.0
func (cr *ConnectivityResult) Equal(other *ConnectivityResult) bool
type ConnectivityResultMap ¶ added in v0.5.0
type ConnectivityResultMap map[*ipblock.IPBlock]*ConnectivityResult
ConnectivityResultMap is a map from IPBlock to ConnectivityResult, used to map disjointLocals IPBlocks to ConnectivityResult
func (ConnectivityResultMap) Equal ¶ added in v0.5.0
func (cr ConnectivityResultMap) Equal(other ConnectivityResultMap) bool
type FloatingIP ¶
type FloatingIP struct { vpcmodel.VPCResource // contains filtered or unexported fields }
func (*FloatingIP) AllowedConnectivity ¶
func (fip *FloatingIP) AllowedConnectivity(src, dst vpcmodel.VPCResourceIntf) (*connection.Set, error)
func (*FloatingIP) AppliedFiltersKinds ¶
func (fip *FloatingIP) AppliedFiltersKinds() map[string]bool
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) 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) 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) StringDetailsOfRules ¶ added in v0.5.0
func (fip *FloatingIP) StringDetailsOfRules(listRulesInFilter []vpcmodel.RulesInTable, verbose bool) (string, error)
type IKSNode ¶
type IKSNode struct { vpcmodel.VPCResource vpcmodel.InternalNode }
IKSNode implements vpcmodel.Node interface
func (*IKSNode) ExtendedName ¶ added in v0.5.0
func (*IKSNode) GenerateDrawioTreeNode ¶ added in v0.2.0
func (n *IKSNode) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*IKSNode) ShowOnSubnetMode ¶ added in v0.3.0
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() *ipblock.IPBlock
func (*LoadBalancer) DenyConnectivity ¶ added in v0.5.0
func (lb *LoadBalancer) DenyConnectivity(src, dst vpcmodel.Node) bool
DenyConnectivity - check if lb denies connection from src to dst currently only a boolean function, will be elaborated when parsing policies rules
func (*LoadBalancer) ExtendedName ¶ added in v0.5.0
func (lb *LoadBalancer) ExtendedName(c *vpcmodel.VPCConfig) string
func (*LoadBalancer) GenerateDrawioTreeNode ¶ added in v0.4.0
func (lb *LoadBalancer) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*LoadBalancer) Name ¶ added in v0.5.0
func (lb *LoadBalancer) Name() string
for LB we add the kind to the name, to make it clear in the reports
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() (*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
LoadBalancerPool ////////////////////////////////////////// Load Balancer the nodes are the private IPs the listeners hold the pools that holds the backend servers (aka pool members)
type NACL ¶
type NACL struct { vpcmodel.VPCResource // contains filtered or unexported fields }
func (*NACL) AllowedConnectivity ¶
func (*NACL) GeneralConnectivityPerSubnet ¶
type NACLAnalyzer ¶
type NACLAnalyzer struct {
// contains filtered or unexported fields
}
func NewNACLAnalyzer ¶
func NewNACLAnalyzer(nacl *vpc1.NetworkACL) (res *NACLAnalyzer, err error)
func (*NACLAnalyzer) AllowedConnectivity ¶
func (na *NACLAnalyzer) AllowedConnectivity(subnet *Subnet, nodeInSubnet, targetNode vpcmodel.Node, isIngress bool) ( *connection.Set, error)
AllowedConnectivity returns set of allowed connections given src/dst and direction if the input subnet was not yet analyzed, it first adds its analysis to saved results
func (*NACLAnalyzer) AnalyzeNACL ¶
func (na *NACLAnalyzer) AnalyzeNACL(subnet *ipblock.IPBlock) ( ingressResConnectivity, egressResConnectivity map[string]*ConnectivityResult)
TODO: return a map from each possible subnetDisjointTarget to its ConnectivityResult, instead of a specific ConnectivityResult get allowed and denied connections (ingress and egress) for a certain subnet to which this nacl is applied
func (*NACLAnalyzer) AnalyzeNACLRules ¶
func (na *NACLAnalyzer) AnalyzeNACLRules(rules []*NACLRule, subnet *ipblock.IPBlock, isIngress bool, subnetDisjointTarget *ipblock.IPBlock, ) (string, *ConnectivityResult)
AnalyzeNACLRules todo: this is used only in testing. Did not expand for deny.
func (*NACLAnalyzer) GeneralConnectivityPerSubnet ¶
func (na *NACLAnalyzer) GeneralConnectivityPerSubnet(subnet *Subnet) ( strResult string, connectivityObjResult map[string]*vpcmodel.IPbasedConnectivityResult, )
GeneralConnectivityPerSubnet returns the str of the connectivity for analyzed subnet input
func (*NACLAnalyzer) StringRules ¶ added in v0.3.0
func (na *NACLAnalyzer) StringRules(rules []int) string
StringRules returns a string with the details of the specified rules
type NaclLayer ¶
type NaclLayer struct { vpcmodel.VPCResource // contains filtered or unexported fields }
func (*NaclLayer) AllowedConnectivity ¶
func (*NaclLayer) ConnectivityMap ¶
func (nl *NaclLayer) ConnectivityMap() (map[string]*vpcmodel.IPbasedConnectivityResult, error)
per-layer connectivity analysis compute allowed connectivity based on the NACL resources for all relevant endpoints (subnets)
func (*NaclLayer) GenerateDrawioTreeNode ¶ added in v0.2.0
func (nl *NaclLayer) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*NaclLayer) GetConnectivityOutputPerEachElemSeparately ¶
func (*NaclLayer) ListFilterWithAction ¶ added in v0.4.0
func (nl *NaclLayer) ListFilterWithAction(listRulesInFilter []vpcmodel.RulesInTable) (filters map[string]bool)
func (*NaclLayer) ReferencedIPblocks ¶
func (*NaclLayer) RulesInConnectivity ¶ added in v0.3.0
func (nl *NaclLayer) RulesInConnectivity(src, dst vpcmodel.Node, conn *connection.Set, isIngress bool) (allowRes []vpcmodel.RulesInTable, denyRes []vpcmodel.RulesInTable, err error)
RulesInConnectivity list of NACL rules contributing to the connectivity
func (*NaclLayer) ShowOnSubnetMode ¶ added in v0.3.0
func (*NaclLayer) StringDetailsOfRules ¶ added in v0.5.0
func (nl *NaclLayer) StringDetailsOfRules(listRulesInFilter []vpcmodel.RulesInTable) string
type NetworkInterface ¶
type NetworkInterface struct { vpcmodel.VPCResource vpcmodel.InternalNode // contains filtered or unexported fields }
NetworkInterface implements vpcmodel.Node interface
func (*NetworkInterface) ExtendedName ¶ added in v0.5.0
func (ni *NetworkInterface) ExtendedName(c *vpcmodel.VPCConfig) string
func (*NetworkInterface) GenerateDrawioTreeNode ¶ added in v0.2.0
func (ni *NetworkInterface) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*NetworkInterface) Name ¶
func (ni *NetworkInterface) Name() string
func (*NetworkInterface) ShowOnSubnetMode ¶ added in v0.3.0
func (ni *NetworkInterface) ShowOnSubnetMode() bool
func (*NetworkInterface) VsiName ¶
func (ni *NetworkInterface) VsiName() string
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) ExtendedName ¶ added in v0.5.0
func (*PrivateIP) GenerateDrawioTreeNode ¶ added in v0.4.0
func (pip *PrivateIP) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*PrivateIP) ShowOnSubnetMode ¶ added in v0.4.0
type PublicGateway ¶
type PublicGateway struct { vpcmodel.VPCResource // contains filtered or unexported fields }
func (*PublicGateway) AllowedConnectivity ¶
func (pgw *PublicGateway) AllowedConnectivity(src, dst vpcmodel.VPCResourceIntf) (*connection.Set, error)
func (*PublicGateway) AppliedFiltersKinds ¶
func (pgw *PublicGateway) AppliedFiltersKinds() map[string]bool
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) 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) 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) StringDetailsOfRules ¶ added in v0.5.0
func (pgw *PublicGateway) StringDetailsOfRules(listRulesInFilter []vpcmodel.RulesInTable, verbose bool) (string, error)
func (*PublicGateway) Zone ¶
func (pgw *PublicGateway) Zone() (*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 Region ¶ added in v0.4.0
type Region struct {
// contains filtered or unexported fields
}
func (*Region) GenerateDrawioTreeNode ¶ added in v0.4.0
func (r *Region) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*Region) IsExternal ¶ added in v0.4.0
implementations of the GenerateDrawioTreeNode() for resource defined in ibmvpc:
func (*Region) Kind ¶ added in v0.4.0
for DrawioResourceIntf that are not VPCResourceIntf, we implement Kind():
func (*Region) ShowOnSubnetMode ¶ added in v0.4.0
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) ExtendedName ¶ added in v0.5.0
func (r *ReservedIP) ExtendedName(c *vpcmodel.VPCConfig) string
func (*ReservedIP) GenerateDrawioTreeNode ¶ added in v0.2.0
func (r *ReservedIP) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*ReservedIP) Name ¶ added in v0.2.0
func (r *ReservedIP) Name() string
func (*ReservedIP) ShowOnSubnetMode ¶ added in v0.3.0
func (r *ReservedIP) ShowOnSubnetMode() bool
type SGAnalyzer ¶
type SGAnalyzer struct {
// contains filtered or unexported fields
}
func NewSGAnalyzer ¶
func NewSGAnalyzer(sg *vpc1.SecurityGroup) *SGAnalyzer
func (*SGAnalyzer) AllowedConnectivity ¶
func (sga *SGAnalyzer) AllowedConnectivity(target, local *ipblock.IPBlock, isIngress bool) *connection.Set
func (*SGAnalyzer) StringRules ¶ added in v0.3.0
func (sga *SGAnalyzer) StringRules(rules []int) string
StringRules returns a string with the details of the specified rules
type SecurityGroup ¶
type SecurityGroup struct { vpcmodel.VPCResource // contains filtered or unexported fields }
func (*SecurityGroup) AllowedConnectivity ¶
func (sg *SecurityGroup) AllowedConnectivity(src, dst vpcmodel.Node, isIngress bool) *connection.Set
func (*SecurityGroup) GenerateDrawioTreeNode ¶ added in v0.4.0
func (sg *SecurityGroup) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*SecurityGroup) ShowOnSubnetMode ¶ added in v0.4.0
func (sg *SecurityGroup) ShowOnSubnetMode() bool
type SecurityGroupLayer ¶
type SecurityGroupLayer struct { vpcmodel.VPCResource // contains filtered or unexported fields }
SecurityGroupLayer captures all SG in the vpc config, analyzes connectivity considering all SG resources
func (*SecurityGroupLayer) AllowedConnectivity ¶
func (sgl *SecurityGroupLayer) AllowedConnectivity(src, dst vpcmodel.Node, isIngress bool) (*connection.Set, error)
AllowedConnectivity TODO: fix: is it possible that no sg applies to the input peer? if so, should not return "no conns" when none applies
func (*SecurityGroupLayer) ConnectivityMap ¶
func (sgl *SecurityGroupLayer) ConnectivityMap() (map[string]*vpcmodel.IPbasedConnectivityResult, error)
func (*SecurityGroupLayer) GenerateDrawioTreeNode ¶ added in v0.2.0
func (sgl *SecurityGroupLayer) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*SecurityGroupLayer) GetConnectivityOutputPerEachElemSeparately ¶
func (sgl *SecurityGroupLayer) GetConnectivityOutputPerEachElemSeparately() string
func (*SecurityGroupLayer) ListFilterWithAction ¶ added in v0.4.0
func (sgl *SecurityGroupLayer) ListFilterWithAction(listRulesInFilter []vpcmodel.RulesInTable) (filters map[string]bool)
func (*SecurityGroupLayer) Name ¶
func (sgl *SecurityGroupLayer) Name() string
func (*SecurityGroupLayer) ReferencedIPblocks ¶
func (sgl *SecurityGroupLayer) ReferencedIPblocks() []*ipblock.IPBlock
func (*SecurityGroupLayer) RulesInConnectivity ¶ added in v0.3.0
func (sgl *SecurityGroupLayer) RulesInConnectivity(src, dst vpcmodel.Node, conn *connection.Set, isIngress bool) (allowRes []vpcmodel.RulesInTable, denyRes []vpcmodel.RulesInTable, err error)
RulesInConnectivity return allow rules between src and dst, or between src and dst of connection conn if conn specified denyRules not relevant here - returns nil
func (*SecurityGroupLayer) ShowOnSubnetMode ¶ added in v0.3.0
func (sgl *SecurityGroupLayer) ShowOnSubnetMode() bool
func (*SecurityGroupLayer) StringDetailsOfRules ¶ added in v0.5.0
func (sgl *SecurityGroupLayer) StringDetailsOfRules(listRulesInFilter []vpcmodel.RulesInTable) string
type Subnet ¶
type Subnet struct { vpcmodel.VPCResource // contains filtered or unexported fields }
Subnet implements vpcmodel.Subnet interface
func (*Subnet) AddressRange ¶ added in v0.2.0
func (*Subnet) GenerateDrawioTreeNode ¶ added in v0.2.0
func (s *Subnet) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*Subnet) ShowOnSubnetMode ¶ added in v0.3.0
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) (*connection.Set, error)
func (*TransitGateway) AppliedFiltersKinds ¶ added in v0.3.0
func (tgw *TransitGateway) AppliedFiltersKinds() map[string]bool
AppliedFiltersKinds todo: currently not used
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) Region ¶ added in v0.4.0
func (tgw *TransitGateway) Region() *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) 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) StringDetailsOfRules ¶ added in v0.5.0
func (tgw *TransitGateway) StringDetailsOfRules(listRulesInTransitConns []vpcmodel.RulesInTable, verbose bool) (string, error)
type VPC ¶
type VPC struct { vpcmodel.VPCResource // contains filtered or unexported fields }
VPC implements vpcmodel.VPC
func (*VPC) AddressPrefixes ¶ added in v0.4.0
func (*VPC) AddressRange ¶ added in v0.2.0
func (*VPC) GenerateDrawioTreeNode ¶ added in v0.2.0
func (v *VPC) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*VPC) ShowOnSubnetMode ¶ added in v0.3.0
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 (*Vpe) GenerateDrawioTreeNode ¶ added in v0.2.0
func (v *Vpe) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*Vpe) ShowOnSubnetMode ¶ added in v0.3.0
type Vsi ¶
type Vsi struct { vpcmodel.VPCResource // contains filtered or unexported fields }
func (*Vsi) AddressRange ¶ added in v0.2.0
func (*Vsi) GenerateDrawioTreeNode ¶ added in v0.2.0
func (v *Vsi) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface
func (*Vsi) ShowOnSubnetMode ¶ added in v0.3.0
type Zone ¶
type Zone struct {
// contains filtered or unexported fields
}
func (*Zone) GenerateDrawioTreeNode ¶ added in v0.2.0
func (z *Zone) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface