Bug 5212 - Neutron-mapper has dependency on Ofoverlay renderer
[groupbasedpolicy.git] / groupbasedpolicy / src / main / java / org / opendaylight / groupbasedpolicy / util / IidFactory.java
1 /*
2  * Copyright (c) 2014 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 package org.opendaylight.groupbasedpolicy.util;
10
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
12 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ActionDefinitionId;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ActionName;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ClassifierDefinitionId;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ClassifierName;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ClauseName;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ContractId;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.EndpointGroupId;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.L2BridgeDomainId;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.L2FloodDomainId;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.L3ContextId;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.RuleName;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.SelectorName;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.SubjectName;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.SubnetId;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.TenantId;
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.Endpoints;
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.Endpoint;
31 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointKey;
32 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointL3;
33 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointL3Key;
34 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointL3Prefix;
35 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointL3PrefixKey;
36 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.SubjectFeatureDefinitions;
37 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.Tenants;
38 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.has.classifier.refs.ClassifierRef;
39 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.has.classifier.refs.ClassifierRefKey;
40 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.definitions.ActionDefinition;
41 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.definitions.ActionDefinitionKey;
42 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.definitions.ClassifierDefinition;
43 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.definitions.ClassifierDefinitionKey;
44 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.Tenant;
45 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.TenantKey;
46 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.ForwardingContext;
47 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.Policy;
48 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.forwarding.context.L2BridgeDomain;
49 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.forwarding.context.L2BridgeDomainKey;
50 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.forwarding.context.L2FloodDomain;
51 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.forwarding.context.L2FloodDomainKey;
52 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.forwarding.context.L3Context;
53 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.forwarding.context.L3ContextKey;
54 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.forwarding.context.Subnet;
55 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.forwarding.context.SubnetKey;
56 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.Contract;
57 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.ContractKey;
58 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.EndpointGroup;
59 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.EndpointGroupKey;
60 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.ExternalImplicitGroup;
61 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.ExternalImplicitGroupKey;
62 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.SubjectFeatureInstances;
63 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.contract.Clause;
64 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.contract.ClauseKey;
65 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.contract.Subject;
66 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.contract.SubjectKey;
67 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.contract.subject.Rule;
68 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.contract.subject.RuleKey;
69 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.endpoint.group.ConsumerNamedSelector;
70 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.endpoint.group.ConsumerNamedSelectorKey;
71 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.endpoint.group.ProviderNamedSelector;
72 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.endpoint.group.ProviderNamedSelectorKey;
73 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.subject.feature.instances.ActionInstance;
74 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.subject.feature.instances.ActionInstanceKey;
75 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.subject.feature.instances.ClassifierInstance;
76 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.subject.feature.instances.ClassifierInstanceKey;
77 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.RendererName;
78 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.Renderers;
79 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.Renderer;
80 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.RendererKey;
81 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.Capabilities;
82 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.Interests;
83 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.capabilities.SupportedActionDefinition;
84 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.capabilities.SupportedClassifierDefinition;
85 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.interests.FollowedTenants;
86 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.interests.followed.tenants.FollowedTenant;
87 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.interests.followed.tenants.FollowedTenantKey;
88 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.interests.followed.tenants.followed.tenant.FollowedEndpointGroup;
89 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.interests.followed.tenants.followed.tenant.FollowedEndpointGroupKey;
90 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.statistics.store.rev151215.StatisticsStore;
91 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.statistics.store.rev151215.statistics.store.StatisticRecord;
92 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.statistics.store.rev151215.statistics.store.StatisticRecordKey;
93 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
94
95 public class IidFactory {
96
97     private IidFactory() {
98         throw new UnsupportedOperationException();
99     }
100
101     private static final InstanceIdentifier<Endpoints> ENDPOINTS_IID =
102             InstanceIdentifier.builder(Endpoints.class).build();
103
104     public static InstanceIdentifier<Tenant> tenantIid(TenantId id) {
105         return InstanceIdentifier.builder(Tenants.class).child(Tenant.class, new TenantKey(id)).build();
106     }
107
108     public static InstanceIdentifier<EndpointGroup> endpointGroupIid(TenantId tenantId, EndpointGroupId epgId) {
109         return InstanceIdentifier.builder(Tenants.class)
110             .child(Tenant.class, new TenantKey(tenantId))
111             .child(Policy.class)
112             .child(EndpointGroup.class, new EndpointGroupKey(epgId))
113             .build();
114     }
115
116     public static InstanceIdentifier<Contract> contractIid(TenantId tenantId, ContractId contractId) {
117         return InstanceIdentifier.builder(Tenants.class)
118             .child(Tenant.class, new TenantKey(tenantId))
119             .child(Policy.class)
120             .child(Contract.class, new ContractKey(contractId))
121             .build();
122     }
123
124     public static InstanceIdentifier<Contract> contractWildcardIid(TenantId tenantId) {
125         return InstanceIdentifier.builder(Tenants.class)
126             .child(Tenant.class, new TenantKey(tenantId))
127             .child(Policy.class)
128             .child(Contract.class)
129             .build();
130     }
131
132     public static InstanceIdentifier<Subject> subjectIid(TenantId tenantId, ContractId contractId,
133             SubjectName subjectName) {
134         return InstanceIdentifier.builder(Tenants.class)
135             .child(Tenant.class, new TenantKey(tenantId))
136             .child(Policy.class)
137             .child(Contract.class, new ContractKey(contractId))
138             .child(Subject.class, new SubjectKey(subjectName))
139             .build();
140     }
141
142     public static InstanceIdentifier<ProviderNamedSelector> providerNamedSelectorIid(TenantId tenantId,
143             EndpointGroupId epgId, SelectorName providerSelectorName) {
144         return InstanceIdentifier.builder(Tenants.class)
145             .child(Tenant.class, new TenantKey(tenantId))
146             .child(Policy.class)
147             .child(EndpointGroup.class, new EndpointGroupKey(epgId))
148             .child(ProviderNamedSelector.class, new ProviderNamedSelectorKey(providerSelectorName))
149             .build();
150     }
151
152     public static InstanceIdentifier<ConsumerNamedSelector> consumerNamedSelectorIid(TenantId tenantId,
153             EndpointGroupId epgId, SelectorName consumerSelectorName) {
154         return InstanceIdentifier.builder(Tenants.class)
155             .child(Tenant.class, new TenantKey(tenantId))
156             .child(Policy.class)
157             .child(EndpointGroup.class, new EndpointGroupKey(epgId))
158             .child(ConsumerNamedSelector.class, new ConsumerNamedSelectorKey(consumerSelectorName))
159             .build();
160     }
161
162     public static InstanceIdentifier<Clause> clauseIid(TenantId tenantId, ContractId contractId,
163             ClauseName clauseName) {
164         return InstanceIdentifier.builder(Tenants.class)
165             .child(Tenant.class, new TenantKey(tenantId))
166             .child(Policy.class)
167             .child(Contract.class, new ContractKey(contractId))
168             .child(Clause.class, new ClauseKey(clauseName))
169             .build();
170     }
171
172     public static InstanceIdentifier<Rule> ruleIid(TenantId tenantId, ContractId contractId, SubjectName subjectName,
173             RuleName ruleName) {
174         return InstanceIdentifier.builder(Tenants.class)
175             .child(Tenant.class, new TenantKey(tenantId))
176             .child(Policy.class)
177             .child(Contract.class, new ContractKey(contractId))
178             .child(Subject.class, new SubjectKey(subjectName))
179             .child(Rule.class, new RuleKey(ruleName))
180             .build();
181     }
182
183     public static InstanceIdentifier<ActionInstance> actionInstanceIid(TenantId tenantId, ActionName actionName) {
184         return InstanceIdentifier.builder(Tenants.class)
185             .child(Tenant.class, new TenantKey(tenantId))
186             .child(Policy.class)
187             .child(SubjectFeatureInstances.class)
188             .child(ActionInstance.class, new ActionInstanceKey(actionName))
189             .build();
190     }
191
192     public static InstanceIdentifier<ClassifierInstance> classifierInstanceIid(TenantId tenantId,
193             ClassifierName classifierName) {
194         return InstanceIdentifier.builder(Tenants.class)
195             .child(Tenant.class, new TenantKey(tenantId))
196             .child(Policy.class)
197             .child(SubjectFeatureInstances.class)
198             .child(ClassifierInstance.class, new ClassifierInstanceKey(classifierName))
199             .build();
200     }
201
202     public static InstanceIdentifier<ClassifierDefinition> classifierDefinitionIid(
203             ClassifierDefinitionId classifierDefinitionId) {
204         return InstanceIdentifier.builder(SubjectFeatureDefinitions.class)
205             .child(ClassifierDefinition.class, new ClassifierDefinitionKey(classifierDefinitionId))
206             .build();
207     }
208
209     public static InstanceIdentifier<ActionDefinition> actionDefinitionIid(ActionDefinitionId actionDefinitionId) {
210         return InstanceIdentifier.builder(SubjectFeatureDefinitions.class)
211             .child(ActionDefinition.class, new ActionDefinitionKey(actionDefinitionId))
212             .build();
213     }
214
215     public static InstanceIdentifier<ClassifierRef> classifierRefIid(TenantId tenantId, ContractId contractId,
216             SubjectName subjectName, RuleName ruleName, ClassifierName classifierRefName) {
217         return InstanceIdentifier.builder(Tenants.class)
218             .child(Tenant.class, new TenantKey(tenantId))
219             .child(Policy.class)
220             .child(Contract.class, new ContractKey(contractId))
221             .child(Subject.class, new SubjectKey(subjectName))
222             .child(Rule.class, new RuleKey(ruleName))
223             .child(ClassifierRef.class, new ClassifierRefKey(classifierRefName))
224             .build();
225     }
226
227     public static InstanceIdentifier<L2FloodDomain> l2FloodDomainIid(TenantId tenantId,
228             L2FloodDomainId l2FloodDomainId) {
229         return InstanceIdentifier.builder(Tenants.class)
230             .child(Tenant.class, new TenantKey(tenantId))
231             .child(ForwardingContext.class)
232             .child(L2FloodDomain.class, new L2FloodDomainKey(l2FloodDomainId))
233             .build();
234     }
235
236     public static InstanceIdentifier<L2BridgeDomain> l2BridgeDomainIid(TenantId tenantId,
237             L2BridgeDomainId l2BridgeDomainId) {
238         return InstanceIdentifier.builder(Tenants.class)
239             .child(Tenant.class, new TenantKey(tenantId))
240             .child(ForwardingContext.class)
241             .child(L2BridgeDomain.class, new L2BridgeDomainKey(l2BridgeDomainId))
242             .build();
243     }
244
245     public static InstanceIdentifier<L3Context> l3ContextIid(TenantId tenantId, L3ContextId l3ContextId) {
246         return InstanceIdentifier.builder(Tenants.class)
247             .child(Tenant.class, new TenantKey(tenantId))
248             .child(ForwardingContext.class)
249             .child(L3Context.class, new L3ContextKey(l3ContextId))
250             .build();
251     }
252
253     /**
254      * Get the {@link Endpoint} {@link InstanceIdentifier} based on the {@link EndpointKey}
255      *
256      * @param endpointKey The {@link EndpointKey} of a particular {@link Endpoint}
257      * @return The {@link InstanceIdentifier} of the {@link Endpoint}
258      */
259     public static InstanceIdentifier<Endpoint> endpointIid(EndpointKey endpointKey) {
260         return InstanceIdentifier.builder(Endpoints.class).child(Endpoint.class, endpointKey).build();
261     }
262
263     public static InstanceIdentifier<Endpoint> endpointIid(L2BridgeDomainId l2Context, MacAddress macAddress) {
264         return IidFactory.endpointIid(new EndpointKey(l2Context, macAddress));
265     }
266
267     public static InstanceIdentifier<EndpointL3> l3EndpointIid(EndpointL3Key endpointL3Key) {
268         return InstanceIdentifier.builder(Endpoints.class).child(EndpointL3.class, endpointL3Key).build();
269     }
270
271     public static InstanceIdentifier<EndpointL3> l3EndpointIid(L3ContextId l3Context, IpAddress ipAddress) {
272         return IidFactory.l3EndpointIid(new EndpointL3Key(ipAddress, l3Context));
273     }
274
275     public static InstanceIdentifier<EndpointL3> l3EndpointsIidWildcard() {
276         return InstanceIdentifier.builder(Endpoints.class).child(EndpointL3.class).build();
277     }
278
279     public static InstanceIdentifier<EndpointL3Prefix> endpointL3PrefixIid(L3ContextId l3Context, IpPrefix ipPrefix) {
280         return InstanceIdentifier.builder(Endpoints.class)
281             .child(EndpointL3Prefix.class, new EndpointL3PrefixKey(ipPrefix, l3Context))
282             .build();
283     }
284
285     public static InstanceIdentifier<Endpoints> endpointsIidWildcard() {
286         return ENDPOINTS_IID;
287     }
288
289     public static InstanceIdentifier<Subnet> subnetIid(TenantId tenantId, SubnetId subnetId) {
290         return InstanceIdentifier.builder(Tenants.class)
291             .child(Tenant.class, new TenantKey(tenantId))
292             .child(ForwardingContext.class)
293             .child(Subnet.class, new SubnetKey(subnetId))
294             .build();
295     }
296
297     public static InstanceIdentifier<Subnet> subnetWildcardIid(TenantId tenantId) {
298         return InstanceIdentifier.builder(Tenants.class)
299             .child(Tenant.class, new TenantKey(tenantId))
300             .child(ForwardingContext.class)
301             .child(Subnet.class)
302             .build();
303     }
304
305     public static InstanceIdentifier<FollowedEndpointGroup> followedEndpointgroupIid(RendererName rendererName,
306             TenantId tenantId, EndpointGroupId epgId) {
307         return InstanceIdentifier.builder(Renderers.class)
308             .child(Renderer.class, new RendererKey(rendererName))
309             .child(Interests.class)
310             .child(FollowedTenants.class)
311             .child(FollowedTenant.class, new FollowedTenantKey(tenantId))
312             .child(FollowedEndpointGroup.class, new FollowedEndpointGroupKey(epgId))
313             .build();
314     }
315
316     public static InstanceIdentifier<SupportedActionDefinition> supportedActionDefinitionIidWildcard() {
317         return InstanceIdentifier.builder(Renderers.class)
318             .child(Renderer.class)
319             .child(Capabilities.class)
320             .child(SupportedActionDefinition.class)
321             .build();
322     }
323
324     public static InstanceIdentifier<SupportedClassifierDefinition> supportedClassifierDefinitionIidWildcard() {
325         return InstanceIdentifier.builder(Renderers.class)
326             .child(Renderer.class)
327             .child(Capabilities.class)
328             .child(SupportedClassifierDefinition.class)
329             .build();
330     }
331
332     public static InstanceIdentifier<StatisticRecord> statisticRecordIid(StatisticRecordKey key) {
333         return InstanceIdentifier.builder(StatisticsStore.class).child(StatisticRecord.class, key).build();
334     }
335
336     public static InstanceIdentifier<FollowedTenant> followedTenantIid(RendererName rendererName, TenantId tenantId) {
337         return InstanceIdentifier.builder(Renderers.class)
338             .child(Renderer.class, new RendererKey(rendererName))
339             .child(Interests.class)
340             .child(FollowedTenants.class)
341             .child(FollowedTenant.class, new FollowedTenantKey(tenantId))
342             .build();
343     }
344
345     public static InstanceIdentifier<Renderer> rendererIid(RendererName rendererName) {
346         return InstanceIdentifier.builder(Renderers.class).child(Renderer.class, new RendererKey(rendererName)).build();
347     }
348
349     public static InstanceIdentifier<Renderers> renderersIid() {
350         return InstanceIdentifier.builder(Renderers.class).build();
351     }
352
353     public static InstanceIdentifier<ExternalImplicitGroup> externalImplicitGroupIid(TenantId tenantId,
354             EndpointGroupId epgId) {
355         return InstanceIdentifier.builder(Tenants.class)
356             .child(Tenant.class, new TenantKey(tenantId))
357             .child(Policy.class)
358             .child(ExternalImplicitGroup.class, new ExternalImplicitGroupKey(epgId))
359             .build();
360     }
361
362 }