Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2021 Open Networking Foundation |
| 2 | // |
Sean Condon | 160ec1d | 2022-02-08 12:58:25 +0000 | [diff] [blame] | 3 | // SPDX-License-Identifier: Apache-2.0 |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 4 | |
| 5 | module enterprise { |
| 6 | namespace "http://opennetworking.org/aether/enterprise"; |
| 7 | prefix ent; |
| 8 | |
| 9 | import connectivity-service { prefix cs; } |
| 10 | |
| 11 | organization "Open Networking Foundation."; |
| 12 | contact "Scott Baker"; |
| 13 | description "To generate JSON from this use command |
| 14 | pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json |
| 15 | Copied from YangUIComponents project"; |
| 16 | |
| 17 | revision "2020-11-30" { |
| 18 | description "An Aether Enterprise. Used to distinguish ownership of devices and other resources as well as a domain of configuration."; |
| 19 | reference "RFC 6087"; |
| 20 | } |
| 21 | |
| 22 | typedef enterprise-id { |
| 23 | type string { |
| 24 | length 1..32; |
| 25 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 26 | description "The typedef for enterprise-id"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | container enterprise { |
| 30 | description "The top level container"; |
| 31 | |
| 32 | list enterprise { |
| 33 | key "id"; |
| 34 | description |
| 35 | "List of enterprises"; |
| 36 | |
| 37 | leaf id { |
| 38 | type enterprise-id; |
| 39 | description "ID for this enterprise."; |
| 40 | } |
| 41 | |
| 42 | leaf display-name { |
| 43 | type string { |
| 44 | length 1..80; |
| 45 | } |
| 46 | description "display name to use in GUI or CLI"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 47 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 48 | |
| 49 | leaf description { |
| 50 | type string { |
| 51 | length 1..100; |
| 52 | } |
| 53 | description "description of this enterprise"; |
| 54 | } |
| 55 | |
| 56 | list connectivity-service { |
| 57 | key "connectivity-service"; |
| 58 | leaf connectivity-service { |
| 59 | type leafref { |
| 60 | path "/cs:connectivity-service/cs:connectivity-service/cs:id"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 61 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 62 | description |
| 63 | "Link to connectivity services where configuration should be pushed for this enterprise's devices"; |
| 64 | } |
| 65 | leaf enabled { |
| 66 | type boolean; |
| 67 | default true; |
| 68 | description |
| 69 | "Allow or disallow pushes to this connectivity service"; |
| 70 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 71 | description "The list for connectivity-service"; |
| 72 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 73 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 74 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 75 | } |