blob: c377dba20c02bb06def76eeb9b9c27cfb57c9e08 [file] [log] [blame]
Sean Condon74e8d942022-03-16 19:20:08 +00001# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
2#
3# SPDX-License-Identifier: Apache-2.0
4
5package aether_2_1_x
6
7echo[config] {
8 config := input
9}
10
11allowed[config] {
SeanCondone155baf2022-04-11 18:55:55 +010012 application := application_rule
13 site := site_rule
14 template := template_rule
15 traffic_class := traffic_class_rule
Sean Condon74e8d942022-03-16 19:20:08 +000016 config := {
SeanCondone155baf2022-04-11 18:55:55 +010017 "application": application,
18 "site": site,
19 "template": template,
20 "traffic_class": traffic_class
Sean Condon74e8d942022-03-16 19:20:08 +000021 }
22}
23
SeanCondone155baf2022-04-11 18:55:55 +010024application_rule[application] {
25 ["AetherROCAdmin", input.target][_] == input.groups[i]
26 application := input.application
27}
28
29site_rule[site] {
30 ["AetherROCAdmin", input.target][_] == input.groups[i]
31 site := input.site
32}
33
34template_rule[template] {
35 ["AetherROCAdmin", input.target][_] == input.groups[i]
36 template := input.template
37}
38
39traffic_class_rule[traffic_class] {
40 ["AetherROCAdmin", input.target][_] == input.groups[i]
41 traffic_class := input.traffic_class
Sean Condon74e8d942022-03-16 19:20:08 +000042}
43
44can_update_enterprise = true {
45 update_enterprise := input.updates.enterprises.enterprise[_]
46 ["AetherROCAdmin", update_enterprise.enterprise_id][_] == input.groups[i]
47}