blob: df7713877319796f76ef3fa46114ece48dd3e6a0 [file] [log] [blame]
Peter K. Lee2bade4d2016-07-14 16:19:56 -07001module cord-device {
Peter K. Lee55395802016-07-15 18:25:40 -07002 namespace "urn:onlab:cord:device";
Peter K. Lee2bade4d2016-07-14 16:19:56 -07003 prefix cord-dev;
4 yang-version 1.1;
5
6 organization
7 "Open Networking Lab (CORD) / Corenova Technologies";
8
9 contact
10 "Larry Peterson <llp@onlab.us>
11 Peter K. Lee <peter@corenova.com>";
12
13 import ietf-yang-types { prefix yang; }
14
15 revision 2016-07-14 {
16 description "Initial revision.";
17 }
18
19 typedef bandwidth {
Peter K. Lee55395802016-07-15 18:25:40 -070020 type uint32 {
21 range 1000000..max; // should be at least 1 Mbps?
22 }
Peter K. Lee2bade4d2016-07-14 16:19:56 -070023 units 'bps';
24 }
25
26 grouping device {
27 leaf mac { type yang:mac-address; mandatory true; }
28 leaf identity { type string; }
29
30 leaf subscriber {
31 type instance-identifier;
32 config false;
33 }
34
35 container features {
36 // how are the uplink/downlink speeds defined here related to 'subscriber'?
37 leaf uplink-speed {
38 type bandwidth;
39 default 1000000000;
40 }
41 leaf downlink-speed {
42 type bandwidth;
43 default 1000000000;
44 }
45 action update;
46 }
47 action save;
48 }
49}