0267abfd3cdb0c44d8c9e46208d5878511db9a26
[netconf.git] / netconf / yanglib / src / main / yang / yanglib.yang
1 module yanglib {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:yanglib:impl";
4     prefix "yanglib";
5
6     import config { prefix config; revision-date 2013-04-05; }
7     import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
8
9     description
10         "Service definition for yanglib project";
11
12     revision "2014-12-10" {
13         description
14             "Initial revision";
15     }
16
17     identity yanglib {
18         base config:module-type;
19         config:java-name-prefix Yanglib;
20     }
21
22     augment "/config:modules/config:module/config:configuration" {
23         case yanglib {
24             when "/config:modules/config:module/config:type = 'yanglib'";
25             container broker {
26                 uses config:service-ref {
27                     refine type {
28                         mandatory true;
29                         config:required-identity md-sal-binding:binding-broker-osgi-registry;
30                     }
31                 }
32             }
33
34             // TODO extracting the schema repositories
35             leaf cache-folder {
36                 type string;
37                 description "local filesystem folder to use as cache + to load yang models from";
38             }
39
40             // TODO it would be better if the binding arguments could be located by the app automatically
41             leaf binding-addr {
42                 type string;
43                 // TODO make this uri
44                 description "binding address is necessary for generating proper URLS (accessible from the outside world)
45                              for models present directly in the library";
46             }
47
48             leaf binding-port {
49                 type uint32;
50                 // TODO proper type
51                 description "binding port is necessary for generating proper URLS (accessible from the outside world)
52                              for models present directly in the library";
53             }
54         }
55     }
56 }