0bf146365393aa3f3a4c57703a65a1f89114531d
[controller.git] / opendaylight / md-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     
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
60
61
62     /** Base structure **/
63     container nodes {
64         list node {
65             key "id";
66             ext:context-instance "node-context";
67
68             uses node;
69
70             list "node-connector" {
71                 key "id";
72                 ext:context-instance "node-connector-context";
73                 
74                 use node-connector;
75             }
76         }
77     }
78 }