-// vi: set smarttab sw=4 tabstop=4:
-module abstract-topology {
+module demo-topology {
yang-version 1;
- namespace "pre:simple.test.demo";
+ namespace "urn:model.1demo-275topology.4.5.my";
prefix "tp";
- import ietf-inet-types { prefix "inet"; }
- import abstract-prefixes { prefix "abs-pref"; }
-
- organization "OPEN DAYLIGHT";
+ organization "OPEN DAYLIGHT";
contact "http://www.opendaylight.org/";
description "
not designed to be used solely for network representation. This module
SHOULD be used as base module in defining the network topology.
";
-
- revision "2012-02-08" {
- reference " WILL BE DEFINED LATER";
- }
-
- typedef topology-id-ref {
- type leafref {
- path "/tp:topology/tp:topology-id";
- }
- description "This type is used for leafs that reference topology identifier instance.";
- }
- typedef network-node-id-ref {
- type leafref {
- path "/tp:topology/tp:network-nodes/tp:network-node/tp:node-id";
- }
- description "This type is used for leafs that reference network node instance.";
- }
-
- typedef link-id-ref {
- type leafref {
- path "/tp:topology/tp:network-links/tp:network-link/tp:link-id";
- }
- description "This type is used for leafs that reference network link instance.";
+ revision "2013-02-08"{
+ reference " WILL BE DEFINED LATER";
}
container topology {
";
leaf topology-id {
- type inet:uri;
+ type string;
description "
It is presumed that datastore will contain many topologies. To
distinguish between topologies it is vital to have UNIQUE
key "node-id";
leaf node-id {
- type inet:uri;
+ type string;
description "The Topology identifier of network-node.";
}
-
- container attributes {
+
+ list network-interface {
+ key "interface-id";
+
+ leaf interface-id {
+ type uint8;
+ }
+
+ leaf interface-address {
+ type string;
+ }
+ }
+
+ container node-attributes {
description "
Additional attributes that can Network Node contains.
";
+
+ leaf geo-latitude {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ config true;
+ }
+
+ leaf geo-longitude {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ config true;
+ }
}
}
}
key "link-id";
leaf link-id {
- type inet:uri;
+ type string;
description "";
}
container source {
leaf node-id {
- type node-id-ref;
+ type string;
description "Source node identifier.";
}
}
container destination {
leaf node-id {
- type node-id-ref;
+ type string;
description "Destination node identifier.";
}
}
- container attributes {
+ container link-attributes {
description "Aditional attributes that can Network Link contains.";
}
}
}
}
-
- //TODO: add base operations
-}
+}
\ No newline at end of file