Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 1 | module cord-device { |
Peter K. Lee | 5539580 | 2016-07-15 18:25:40 -0700 | [diff] [blame] | 2 | namespace "urn:onlab:cord:device"; |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 3 | 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. Lee | 5539580 | 2016-07-15 18:25:40 -0700 | [diff] [blame] | 20 | type uint32 { |
| 21 | range 1000000..max; // should be at least 1 Mbps? |
| 22 | } |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 23 | 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 | } |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 47 | } |
| 48 | } |