blob: 9c2ec1b6be756da0efc7002274a43a50e922656b [file] [log] [blame]
Scott Baker69654392021-09-17 13:50:16 -07001# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
2#
3# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
5package aether_2_1_0
6
7echo[config] {
8 config := input
9}
10
11allowed[config] {
12 access_profile := access_profiles # refer to rule below
13 subscriber := subscribers
14 apn_profile := apn_profiles
15 connectivity_service := connectivityservices
16 enterprise := enterprises
17 qos_profile := qos_profiles
18 security_profile := security_profiles
19 service_profile := service_profiles
20 service_group := service_groups
21 service_policy := service_policies
22 service_rule := service_rules
23 up_profile := up_profiles
24 config := {
25 "access_profile": {
26 "access_profile": [
27 access_profile
28 ]
29 },
30 "subscriber": {
31 "ue": [
32 subscriber
33 ]
34 },
35 "apn_profile": {
36 "apn_profile": [
37 apn_profile
38 ]
39 },
40 "connectivity-service": {
41 "connectivity-service": [
42 connectivity_service
43 ]
44 },
45 "enterprise": {
46 "enterprise": [
47 enterprise
48 ]
49 },
50 "qos_profile": {
51 "qos_profile": [
52 qos_profile
53 ]
54 },
55 "security_profile": {
56 "security_profile": [
57 security_profile
58 ]
59 },
60 "service_profile": {
61 "service_profile": [
62 service_profile
63 ]
64 },
65 "service_group": {
66 "service_group": [
67 service_group
68 ]
69 },
70 "service_policy": {
71 "service_policy": [
72 service_policy
73 ]
74 },
75 "service_rule": {
76 "service_rule": [
77 service_rule
78 ]
79 },
80 "up_profile": {
81 "up_profile": [
82 up_profile
83 ]
84 },
85 }
86}
87
88access_profiles[access_profile] {
89 access_profile := input.access_profile.access_profile[_]
90}
91
92subscribers[subscriber] {
93 subscriber := input.subscriber.ue[_]
94}
95
96apn_profiles[apn_profile] {
97 apn_profile := input.apn_profile.apn_profile[_]
98}
99
100connectivityservices[connectivity_service] {
101 enterprise := input.enterprise.enterprise[_]
102 enterprise_cs := enterprise.connectivity_service[_]
103 connectivity_service := input.connectivity_service.connectivity_service[_]
104 ["AetherROCAdmin", enterprise.id][_] == input.groups[i]
105 enterprise_cs.connectivity_service == connectivity_service.id
106}
107
108enterprises[enterprise] {
109 enterprise := input.enterprise.enterprise[_]
110 ["AetherROCAdmin", enterprise.id][_] == input.groups[_]
111}
112
113qos_profiles[qos_profile] {
114 qos_profile := input.qos_profile.qos_profile[_]
115}
116security_profiles[security_profile] {
117 security_profile := input.security_profile.security_profile[_]
118}
119service_profiles[service_profile] {
120 service_profile := input.service_profile.service_profile[_]
121}
122service_groups[service_group] {
123 service_group := input.service_group.service_group[_]
124}
125service_policies[service_policy] {
126 service_policy := input.service_policy.service_policy[_]
127}
128service_rules[service_rule] {
129 service_rule := input.service_rule.service_rule[_]
130}
131up_profiles[up_profile] {
132 up_profile := input.up_profile.up_profile[_]
133}