Skip to content

Commit

Permalink
added statefullness test (temp, should be replaced by #199
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiriMoran committed Nov 12, 2023
1 parent 2a8f78d commit 27205d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pkg/ibmvpc/examples/acl_testing5subnetsDiff.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Analysis for diff between VPC test-vpc-ky1 and VPC test-vpc-ky2
diff-type: added, source: sub1-2-ky, destination: sub1-1-ky, config1: protocol: TCP, config2: No connection
diff-type: added, source: sub1-3-ky, destination: sub1-1-ky, config1: protocol: TCP, config2: No connection
diff-type: changed, source: sub1-1-ky, destination: sub1-2-ky, config1: protocol: TCP, config2: protocol: TCP *
diff-type: changed, source: sub1-1-ky, destination: sub1-3-ky, config1: protocol: TCP, config2: protocol: TCP *
diff-type: changed, source: sub2-1-ky, destination: Public Internet [8.8.8.8/32], config1: protocol: UDP dst-ports: 53, config2: protocol: UDP dst-ports: 43,53

diff-type: removed, source: sub2-1-ky, destination: Public Internet [8.8.8.0/29], config1: No connection, config2: protocol: UDP dst-ports: 53 *
Expand Down
6 changes: 4 additions & 2 deletions pkg/vpcmodel/semanticDiffSubnets.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ func (subnetConfConnectivity *SubnetConfigConnectivity) subtract(other *SubnetCo
if srcInOther != nil && dstInOther != nil {
if otherSrc, ok := other.subnetConnectivity[srcInOther]; ok {
if otherConn, ok := otherSrc[dstInOther]; ok {
// ToDo: https://github.com/np-guard/vpc-network-config-analyzer/issues/199
if !includeChanged || (conns.Equal(otherConn) && conns.IsStateful == otherConn.IsStateful){
equalConnections := conns.Equal(otherConn) &&
// ToDo: https://github.com/np-guard/vpc-network-config-analyzer/issues/199
conns.IsStateful == otherConn.IsStateful
if !includeChanged || equalConnections {
continue
}
connDiff.conn2 = otherConn
Expand Down

0 comments on commit 27205d1

Please sign in to comment.