X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fcode-generator%2Fsamples%2Fmaven-code-gen-sample%2Fsrc%2Fmain%2Fyang%2Fcontroller-network.yang;h=ce0b6b08241f3444292e774839c5428defeac1c9;hp=600e87d2679c8e2ad0cf3e2eb2481327631f21ca;hb=c9006d027a5c5b639e57aa7b8484ec1ff3497dc8;hpb=a84e3c483f492477ace9f6da6908754cb257c225 diff --git a/opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/controller-network.yang b/opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/controller-network.yang index 600e87d267..ce0b6b0824 100644 --- a/opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/controller-network.yang +++ b/opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/controller-network.yang @@ -1,171 +1,167 @@ module controller-network { - yang-version 1; - namespace "urn:opendaylight:controller:network"; - prefix "topos"; - - import ietf-inet-types { prefix "inet"; } - - revision 2013-05-20 { - description "Initial demo"; - } - + yang-version 1; + namespace "urn:opendaylight:controller:network"; + prefix "topos"; + + import ietf-inet-types { prefix "inet"; } + + revision 2013-05-20 { + description "Initial demo"; + } - - typedef topology-id { - type string; - } + typedef topology-id { + type string; + } - typedef node-id { - type string; - } + typedef node-id { + type string; + } - typedef link-id { - type string; - } + typedef link-id { + type string; + } - typedef tp-id { - type string; - description "identifier for termination points on a port"; - } + typedef tp-id { + type string; + description "identifier for termination points on a port"; + } - typedef tp-ref { - type leafref { - path "/network/topologies/topology/nodes/node/termination-points/termination-point/tp-id"; - } - } - typedef topology-ref { - type leafref { - path "/network/topologies/topology/topology-id"; - } - description "This type is used for leafs that reference topology identifier instance."; - // currently not used - } + typedef tp-ref { + type leafref { + path "/network/topologies/topology/nodes/node/termination-points/termination-point/tp-id"; + } + } + typedef topology-ref { + type leafref { + path "/network/topologies/topology/topology-id"; + } + description "This type is used for leafs that reference topology identifier instance."; + // currently not used + } - typedef node-ref { - type leafref { - path "/network/topologies/topology/nodes/node/node-id"; - } - description "This type is used for leafs that reference a node instance."; - } + typedef node-ref { + type leafref { + path "/network/topologies/topology/nodes/node/node-id"; + } + description "This type is used for leafs that reference a node instance."; + } - typedef link-ref { - type leafref { - path "/network/topologies/topology/links/link/link-id"; - } - description "This type is used for leafs that reference a link instance."; - // currently not used - } - - typedef network-element-ref { - type leafref { - path "/network/network-elements/network-element/element-id"; - } - } + typedef link-ref { + type leafref { + path "/network/topologies/topology/links/link/link-id"; + } + description "This type is used for leafs that reference a link instance."; + // currently not used + } + + typedef network-element-ref { + type leafref { + path "/network/network-elements/network-element/element-id"; + } + } + typedef element-id { + type string; + } + + container network { + container topologies { + list topology { + description " + This is the model of abstract topology which contains only Network + Nodes and Network Links. Each topology MUST be identified by + unique topology-id for reason that the store could contain many + topologies. + "; + key "topology-id"; + leaf topology-id { + type topology-id; + description " + It is presumed that datastore will contain many topologies. To + distinguish between topologies it is vital to have UNIQUE + topology identifier. + "; + } - typedef element-id { - type string; - } - - container network { - container topologies { - list topology { - description " - This is the model of abstract topology which contains only Network - Nodes and Network Links. Each topology MUST be identified by - unique topology-id for reason that the store could contain many - topologies. - "; - key "topology-id"; - leaf topology-id { - type topology-id; - description " - It is presumed that datastore will contain many topologies. To - distinguish between topologies it is vital to have UNIQUE - topology identifier. - "; - } + container types { + description " + The container for definition of topology types. + The augmenting modules should add empty optional leaf + to this container to signalize topology type."; + } - container types { - description " - The container for definition of topology types. - The augmenting modules should add empty optional leaf - to this container to signalize topology type. - "; - } + container nodes { + list node { + description "The list of network nodes defined for topology."; - container nodes { - list node { - description "The list of network nodes defined for topology."; + key "node-id"; + leaf node-id { + type node-id; + description "The Topology identifier of network-node."; + } - key "node-id"; - leaf node-id { - type node-id; - description "The Topology identifier of network-node."; - } - - leaf supporting-ne { - type network-element-ref; - } - - container termination-points { - list termination-point { - key "tp-id"; - leaf tp-id { - type tp-id; - } - } - } - } - } - - container links { - list link { - description " - The Network Link which is defined by Local (Source) and - Remote (Destination) Network Nodes. Every link MUST be - defined either by identifier and his local and remote - Network Nodes (in real applications it is common that many - links are originated from one node and end up in same - remote node). To ensure that we would always know to - distinguish between links, every link SHOULD have - identifier. - "; - key "link-id"; - - leaf link-id { - type link-id; - } - container source { - leaf source-node { - type node-ref; - description "Source node identifier."; - } - leaf source-tp { - type tp-ref; - } - } - container destination { - leaf dest-node { - type node-ref; - description "Destination node identifier."; - } - leaf dest-tp { - type tp-ref; - } - } - } - } - } - } - container network-elements { - config true; - list network-element { - key "element-id"; - leaf element-id { - type element-id; - } - } - } - } + leaf supporting-ne { + type network-element-ref; + } + + container termination-points { + list termination-point { + key "tp-id"; + leaf tp-id { + type tp-id; + } + } + } + } + } + + container links { + list link { + description " + The Network Link which is defined by Local (Source) and + Remote (Destination) Network Nodes. Every link MUST be + defined either by identifier and his local and remote + Network Nodes (in real applications it is common that many + links are originated from one node and end up in same + remote node). To ensure that we would always know to + distinguish between links, every link SHOULD have + identifier. + "; + key "link-id"; + + leaf link-id { + type link-id; + } + container source { + leaf source-node { + type node-ref; + description "Source node identifier."; + } + leaf source-tp { + type tp-ref; + } + } + container destination { + leaf dest-node { + type node-ref; + description "Destination node identifier."; + } + leaf dest-tp { + type tp-ref; + } + } + } + } + } + } + container network-elements { + config true; + list network-element { + key "element-id"; + leaf element-id { + type element-id; + } + } + } + } }