Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 1 | module xos-core { |
Peter K. Lee | 5539580 | 2016-07-15 18:25:40 -0700 | [diff] [blame] | 2 | namespace "urn:onlab:xos:core"; |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 3 | prefix xos; |
| 4 | yang-version 1.1; |
| 5 | |
| 6 | organization |
| 7 | "Open Networking Lab (XOS) / Corenova Technologies"; |
| 8 | |
| 9 | contact |
| 10 | "Larry Peterson <llp@onlab.us> |
| 11 | Peter K. Lee <peter@corenova.com>"; |
| 12 | |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 13 | description |
| 14 | "This module contains a collection of core models for XOS. |
| 15 | |
| 16 | Copyright (c) 2016 ON.LAB and the persons identified as authors of |
| 17 | the code. All rights reserved. |
| 18 | |
| 19 | Redistribution and use in source and binary forms, with or without |
| 20 | modification, is permitted pursuant to, and subject to the license |
| 21 | terms of the Apache License, Version 2.0 which accompanies this |
| 22 | distribution, and is available at |
| 23 | (http://www.apache.org/licenses/LICENSE-2.0)."; |
| 24 | |
| 25 | revision 2016-07-14 { |
| 26 | description "Initial revision."; |
| 27 | } |
| 28 | |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 29 | import ietf-yang-types { prefix yang; } |
Peter K. Lee | 5539580 | 2016-07-15 18:25:40 -0700 | [diff] [blame] | 30 | import ietf-inet-types { prefix inet; } |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 31 | |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 32 | feature synchronizer { |
| 33 | description |
| 34 | "Enables configuration synchronization to the distributed store."; |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | identity kind; |
| 38 | identity generic { base kind; } |
| 39 | identity subscriber { base kind; } |
| 40 | |
| 41 | typedef unique-identifier { |
| 42 | description "defines valid formats for external reference id"; |
| 43 | type union { |
Peter K. Lee | 4302f47 | 2016-07-28 03:51:39 -0700 | [diff] [blame] | 44 | type uint32 { range 1..max; } |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 45 | type yang:uuid; |
| 46 | type inet:uri; |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 47 | } |
| 48 | } |
| 49 | |
| 50 | grouping tenant-root { |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 51 | description |
| 52 | "A Tenant Root is one of the things that can sit at the root of a chain |
| 53 | of tenancy. This object represents a node."; |
| 54 | |
| 55 | leaf id { |
| 56 | type unique-identifier; |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 57 | mandatory true; |
| 58 | } |
| 59 | leaf kind { |
| 60 | type identityref { |
| 61 | base kind; |
| 62 | } |
| 63 | default generic; |
| 64 | } |
| 65 | leaf name { |
| 66 | type string { |
| 67 | length 0..255; |
| 68 | } |
| 69 | description "Specify name of the TenantRoot"; |
| 70 | } |
| 71 | |
| 72 | leaf service-specific-attribute { type string; } |
| 73 | leaf service-specific-id { |
| 74 | type unique-identifier; |
| 75 | mandatory true; |
| 76 | } |
| 77 | |
Peter K. Lee | af777da | 2016-08-17 04:33:00 -0700 | [diff] [blame] | 78 | list subscribed-tenant { |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 79 | config false; |
| 80 | // not exactly clear how this is populated |
| 81 | } |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | grouping subscriber { |
| 85 | uses tenant-root { |
| 86 | refine kind { default subscriber; } |
| 87 | } |
| 88 | // seems we should have interesting attributes specific to subscriber? |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 89 | } |
| 90 | |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 91 | /*** main configuration tree for XOS ***/ |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 92 | |
| 93 | container api { |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 94 | description |
| 95 | "The primary configuration interaction endpoint"; |
| 96 | |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 97 | container service { |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 98 | description |
| 99 | "placeholder endpoint for services to augment"; |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 100 | } |
| 101 | container tenant { |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 102 | description |
| 103 | "placeholder endpoint for tenants to augment"; |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 104 | } |
| 105 | } |
| 106 | |
| 107 | } |