blob: 0f7d4b677bbe48557da3bc95f39577f8b4bb3f99 [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 onf-application {
6 namespace "http://opennetworking.org/enterprise/application";
7 prefix app;
8
9 import ietf-inet-types{ prefix ietf; }
10 import ietf-yang-types{ prefix yg; }
11 import onf-aether-types{ prefix at; }
12 import onf-enterprise{ prefix ent; }
13
14 organization "Open Networking Foundation.";
15 contact "Scott Baker";
16 description
17 "An Aether Application is an application that devices may
18 connect to. Includes a set of endpoints where services are
19 provided.";
20
21 revision "2021-09-10" {
22 description "Aether Application.";
23 reference "RFC 6087";
24 }
25
26 typedef application-id {
27 type yg:yang-identifier {
28 length 1..32;
29 }
30 }
31
32 container application {
33 description "The top level container";
34
35 list application {
36 key "id";
37 description
38 "List of applications";
39
40 leaf id {
41 type application-id;
42 description "ID for this application.";
43 }
44
45 leaf display-name {
46 type string {
47 length 1..80;
48 }
49 description "display name to use in GUI or CLI";
50 }
51
52 leaf description {
53 type at:description;
54 description "description of this application";
55 }
56
57 list endpoint {
58 key "name";
59 max-elements 1;
60 leaf name {
61 type string;
62 description
63 "Name of this endpoint";
64 }
65 leaf address {
66 type ietf:host;
67 mandatory true;
68 description
69 "Address of this endpoint. Either a hostname, and IP, or a subnet.";
70 }
71 leaf port-start {
72 type ietf:port-number;
73 mandatory true;
74 description
75 "First port in range";
76 }
77 leaf port-end {
78 type ietf:port-number;
79 description
80 "Last port in range";
81 }
82 leaf protocol {
83 type at:protocol;
84 description
85 "Name of this endpoint";
86 }
87 }
88
89 leaf enterprise {
90 type leafref {
91 path "/ent:enterprise/ent:enterprise/ent:id";
92 }
93 mandatory true;
94 description
95 "Link to enterprise that owns this Application. May be set to None if the application is global to all Enterprises.";
96 }
97
98 container mbr {
99 description "Maximum bitrate";
100 leaf uplink {
101 type at:bitrate;
102 units mbr;
103 description "Per-Application mbr uplink data rate in mbps";
104 }
105
106 leaf downlink {
107 type at:bitrate;
108 units mbr;
109 description "Per-Application mbr downlink data rate in mbps";
110 }
111 }
112 }
113 }
114}