Updated function test env with new tests and features
Added tests for transient policies
Added test case for policy type sync
Added test for policy create/delete from parallel processes
Updated test env to run with selected local images and ignoring certain images.
Issue-ID: NONRTRIC-154
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I9893dc3ad8c77186b73ec82770f5b72fbf948154
diff --git a/test/auto-test/testdata/OSC/3-agent-modified.json b/test/auto-test/testdata/OSC/3-agent-modified.json
new file mode 100644
index 0000000..303b36b
--- /dev/null
+++ b/test/auto-test/testdata/OSC/3-agent-modified.json
@@ -0,0 +1,36 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "3",
+ "description": "Type 3 policy type",
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "object",
+ "properties": {
+ "groupId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "groupId"
+ ]
+ },
+ "qosObjective": {
+ "type": "object",
+ "properties": {
+ "priorityLevel": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "priorityLevel"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scope", "qosObjective"
+ ]
+ }
diff --git a/test/auto-test/testdata/OSC/3.json b/test/auto-test/testdata/OSC/3.json
new file mode 100644
index 0000000..ab0204d
--- /dev/null
+++ b/test/auto-test/testdata/OSC/3.json
@@ -0,0 +1,36 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "OSC_Type3_1.0.0",
+ "description": "Type 3 policy type",
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "object",
+ "properties": {
+ "groupId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "groupId"
+ ]
+ },
+ "qosObjective": {
+ "type": "object",
+ "properties": {
+ "priorityLevel": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "priorityLevel"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scope", "qosObjective"
+ ]
+}
diff --git a/test/auto-test/testdata/OSC/4-agent-modified.json b/test/auto-test/testdata/OSC/4-agent-modified.json
new file mode 100644
index 0000000..868ceea
--- /dev/null
+++ b/test/auto-test/testdata/OSC/4-agent-modified.json
@@ -0,0 +1,36 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "4",
+ "description": "Type 4 policy type",
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "object",
+ "properties": {
+ "cellId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "cellId"
+ ]
+ },
+ "qosObjective": {
+ "type": "object",
+ "properties": {
+ "priorityLevel": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "priorityLevel"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scope", "qosObjective"
+ ]
+ }
diff --git a/test/auto-test/testdata/OSC/4.json b/test/auto-test/testdata/OSC/4.json
new file mode 100644
index 0000000..c5e785c
--- /dev/null
+++ b/test/auto-test/testdata/OSC/4.json
@@ -0,0 +1,36 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "OSC_Type4_1.0.0",
+ "description": "Type 4 policy type",
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "object",
+ "properties": {
+ "cellId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "cellId"
+ ]
+ },
+ "qosObjective": {
+ "type": "object",
+ "properties": {
+ "priorityLevel": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "priorityLevel"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scope", "qosObjective"
+ ]
+}
diff --git a/test/auto-test/testdata/OSC/5-agent-modified.json b/test/auto-test/testdata/OSC/5-agent-modified.json
new file mode 100644
index 0000000..b5fd5bc
--- /dev/null
+++ b/test/auto-test/testdata/OSC/5-agent-modified.json
@@ -0,0 +1,40 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "5",
+ "description": "Type 5 policy type",
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "object",
+ "properties": {
+ "sliceId": {
+ "type": "string"
+ },
+ "cellId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "sliceId",
+ "cellId"
+ ]
+ },
+ "qosObjective": {
+ "type": "object",
+ "properties": {
+ "priorityLevel": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "priorityLevel"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scope", "qosObjective"
+ ]
+ }
diff --git a/test/auto-test/testdata/OSC/5.json b/test/auto-test/testdata/OSC/5.json
new file mode 100644
index 0000000..dee440a
--- /dev/null
+++ b/test/auto-test/testdata/OSC/5.json
@@ -0,0 +1,40 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "OSC_Type5_1.0.0",
+ "description": "Type 5 policy type",
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "object",
+ "properties": {
+ "sliceId": {
+ "type": "string"
+ },
+ "cellId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "sliceId",
+ "cellId"
+ ]
+ },
+ "qosObjective": {
+ "type": "object",
+ "properties": {
+ "priorityLevel": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "priorityLevel"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scope", "qosObjective"
+ ]
+}
diff --git a/test/auto-test/testdata/OSC/pi3_template.json b/test/auto-test/testdata/OSC/pi3_template.json
new file mode 100644
index 0000000..a916fad
--- /dev/null
+++ b/test/auto-test/testdata/OSC/pi3_template.json
@@ -0,0 +1,8 @@
+{
+ "scope": {
+ "groupId": "groupXXX"
+ },
+ "qosObjective": {
+ "priorityLevel": XXX
+ }
+ }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/pi4_template.json b/test/auto-test/testdata/OSC/pi4_template.json
new file mode 100644
index 0000000..0673dec
--- /dev/null
+++ b/test/auto-test/testdata/OSC/pi4_template.json
@@ -0,0 +1,8 @@
+{
+ "scope": {
+ "cellId": "cellXXX"
+ },
+ "qosObjective": {
+ "priorityLevel": XXX
+ }
+ }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/pi5_template.json b/test/auto-test/testdata/OSC/pi5_template.json
new file mode 100644
index 0000000..e362c9e
--- /dev/null
+++ b/test/auto-test/testdata/OSC/pi5_template.json
@@ -0,0 +1,9 @@
+{
+ "scope": {
+ "sliceId": "sliceXXX",
+ "cellId": "cellXXX"
+ },
+ "qosObjective": {
+ "priorityLevel": XXX
+ }
+ }
\ No newline at end of file
diff --git a/test/auto-test/testdata/OSC/sim_3.json b/test/auto-test/testdata/OSC/sim_3.json
new file mode 100644
index 0000000..1b97047
--- /dev/null
+++ b/test/auto-test/testdata/OSC/sim_3.json
@@ -0,0 +1,41 @@
+{
+ "name": "pt3",
+ "description": "pt3 policy type",
+ "policy_type_id": 3,
+ "create_schema": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "OSC_Type3_1.0.0",
+ "description": "Type 3 policy type",
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "object",
+ "properties": {
+ "groupId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "groupId"
+ ]
+ },
+ "qosObjective": {
+ "type": "object",
+ "properties": {
+ "priorityLevel": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "priorityLevel"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scope", "qosObjective"
+ ]
+ }
+}
diff --git a/test/auto-test/testdata/OSC/sim_4.json b/test/auto-test/testdata/OSC/sim_4.json
new file mode 100644
index 0000000..ac1fa2b
--- /dev/null
+++ b/test/auto-test/testdata/OSC/sim_4.json
@@ -0,0 +1,41 @@
+{
+ "name": "pt4",
+ "description": "pt4 policy type",
+ "policy_type_id": 4,
+ "create_schema": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "OSC_Type4_1.0.0",
+ "description": "Type 4 policy type",
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "object",
+ "properties": {
+ "cellId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "cellId"
+ ]
+ },
+ "qosObjective": {
+ "type": "object",
+ "properties": {
+ "priorityLevel": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "priorityLevel"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scope", "qosObjective"
+ ]
+ }
+}
diff --git a/test/auto-test/testdata/OSC/sim_5.json b/test/auto-test/testdata/OSC/sim_5.json
new file mode 100644
index 0000000..4d8f3c9
--- /dev/null
+++ b/test/auto-test/testdata/OSC/sim_5.json
@@ -0,0 +1,45 @@
+{
+ "name": "pt5",
+ "description": "pt5 policy type",
+ "policy_type_id": 5,
+ "create_schema": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "OSC_Type5_1.0.0",
+ "description": "Type 5 policy type",
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "object",
+ "properties": {
+ "sliceId": {
+ "type": "string"
+ },
+ "cellId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "sliceId",
+ "cellId"
+ ]
+ },
+ "qosObjective": {
+ "type": "object",
+ "properties": {
+ "priorityLevel": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "priorityLevel"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scope", "qosObjective"
+ ]
+ }
+}