Fixed NetconfDevice to store capability info.
[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; revision-date "2013-07-09";}
6     import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
7     import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
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         description "Identity used to mark node connector context";
45     }
46
47     identity node-type {
48         description "Base identity for node types";
49     }
50
51     identity node-connector-type {
52         description "Base identity for node connectors type";
53     }
54
55     grouping node {
56         leaf id {
57             type node-id;
58         }
59
60         list "node-connector" {
61             key "id";
62             ext:context-instance "node-connector-context";
63
64             uses node-connector;
65         }
66     }
67
68     grouping node-connector {
69         leaf id {
70             type node-connector-id;
71         }
72     }
73
74     grouping node-context-ref {
75         description 
76         "Helper grouping which contains a reference to node context.";
77         leaf node {
78             ext:context-reference "node-context";
79             type node-ref;
80         }
81     }
82
83     /** Base structure **/
84     container nodes {
85         list node {
86             key "id";
87             ext:context-instance "node-context";
88
89             uses node;
90         }
91     }
92
93     notification node-updated {
94         leaf node-ref {
95             ext:context-reference "node-context";
96             type node-ref;
97         }
98         uses node;
99     }
100
101     notification node-connector-updated {
102         leaf node-connector-ref {
103             ext:context-reference "node-connector-context";
104             type node-connector-ref;
105         }
106         uses node-connector;
107     }
108
109     notification node-removed {
110         leaf node-ref {
111             ext:context-reference "node-context";
112             type node-ref;
113         }
114     }
115
116     notification node-connector-removed {
117         leaf node-connector-ref {
118             ext:context-reference "node-connector-context";
119             type node-connector-ref;
120         }
121     }
122 }