| |
| /* |
| * NO RW COPYRIGHT |
| * |
| */ |
| |
| module ietf-network { |
| yang-version 1; |
| namespace "urn:ietf:params:xml:ns:yang:ietf-network"; |
| prefix nd; |
| |
| import ietf-inet-types { |
| prefix inet; |
| } |
| |
| import rw-pb-ext { |
| prefix "rwpb"; |
| } |
| |
| organization "TBD"; |
| contact |
| "WILL-BE-DEFINED-LATER"; |
| description |
| "This module defines a common base model for a collection |
| of nodes in a network. Node definitions s are further used |
| in network topologies and inventories."; |
| |
| revision 2015-06-08 { |
| description |
| "Initial revision."; |
| reference "draft-ietf-i2rs-yang-network-topo-01"; |
| } |
| |
| typedef node-id { |
| type inet:uri; |
| description |
| "Identifier for a node."; |
| } |
| |
| typedef network-id { |
| type inet:uri; |
| description |
| "Identifier for a network."; |
| } |
| |
| grouping network-ref { |
| description |
| "Contains the information necessary to reference a network, |
| for example an underlay network."; |
| leaf network-ref { |
| type leafref { |
| path "/network/network-id"; |
| } |
| description |
| "Used to reference a network, for example an underlay |
| network."; |
| } |
| } |
| |
| grouping node-ref { |
| description |
| "Contains the information necessary to reference a node."; |
| leaf node-ref { |
| type leafref { |
| path "/network[network-id=current()/../network-ref]"+ |
| "/node/node-id"; |
| } |
| description |
| "Used to reference a node. |
| Nodes are identified relative to the network they are |
| contained in."; |
| } |
| uses network-ref; |
| } |
| |
| list network { |
| config false; |
| key "network-id"; |
| description |
| "Describes a network. |
| A network typically contains an inventory of nodes, |
| topological information (augmented through |
| network-topology model), as well as layering |
| information."; |
| container network-types { |
| description |
| "Serves as an augmentation target. |
| The network type is indicated through corresponding |
| presence containers augmented into this container."; |
| } |
| leaf network-id { |
| type network-id; |
| description |
| "Identifies a network."; |
| } |
| leaf server-provided { |
| type boolean; |
| config false; |
| description |
| "Indicates whether the information concerning this |
| particular network is populated by the server |
| (server-provided true, the general case for network |
| information discovered from the server), |
| or whether it is configured by a client |
| (server-provided true, possible e.g. for |
| service overlays managed through a controller)."; |
| } |
| list supporting-network { |
| key "network-ref"; |
| description |
| "An underlay network, used to represent layered network |
| topologies."; |
| |
| leaf network-ref { |
| type leafref { |
| path "/network/network-id"; |
| } |
| description |
| "References the underlay network."; |
| } |
| } |
| list node { |
| key "node-id"; |
| description |
| "The inventory of nodes of this network."; |
| leaf node-id { |
| type node-id; |
| description |
| "Identifies a node uniquely within the containing |
| network."; |
| } |
| list supporting-node { |
| key "network-ref node-ref"; |
| description |
| "Represents another node, in an underlay network, that |
| this node is supported by. Used to represent layering |
| structure."; |
| leaf network-ref { |
| type leafref { |
| path "../../../supporting-network/network-ref"; |
| } |
| description |
| "References the underlay network that the |
| underlay node is part of."; |
| } |
| leaf node-ref { |
| type leafref { |
| path "/network/node/node-id"; |
| } |
| description |
| "References the underlay node itself."; |
| } |
| } |
| } |
| } |
| } |
| |