6ef5b63bd4fa47ef1df89daa2e24f63eb1ff983e
[controller.git] / opendaylight / md-sal / model / model-inventory / src / main / yang / node-inventory.yang
1 module opendaylight-inventory {
2     namespace "urn:opendaylight:inventory";
3     prefix inv;
4
5     import yang-ext {prefix ext;}
6     import ietf-inet-types {prefix inet;}
7     import ietf-yang-types {prefix yang;}
8
9
10     revision "2013-08-19" {
11         description "Initial revision of Inventory model";
12     }
13     
14     
15     typedef support-type {
16         type enumeration {
17             enum native;
18             enum emulated;
19             enum not-supported;
20         }
21     }
22
23     typedef node-id {
24         type inet:uri;
25     }
26
27     typedef node-connector-id {
28         type inet:uri;
29     }
30
31     typedef node-ref {
32         type instance-identifier;
33     }
34
35     typedef node-connector-ref {
36         type instance-identifier;
37     }
38
39     identity node-context {
40         description "Identity used to mark node context";
41     }
42
43     identity node-connector-context {
44         
45     }
46
47     grouping node {
48     leaf id {
49             type node-id;
50         }
51     }
52
53     grouping node-connector {
54         leaf id {
55             type node-connector-id;
56         }
57     }
58
59     /** Base structure **/
60     container nodes {
61         list node {
62             key "id";
63             ext:context-instance "node-context";
64
65             uses node;
66
67             list "node-connector" {
68                 key "id";
69                 ext:context-instance "node-connector-context";
70
71                 use node-connector;
72             }
73         }
74     }
75 }