Sean Condon | 74e8d94 | 2022-03-16 19:20:08 +0000 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org> |
| 2 | # |
| 3 | # SPDX-License-Identifier: Apache-2.0 |
| 4 | |
| 5 | package aether_2_1_x |
| 6 | |
| 7 | echo[config] { |
| 8 | config := input |
| 9 | } |
| 10 | |
| 11 | allowed[config] { |
SeanCondon | e155baf | 2022-04-11 18:55:55 +0100 | [diff] [blame] | 12 | application := application_rule |
| 13 | site := site_rule |
| 14 | template := template_rule |
| 15 | traffic_class := traffic_class_rule |
Sean Condon | 74e8d94 | 2022-03-16 19:20:08 +0000 | [diff] [blame] | 16 | config := { |
SeanCondon | e155baf | 2022-04-11 18:55:55 +0100 | [diff] [blame] | 17 | "application": application, |
| 18 | "site": site, |
| 19 | "template": template, |
| 20 | "traffic_class": traffic_class |
Sean Condon | 74e8d94 | 2022-03-16 19:20:08 +0000 | [diff] [blame] | 21 | } |
| 22 | } |
| 23 | |
SeanCondon | e155baf | 2022-04-11 18:55:55 +0100 | [diff] [blame] | 24 | application_rule[application] { |
| 25 | ["AetherROCAdmin", input.target][_] == input.groups[i] |
| 26 | application := input.application |
| 27 | } |
| 28 | |
| 29 | site_rule[site] { |
| 30 | ["AetherROCAdmin", input.target][_] == input.groups[i] |
| 31 | site := input.site |
| 32 | } |
| 33 | |
| 34 | template_rule[template] { |
| 35 | ["AetherROCAdmin", input.target][_] == input.groups[i] |
| 36 | template := input.template |
| 37 | } |
| 38 | |
| 39 | traffic_class_rule[traffic_class] { |
| 40 | ["AetherROCAdmin", input.target][_] == input.groups[i] |
| 41 | traffic_class := input.traffic_class |
Sean Condon | 74e8d94 | 2022-03-16 19:20:08 +0000 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | can_update_enterprise = true { |
| 45 | update_enterprise := input.updates.enterprises.enterprise[_] |
| 46 | ["AetherROCAdmin", update_enterprise.enterprise_id][_] == input.groups[i] |
| 47 | } |