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