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] { |
| 12 | enterprise := enterprise_rule |
| 13 | config := { |
| 14 | "connectivity_services": object.get(input, "connectivity_services", {}), |
| 15 | "enterprises": { |
| 16 | "enterprise": [ |
| 17 | enterprise |
| 18 | ] |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | enterprise_rule[enterprise] { |
| 24 | enterprise := input.enterprises.enterprise[_] |
| 25 | ["AetherROCAdmin", enterprise.enterprise_id][_] == input.groups[i] |
| 26 | } |
| 27 | |
| 28 | can_update_enterprise = true { |
| 29 | update_enterprise := input.updates.enterprises.enterprise[_] |
| 30 | ["AetherROCAdmin", update_enterprise.enterprise_id][_] == input.groups[i] |
| 31 | } |