blob: 460463f0721c64508ea34e77a79e33f1bd690f74 [file] [log] [blame]
Scott Bakerc9d3d842021-09-17 11:32:53 -07001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
Sean Condon160ec1d2022-02-08 12:58:25 +00003// SPDX-License-Identifier: Apache-2.0
Scott Bakerc9d3d842021-09-17 11:32:53 -07004
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 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000026 description "The typedef for service-group-id";
Scott Bakerc9d3d842021-09-17 11:32:53 -070027 }
28
29 typedef service-kind {
30 type string {
31 length 1..32;
32 pattern "default|on-demand";
33 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000034 description "The typedef for service-kind";
Scott Bakerc9d3d842021-09-17 11:32:53 -070035 }
36
37 container service-group {
38 description "The top level container";
39
40 list service-group {
41 key "id";
42 description
43 "List of service groups";
44
45 leaf id {
46 type service-group-id;
47 description "ID for this service group.";
48 }
49
50 leaf display-name {
51 type string {
52 length 1..80;
53 }
54 description "display name to use in GUI or CLI";
55 }
56
57 list service-policies {
58 key "service-policy";
59 leaf service-policy {
60 type leafref {
61 path "/serv:service-policy/serv:service-policy/serv:id";
62 }
63 description
64 "Link to service policy";
65 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000066 leaf kind {
Scott Bakerc9d3d842021-09-17 11:32:53 -070067 type service-kind;
68 default "default";
69 description
70 "Type of service link";
71 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000072 description "The list for service-policies";
73 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070074
75 leaf description {
76 type string {
77 length 1..100;
78 }
79 description "description of this service group";
PUSHP RAJba2e32f2021-11-02 10:39:24 +000080 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070081 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000082 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070083}