blob: 9f2e7daccc164b3c4a8cc6676953269570c6ba85 [file] [log] [blame]
Scott Bakerc9d3d842021-09-17 11:32:53 -07001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
3// SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
5module service-group {
6 namespace "http://opennetworking.org/aether/service-group";
7 prefix sg;
8
9 import service-policy { prefix serv; }
10
11 organization "Open Networking Foundation.";
12 contact "Scott Baker";
13 description "To generate JSON from this use command
14 pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json
15 Copied from YangUIComponents project";
16
17 revision "2021-03-04" {
18 description "An Aether Service Group";
19 reference "RFC 6087";
20 }
21
22 typedef service-group-id {
23 type string {
24 length 1..32;
25 }
26 }
27
28 typedef service-kind {
29 type string {
30 length 1..32;
31 pattern "default|on-demand";
32 }
33 }
34
35 container service-group {
36 description "The top level container";
37
38 list service-group {
39 key "id";
40 description
41 "List of service groups";
42
43 leaf id {
44 type service-group-id;
45 description "ID for this service group.";
46 }
47
48 leaf display-name {
49 type string {
50 length 1..80;
51 }
52 description "display name to use in GUI or CLI";
53 }
54
55 list service-policies {
56 key "service-policy";
57 leaf service-policy {
58 type leafref {
59 path "/serv:service-policy/serv:service-policy/serv:id";
60 }
61 description
62 "Link to service policy";
63 }
64 leaf kind {
65 type service-kind;
66 default "default";
67 description
68 "Type of service link";
69 }
70 }
71
72 leaf description {
73 type string {
74 length 1..100;
75 }
76 description "description of this service group";
77 }
78 }
79 }
80}