blob: 4c146c3540beb1486d07866ecaaaef797bd81685 [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
Scott Baker910f4062021-09-22 13:26:23 -070057 leaf address {
58 type ietf:host;
59 mandatory true;
60 description
61 "Address of this application. Either a hostname, an IP, or a subnet.";
62 }
63
Scott Bakerc9d3d842021-09-17 11:32:53 -070064 list endpoint {
65 key "name";
Scott Bakerc9d3d842021-09-17 11:32:53 -070066 leaf name {
67 type string;
68 description
69 "Name of this endpoint";
70 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070071 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
Scott Baker910f4062021-09-22 13:26:23 -070085 "Protocol of this endpoint";
86 }
87 container mbr {
88 description "Maximum bitrate";
89 leaf uplink {
90 type at:bitrate;
91 units mbr;
92 description "Per-Device per-Application mbr uplink data rate in mbps";
93 }
94
95 leaf downlink {
96 type at:bitrate;
97 units mbr;
98 description "Per-Device per application mbr downlink data rate in mbps";
99 }
100 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700101 }
102
103 leaf enterprise {
104 type leafref {
105 path "/ent:enterprise/ent:enterprise/ent:id";
106 }
107 mandatory true;
108 description
109 "Link to enterprise that owns this Application. May be set to None if the application is global to all Enterprises.";
110 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700111 }
Scott Baker910f4062021-09-22 13:26:23 -0700112 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700113}