Move implementation to the new notification service
[lispflowmapping.git] / mappingservice / implementation / src / main / yang / mappingservice-impl.yang
1 module mappingservice-impl {
2
3     yang-version 1;
4     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:lfm:mappingservice:impl";
5     prefix "mappingservice-impl";
6
7     import config { prefix config; revision-date 2013-04-05; }
8     import rpc-context { prefix rpcx; revision-date 2013-06-17; }
9     import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
10     import opendaylight-sal-binding-broker-impl { prefix sal-broker; revision-date 2013-10-28; }
11     import mappingservice { prefix mappingservice; revision-date 2015-09-06; }
12     import mappingservice-dao { prefix ms-dao; revision-date 2015-10-07; }
13
14     description
15         "This module contains the base YANG definitions for
16         mappingservice implementation.";
17
18     revision "2015-09-06" {
19         description
20             "Initial revision.";
21     }
22
23     // This is the definition of the mappingservice implementation as a module identity
24     identity mappingservice-impl {
25         base config:module-type;
26         config:java-name-prefix MappingService;
27         config:provided-service mappingservice:mappingservice;
28     }
29
30     identity lisp-mappingservice-impl {
31         base config:module-type;
32         config:java-name-prefix LispMappingService;
33         config:provided-service mappingservice:lisp-mappingservice;
34     }
35
36     // Augments the 'configuration' choice node under modules/module.
37     augment "/config:modules/config:module/config:configuration" {
38         case mappingservice-impl {
39             when "/config:modules/config:module/config:type = 'mappingservice-impl'";
40
41             //wires in the data-broker service
42             container data-broker {
43                 uses config:service-ref {
44                     refine type {
45                         mandatory true;
46                         config:required-identity mdsal:binding-async-data-broker;
47                     }
48                 }
49             }
50             container broker {
51                 uses config:service-ref {
52                     refine type {
53                         mandatory true;
54                         config:required-identity mdsal:binding-broker-osgi-registry;
55                     }
56                 }
57             }
58             container rpc-registry {
59                 uses config:service-ref {
60                     refine type {
61                         mandatory true;
62                         config:required-identity mdsal:binding-rpc-registry;
63                     }
64                 }
65             }
66             container dao {
67                 uses config:service-ref {
68                     refine type {
69                         mandatory true;
70                         config:required-identity ms-dao:mappingservice-dao;
71                     }
72                 }
73             }
74             container notification-publish-service {
75                 uses config:service-ref {
76                     refine type {
77                         mandatory true;
78                         config:required-identity sal-broker:binding-new-notification-publish-service;
79                     }
80                 }
81             }
82         }
83         case lisp-mappingservice-impl {
84             when "/config:modules/config:module/config:type = 'lisp-mappingservice-impl'";
85             container osgi-broker {
86                 uses config:service-ref {
87                     refine type {
88                         mandatory true;
89                         config:required-identity mdsal:binding-broker-osgi-registry;
90                     }
91                 }
92             }
93             container notification-service {
94                 uses config:service-ref {
95                     refine type {
96                         mandatory true;
97                         config:required-identity sal-broker:binding-new-notification-service;
98                     }
99                 }
100             }
101             container mappingservice {
102                 uses config:service-ref {
103                     refine type {
104                         mandatory true;
105                         config:required-identity mappingservice:mappingservice;
106                     }
107                 }
108             }
109         }
110     }
111 }