Fix occasional NPEs in Connection manager
[controller.git] / opendaylight / sal / yang-prototype / sal / model / model-inventory / src / main / yang / 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     typedef node-id {
15         type inet:uri;
16     }
17
18     typedef node-connector-id {
19         type inet:uri;
20     }
21
22     typedef node-ref {
23         type instance-identifier;
24     }
25
26     typedef node-connector-ref {
27         type instance-identifier;
28     }
29
30     identity node-context {
31         description "Identity used to mark node context";
32     }
33
34     identity node-connector-context {
35
36     }
37
38         grouping node {
39                 leaf id {
40             type node-id;
41         }
42         }
43
44         grouping node-connector {
45                 leaf id {
46             type node-connector-id;
47                 }
48         }
49
50
51
52
53     /** Base structure **/
54     container nodes {
55         list node {
56             key "id";
57             ext:context-instance "node-context";
58
59                         uses node;
60
61             list "node-connector" {
62                 key "id";
63                 ext:context-instance "node-connector-context";
64                 
65                 use node-connector;
66             }
67         }
68     }
69 }