VinodKumarS-Huawei | 95169ea | 2016-06-01 14:30:22 +0530 | [diff] [blame] | 1 | module ietf-network { |
| 2 | yang-version 1; |
| 3 | namespace "urn:ietf:params:xml:ns:yang:ietf-network"; |
| 4 | prefix nd; |
| 5 | |
| 6 | import ietf-inet-types { |
| 7 | prefix inet; |
| 8 | } |
| 9 | |
| 10 | organization |
| 11 | "IETF I2RS (Interface to the Routing System) Working Group"; |
| 12 | |
| 13 | contact |
| 14 | "WG Web: <http://tools.ietf.org/wg/i2rs/> |
| 15 | WG List: <mailto:i2rs@ietf.org> |
| 16 | |
| 17 | WG Chair: Susan Hares |
| 18 | <mailto:shares@ndzh.com> |
| 19 | |
| 20 | WG Chair: Jeffrey Haas |
| 21 | <mailto:jhaas@pfrc.org> |
| 22 | |
| 23 | Editor: Alexander Clemm |
| 24 | <mailto:alex@cisco.com> |
| 25 | |
| 26 | Editor: Jan Medved |
| 27 | <mailto:jmedved@cisco.com> |
| 28 | |
| 29 | Editor: Robert Varga |
| 30 | <mailto:rovarga@cisco.com> |
| 31 | |
| 32 | Editor: Tony Tkacik |
| 33 | <mailto:ttkacik@cisco.com> |
| 34 | |
| 35 | Editor: Nitin Bahadur |
| 36 | <mailto:nitin_bahadur@yahoo.com> |
| 37 | |
| 38 | Editor: Hariharan Ananthakrishnan |
| 39 | <mailto:hari@packetdesign.com>"; |
| 40 | |
| 41 | description |
| 42 | "This module defines a common base model for a collection |
| 43 | of nodes in a network. Node definitions are further used |
| 44 | in network topologies and inventories. |
| 45 | |
| 46 | Copyright (c) 2015 IETF Trust and the persons identified as |
| 47 | authors of the code. All rights reserved. |
| 48 | |
| 49 | Redistribution and use in source and binary forms, with or |
| 50 | without modification, is permitted pursuant to, and subject |
| 51 | to the license terms contained in, the Simplified BSD License |
| 52 | set forth in Section 4.c of the IETF Trust's Legal Provisions |
| 53 | Relating to IETF Documents |
| 54 | (http://trustee.ietf.org/license-info). |
| 55 | |
| 56 | This version of this YANG module is part of |
| 57 | draft-ietf-i2rs-yang-network-topo-02; |
| 58 | see the RFC itself for full legal notices. |
| 59 | |
| 60 | NOTE TO RFC EDITOR: Please replace above reference to |
| 61 | draft-ietf-i2rs-yang-network-topo-02 with RFC |
| 62 | number when published (i.e. RFC xxxx)."; |
| 63 | |
| 64 | revision 2015-12-08 { |
| 65 | description |
| 66 | "Initial revision. |
| 67 | NOTE TO RFC EDITOR: Please replace the following reference |
| 68 | to draft-ietf-i2rs-yang-network-topo-02 with |
| 69 | RFC number when published (i.e. RFC xxxx)."; |
| 70 | reference |
| 71 | "draft-ietf-i2rs-yang-network-topo-02"; |
| 72 | } |
| 73 | |
| 74 | typedef node-id { |
| 75 | type inet:uri; |
| 76 | description |
| 77 | "Identifier for a node."; |
| 78 | } |
| 79 | |
| 80 | typedef network-id { |
| 81 | type inet:uri; |
| 82 | description |
| 83 | "Identifier for a network."; |
| 84 | } |
| 85 | grouping network-ref { |
| 86 | description |
| 87 | "Contains the information necessary to reference a network, |
| 88 | for example an underlay network."; |
| 89 | leaf network-ref { |
| 90 | type network-id; |
| 91 | description |
| 92 | "Used to reference a network, for example an underlay |
| 93 | network."; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | grouping node-ref { |
| 98 | description |
| 99 | "Contains the information necessary to reference a node."; |
| 100 | leaf node-ref { |
| 101 | type node-id; |
| 102 | description |
| 103 | "Used to reference a node. |
| 104 | Nodes are identified relative to the network they are |
| 105 | contained in."; |
| 106 | } |
| 107 | uses network-ref; |
| 108 | } |
| 109 | |
| 110 | container networks { |
| 111 | description |
| 112 | "Serves as top-level container for a list of networks."; |
| 113 | list network { |
| 114 | key "network-id"; |
| 115 | description |
| 116 | "Describes a network. |
| 117 | A network typically contains an inventory of nodes, |
| 118 | topological information (augmented through |
| 119 | network-topology model), as well as layering |
| 120 | information."; |
| 121 | container network-types { |
| 122 | description |
| 123 | "Serves as an augmentation target. |
| 124 | The network type is indicated through corresponding |
| 125 | presence containers augmented into this container."; |
| 126 | } |
| 127 | leaf network-id { |
| 128 | type network-id; |
| 129 | description |
| 130 | "Identifies a network."; |
| 131 | } |
| 132 | list supporting-network { |
| 133 | key "network-ref"; |
| 134 | description |
| 135 | "An underlay network, used to represent layered network |
| 136 | topologies."; |
| 137 | leaf network-ref { |
| 138 | type network-id; |
| 139 | description |
| 140 | "References the underlay network."; |
| 141 | } |
| 142 | } |
| 143 | list node { |
| 144 | key "node-id"; |
| 145 | description |
| 146 | "The inventory of nodes of this network."; |
| 147 | leaf node-id { |
| 148 | type node-id; |
| 149 | description |
| 150 | "Identifies a node uniquely within the containing |
| 151 | network."; |
| 152 | } |
| 153 | list supporting-node { |
| 154 | key "network-ref node-ref"; |
| 155 | description |
| 156 | "Represents another node, in an underlay network, that |
| 157 | this node is supported by. Used to represent layering |
| 158 | structure."; |
| 159 | leaf network-ref { |
| 160 | type network-id; |
| 161 | description |
| 162 | "References the underlay network that the |
| 163 | underlay node is part of."; |
| 164 | } |
| 165 | leaf node-ref { |
| 166 | type node-id; |
| 167 | description |
| 168 | "References the underlay node itself."; |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | container networks-state { |
| 175 | config false; |
| 176 | description |
| 177 | "Serves as top-level container for a list of state information |
| 178 | for networks"; |
| 179 | list network { |
| 180 | key "network-ref"; |
| 181 | description |
| 182 | "Data nodes representing operational data and state of |
| 183 | networks. |
| 184 | An instance is automatically created for every network |
| 185 | in the corresponding list under the networks container."; |
| 186 | uses network-ref; |
| 187 | leaf server-provided { |
| 188 | type boolean; |
| 189 | description |
| 190 | "Indicates whether the information concerning this |
| 191 | particular network is populated by the server |
| 192 | (server-provided true, the general case for network |
| 193 | information discovered from the server), |
| 194 | or whether it is configured by a client |
| 195 | (server-provided true, possible e.g. for |
| 196 | service overlays managed through a controller)."; |
| 197 | } |
| 198 | } |
| 199 | } |
| 200 | } |