Improve consistency of YANG model namespaces
[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 mappingservice { prefix mappingservice; revision-date 2015-09-06; }
11     import mappingservice-dao { prefix ms-dao; revision-date 2015-10-07; }
12
13     description
14         "This module contains the base YANG definitions for
15         mappingservice implementation.";
16
17     revision "2015-09-06" {
18         description
19             "Initial revision.";
20     }
21
22     // This is the definition of the mappingservice implementation as a module identity
23     identity mappingservice-impl {
24         base config:module-type;
25         config:java-name-prefix MappingService;
26         config:provided-service mappingservice:mappingservice;
27     }
28
29     identity lisp-mappingservice-impl {
30         base config:module-type;
31         config:java-name-prefix LispMappingService;
32         config:provided-service mappingservice:lisp-mappingservice;
33     }
34
35     // Augments the 'configuration' choice node under modules/module.
36     augment "/config:modules/config:module/config:configuration" {
37         case mappingservice-impl {
38             when "/config:modules/config:module/config:type = 'mappingservice-impl'";
39
40             //wires in the data-broker service
41             container data-broker {
42                 uses config:service-ref {
43                     refine type {
44                         mandatory true;
45                         config:required-identity mdsal:binding-async-data-broker;
46                     }
47                 }
48             }
49             container broker {
50                 uses config:service-ref {
51                     refine type {
52                         mandatory true;
53                         config:required-identity mdsal:binding-broker-osgi-registry;
54                     }
55                 }
56             }
57             container rpc-registry {
58                 uses config:service-ref {
59                     refine type {
60                         mandatory true;
61                         config:required-identity mdsal:binding-rpc-registry;
62                     }
63                 }
64             }
65             container dao {
66                 uses config:service-ref {
67                     refine type {
68                         mandatory true;
69                         config:required-identity ms-dao:mappingservice-dao;
70                     }
71                 }
72             }
73             container notification-service {
74                 uses config:service-ref {
75                     refine type {
76                         mandatory true;
77                         config:required-identity mdsal:binding-notification-service;
78                     }
79                 }
80             }
81         }
82         case lisp-mappingservice-impl {
83             when "/config:modules/config:module/config:type = 'lisp-mappingservice-impl'";
84             container osgi-broker {
85                 uses config:service-ref {
86                     refine type {
87                         mandatory true;
88                         config:required-identity mdsal:binding-broker-osgi-registry;
89                     }
90                 }
91             }
92             container mappingservice {
93                 uses config:service-ref {
94                     refine type {
95                         mandatory true;
96                         config:required-identity mappingservice:mappingservice;
97                     }
98                 }
99             }
100         }
101     }
102 }