Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2021 Open Networking Foundation |
| 2 | // |
| 3 | // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 4 | |
| 5 | module 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 Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 13 | import onf-traffic-class{ prefix tc; } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 14 | |
| 15 | organization "Open Networking Foundation."; |
| 16 | contact "Scott Baker"; |
Scott Baker | ebb99ae | 2021-11-01 15:34:51 -0700 | [diff] [blame] | 17 | description |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 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 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 31 | description "The typedef for application-id"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | container application { |
| 35 | description "The top level container"; |
| 36 | |
| 37 | list application { |
| 38 | key "id"; |
| 39 | description |
| 40 | "List of applications"; |
| 41 | |
| 42 | leaf id { |
| 43 | type application-id; |
| 44 | description "ID for this application."; |
| 45 | } |
| 46 | |
| 47 | leaf display-name { |
| 48 | type string { |
| 49 | length 1..80; |
| 50 | } |
| 51 | description "display name to use in GUI or CLI"; |
| 52 | } |
| 53 | |
| 54 | leaf description { |
| 55 | type at:description; |
| 56 | description "description of this application"; |
| 57 | } |
| 58 | |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 59 | leaf address { |
| 60 | type ietf:host; |
| 61 | mandatory true; |
| 62 | description |
| 63 | "Address of this application. Either a hostname, an IP, or a subnet."; |
| 64 | } |
| 65 | |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 66 | list endpoint { |
Scott Baker | c4b3e27 | 2021-11-01 17:13:48 -0700 | [diff] [blame] | 67 | key "endpoint-id"; |
| 68 | leaf endpoint-id { |
Scott Baker | ebb99ae | 2021-11-01 15:34:51 -0700 | [diff] [blame] | 69 | type yg:yang-identifier; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 70 | description |
Scott Baker | ebb99ae | 2021-11-01 15:34:51 -0700 | [diff] [blame] | 71 | "Id of this endpoint"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 72 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 73 | leaf port-start { |
| 74 | type ietf:port-number; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 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 Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 86 | "Protocol of this endpoint"; |
| 87 | } |
| 88 | container mbr { |
| 89 | description "Maximum bitrate"; |
| 90 | leaf uplink { |
| 91 | type at:bitrate; |
Scott Baker | 3f1cb27 | 2021-10-26 14:28:05 -0700 | [diff] [blame] | 92 | units bps; |
| 93 | description "Per-Device per-Application MBR uplink data rate in bps"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 94 | } |
| 95 | |
| 96 | leaf downlink { |
| 97 | type at:bitrate; |
Scott Baker | 3f1cb27 | 2021-10-26 14:28:05 -0700 | [diff] [blame] | 98 | units bps; |
| 99 | description "Per-Device per application MBR downlink data rate in bps"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 100 | } |
| 101 | } |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 102 | 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 Baker | ebb99ae | 2021-11-01 15:34:51 -0700 | [diff] [blame] | 109 | leaf display-name { |
| 110 | type string { |
| 111 | length 1..80; |
| 112 | } |
| 113 | description "display name to use in GUI or CLI"; |
| 114 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 115 | description "list for endpoint"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 116 | } |
| 117 | |
| 118 | leaf enterprise { |
| 119 | type leafref { |
| 120 | path "/ent:enterprise/ent:enterprise/ent:id"; |
| 121 | } |
| 122 | mandatory true; |
| 123 | description |
| 124 | "Link to enterprise that owns this Application. May be set to None if the application is global to all Enterprises."; |
| 125 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 126 | } |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 127 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 128 | } |