17b0c8d0f0f9b3361ba4f15c8782bf8afb8828aa
[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             container data-broker {
51                 uses config:service-ref {
52                     refine type {
53                         mandatory false;
54                         config:required-identity mdsal:binding-data-broker;
55                     }
56                 }
57             }
58         }
59     }
60
61     augment "/config:modules/config:module/config:state" {
62         case toaster-provider-impl {
63             when "/config:modules/config:module/config:type = 'toaster-provider-impl'";
64
65             leaf toasts-made {
66                 type uint32;
67             }
68
69         }
70     }
71 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.