blob: 171ba6a8c5b6f66edce695c71c4882a14a7fd7c9 [file] [log] [blame]
Sean Condonf69b0472022-01-11 14:10:45 +00001# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
2#
3# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
5package aether_2_0_0
6
7echo[config] {
8 config := input
9}
10
11allowed[config] {
Sean Condon0eeac172022-01-24 09:14:13 +000012 enterprise := enterprise_rule
Sean Condonf69b0472022-01-11 14:10:45 +000013 config := {
Sean Condon0eeac172022-01-24 09:14:13 +000014 "connectivity_services": object.get(input, "connectivity_services", {}),
15 "enterprises": {
Sean Condonf69b0472022-01-11 14:10:45 +000016 "enterprise": [
17 enterprise
18 ]
Sean Condonf69b0472022-01-11 14:10:45 +000019 }
20 }
21}
22
Sean Condon0eeac172022-01-24 09:14:13 +000023enterprise_rule[enterprise] {
24 enterprise := input.enterprises.enterprise[_]
Sean Condonaed92372022-02-03 16:43:23 +000025 ["AetherROCAdmin", enterprise.enterprise_id][_] == input.groups[i]
Sean Condonf69b0472022-01-11 14:10:45 +000026}
27
28can_update_enterprise = true {
Sean Condon0eeac172022-01-24 09:14:13 +000029 update_enterprise := input.updates.enterprises.enterprise[_]
Sean Condonaed92372022-02-03 16:43:23 +000030 ["AetherROCAdmin", update_enterprise.enterprise_id][_] == input.groups[i]
Sean Condonf69b0472022-01-11 14:10:45 +000031}