AETHER-2941 open-policy-agent: create unit tests for REGO Rules
Change-Id: Ib6b9294e3cedaf96e77b03e21727b2ea108d43e3
diff --git a/aether-roc-umbrella/files/opa-rbac/test/out/aether-3.0.0-example-get.out b/aether-roc-umbrella/files/opa-rbac/test/out/aether-3.0.0-example-get.out
new file mode 100644
index 0000000..4b3d3c0
--- /dev/null
+++ b/aether-roc-umbrella/files/opa-rbac/test/out/aether-3.0.0-example-get.out
@@ -0,0 +1,239 @@
+[
+ {
+ "ap-list": {
+ "ap-list": [
+ [
+ {
+ "access_points": [
+ {
+ "address": "ap2^chicago^acme^com",
+ "enable": true,
+ "tac": 8002
+ }
+ ],
+ "description": "Chicago APs",
+ "display_name": "Chicago",
+ "enterprise": "acme",
+ "id": "acme_chicago_aps"
+ }
+ ]
+ ]
+ },
+ "application": {
+ "application": [
+ [
+ {
+ "description": "Data Acquisition",
+ "display_name": "DA",
+ "endpoint": [
+ {
+ "address": "da.acme.com",
+ "name": "da",
+ "port_end": 7585,
+ "port_start": 7588,
+ "protocol": "TCP"
+ }
+ ],
+ "enterprise": "acme",
+ "id": "acme_dataacquisition"
+ }
+ ]
+ ]
+ },
+ "connectivity-service": {
+ "connectivity-service": [
+ [
+ {
+ "core_5g_endpoint": "http://aether_roc_umbrella_sdcore_test_dummy/v1/config/5g",
+ "description": "5G Test",
+ "display_name": "ROC 5G Test Connectivity Service",
+ "id": "cs5gtest"
+ },
+ {
+ "description": "ROC 4G Test Connectivity Service",
+ "display_name": "4G Test",
+ "hss_endpoint": "http://aether_roc_umbrella_sdcore_test_dummy/v1/config/imsis",
+ "id": "cs4gtest",
+ "pcrf_endpoint": "http://aether_roc_umbrella_sdcore_test_dummy/v1/config/policies",
+ "spgwc_endpoint": "http://aether_roc_umbrella_sdcore_test_dummy/v1/config"
+ }
+ ]
+ ]
+ },
+ "device-group": {
+ "device-group": [
+ [
+ {
+ "display_name": "ACME Robots",
+ "id": "acme_chicago_robots",
+ "imsis": [
+ {
+ "imsi_range_from": 13698808332993000,
+ "imsi_range_to": 13698808332993003,
+ "name": "production"
+ },
+ {
+ "imsi_range_from": 13698808332993010,
+ "imsi_range_to": 13698808332993012,
+ "name": "warehouse"
+ }
+ ],
+ "ip_domain": "acme_chicago",
+ "site": "acme_chicago"
+ }
+ ]
+ ]
+ },
+ "enterprise": {
+ "enterprise": [
+ [
+ {
+ "connectivity_service": [
+ {
+ "connectivity_service": "cs5gtest",
+ "enabled": true
+ }
+ ],
+ "description": "ACME Corporation",
+ "display_name": "ACME Corp",
+ "id": "acme"
+ }
+ ]
+ ]
+ },
+ "ip-domain": {
+ "ip-domain": [
+ []
+ ]
+ },
+ "network": {
+ "network": [
+ [
+ {
+ "description": "Chicago 123_456",
+ "display_name": "Chicago",
+ "enterprise": "acme",
+ "id": "acme_chicago",
+ "mcc": 123,
+ "mnc": 456
+ }
+ ]
+ ]
+ },
+ "site": {
+ "site": [
+ [
+ {
+ "description": "ACME HQ",
+ "display_name": "Chicago",
+ "enterprise": "acme",
+ "id": "acme_chicago",
+ "network": "acme_chicago"
+ }
+ ]
+ ]
+ },
+ "template": {
+ "template": [
+ [
+ {
+ "description": "VCS Template 1",
+ "display_name": "Template 1",
+ "downlink": 24669539,
+ "id": "template_1",
+ "sd": 10886763,
+ "sst": 158,
+ "traffic_class": "class_1",
+ "uplink": 23770218
+ },
+ {
+ "description": "VCS Template 2",
+ "display_name": "Template 2",
+ "downlink": 2791589,
+ "id": "template_2",
+ "sd": 16619900,
+ "sst": 157,
+ "traffic_class": "class_2",
+ "uplink": 24721051
+ }
+ ]
+ ]
+ },
+ "traffic_class": {
+ "traffic_class": [
+ [
+ {
+ "description": "High Priority TC",
+ "display_name": "Class 1",
+ "id": "class_1",
+ "pdb": 577,
+ "pelr": 3,
+ "qci": 10
+ },
+ {
+ "description": "Medium Priority TC",
+ "display_name": "Class 2",
+ "id": "class_2",
+ "pdb": 831,
+ "pelr": 4,
+ "qci": 20
+ },
+ {
+ "description": "Low Priority TC",
+ "display_name": "Class 3",
+ "id": "class_3",
+ "pdb": 833,
+ "pelr": 4,
+ "qci": 30
+ }
+ ]
+ ]
+ },
+ "upf": {
+ "upf": [
+ [
+ {
+ "address": "chicago.robots_upf.acme.com",
+ "description": "Chicago Robots UPF",
+ "display_name": "Chicago Robots",
+ "enterprise": "acme",
+ "id": "acme_chicago_robots",
+ "port": 6161
+ }
+ ]
+ ]
+ },
+ "vcs": {
+ "vcs": [
+ [
+ {
+ "ap": "acme_chicago_aps",
+ "application": [
+ {
+ "allow": false,
+ "application": "acme_dataacquisition"
+ }
+ ],
+ "description": "Chicago Robots",
+ "device_group": [
+ {
+ "device_group": "acme_chicago_robots",
+ "enable": true
+ }
+ ],
+ "display_name": "Chicago Robots VCS",
+ "downlink": 28492626,
+ "enterprise": "acme",
+ "id": "acme_chicago_robots",
+ "sd": 2973238,
+ "sst": 79,
+ "template": "template_2",
+ "traffic_class": "class_2",
+ "upf": "acme_chicago_robots",
+ "uplink": 13227287
+ }
+ ]
+ ]
+ }
+ }
+]