janani b | ebb143d | 2016-07-14 19:35: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 | organization |
| 7 | "IETF I2RS (Interface to the Routing System) Working Group"; |
| 8 | grouping node-ref { |
| 9 | description |
| 10 | "Contains the information necessary to reference a node."; |
| 11 | container node-from-grouping { |
| 12 | leaf node-ref { |
| 13 | type leafref { |
| 14 | path "/networks/network/node/node-id"; |
| 15 | require-instance false; |
| 16 | } |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | container networks { |
| 21 | description |
| 22 | "Serves as top-level container for a list of networks."; |
| 23 | list network { |
| 24 | key "network-id"; |
| 25 | description |
| 26 | "Describes a network. |
| 27 | A network typically contains an inventory of nodes, |
| 28 | topological information (augmented through |
| 29 | network-topology model), as well as layering |
| 30 | information."; |
| 31 | container network-types { |
| 32 | description |
| 33 | "Serves as an augmentation target. |
| 34 | The network type is indicated through corresponding |
| 35 | presence containers augmented into this container."; |
| 36 | } |
| 37 | leaf network-id { |
| 38 | type string; |
| 39 | description |
| 40 | "Identifies a network."; |
| 41 | } |
| 42 | list supporting-network { |
| 43 | key "network-ref"; |
| 44 | description |
| 45 | "An underlay network, used to represent layered network |
| 46 | topologies."; |
| 47 | leaf network-ref { |
| 48 | type leafref { |
| 49 | path "/networks/network/network-id"; |
| 50 | require-instance false; |
| 51 | } |
| 52 | description |
| 53 | "References the underlay network."; |
| 54 | } |
| 55 | } |
| 56 | list node { |
| 57 | key "node-id"; |
| 58 | description |
| 59 | "The inventory of nodes of this network."; |
| 60 | leaf node-id { |
| 61 | type uint8; |
| 62 | description |
| 63 | "Identifies a node uniquely within the containing |
| 64 | network."; |
| 65 | } |
| 66 | list supporting-node { |
| 67 | key "network-ref node-ref"; |
| 68 | description |
| 69 | "Represents another node, in an underlay network, that |
| 70 | this node is supported by. Used to represent layering |
| 71 | structure."; |
| 72 | leaf network-ref { |
| 73 | type leafref { |
| 74 | path "../../../supporting-network/network-ref"; |
| 75 | require-instance false; |
| 76 | } |
| 77 | description |
| 78 | "References the underlay network that the |
| 79 | underlay node is part of."; |
| 80 | } |
| 81 | leaf node-ref { |
| 82 | type leafref { |
| 83 | path "/networks/network/node/node-id"; |
| 84 | require-instance false; |
| 85 | } |
| 86 | description |
| 87 | "References the underlay node itself."; |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | uses node-ref; |
| 93 | } |
| 94 | |
| 95 | } |