Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 1 | module cord-core { |
| 2 | |
| 3 | namespace "urn:onlab:cord"; |
| 4 | prefix cord; |
| 5 | yang-version 1.1; |
| 6 | |
| 7 | organization |
| 8 | "Open Networking Lab (CORD) / Corenova Technologies"; |
| 9 | |
| 10 | contact |
| 11 | "Larry Peterson <llp@onlab.us> |
| 12 | Peter K. Lee <peter@corenova.com>"; |
| 13 | |
| 14 | description |
| 15 | "This module contains a collection of core models for CORD. |
| 16 | |
| 17 | Copyright (c) 2016 ON.LAB and the persons identified as authors of |
| 18 | the code. All rights reserved. |
| 19 | |
| 20 | Redistribution and use in source and binary forms, with or without |
| 21 | modification, is permitted pursuant to, and subject to the license |
| 22 | terms of the Apache License, Version 2.0 which accompanies this |
| 23 | distribution, and is available at |
| 24 | (http://www.apache.org/licenses/LICENSE-2.0)."; |
| 25 | |
| 26 | revision 2016-07-22 { |
| 27 | description "Initial revision."; |
| 28 | } |
| 29 | |
| 30 | import xos-core { prefix xos; } |
| 31 | import cord-subscriber { prefix csub; } |
| 32 | import corenova-node { prefix node; } |
| 33 | |
| 34 | /*** primary configuration tree for this module ***/ |
| 35 | |
Peter K. Lee | 4302f47 | 2016-07-28 03:51:39 -0700 | [diff] [blame] | 36 | list subscriber { |
| 37 | uses csub:subscriber-controller; |
| 38 | key "id"; |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 39 | |
Peter K. Lee | 4302f47 | 2016-07-28 03:51:39 -0700 | [diff] [blame] | 40 | description |
| 41 | "Authorative list of all subscriber instances"; |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 42 | |
Peter K. Lee | 4302f47 | 2016-07-28 03:51:39 -0700 | [diff] [blame] | 43 | leaf humanReadableName { |
| 44 | config false; |
| 45 | type string { |
| 46 | pattern '^cordSubscriber-\w+$'; |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 47 | } |
Peter K. Lee | 4302f47 | 2016-07-28 03:51:39 -0700 | [diff] [blame] | 48 | } |
| 49 | action delete; |
| 50 | } |
| 51 | |
| 52 | // here we augment the /api/tenant API configuration tree in 'xos' module |
| 53 | augment "/xos:api/xos:tenant" { |
| 54 | container cord { |
| 55 | node:link subscriber { path "/cord:subscriber"; } |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 56 | } |
| 57 | } |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 58 | } |