diff --git a/pkg/synthesis/tests/examples.go b/pkg/synthesis/tests/examples.go index ca7ef061..0355a657 100644 --- a/pkg/synthesis/tests/examples.go +++ b/pkg/synthesis/tests/examples.go @@ -72,7 +72,7 @@ var ExampleDumbeldore = ExampleSynthesis{ }, { Name: "Dumb2-Not-Sly", - ID: 9195, + ID: newRuleID + 1, Source: "DumbledoreNoSly", Dest: sly, Services: []string{"ANY"}, @@ -80,7 +80,7 @@ var ExampleDumbeldore = ExampleSynthesis{ }, { Name: "Dumb2-To-All", - ID: 9196, + ID: newRuleID + 2, Source: "DumbledoreNoSly", Dest: "ANY", Services: []string{"ANY"}, @@ -217,7 +217,7 @@ var ExampleDenyPassSimple = ExampleSynthesis{ Rules: []data.Rule{ { Name: "allow-all-to-all", - ID: newRuleID, + ID: 10230, Source: "ANY", Dest: "ANY", Services: []string{"ANY"}, @@ -264,7 +264,7 @@ var ExampleHintsDisjoint = ExampleSynthesis{ }, { Name: "Dumb2-Not-Gryf", - ID: 9195, + ID: newRuleID + 1, Source: dum2, Dest: gry, Services: []string{"ANY"}, @@ -272,7 +272,7 @@ var ExampleHintsDisjoint = ExampleSynthesis{ }, { Name: "Dumb1-To-All", - ID: 9196, + ID: newRuleID + 2, Source: dum1, Dest: "ANY", Services: []string{"ANY"}, @@ -280,7 +280,7 @@ var ExampleHintsDisjoint = ExampleSynthesis{ }, { Name: "Dumb2-To-All", - ID: 9196, + ID: newRuleID + 3, Source: dum2, Dest: "ANY", Services: []string{"ANY"}, @@ -390,7 +390,7 @@ var ExampleHogwarts = ExampleSynthesis{ Rules: []data.Rule{ { Name: "allow-Dumbledore-to-all", - ID: 10217, + ID: 10221, Source: dum, Dest: gry, Services: []string{"ANY"}, @@ -398,7 +398,7 @@ var ExampleHogwarts = ExampleSynthesis{ }, { Name: "default-deny-env", - ID: 10218, + ID: 10300, Source: "ANY", Dest: "ANY", Services: []string{"ANY"}, @@ -413,7 +413,7 @@ var ExampleHogwarts = ExampleSynthesis{ Rules: []data.Rule{ { Name: "Client-Access", - ID: 9195, + ID: 10400, Source: "ANY", Dest: web, Services: []string{"ANY"}, @@ -421,7 +421,7 @@ var ExampleHogwarts = ExampleSynthesis{ }, { Name: "Web-To-App-Access", - ID: 9196, + ID: 10401, Source: web, Dest: app, Services: []string{"ANY"}, @@ -429,7 +429,7 @@ var ExampleHogwarts = ExampleSynthesis{ }, { Name: "App-To-DB-Access", - ID: 9197, + ID: 10405, Source: app, Dest: db, Services: []string{"ANY"}, @@ -497,7 +497,7 @@ var ExampleHogwartsSimpler = ExampleSynthesis{ }, { Name: "default-deny-env", - ID: 10218, + ID: 10221, Source: "ANY", Dest: "ANY", Services: []string{"ANY"}, @@ -582,7 +582,7 @@ var hogwartsAppToHousesPolicy = []data.Category{ }, { Name: "default-deny-env", - ID: 10218, + ID: 10230, Source: "ANY", Dest: "ANY", Services: []string{"ANY"}, diff --git a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleDenyPassSimple_true_0/policies.yaml b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleDenyPassSimple_true_0/policies.yaml index 04052add..5e42ada2 100644 --- a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleDenyPassSimple_true_0/policies.yaml +++ b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleDenyPassSimple_true_0/policies.yaml @@ -3,7 +3,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (*) to (group != Hufflepuff and group != Slytherin) - nsx-id: "1925" + nsx-id: "10230" creationTimestamp: null name: policy_0 spec: @@ -24,7 +24,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (*) to (group = Dumbledore) - nsx-id: "1925" + nsx-id: "10230" creationTimestamp: null name: policy_1 spec: @@ -43,7 +43,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (*) to (group != Hufflepuff and group != Slytherin) - nsx-id: "1925" + nsx-id: "10230" creationTimestamp: null name: policy_2 spec: @@ -64,7 +64,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (*) to (group = Dumbledore) - nsx-id: "1925" + nsx-id: "10230" creationTimestamp: null name: policy_3 spec: diff --git a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleDumbeldore_true_0/policies.yaml b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleDumbeldore_true_0/policies.yaml index 6cc4fa9b..27d6b27e 100644 --- a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleDumbeldore_true_0/policies.yaml +++ b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleDumbeldore_true_0/policies.yaml @@ -41,7 +41,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = DumbledoreNoSly) to (group != Slytherin) - nsx-id: "9196" + nsx-id: "1927" creationTimestamp: null name: policy_2 spec: @@ -63,7 +63,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = DumbledoreNoSly) to (group != Slytherin) - nsx-id: "9196" + nsx-id: "1927" creationTimestamp: null name: policy_3 spec: diff --git a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHintsDisjoint_true_0/policies.yaml b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHintsDisjoint_true_0/policies.yaml index 0d6e23bb..391822c8 100644 --- a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHintsDisjoint_true_0/policies.yaml +++ b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHintsDisjoint_true_0/policies.yaml @@ -3,7 +3,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Dumbledore1 and group != Dumbledore2) to (group != Slytherin) - nsx-id: "9196" + nsx-id: "1927" creationTimestamp: null name: policy_0 spec: @@ -27,7 +27,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Dumbledore1) to (group != Slytherin and group != Gryffindor) - nsx-id: "9196" + nsx-id: "1927" creationTimestamp: null name: policy_1 spec: @@ -51,7 +51,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Dumbledore1 and group != Dumbledore2) to (group != Slytherin) - nsx-id: "9196" + nsx-id: "1927" creationTimestamp: null name: policy_2 spec: @@ -75,7 +75,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Dumbledore1) to (group != Slytherin and group != Gryffindor) - nsx-id: "9196" + nsx-id: "1927" creationTimestamp: null name: policy_3 spec: @@ -99,7 +99,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Dumbledore2 and group != Dumbledore1) to (group != Gryffindor) - nsx-id: "9196" + nsx-id: "1928" creationTimestamp: null name: policy_4 spec: @@ -123,7 +123,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Dumbledore2) to (group != Slytherin and group != Gryffindor) - nsx-id: "9196" + nsx-id: "1928" creationTimestamp: null name: policy_5 spec: @@ -147,7 +147,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Dumbledore2 and group != Dumbledore1) to (group != Gryffindor) - nsx-id: "9196" + nsx-id: "1928" creationTimestamp: null name: policy_6 spec: @@ -171,7 +171,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Dumbledore2) to (group != Slytherin and group != Gryffindor) - nsx-id: "9196" + nsx-id: "1928" creationTimestamp: null name: policy_7 spec: diff --git a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_0/policies.yaml b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_0/policies.yaml index 4bc18779..cbf217fd 100644 --- a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_0/policies.yaml +++ b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_0/policies.yaml @@ -3,7 +3,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Gryffindor) to (group = Web and group = Gryffindor) - nsx-id: "9195" + nsx-id: "10400" creationTimestamp: null name: policy_0 spec: @@ -27,7 +27,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Hufflepuff) to (group = Web and group = Hufflepuff) - nsx-id: "9195" + nsx-id: "10400" creationTimestamp: null name: policy_1 spec: @@ -51,7 +51,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Slytherin) to (group = Web and group = Slytherin) - nsx-id: "9195" + nsx-id: "10400" creationTimestamp: null name: policy_2 spec: @@ -75,7 +75,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Dumbledore) to (group = Web and group = Gryffindor) - nsx-id: "9195" + nsx-id: "10400" creationTimestamp: null name: policy_3 spec: @@ -99,7 +99,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Gryffindor) to (group = Web and group = Gryffindor) - nsx-id: "9195" + nsx-id: "10400" creationTimestamp: null name: policy_4 spec: @@ -123,7 +123,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Hufflepuff) to (group = Web and group = Hufflepuff) - nsx-id: "9195" + nsx-id: "10400" creationTimestamp: null name: policy_5 spec: @@ -147,7 +147,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Slytherin) to (group = Web and group = Slytherin) - nsx-id: "9195" + nsx-id: "10400" creationTimestamp: null name: policy_6 spec: @@ -171,7 +171,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Dumbledore) to (group = Web and group = Gryffindor) - nsx-id: "9195" + nsx-id: "10400" creationTimestamp: null name: policy_7 spec: @@ -195,7 +195,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Web and group = Gryffindor) to (group = App and group = Gryffindor) - nsx-id: "9196" + nsx-id: "10401" creationTimestamp: null name: policy_8 spec: @@ -221,7 +221,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Web and group = Hufflepuff) to (group = App and group = Hufflepuff) - nsx-id: "9196" + nsx-id: "10401" creationTimestamp: null name: policy_9 spec: @@ -247,7 +247,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Web and group = Slytherin) to (group = App and group = Slytherin) - nsx-id: "9196" + nsx-id: "10401" creationTimestamp: null name: policy_10 spec: @@ -273,7 +273,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Web and group = Gryffindor) to (group = App and group = Gryffindor) - nsx-id: "9196" + nsx-id: "10401" creationTimestamp: null name: policy_11 spec: @@ -299,7 +299,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Web and group = Hufflepuff) to (group = App and group = Hufflepuff) - nsx-id: "9196" + nsx-id: "10401" creationTimestamp: null name: policy_12 spec: @@ -325,7 +325,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Web and group = Slytherin) to (group = App and group = Slytherin) - nsx-id: "9196" + nsx-id: "10401" creationTimestamp: null name: policy_13 spec: @@ -351,7 +351,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = App and group = Gryffindor) to (group = DB and group = Gryffindor) - nsx-id: "9197" + nsx-id: "10405" creationTimestamp: null name: policy_14 spec: @@ -377,7 +377,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = App and group = Hufflepuff) to (group = DB and group = Hufflepuff) - nsx-id: "9197" + nsx-id: "10405" creationTimestamp: null name: policy_15 spec: @@ -403,7 +403,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = App and group = Slytherin) to (group = DB and group = Slytherin) - nsx-id: "9197" + nsx-id: "10405" creationTimestamp: null name: policy_16 spec: @@ -429,7 +429,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = App and group = Gryffindor) to (group = DB and group = Gryffindor) - nsx-id: "9197" + nsx-id: "10405" creationTimestamp: null name: policy_17 spec: @@ -455,7 +455,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = App and group = Hufflepuff) to (group = DB and group = Hufflepuff) - nsx-id: "9197" + nsx-id: "10405" creationTimestamp: null name: policy_18 spec: @@ -481,7 +481,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = App and group = Slytherin) to (group = DB and group = Slytherin) - nsx-id: "9197" + nsx-id: "10405" creationTimestamp: null name: policy_19 spec: diff --git a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_4/adminPolicies.yaml b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_4/adminPolicies.yaml index f5537364..55c4b993 100644 --- a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_4/adminPolicies.yaml +++ b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_4/adminPolicies.yaml @@ -183,7 +183,7 @@ kind: AdminNetworkPolicy metadata: annotations: description: '(jump_to_application: (All Connections from (group = Dumbledore) to (group = Gryffindor))' - nsx-id: "10217" + nsx-id: "10221" creationTimestamp: null name: admin_policy_6 spec: @@ -213,7 +213,7 @@ kind: AdminNetworkPolicy metadata: annotations: description: '(jump_to_application: (All Connections from (group = Dumbledore) to (group = Gryffindor))' - nsx-id: "10217" + nsx-id: "10221" creationTimestamp: null name: admin_policy_7 spec: @@ -243,7 +243,7 @@ kind: AdminNetworkPolicy metadata: annotations: description: '(deny: (All Connections from (*) to (*))' - nsx-id: "10218" + nsx-id: "10300" creationTimestamp: null name: admin_policy_8 spec: @@ -267,7 +267,7 @@ kind: AdminNetworkPolicy metadata: annotations: description: '(deny: (All Connections from (*) to (*))' - nsx-id: "10218" + nsx-id: "10300" creationTimestamp: null name: admin_policy_9 spec: diff --git a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_4/policies.yaml b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_4/policies.yaml index 3497e92c..f9f592a0 100644 --- a/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_4/policies.yaml +++ b/pkg/synthesis/tests_expected_output/k8s_resources/ExampleHogwarts_false_4/policies.yaml @@ -3,7 +3,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (*) to (group = Web) - nsx-id: "9195" + nsx-id: "10400" creationTimestamp: null name: policy_0 spec: @@ -22,7 +22,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (*) to (group = Web) - nsx-id: "9195" + nsx-id: "10400" creationTimestamp: null name: policy_1 spec: @@ -41,7 +41,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Web) to (group = App) - nsx-id: "9196" + nsx-id: "10401" creationTimestamp: null name: policy_2 spec: @@ -63,7 +63,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = Web) to (group = App) - nsx-id: "9196" + nsx-id: "10401" creationTimestamp: null name: policy_3 spec: @@ -85,7 +85,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = App) to (group = DB) - nsx-id: "9197" + nsx-id: "10405" creationTimestamp: null name: policy_4 spec: @@ -107,7 +107,7 @@ kind: NetworkPolicy metadata: annotations: description: All Connections from (group = App) to (group = DB) - nsx-id: "9197" + nsx-id: "10405" creationTimestamp: null name: policy_5 spec: