module opendaylight-inventory { namespace "urn:opendaylight:inventory"; prefix inv; import yang-ext {prefix ext; revision-date "2013-07-09";} import ietf-inet-types {prefix inet; revision-date "2010-09-24";} import ietf-yang-types {prefix yang; revision-date "2010-09-24";} revision "2013-08-19" { description "Initial revision of Inventory model"; } typedef support-type { type enumeration { enum native; enum emulated; enum not-supported; } } typedef node-id { type inet:uri; } typedef node-connector-id { type inet:uri; } typedef node-ref { type instance-identifier; } typedef node-connector-ref { type instance-identifier; } identity node-context { description "Identity used to mark node context"; } identity node-connector-context { description "Identity used to mark node connector context"; } identity node-type { description "Base identity for node types"; } identity node-connector-type { description "Base identity for node connectors type"; } grouping node { leaf id { type node-id; } list "node-connector" { key "id"; ext:context-instance "node-connector-context"; uses node-connector; } } grouping node-connector { leaf id { type node-connector-id; } } grouping node-context-ref { description "Helper grouping which contains a reference to node context."; leaf node { ext:context-reference "node-context"; type node-ref; } } /** Base structure **/ container nodes { list node { key "id"; ext:context-instance "node-context"; uses node; } } notification node-updated { leaf node-ref { ext:context-reference "node-context"; type node-ref; } uses node; } notification node-connector-updated { leaf node-connector-ref { ext:context-reference "node-connector-context"; type node-connector-ref; } uses node-connector; } notification node-removed { leaf node-ref { ext:context-reference "node-context"; type node-ref; } } notification node-connector-removed { leaf node-connector-ref { ext:context-reference "node-connector-context"; type node-connector-ref; } } }