Introduced DomainSpecificRegistry service
[groupbasedpolicy.git] / groupbasedpolicy / src / main / yang / groupbasedpolicy-cfg.yang
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 module groupbasedpolicy-cfg {
10     yang-version 1;
11     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:groupbasedpolicy";
12     prefix "gbpcfg";
13
14     import config { prefix config; revision-date 2013-04-05; }
15     import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
16
17     description
18         "This module contains the base YANG definitions for
19           groupbasedpolicy impl implementation.";
20
21     revision "2015-11-06" {
22         description
23             "Initial revision.";
24     }
25
26     identity ep-renderer-augmentation-registry {
27         description
28             "ep-renderer-augmentation-registry service definition";
29
30         base "config:service-type";
31         config:java-class "org.opendaylight.groupbasedpolicy.api.EpRendererAugmentationRegistry";
32     }
33
34     identity domain-specific-registry {
35         description
36             "domain-specific-registry service definition";
37
38         base "config:service-type";
39         config:java-class "org.opendaylight.groupbasedpolicy.api.DomainSpecificRegistry";
40     }
41
42     identity policy-validator-registry {
43         description
44             "policy-validator-registry service definition";
45
46         base "config:service-type";
47         config:java-class "org.opendaylight.groupbasedpolicy.api.PolicyValidatorRegistry";
48     }
49
50     identity statistics-manager {
51         description
52             "statistics-manager service definition";
53
54         base "config:service-type";
55         config:java-class "org.opendaylight.groupbasedpolicy.api.StatisticsManager";
56     }
57
58     identity policy-validator-registry-impl {
59         base "config:module-type";
60
61         config:provided-service policy-validator-registry;
62         config:java-name-prefix PolicyValidatorRegistry;
63     }
64
65     identity ep-renderer-augmentation-registry-impl {
66         base "config:module-type";
67
68         config:provided-service ep-renderer-augmentation-registry;
69         config:java-name-prefix EpRendererAugmentationRegistryImpl;
70     }
71
72     identity domain-specific-registry-impl {
73         base "config:module-type";
74
75         config:provided-service domain-specific-registry;
76         config:java-name-prefix DomainSpecificRegistry;
77     }
78
79     identity statistics-manager-impl {
80         base "config:module-type";
81
82         config:provided-service statistics-manager;
83         config:java-name-prefix StatisticsManagerImpl;
84     }
85
86     identity groupbasedpolicy-impl {
87         base "config:module-type";
88
89         config:java-name-prefix Groupbasedpolicy;
90     }
91
92     // Augments the 'configuration' choice node under modules/module.
93     augment "/config:modules/config:module/config:configuration" {
94         case groupbasedpolicy-impl {
95             when "/config:modules/config:module/config:type = 'groupbasedpolicy-impl'";
96
97             //wires in the data-broker service
98             container data-broker {
99                 uses config:service-ref {
100                     refine type {
101                         mandatory true;
102                         config:required-identity mdsal:binding-async-data-broker;
103                     }
104                 }
105             }
106             //RPC Registry
107             container rpc-registry {
108                 uses config:service-ref {
109                     refine type {
110                         mandatory true;
111                         config:required-identity mdsal:binding-rpc-registry;
112                     }
113                 }
114             }
115             // EpRendererAugmentationRegistry service
116             container policy-validator-registry {
117                 uses config:service-ref {
118                     refine type {
119                         config:required-identity policy-validator-registry;
120                     }
121                 }
122             }
123         }
124         case policy-validator-registry-impl {
125             when "/config:modules/config:module/config:type = 'policy-validator-registry-impl'";
126
127             //wires in the data-broker service
128             container data-broker {
129                 uses config:service-ref {
130                     refine type {
131                         mandatory true;
132                         config:required-identity mdsal:binding-async-data-broker;
133                     }
134                 }
135             }
136         }
137         case ep-renderer-augmentation-registry-impl {
138             when "/config:modules/config:module/config:type = 'ep-renderer-augmentation-registry-impl'";
139
140             //wires in the data-broker service
141             container data-broker {
142                 uses config:service-ref {
143                     refine type {
144                         mandatory true;
145                         config:required-identity mdsal:binding-async-data-broker;
146                     }
147                 }
148             }
149             //RPC Registry
150             container rpc-registry {
151                 uses config:service-ref {
152                     refine type {
153                         mandatory true;
154                         config:required-identity mdsal:binding-rpc-registry;
155                     }
156                 }
157             }
158         }
159         case domain-specific-registry-impl {
160             when "/config:modules/config:module/config:type = 'domain-specific-registry-impl'";
161
162             //wires in the data-broker service
163             container data-broker {
164                 uses config:service-ref {
165                     refine type {
166                         mandatory true;
167                         config:required-identity mdsal:binding-async-data-broker;
168                     }
169                 }
170             }
171             //RPC Registry
172             container rpc-registry {
173                 uses config:service-ref {
174                     refine type {
175                         mandatory true;
176                         config:required-identity mdsal:binding-rpc-registry;
177                     }
178                 }
179             }
180         }
181         case statistics-manager-impl {
182             when "/config:modules/config:module/config:type = 'statistics-manager-impl'";
183
184           //wires in the data-broker service
185             container data-broker {
186                 uses config:service-ref {
187                     refine type {
188                         mandatory true;
189                         config:required-identity mdsal:binding-async-data-broker;
190                     }
191                 }
192             }
193         }
194     }
195 }