Bug 499: Added support for old DOM Broker APIs.
[controller.git] / opendaylight / md-sal / samples / toaster-provider / src / main / yang / toaster-provider-impl.yang
1 // vi: set smarttab et sw=4 tabstop=4:
2 module toaster-provider-impl {
3
4     yang-version 1;
5     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:toaster-provider:impl";
6     prefix "toaster-provider-impl";
7
8     import config { prefix config; revision-date 2013-04-05; }
9     import toaster-provider { prefix toaster-provider; revision-date 2014-01-31; }
10     import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
11
12     description
13         "This module contains the base YANG definitions for
14         toaster-provider impl implementation.";
15
16     revision "2014-01-31" {
17         description
18             "Initial revision.";
19     }
20
21     // This is the definition of a service implementation
22     identity toaster-provider-impl {
23             base config:module-type;
24             config:provided-service toaster-provider:toaster-provider;
25             config:java-name-prefix ToasterProvider;
26     }
27
28     augment "/config:modules/config:module/config:configuration" {
29         case toaster-provider-impl {
30             when "/config:modules/config:module/config:type = 'toaster-provider-impl'";
31
32             container rpc-registry {
33                 uses config:service-ref {
34                     refine type {
35                         mandatory true;
36                         config:required-identity mdsal:binding-rpc-registry;
37                     }
38                 }
39             }
40
41             container notification-service {
42                 uses config:service-ref {
43                     refine type {
44                         mandatory true;
45                         config:required-identity mdsal:binding-notification-service;
46                     }
47                 }
48             }
49
50         }
51     }
52
53     augment "/config:modules/config:module/config:state" {
54         case toaster-provider-impl {
55             when "/config:modules/config:module/config:type = 'toaster-provider-impl'";
56
57             leaf toasts-made {
58                 type uint32;
59             }
60
61         }
62     }
63 }