--- /dev/null
+= l3-api
+
+Overview of l3-api
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2017 Cisco and/or its affiliates.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at:
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>io.fd.honeycomb.common</groupId>
+ <artifactId>api-parent</artifactId>
+ <version>1.17.04-SNAPSHOT</version>
+ </parent>
+
+ <groupId>io.fd.hc2vpp.l3</groupId>
+ <artifactId>l3-api</artifactId>
+ <version>1.17.04-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-yang-types-20130715</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-interfaces</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-inet-types-2013-07-15</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>yang-ext</artifactId>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
}
}
}
- // TODO(HC2VPP-7): move nd-proxy module to interfaces/ip plugin
}
\ No newline at end of file
}
// TODO(HC2VPP-86): add interfaces-state augmentation once VPP supports ARP proxy read (VPP-225)
- // TODO(HC2VPP-7): move to interfaces/ip plugin
}
\ No newline at end of file
--- /dev/null
+= l3-aggregator
+
+Overview of l3-aggregator
\ No newline at end of file
--- /dev/null
+= l3-impl
+
+Overview of l3-impl
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2017 Cisco and/or its affiliates.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at:
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>io.fd.hc2vpp.common</groupId>
+ <artifactId>vpp-impl-parent</artifactId>
+ <version>1.17.04-SNAPSHOT</version>
+ <relativePath>../../vpp-common/vpp-impl-parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>io.fd.hc2vpp.l3</groupId>
+ <artifactId>l3-impl</artifactId>
+ <version>1.17.04-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.fd.hc2vpp.l3</groupId>
+ <artifactId>l3-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>io.fd.hc2vpp.l3</groupId>
+ <artifactId>l3-utils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>io.fd.vpp</groupId>
+ <artifactId>jvpp-core</artifactId>
+ </dependency>
+
+ <!-- Test -->
+ <dependency>
+ <groupId>io.fd.hc2vpp.common</groupId>
+ <artifactId>vpp-translate-test</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-testlib</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.hc2vpp.l3;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.multibindings.Multibinder;
+import io.fd.hc2vpp.l3.read.factory.Ipv4StateReaderFactory;
+import io.fd.hc2vpp.l3.read.factory.Ipv6StateReaderFactory;
+import io.fd.hc2vpp.l3.write.factory.Ipv4WriterFactory;
+import io.fd.hc2vpp.l3.write.factory.Ipv6WriterFactory;
+import io.fd.honeycomb.translate.read.ReaderFactory;
+import io.fd.honeycomb.translate.write.WriterFactory;
+
+public class InterfaceL3Module extends AbstractModule {
+
+ @Override
+ protected void configure() {
+ // Readers
+ final Multibinder<ReaderFactory> readerFactoryBinder = Multibinder.newSetBinder(binder(), ReaderFactory.class);
+ readerFactoryBinder.addBinding().to(Ipv4StateReaderFactory.class);
+ readerFactoryBinder.addBinding().to(Ipv6StateReaderFactory.class);
+
+ // Writers
+ final Multibinder<WriterFactory> writerFactoryBinder = Multibinder.newSetBinder(binder(), WriterFactory.class);
+ writerFactoryBinder.addBinding().to(Ipv4WriterFactory.class);
+ writerFactoryBinder.addBinding().to(Ipv6WriterFactory.class);
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.hc2vpp.l3;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.multibindings.Multibinder;
+import io.fd.hc2vpp.l3.write.factory.ProxyArpWriterFactory;
+import io.fd.honeycomb.translate.write.WriterFactory;
+
+public class ProxyArpModule extends AbstractModule {
+
+ @Override
+ protected void configure() {
+ // Writers
+ final Multibinder<WriterFactory> writerFactoryBinder = Multibinder.newSetBinder(binder(), WriterFactory.class);
+ writerFactoryBinder.addBinding().to(ProxyArpWriterFactory.class);
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.hc2vpp.l3;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.multibindings.Multibinder;
+import io.fd.hc2vpp.l3.read.factory.SubInterfaceStateIpv4ReaderFactory;
+import io.fd.hc2vpp.l3.read.factory.SubInterfaceStateIpv6ReaderFactory;
+import io.fd.hc2vpp.l3.write.factory.SubInterfaceIpv4WriterFactory;
+import io.fd.hc2vpp.l3.write.factory.SubInterfaceIpv6WriterFactory;
+import io.fd.honeycomb.translate.read.ReaderFactory;
+import io.fd.honeycomb.translate.write.WriterFactory;
+
+public class SubInterfaceL3Module extends AbstractModule {
+
+ @Override
+ protected void configure() {
+ // Readers
+ final Multibinder<ReaderFactory> readerFactoryBinder = Multibinder.newSetBinder(binder(), ReaderFactory.class);
+ readerFactoryBinder.addBinding().to(SubInterfaceStateIpv4ReaderFactory.class);
+ readerFactoryBinder.addBinding().to(SubInterfaceStateIpv6ReaderFactory.class);
+
+ // Writers
+ final Multibinder<WriterFactory> writerFactoryBinder = Multibinder.newSetBinder(binder(), WriterFactory.class);
+ writerFactoryBinder.addBinding().to(SubInterfaceIpv4WriterFactory.class);
+ writerFactoryBinder.addBinding().to(SubInterfaceIpv6WriterFactory.class);
+ }
+}
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.factory;
+package io.fd.hc2vpp.l3.read.factory;
-import static io.fd.hc2vpp.v3po.factory.InterfacesStateReaderFactory.IFC_ID;
-
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v4.Ipv4AddressCustomizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v4.Ipv4Customizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v4.Ipv4NeighbourCustomizer;
+import io.fd.hc2vpp.l3.read.ipv4.Ipv4AddressCustomizer;
+import io.fd.hc2vpp.l3.read.ipv4.Ipv4Customizer;
+import io.fd.hc2vpp.l3.read.ipv4.Ipv4NeighbourCustomizer;
import io.fd.honeycomb.translate.impl.read.GenericInitListReader;
import io.fd.honeycomb.translate.impl.read.GenericListReader;
import io.fd.honeycomb.translate.impl.read.GenericReader;
import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface2;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface2Builder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv4;
public class Ipv4StateReaderFactory implements ReaderFactory {
- private static final InstanceIdentifier<Interface2> IFC_2_ID = IFC_ID.augmentation(Interface2.class);
+ private static final InstanceIdentifier<Interface2> IFC_2_ID =
+ InstanceIdentifier.create(InterfacesState.class)
+ .child(Interface.class)
+ .augmentation(Interface2.class);
@Inject
private FutureJVppCore jvpp;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.factory;
-
-
-import static io.fd.hc2vpp.v3po.factory.InterfacesStateReaderFactory.IFC_ID;
+package io.fd.hc2vpp.l3.read.factory;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v6.Ipv6AddressCustomizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v6.Ipv6Customizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v6.Ipv6NeighbourCustomizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v6.nd.NdProxyCustomizer;
+import io.fd.hc2vpp.l3.read.ipv6.Ipv6AddressCustomizer;
+import io.fd.hc2vpp.l3.read.ipv6.Ipv6Customizer;
+import io.fd.hc2vpp.l3.read.ipv6.Ipv6NeighbourCustomizer;
+import io.fd.hc2vpp.l3.read.ipv6.nd.NdProxyCustomizer;
import io.fd.honeycomb.translate.impl.read.GenericInitListReader;
import io.fd.honeycomb.translate.impl.read.GenericListReader;
import io.fd.honeycomb.translate.impl.read.GenericReader;
import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface2;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv6;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv6.Address;
public class Ipv6StateReaderFactory implements ReaderFactory {
- private static final InstanceIdentifier<Interface2> IFC_2_ID = IFC_ID.augmentation(Interface2.class);
+ private static final InstanceIdentifier<Interface2> IFC_2_ID = InstanceIdentifier.create(InterfacesState.class)
+ .child(Interface.class)
+ .augmentation(Interface2.class);
@Inject
private FutureJVppCore jvpp;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.factory;
+package io.fd.hc2vpp.l3.read.factory;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v4.subinterface.SubInterfaceIpv4AddressCustomizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v4.subinterface.SubInterfaceIpv4NeighbourCustomizer;
+import io.fd.hc2vpp.l3.read.ipv4.subinterface.SubInterfaceIpv4AddressCustomizer;
+import io.fd.hc2vpp.l3.read.ipv4.subinterface.SubInterfaceIpv4NeighbourCustomizer;
import io.fd.honeycomb.translate.impl.read.GenericInitListReader;
import io.fd.honeycomb.translate.impl.read.GenericListReader;
import io.fd.honeycomb.translate.read.ReaderFactory;
import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.SubinterfaceStateAugmentation;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.interfaces.state._interface.SubInterfaces;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.interfaces.state._interface.sub.interfaces.SubInterface;
public class SubInterfaceStateIpv4ReaderFactory implements ReaderFactory {
+ private static final InstanceIdentifier<Interface> IFC_ID =
+ InstanceIdentifier.create(InterfacesState.class).child(Interface.class);
+
@Inject
private FutureJVppCore jvpp;
public void init(@Nonnull final ModifiableReaderRegistryBuilder registry) {
final InstanceIdentifier<SubInterface> subIfcId =
- InterfacesStateReaderFactory.IFC_ID.augmentation(SubinterfaceStateAugmentation.class)
+ IFC_ID.augmentation(SubinterfaceStateAugmentation.class)
.child(SubInterfaces.class).child(SubInterface.class);
// Ipv4(Structural)
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.factory;
+package io.fd.hc2vpp.l3.read.factory;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v6.subinterface.SubInterfaceIpv6AddressCustomizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.v6.subinterface.SubInterfaceIpv6NeighbourCustomizer;
+import io.fd.hc2vpp.l3.read.ipv6.subinterface.SubInterfaceIpv6AddressCustomizer;
+import io.fd.hc2vpp.l3.read.ipv6.subinterface.SubInterfaceIpv6NeighbourCustomizer;
import io.fd.honeycomb.translate.impl.read.GenericInitListReader;
import io.fd.honeycomb.translate.impl.read.GenericListReader;
import io.fd.honeycomb.translate.read.ReaderFactory;
import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.SubinterfaceStateAugmentation;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.interfaces.state._interface.SubInterfaces;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.interfaces.state._interface.sub.interfaces.SubInterface;
public class SubInterfaceStateIpv6ReaderFactory implements ReaderFactory {
+ private static final InstanceIdentifier<Interface> IFC_ID =
+ InstanceIdentifier.create(InterfacesState.class).child(Interface.class);
+
@Inject
private FutureJVppCore jvpp;
public void init(@Nonnull final ModifiableReaderRegistryBuilder registry) {
final InstanceIdentifier<SubInterface> subIfcId =
- InterfacesStateReaderFactory.IFC_ID.augmentation(SubinterfaceStateAugmentation.class)
+ IFC_ID.augmentation(SubinterfaceStateAugmentation.class)
.child(SubInterfaces.class).child(SubInterface.class);
// Ipv6(Structural)
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v4;
+package io.fd.hc2vpp.l3.read.ipv4;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
+import io.fd.hc2vpp.l3.utils.ip.read.IpAddressReader;
import io.fd.hc2vpp.v3po.interfacesstate.InterfaceCustomizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params.IfaceDumpFilter;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.readers.IpAddressReader;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.vpp.jvpp.core.dto.IpAddressDetails;
import io.fd.vpp.jvpp.core.dto.IpAddressDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.List;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-import java.util.List;
-
/**
* Read customizer for interface Ipv4 addresses.
*/
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v4;
+package io.fd.hc2vpp.l3.read.ipv4;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.honeycomb.translate.read.ReadContext;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v4;
+package io.fd.hc2vpp.l3.read.ipv4;
+
+import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Dynamic;
+import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Static;
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params.IfaceDumpFilter;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.readers.IpNeighbourReader;
+import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
+import io.fd.hc2vpp.l3.utils.ip.read.IpNeighbourReader;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer;
import io.fd.vpp.jvpp.core.dto.IpNeighborDetails;
import io.fd.vpp.jvpp.core.dto.IpNeighborDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.List;
+import java.util.function.Function;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv4Builder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import javax.annotation.Nonnull;
-import java.util.List;
-import java.util.function.Function;
-
-import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Dynamic;
-import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Static;
-
/**
* Operational data read operation customizer for {@link Neighbor}<br>
* Currently not supported in jvpp, so this is only dummy implementation<br>
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v4.subinterface;
+package io.fd.hc2vpp.l3.read.ipv4.subinterface;
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
+import io.fd.hc2vpp.l3.utils.ip.read.IpAddressReader;
import io.fd.hc2vpp.v3po.interfacesstate.SubInterfaceCustomizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params.IfaceDumpFilter;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.readers.IpAddressReader;
import io.fd.hc2vpp.v3po.util.SubInterfaceUtils;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.vpp.jvpp.core.dto.IpAddressDetails;
import io.fd.vpp.jvpp.core.dto.IpAddressDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.List;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.interfaces.state._interface.sub.interfaces.SubInterface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.sub._interface.ip4.attributes.Ipv4;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-import java.util.List;
-
/**
* Read customizer for sub-interface Ipv4 addresses.
*/
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v4.subinterface;
+package io.fd.hc2vpp.l3.read.ipv4.subinterface;
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params.IfaceDumpFilter;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.readers.IpNeighbourReader;
+import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
+import io.fd.hc2vpp.l3.utils.ip.read.IpNeighbourReader;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer;
import io.fd.vpp.jvpp.core.dto.IpNeighborDetails;
import io.fd.vpp.jvpp.core.dto.IpNeighborDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.List;
+import java.util.function.Function;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.sub._interface.ip4.attributes.Ipv4Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.sub._interface.ip4.attributes.ipv4.Neighbor;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import javax.annotation.Nonnull;
-import java.util.List;
-import java.util.function.Function;
-
public class SubInterfaceIpv4NeighbourCustomizer extends IpNeighbourReader
implements ListReaderCustomizer<Neighbor, NeighborKey, NeighborBuilder> {
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6;
+package io.fd.hc2vpp.l3.read.ipv6;
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
+import io.fd.hc2vpp.l3.utils.ip.read.IpAddressReader;
import io.fd.hc2vpp.v3po.interfacesstate.InterfaceCustomizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params.IfaceDumpFilter;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.readers.IpAddressReader;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.Initialized;
import io.fd.vpp.jvpp.core.dto.IpAddressDetails;
import io.fd.vpp.jvpp.core.dto.IpAddressDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.List;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv6;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-import java.util.List;
-
public class Ipv6AddressCustomizer extends IpAddressReader
implements InitializingListReaderCustomizer<Address, AddressKey, AddressBuilder> {
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6;
+package io.fd.hc2vpp.l3.read.ipv6;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.honeycomb.translate.read.ReadContext;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6;
+package io.fd.hc2vpp.l3.read.ipv6;
+import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Dynamic;
+import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Static;
+
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params.IfaceDumpFilter;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.readers.IpNeighbourReader;
+import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
+import io.fd.hc2vpp.l3.utils.ip.read.IpNeighbourReader;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer;
import io.fd.vpp.jvpp.core.dto.IpNeighborDetails;
import io.fd.vpp.jvpp.core.dto.IpNeighborDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.List;
+import java.util.function.Function;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv6Builder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv6.Neighbor;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import javax.annotation.Nonnull;
-import java.util.List;
-import java.util.function.Function;
-
-import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Dynamic;
-import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.NeighborOrigin.Static;
-
public class Ipv6NeighbourCustomizer extends IpNeighbourReader
implements ListReaderCustomizer<Neighbor, NeighborKey, NeighborBuilder> {
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6.nd;
+package io.fd.hc2vpp.l3.read.ipv6.nd;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor.NO_PARAMS;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6.subinterface;
+package io.fd.hc2vpp.l3.read.ipv6.subinterface;
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
+import io.fd.hc2vpp.l3.utils.ip.read.IpAddressReader;
import io.fd.hc2vpp.v3po.interfacesstate.SubInterfaceCustomizer;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params.IfaceDumpFilter;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.readers.IpAddressReader;
import io.fd.hc2vpp.v3po.util.SubInterfaceUtils;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.vpp.jvpp.core.dto.IpAddressDetails;
import io.fd.vpp.jvpp.core.dto.IpAddressDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.List;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.interfaces.state._interface.sub.interfaces.SubInterface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.sub._interface.ip6.attributes.Ipv6;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-import java.util.List;
-
public class SubInterfaceIpv6AddressCustomizer extends IpAddressReader
implements InitializingListReaderCustomizer<Address, AddressKey, AddressBuilder> {
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6.subinterface;
+package io.fd.hc2vpp.l3.read.ipv6.subinterface;
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params.IfaceDumpFilter;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.readers.IpNeighbourReader;
+import io.fd.hc2vpp.l3.utils.ip.read.IfaceDumpFilter;
+import io.fd.hc2vpp.l3.utils.ip.read.IpNeighbourReader;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer;
import io.fd.vpp.jvpp.core.dto.IpNeighborDetails;
import io.fd.vpp.jvpp.core.dto.IpNeighborDetailsReplyDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.List;
+import java.util.function.Function;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.sub._interface.ip6.attributes.Ipv6Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.sub._interface.ip6.attributes.ipv6.Neighbor;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import javax.annotation.Nonnull;
-import java.util.List;
-import java.util.function.Function;
-
public class SubInterfaceIpv6NeighbourCustomizer extends IpNeighbourReader
implements ListReaderCustomizer<Neighbor, NeighborKey, NeighborBuilder> {
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.factory;
+package io.fd.hc2vpp.l3.write.factory;
import static io.fd.hc2vpp.v3po.factory.InterfacesWriterFactory.IFC_ID;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.Ipv4AddressCustomizer;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.Ipv4Customizer;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.Ipv4NeighbourCustomizer;
+import io.fd.hc2vpp.l3.write.ipv4.Ipv4AddressCustomizer;
+import io.fd.hc2vpp.l3.write.ipv4.Ipv4Customizer;
+import io.fd.hc2vpp.l3.write.ipv4.Ipv4NeighbourCustomizer;
import io.fd.honeycomb.translate.impl.write.GenericListWriter;
import io.fd.honeycomb.translate.impl.write.GenericWriter;
import io.fd.honeycomb.translate.write.WriterFactory;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.factory;
+package io.fd.hc2vpp.l3.write.factory;
import static io.fd.hc2vpp.v3po.factory.InterfacesWriterFactory.IFC_ID;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.v6.Ipv6AddressCustomizer;
-import io.fd.hc2vpp.v3po.interfaces.ip.v6.Ipv6Customizer;
-import io.fd.hc2vpp.v3po.interfaces.ip.v6.Ipv6NeighbourCustomizer;
-import io.fd.hc2vpp.v3po.interfaces.ip.v6.nd.NdProxyCustomizer;
+import io.fd.hc2vpp.l3.write.ipv6.Ipv6AddressCustomizer;
+import io.fd.hc2vpp.l3.write.ipv6.Ipv6Customizer;
+import io.fd.hc2vpp.l3.write.ipv6.Ipv6NeighbourCustomizer;
+import io.fd.hc2vpp.l3.write.ipv6.nd.NdProxyCustomizer;
import io.fd.honeycomb.translate.impl.write.GenericListWriter;
import io.fd.honeycomb.translate.impl.write.GenericWriter;
import io.fd.honeycomb.translate.write.WriterFactory;
import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv6;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv6.Address;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nd.proxy.rev170315.interfaces._interface.ipv6.nd.proxies.NdProxy;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-/**
- * Created by jsrnicek on 3.1.2017.
- */
public class Ipv6WriterFactory implements WriterFactory {
@Inject
@Override
public void init(@Nonnull final ModifiableWriterRegistryBuilder registry) {
- final InstanceIdentifier<Interface1> ifc1AugId = IFC_ID.augmentation(Interface1.class);
+ final InstanceIdentifier<Interface1> ifc1AugId = InstanceIdentifier.create(Interfaces.class)
+ .child(Interface.class).augmentation(Interface1.class);
// Ipv6(after interface) =
final InstanceIdentifier<Ipv6> ipv6Id = ifc1AugId.child(Ipv6.class);
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.factory;
+package io.fd.hc2vpp.l3.write.factory;
import com.google.common.collect.Sets;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.ProxyArpCustomizer;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.ProxyRangeCustomizer;
+import io.fd.hc2vpp.l3.write.ipv4.ProxyArpCustomizer;
+import io.fd.hc2vpp.l3.write.ipv4.ProxyRangeCustomizer;
import io.fd.honeycomb.translate.impl.write.GenericListWriter;
import io.fd.honeycomb.translate.impl.write.GenericWriter;
import io.fd.honeycomb.translate.write.WriterFactory;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.factory;
+
+package io.fd.hc2vpp.l3.write.factory;
import static io.fd.hc2vpp.v3po.factory.SubinterfaceAugmentationWriterFactory.L2_ID;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.subinterface.SubInterfaceIpv4AddressCustomizer;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.subinterface.SubInterfaceIpv4NeighbourCustomizer;
+import io.fd.hc2vpp.l3.write.ipv4.subinterface.SubInterfaceIpv4AddressCustomizer;
+import io.fd.hc2vpp.l3.write.ipv4.subinterface.SubInterfaceIpv4NeighbourCustomizer;
import io.fd.honeycomb.translate.impl.write.GenericListWriter;
import io.fd.honeycomb.translate.write.WriterFactory;
import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.factory;
+
+package io.fd.hc2vpp.l3.write.factory;
import static io.fd.hc2vpp.v3po.factory.SubinterfaceAugmentationWriterFactory.L2_ID;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.v6.subinterface.SubInterfaceIpv6AddressCustomizer;
-import io.fd.hc2vpp.v3po.interfaces.ip.v6.subinterface.SubInterfaceIpv6NeighbourCustomizer;
+import io.fd.hc2vpp.l3.write.ipv6.subinterface.SubInterfaceIpv6AddressCustomizer;
+import io.fd.hc2vpp.l3.write.ipv6.subinterface.SubInterfaceIpv6NeighbourCustomizer;
import io.fd.honeycomb.translate.impl.write.GenericListWriter;
import io.fd.honeycomb.translate.write.WriterFactory;
import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v4;
+package io.fd.hc2vpp.l3.write.ipv4;
import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.IpWriter;
+import io.fd.hc2vpp.l3.utils.ip.write.IpWriter;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
-import io.fd.honeycomb.translate.util.RWUtils;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.AddressKey;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.address.Subnet;
} else if (subnet instanceof Netmask) {
setNetmaskSubnet(add, id, interfaceName, interfaceIndex, address, (Netmask) subnet);
} else {
- LOG.error("Unable to handle subnet of type {}", subnet.getClass());
+ LOG.error("Unable to handle subnet of type {}", subnet);
throw new WriteFailedException(id, "Unable to handle subnet of type " + subnet.getClass());
}
}
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v4;
+package io.fd.hc2vpp.l3.write.ipv4;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v4;
+package io.fd.hc2vpp.l3.write.ipv4;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.IpWriter;
+import io.fd.hc2vpp.l3.utils.ip.write.IpWriter;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v4;
+package io.fd.hc2vpp.l3.write.ipv4;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v4;
+package io.fd.hc2vpp.l3.write.ipv4;
import com.google.common.net.InetAddresses;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v4.subinterface;
+package io.fd.hc2vpp.l3.write.ipv4.subinterface;
import static com.google.common.base.Preconditions.checkNotNull;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.IpWriter;
+import io.fd.hc2vpp.l3.utils.ip.write.IpWriter;
import io.fd.hc2vpp.v3po.util.SubInterfaceUtils;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v4.subinterface;
+package io.fd.hc2vpp.l3.write.ipv4.subinterface;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.IpWriter;
+import io.fd.hc2vpp.l3.utils.ip.write.IpWriter;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v6;
+package io.fd.hc2vpp.l3.write.ipv6;
import static com.google.common.base.Preconditions.checkNotNull;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.IpWriter;
+import io.fd.hc2vpp.l3.utils.ip.write.IpWriter;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v6;
+package io.fd.hc2vpp.l3.write.ipv6;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v6;
+package io.fd.hc2vpp.l3.write.ipv6;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v6.nd;
+package io.fd.hc2vpp.l3.write.ipv6.nd;
import static com.google.common.base.Preconditions.checkNotNull;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v6.subinterface;
+package io.fd.hc2vpp.l3.write.ipv6.subinterface;
import static com.google.common.base.Preconditions.checkNotNull;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.IpWriter;
+import io.fd.hc2vpp.l3.utils.ip.write.IpWriter;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v6.subinterface;
+package io.fd.hc2vpp.l3.write.ipv6.subinterface;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.IpWriter;
+import io.fd.hc2vpp.l3.utils.ip.write.IpWriter;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
--- /dev/null
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.Matchers.empty;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.MockitoAnnotations.initMocks;
+
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.multibindings.Multibinder;
+import com.google.inject.name.Named;
+import com.google.inject.testing.fieldbinder.Bind;
+import com.google.inject.testing.fieldbinder.BoundFieldModule;
+import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.hc2vpp.l3.InterfaceL3Module;
+import io.fd.hc2vpp.l3.ProxyArpModule;
+import io.fd.hc2vpp.l3.SubInterfaceL3Module;
+import io.fd.honeycomb.translate.impl.read.GenericListReader;
+import io.fd.honeycomb.translate.impl.read.registry.CompositeReaderRegistryBuilder;
+import io.fd.honeycomb.translate.impl.write.registry.FlatWriterRegistryBuilder;
+import io.fd.honeycomb.translate.read.ReaderFactory;
+import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer;
+import io.fd.honeycomb.translate.write.WriterFactory;
+import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.HashSet;
+import java.util.Set;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesStateBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+
+public class L3ModulesTest {
+
+ @Bind
+ @Mock
+ private FutureJVppCore api;
+
+ @Inject
+ private Set<ReaderFactory> readerFactories = new HashSet<>();
+
+ @Inject
+ private Set<WriterFactory> writerFactories = new HashSet<>();
+
+ @Bind
+ @Named("interface-context")
+ private NamingContext interfaceContext;
+
+ @Before
+ public void setUp() {
+ initMocks(this);
+ interfaceContext = new NamingContext("iface", "iface-context");
+ // InterfaceL3Module adds readers under InterfacesState
+ // because readers for parents need to be present (are part of V3poModule)
+ // add structural readers here (better than maven dependency).
+ Guice.createInjector(binder -> Multibinder.newSetBinder(binder, ReaderFactory.class)
+ .addBinding().toInstance(registry -> {
+ registry.addStructuralReader(InstanceIdentifier.create(InterfacesState.class),
+ InterfacesStateBuilder.class);
+ registry.add(new GenericListReader<>(InstanceIdentifier.create(InterfacesState.class)
+ .child(Interface.class),
+ mock(ListReaderCustomizer.class)));
+ }), new InterfaceL3Module(),
+ new SubInterfaceL3Module(),
+ new ProxyArpModule(),
+ BoundFieldModule.of(this)).injectMembers(this);
+ }
+
+ @Test
+ public void testReaderFactories() throws Exception {
+ assertThat(readerFactories, is(not(empty())));
+
+ // Test registration process (all dependencies present, topological order of readers does exist, etc.)
+ final CompositeReaderRegistryBuilder registryBuilder = new CompositeReaderRegistryBuilder();
+ readerFactories.stream().forEach(factory -> factory.init(registryBuilder));
+ assertNotNull(registryBuilder.build());
+ }
+
+ @Test
+ public void testWriterFactories() throws Exception {
+ assertThat(writerFactories, is(not(empty())));
+
+ // Test registration process (all dependencies present, topological order of writers does exist, etc.)
+ final FlatWriterRegistryBuilder registryBuilder = new FlatWriterRegistryBuilder();
+ writerFactories.stream().forEach(factory -> factory.init(registryBuilder));
+ assertNotNull(registryBuilder.build());
+ }
+}
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip;
+
+package io.fd.hc2vpp.l3.read;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.hasSize;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.when;
import io.fd.hc2vpp.common.test.util.FutureProducer;
import io.fd.hc2vpp.common.test.util.NamingContextHelper;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.vpp.jvpp.core.dto.*;
+import io.fd.vpp.jvpp.core.dto.IpAddressDetails;
+import io.fd.vpp.jvpp.core.dto.IpAddressDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.IpAddressDump;
+import io.fd.vpp.jvpp.core.dto.IpNeighborDetails;
+import io.fd.vpp.jvpp.core.dto.IpNeighborDetailsReplyDump;
+import io.fd.vpp.jvpp.core.dto.IpNeighborDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.Arrays;
+import java.util.List;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress;
-import javax.annotation.Nonnull;
-import java.util.Arrays;
-import java.util.List;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.hasSize;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.when;
-
public interface InterfaceChildNodeTest extends NamingContextHelper, FutureProducer {
String INTERFACE_CONTEXT_NAME = "iface-context";
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v4;
+package io.fd.hc2vpp.l3.read.ipv4;
+import static org.hamcrest.Matchers.empty;
+import static org.hamcrest.Matchers.hasItem;
+import static org.hamcrest.Matchers.hasSize;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.when;
+
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
import io.fd.hc2vpp.common.translate.util.Ipv4Translator;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.InterfaceChildNodeTest;
+import io.fd.hc2vpp.l3.read.InterfaceChildNodeTest;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
import io.fd.honeycomb.translate.util.read.cache.CacheKeyFactory;
import io.fd.vpp.jvpp.core.dto.IpAddressDetails;
import io.fd.vpp.jvpp.core.dto.IpAddressDetailsReplyDump;
import io.fd.vpp.jvpp.core.dto.IpAddressDump;
-import org.hamcrest.Matchers;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.stream.Collectors;
import org.junit.Test;
import org.mockito.Mockito;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.address.subnet.PrefixLength;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.CompletableFuture;
-import java.util.stream.Collectors;
-
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.when;
-
public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address, AddressKey, AddressBuilder> implements
Ipv4Translator,InterfaceChildNodeTest {
final List<AddressKey> ifc1Ids = getCustomizer().getAllIds(id, ctx);
assertThat(ifc1Ids.size(), is(1));
- assertThat(ifc1Ids, Matchers.hasItem(new AddressKey(new Ipv4AddressNoZone("192.168.2.1"))));
+ assertThat(ifc1Ids, hasItem(new AddressKey(new Ipv4AddressNoZone("192.168.2.1"))));
final List<AddressKey> ifc2Ids = getCustomizer().getAllIds(id2, ctx);
assertThat(ifc2Ids.size(), is(1));
- assertThat(ifc2Ids, Matchers.hasItem(new AddressKey(new Ipv4AddressNoZone("192.168.2.2"))));
+ assertThat(ifc2Ids, hasItem(new AddressKey(new Ipv4AddressNoZone("192.168.2.2"))));
AddressBuilder builder = new AddressBuilder();
getCustomizer().readCurrentAttributes(id, builder, ctx);
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v4;
+package io.fd.hc2vpp.l3.read.ipv4;
+
+import static org.mockito.Mockito.verifyZeroInteractions;
import io.fd.hc2vpp.common.test.read.ReaderCustomizerTest;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv4;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv4Builder;
-import static org.mockito.Mockito.verifyZeroInteractions;
-
public class Ipv4CustomizerTest extends ReaderCustomizerTest<Ipv4, Ipv4Builder> {
public Ipv4CustomizerTest() {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v4;
+
+package io.fd.hc2vpp.l3.read.ipv4;
+
+import static org.junit.Assert.assertEquals;
import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.InterfaceChildNodeTest;
+import io.fd.hc2vpp.l3.read.InterfaceChildNodeTest;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
+import java.util.Arrays;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.NeighborKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.Arrays;
-
-import static org.junit.Assert.assertEquals;
-
public class Ipv4NeighbourCustomizerTest extends ListReaderCustomizerTest<Neighbor, NeighborKey, NeighborBuilder>
implements InterfaceChildNodeTest {
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v4.subinterface;
+package io.fd.hc2vpp.l3.read.ipv4;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.hamcrest.Matchers.empty;
+import static org.hamcrest.Matchers.hasSize;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
import io.fd.hc2vpp.common.translate.util.Ipv4Translator;
import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.hc2vpp.l3.read.ipv4.subinterface.SubInterfaceIpv4AddressCustomizer;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer;
import io.fd.honeycomb.translate.util.read.cache.CacheKeyFactory;
import io.fd.honeycomb.translate.util.read.cache.TypeAwareIdentifierCacheKeyFactory;
import io.fd.vpp.jvpp.core.dto.IpAddressDetails;
import io.fd.vpp.jvpp.core.dto.IpAddressDetailsReplyDump;
+import java.util.Arrays;
+import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.sub._interface.ip4.attributes.ipv4.address.subnet.PrefixLengthBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.Arrays;
-import java.util.List;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.*;
-
public class SubInterfaceIpv4AddressCustomizerTest extends ListReaderCustomizerTest<Address, AddressKey, AddressBuilder>
implements Ipv4Translator {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v4.subinterface;
+
+package io.fd.hc2vpp.l3.read.ipv4;
+
+import static org.junit.Assert.assertEquals;
import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.InterfaceChildNodeTest;
+import io.fd.hc2vpp.l3.read.InterfaceChildNodeTest;
+import io.fd.hc2vpp.l3.read.ipv4.subinterface.SubInterfaceIpv4NeighbourCustomizer;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
+import java.util.Arrays;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.sub._interface.ip4.attributes.ipv4.NeighborKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.Arrays;
-
-import static org.junit.Assert.assertEquals;
-
public class SubInterfaceIpv4NeighbourCustomizerTest extends ListReaderCustomizerTest<Neighbor, NeighborKey, NeighborBuilder>
implements InterfaceChildNodeTest {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6;
+
+package io.fd.hc2vpp.l3.read.ipv6;
+
+import static org.junit.Assert.assertEquals;
import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.InterfaceChildNodeTest;
+import io.fd.hc2vpp.l3.read.InterfaceChildNodeTest;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
+import java.util.Arrays;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv6.AddressKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.Arrays;
-
-import static org.junit.Assert.assertEquals;
-
public class Ipv6AddressCustomizerTest extends ListReaderCustomizerTest<Address, AddressKey, AddressBuilder>
implements InterfaceChildNodeTest {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6;
+
+package io.fd.hc2vpp.l3.read.ipv6;
+
+import static org.junit.Assert.assertEquals;
import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.InterfaceChildNodeTest;
+import io.fd.hc2vpp.l3.read.InterfaceChildNodeTest;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
+import java.util.Arrays;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv6.NeighborKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.Arrays;
-
-import static org.junit.Assert.assertEquals;
-
public class Ipv6NeighbourCustomizerTest extends ListReaderCustomizerTest<Neighbor, NeighborKey, NeighborBuilder>
implements InterfaceChildNodeTest {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6.subinterface;
+
+package io.fd.hc2vpp.l3.read.ipv6;
import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.InterfaceChildNodeTest;
+import io.fd.hc2vpp.l3.read.InterfaceChildNodeTest;
+import io.fd.hc2vpp.l3.read.ipv6.subinterface.SubInterfaceIpv6AddressCustomizer;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
+import java.util.Arrays;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.sub._interface.ip6.attributes.ipv6.AddressKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.Arrays;
-
public class SubInterfaceIpv6AddressCustomizerTest extends ListReaderCustomizerTest<Address, AddressKey, AddressBuilder>
implements InterfaceChildNodeTest {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6.subinterface;
+
+package io.fd.hc2vpp.l3.read.ipv6;
+
+import static org.junit.Assert.assertEquals;
import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.InterfaceChildNodeTest;
+import io.fd.hc2vpp.l3.read.InterfaceChildNodeTest;
+import io.fd.hc2vpp.l3.read.ipv6.subinterface.SubInterfaceIpv6NeighbourCustomizer;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
+import java.util.Arrays;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.sub._interface.ip6.attributes.ipv6.NeighborKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.Arrays;
-
-import static org.junit.Assert.assertEquals;
-
public class SubInterfaceIpv6NeighbourCustomizerTest extends ListReaderCustomizerTest<Neighbor, NeighborKey, NeighborBuilder>
implements InterfaceChildNodeTest {
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.v6.nd;
+package io.fd.hc2vpp.l3.read.ipv6.nd;
-import static io.fd.hc2vpp.v3po.interfacesstate.ip.v6.nd.NdProxyCustomizer.getCfgId;
+import static io.fd.hc2vpp.l3.read.ipv6.nd.NdProxyCustomizer.getCfgId;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.junit.Assert.assertEquals;
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces;
+package io.fd.hc2vpp.l3.write;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.ProxyArpCustomizer;
+import io.fd.hc2vpp.l3.write.ipv4.ProxyArpCustomizer;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.core.dto.ProxyArpIntfcEnableDisable;
import io.fd.vpp.jvpp.core.dto.ProxyArpIntfcEnableDisableReply;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces;
+package io.fd.hc2vpp.l3.write;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.ProxyRangeCustomizer;
+import io.fd.hc2vpp.l3.write.ipv4.ProxyRangeCustomizer;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.core.dto.ProxyArpAddDel;
import io.fd.vpp.jvpp.core.dto.ProxyArpAddDelReply;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v4;
+package io.fd.hc2vpp.l3.write.ipv4;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.argThat;
-import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import io.fd.vpp.jvpp.core.dto.IpAddressDetailsReplyDump;
import io.fd.vpp.jvpp.core.dto.SwInterfaceAddDelAddress;
import io.fd.vpp.jvpp.core.dto.SwInterfaceAddDelAddressReply;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentMatcher;
-import org.mockito.Mock;
-import org.mockito.Mockito;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4Builder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.AddressBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.address.subnet.Netmask;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v4;
+package io.fd.hc2vpp.l3.write.ipv4;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.fail;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.Ipv4Translator;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.Ipv4NeighbourCustomizer;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.VppBaseCallException;
import io.fd.vpp.jvpp.core.dto.IpNeighborAddDel;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip;
+package io.fd.hc2vpp.l3.write.ipv4;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfaces.ip.v4.subinterface.SubInterfaceIpv4AddressCustomizer;
+import io.fd.hc2vpp.l3.write.ipv4.subinterface.SubInterfaceIpv4AddressCustomizer;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.VppBaseCallException;
import io.fd.vpp.jvpp.core.dto.SwInterfaceAddDelAddress;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v6;
+package io.fd.hc2vpp.l3.write.ipv6;
+
+import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev161214.interfaces._interface.RoutingBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.*;
-
public class Ipv6NeighbourCustomizerTest extends WriterCustomizerTest implements Ipv6Translator {
private static final String IFC_CTX_NAME = "ifc-test-instance";
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip.v6.nd;
+package io.fd.hc2vpp.l3.write.ipv6.nd;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2017 Cisco and/or its affiliates.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at:
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>hc2vpp-aggregator</artifactId>
+ <groupId>io.fd.hc2vpp</groupId>
+ <version>1.17.04-SNAPSHOT</version>
+ </parent>
+ <packaging>pom</packaging>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>io.fd.hc2vpp.l3</groupId>
+ <artifactId>l3-aggregator</artifactId>
+
+ <modules>
+ <module>api</module>
+ <module>impl</module>
+ <module>utils</module>
+ </modules>
+</project>
\ No newline at end of file
--- /dev/null
+= l3-utils
+
+Overview of l3-utils
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2017 Cisco and/or its affiliates.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at:
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>io.fd.hc2vpp.common</groupId>
+ <artifactId>vpp-impl-parent</artifactId>
+ <version>1.17.04-SNAPSHOT</version>
+ <relativePath>../../vpp-common/vpp-impl-parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>io.fd.hc2vpp.l3</groupId>
+ <artifactId>l3-utils</artifactId>
+ <version>1.17.04-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.fd.hc2vpp.l3</groupId>
+ <artifactId>l3-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- TODO - HC2VPP-100 - for building subinterface keys,etc,change to interface/subinterface api after split -->
+ <dependency>
+ <groupId>io.fd.hc2vpp.v3po</groupId>
+ <artifactId>v3po-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>io.fd.vpp</groupId>
+ <artifactId>jvpp-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>io.fd.honeycomb</groupId>
+ <artifactId>translate-utils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.fd.hc2vpp.common</groupId>
+ <artifactId>vpp-translate-utils</artifactId>
+ </dependency>
+
+ <!-- TODO - HC2VPP-100 - sub-interface utils,change to interface/subinterface api after split-->
+ <dependency>
+ <groupId>io.fd.hc2vpp.v3po</groupId>
+ <artifactId>v3po2vpp</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params;
+package io.fd.hc2vpp.l3.utils.ip.read;
public class IfaceDumpFilter {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.readers;
+
+package io.fd.hc2vpp.l3.utils.ip.read;
+
+import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params.IfaceDumpFilter;
import io.fd.hc2vpp.v3po.util.SubInterfaceUtils;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.vpp.jvpp.core.dto.IpAddressDetailsReplyDump;
import io.fd.vpp.jvpp.core.dto.IpAddressDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yangtools.yang.binding.Identifier;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import javax.annotation.Nonnull;
-import java.util.Collections;
-import java.util.List;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
/**
* Provides logic for reading of ip addresses
*/
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.readers;
+
+package io.fd.hc2vpp.l3.utils.ip.read;
+
+import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.Optional;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.interfacesstate.ip.dump.params.IfaceDumpFilter;
import io.fd.hc2vpp.v3po.util.SubInterfaceUtils;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.vpp.jvpp.core.dto.IpNeighborDetailsReplyDump;
import io.fd.vpp.jvpp.core.dto.IpNeighborDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.interfaces.state._interface.sub.interfaces.SubInterface;
-import org.opendaylight.yangtools.yang.binding.Identifier;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-import javax.annotation.Nonnull;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import javax.annotation.Nonnull;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.interfaces.state._interface.sub.interfaces.SubInterface;
+import org.opendaylight.yangtools.yang.binding.Identifier;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
/**
* Provides logic for reading ip neighbours
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfacesstate.ip.readers;
+package io.fd.hc2vpp.l3.utils.ip.read;
import com.google.common.collect.ImmutableSet;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.honeycomb.translate.util.read.cache.CacheKeyFactory;
import io.fd.honeycomb.translate.util.read.cache.TypeAwareIdentifierCacheKeyFactory;
+import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev161214.interfaces.state._interface.sub.interfaces.SubInterface;
-import javax.annotation.Nonnull;
-
/**
* Utility class providing Ipv4/6 read support.
*/
-abstract class IpReader implements AddressTranslator, JvppReplyConsumer {
+public abstract class IpReader implements AddressTranslator, JvppReplyConsumer {
private final NamingContext interfaceContext;
private final boolean isIpv6;
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-package io.fd.hc2vpp.v3po.interfaces.ip;
+package io.fd.hc2vpp.l3.utils.ip.write;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
<module>dhcp</module>
<module>samples</module>
<module>vpp-classifier</module>
+ <module>l3</module>
</modules>
</project>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>yang-ext</artifactId>
</dependency>
+
+ <!-- Ietf ip -->
+ <dependency>
+ <groupId>io.fd.hc2vpp.l3</groupId>
+ <artifactId>l3-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
<dependency>
<groupId>io.fd.hc2vpp.vpp.classifier</groupId>
<artifactId>vpp-classifier-api</artifactId>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>yang-ext</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.fd.hc2vpp.l3</groupId>
+ <artifactId>l3-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>io.fd.hc2vpp.common</groupId>
<artifactId>naming-context-api</artifactId>
import io.fd.hc2vpp.v3po.cfgattrs.V3poConfiguration;
import io.fd.hc2vpp.v3po.factory.InterfacesStateReaderFactory;
import io.fd.hc2vpp.v3po.factory.InterfacesWriterFactory;
-import io.fd.hc2vpp.v3po.factory.Ipv4StateReaderFactory;
-import io.fd.hc2vpp.v3po.factory.Ipv4WriterFactory;
-import io.fd.hc2vpp.v3po.factory.Ipv6StateReaderFactory;
-import io.fd.hc2vpp.v3po.factory.Ipv6WriterFactory;
-import io.fd.hc2vpp.v3po.factory.ProxyArpWriterFactory;
-import io.fd.hc2vpp.v3po.factory.SubInterfaceIpv4WriterFactory;
-import io.fd.hc2vpp.v3po.factory.SubInterfaceIpv6WriterFactory;
-import io.fd.hc2vpp.v3po.factory.SubInterfaceStateIpv4ReaderFactory;
-import io.fd.hc2vpp.v3po.factory.SubInterfaceStateIpv6ReaderFactory;
import io.fd.hc2vpp.v3po.factory.SubinterfaceAugmentationWriterFactory;
import io.fd.hc2vpp.v3po.factory.SubinterfaceStateAugmentationReaderFactory;
import io.fd.hc2vpp.v3po.factory.VppHoneycombWriterFactory;
// Expose disabled interfaces in operational data
readerFactoryBinder.addBinding().to(DisabledInterfacesManager.ContextsReaderFactory.class);
- //Ipv4/Ipv6
- readerFactoryBinder.addBinding().to(Ipv4StateReaderFactory.class);
- readerFactoryBinder.addBinding().to(Ipv6StateReaderFactory.class);
- readerFactoryBinder.addBinding().to(SubInterfaceStateIpv4ReaderFactory.class);
- readerFactoryBinder.addBinding().to(SubInterfaceStateIpv6ReaderFactory.class);
-
// Writers
final Multibinder<WriterFactory> writerFactoryBinder = Multibinder.newSetBinder(binder(), WriterFactory.class);
writerFactoryBinder.addBinding().to(InterfacesWriterFactory.class);
- writerFactoryBinder.addBinding().to(ProxyArpWriterFactory.class);
writerFactoryBinder.addBinding().to(SubinterfaceAugmentationWriterFactory.class);
writerFactoryBinder.addBinding().to(VppHoneycombWriterFactory.class);
- //Ipv4/Ipv6
- writerFactoryBinder.addBinding().to(Ipv4WriterFactory.class);
- writerFactoryBinder.addBinding().to(Ipv6WriterFactory.class);
- writerFactoryBinder.addBinding().to(SubInterfaceIpv4WriterFactory.class);
- writerFactoryBinder.addBinding().to(SubInterfaceIpv6WriterFactory.class);
-
// Notifications
final Multibinder<ManagedNotificationProducer> notifiersBinder =
Multibinder.newSetBinder(binder(), ManagedNotificationProducer.class);
<acl.version>1.17.04-SNAPSHOT</acl.version>
<dhcp.version>1.17.04-SNAPSHOT</dhcp.version>
<vpp.classifier.version>1.17.04-SNAPSHOT</vpp.classifier.version>
+ <l3-impl.version>1.17.04-SNAPSHOT</l3-impl.version>
<distribution.modules>
io.fd.hc2vpp.common.integration.VppCommonModule,
io.fd.hc2vpp.lisp.LispModule,
io.fd.hc2vpp.v3po.V3poModule,
+ io.fd.hc2vpp.l3.InterfaceL3Module,
+ io.fd.hc2vpp.l3.SubInterfaceL3Module,
+ io.fd.hc2vpp.l3.ProxyArpModule,
io.fd.hc2vpp.vpp.classifier.VppClassifierModule,
io.fd.hc2vpp.vpp.classifier.InterfaceClassifierAclModule,
io.fd.hc2vpp.vpp.classifier.SubInterfaceClassifierAclModule,
<artifactId>vpp-classifier-impl</artifactId>
<version>${vpp.classifier.version}</version>
</dependency>
+ <dependency>
+ <groupId>io.fd.hc2vpp.l3</groupId>
+ <artifactId>l3-impl</artifactId>
+ <version>${l3-impl.version}</version>
+ </dependency>
<dependency>
<groupId>io.fd.hc2vpp.lisp</groupId>
<artifactId>lisp2vpp</artifactId>