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