blob: 6689a0b62a5c2133b51f5d23e433dd3843e1e350 [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[_]
25 ["AetherROCAdmin", enterprise.ent_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[_]
30 ["AetherROCAdmin", update_enterprise.ent_id][_] == input.groups[i]
Sean Condonf69b0472022-01-11 14:10:45 +000031}