e753cf56e9360e933164012631873df67e114da8
[hc2vpp.git] /
1 package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406;
2
3
4 import static io.fd.honeycomb.v3po.translate.util.RWUtils.emptyAugReaderList;
5 import static io.fd.honeycomb.v3po.translate.util.RWUtils.emptyChildReaderList;
6 import static io.fd.honeycomb.v3po.translate.util.RWUtils.singletonAugReaderList;
7 import static io.fd.honeycomb.v3po.translate.util.RWUtils.singletonChildReaderList;
8
9 import io.fd.honeycomb.v3po.translate.impl.read.CompositeChildReader;
10 import io.fd.honeycomb.v3po.translate.impl.read.CompositeListReader;
11 import io.fd.honeycomb.v3po.translate.impl.read.CompositeRootReader;
12 import io.fd.honeycomb.v3po.translate.read.ChildReader;
13 import io.fd.honeycomb.v3po.translate.util.read.CloseableReader;
14 import io.fd.honeycomb.v3po.translate.util.read.ReflexiveRootReaderCustomizer;
15 import io.fd.honeycomb.v3po.translate.v3po.interfacesstate.InterfaceCustomizer;
16 import io.fd.honeycomb.v3po.translate.v3po.interfacesstate.VppInterfaceStateCustomizer;
17 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
18 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesStateBuilder;
19 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
20 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceBuilder;
21 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentation;
23
24 public class InterfacesStateHoneycombReaderModule extends
25     org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractInterfacesStateHoneycombReaderModule {
26     public InterfacesStateHoneycombReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
27                                                 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
28         super(identifier, dependencyResolver);
29     }
30
31     public InterfacesStateHoneycombReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
32                                                 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
33                                                 org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.InterfacesStateHoneycombReaderModule oldModule,
34                                                 java.lang.AutoCloseable oldInstance) {
35         super(identifier, dependencyResolver, oldModule, oldInstance);
36     }
37
38     @Override
39     public void customValidation() {
40         // add custom validation form module attributes here.
41     }
42
43     @Override
44     public java.lang.AutoCloseable createInstance() {
45
46         final ChildReader<VppInterfaceStateAugmentation> vppInterfaceStateAugmentationChildReader =
47             new CompositeChildReader<>(VppInterfaceStateAugmentation.class,
48                 new VppInterfaceStateCustomizer(getVppJvppDependency()));
49
50
51         final CompositeListReader<Interface, InterfaceKey, InterfaceBuilder> interfaceReader =
52             new CompositeListReader<>(Interface.class,
53                 emptyChildReaderList(),
54                 singletonAugReaderList(vppInterfaceStateAugmentationChildReader),
55                 new InterfaceCustomizer(getVppJvppDependency(), getInterfaceContextIfcStateDependency()));
56
57         return new CloseableReader<>(new CompositeRootReader<>(
58             InterfacesState.class,
59             singletonChildReaderList(interfaceReader),
60             emptyAugReaderList(),
61             new ReflexiveRootReaderCustomizer<>(InterfacesStateBuilder.class)));
62     }
63 }