</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
+ <version>3.1.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
</plugin>
<!-- Generate module to yang provider index -->
<plugin>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>groovy-maven-plugin</artifactId>
+ <groupId>org.codehaus.gmavenplus</groupId>
+ <artifactId>gmavenplus-plugin</artifactId>
<executions>
<execution>
<id>generate-yang-index</id>
<goal>execute</goal>
</goals>
<configuration>
- <source>
- io.fd.honeycomb.common.scripts.ModuleYangIndexGenerator.generateIndexForPresentModules(project, log)
- </source>
+ <scripts>
+ <script>
+ <![CDATA[
+ import io.fd.honeycomb.common.scripts.ModuleYangIndexGenerator
+ ModuleYangIndexGenerator.generateIndexForPresentModules(project, log)
+ ]]>
+ </script>
+ </scripts>
</configuration>
</execution>
</executions>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
+ <version>3.1.1</version>
<executions>
<execution>
<id>unpack-configuration</id>
<!-- Generate shell script -->
<!-- Extract modules started by distribution -->
<plugin>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>groovy-maven-plugin</artifactId>
+ <groupId>org.codehaus.gmavenplus</groupId>
+ <artifactId>gmavenplus-plugin</artifactId>
<executions>
<execution>
<id>start-scripts-generation</id>
<goal>execute</goal>
</goals>
<configuration>
- <source>
- io.fd.honeycomb.common.scripts.StartupScriptGenerator.generate(project, properties, log)
- </source>
+ <scripts>
+ <script>
+ <![CDATA[
+ import io.fd.honeycomb.common.scripts.StartupScriptGenerator
+ StartupScriptGenerator.generate(project, properties, log)
+ ]]>
+ </script>
+ </scripts>
</configuration>
</execution>
<execution>
<goal>execute</goal>
</goals>
<configuration>
- <source>
- io.fd.honeycomb.common.scripts.ModulesListGenerator.generate(project, properties, log)
- </source>
+ <scripts>
+ <script>
+ <![CDATA[
+ import io.fd.honeycomb.common.scripts.ModulesListGenerator
+ ModulesListGenerator.generate(project, log)
+ ]]>
+ </script>
+ </scripts>
</configuration>
</execution>
<execution>
<goal>execute</goal>
</goals>
<configuration>
- <source>
- io.fd.honeycomb.common.scripts.ModuleYangIndexGenerator.pairDistributionModulesWithYangModules(project, log)
- </source>
+ <scripts>
+ <script>
+ <![CDATA[
+ import io.fd.honeycomb.common.scripts.ModuleYangIndexGenerator
+ ModuleYangIndexGenerator.pairDistributionModulesWithYangModules(project, log)
+ ]]>
+ </script>
+ </scripts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
</project>
\ No newline at end of file
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
In VPP this table is mapped to ip_table_add_del VPP API message:
Add/del table request
A table can be added multiple times, but need be deleted only once.
- @param is_ipv6 - V4 or V6 table
- @param table_id - table ID associated with the route
+ param is_ipv6 - V4 or V6 table
+ param table_id - table ID associated with the route
This table ID will apply to both the unicats and mlticast FIBs
- @param name - A client provided name/tag for the table. If this is
+ param name - A client provided name/tag for the table. If this is
not set by the client, then VPP will generate something meaningfull";
leaf address-family {
type identityref {
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<packaging>bundle</packaging>
<properties>
- <guice.version>4.1.0</guice.version>
+ <guice.version>4.2.2</guice.version>
<guice.config.version>1.2.0</guice.config.version>
</properties>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
+ <version>3.1.1</version>
<executions>
<execution>
<id>unpack-configuration</id>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- Tests -->
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
* @param vppPhysAddress byte array of bytes in big endian order, constructing the network IF physical address.
* @return String like "aa:bb:cc:dd:ee:ff"
* @throws NullPointerException if vppPhysAddress is null
- * @throws IllegalArgumentException if vppPhysAddress.length < 6
+ * @throws IllegalArgumentException if vppPhysAddress.length < 6
*/
default String vppPhysAddrToYang(@Nonnull final byte[] vppPhysAddress) {
Objects.requireNonNull(vppPhysAddress, "Empty physical address bytes");
}
/**
- * Checks whether provided {@link SwInterfaceDetails} is detail of sub-interface<br> <li>subId == unique number of
- * sub-interface within set of sub-interfaces of single interface <li>swIfIndex == unique index of
- * interface/sub-interface within all interfaces <li>supSwIfIndex == unique index of parent interface <li>in case of
- * interface , swIfIndex value equals supSwIfIndex <li>in case of subinterface, supSwIfIndex equals index of parent
- * interface, swIfIndex is index of subinterface itselt
+ * Checks whether provided {@link SwInterfaceDetails} is detail of sub-interface<br>
+ * <ul>
+ * <li>subId == unique number of sub-interface within set of sub-interfaces of single interface</li>
+ * <li>swIfIndex == unique index of interface/sub-interface within all interfaces</li>
+ * <li>supSwIfIndex == unique index of parent interface</li>
+ * <li>in case of interface , swIfIndex value equals supSwIfIndex</li>
+ * <li>in case of subinterface, supSwIfIndex equals index of parent interface, swIfIndex is index of
+ * subinterface itselt</li>
+ * </ul>
*/
default boolean isSubInterface(@Nonnull final SwInterfaceDetails elt) {
//cant check by subId != 0, because you can pick 0 as value
}
/**
- * Checks whether provided {@link SwInterfaceDetails} is detail of interface<br> <li>subId == unique number of
- * subinterface within set of subinterfaces of single interface <li>swIfIndex == unique index of
- * interface/subinterface within all interfaces <li>supSwIfIndex == unique index of parent interface <li>in case of
- * interface , swIfIndex value equals supSwIfIndex <li>in case of subinterface, supSwIfIndex equals index of parent
- * interface, swIfIndex is index of subinterface itselt
+ * Checks whether provided {@link SwInterfaceDetails} is detail of interface<br>
+ * <ul>
+ * <li>subId == unique number of subinterface within set of subinterfaces of single interface</li>
+ * <li>swIfIndex == unique index of interface/subinterface within all interfaces</li>
+ * <li>supSwIfIndex == unique index of parent interface</li>
+ * <li>in case of interface , swIfIndex value equals supSwIfIndex</li>
+ * <li>in case of subinterface, supSwIfIndex equals index of parent interface, swIfIndex is index
+ * of subinterface itselt</li>
+ * </ul>
*/
default boolean isRegularInterface(@Nonnull final SwInterfaceDetails elt) {
return !isSubInterface(elt);
* Get mapped name for the interface. Best effort only! The mapping might not yet be stored in context data tree
* (write transaction is still in progress and context changes have not been committed yet, or VPP sends the
* notification before it returns create request(that would store mapping)).
- * <p/>
+ *
* In case mapping is not available, index is used as name.
*/
private InterfaceNameOrIndex getIfcName(final SwInterfaceEvent swInterfaceEventNotification) {
<artifactId>vpp-translate-utils</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.4.0-b180725.0427</version>
+ </dependency>
<!-- TODO - HC2VPP-97 change once interfaces-impl once modules present
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<jvpp.version>19.04-SNAPSHOT</jvpp.version>
- <hamcrest.version>1.3</hamcrest.version>
+ <hamcrest.version>2.1</hamcrest.version>
</properties>
<build>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
/**
* Return pre-stubed mock that will throw {@link TimeoutException},
* while performing desired method
+ *
+ * @return pre-stubed mock that will throw {@link TimeoutException}
+ * @throws InterruptedException when the operation is interrupted
+ * @throws ExecutionException when execution fails
+ * @throws TimeoutException when timeout occurs
*/
protected FutureJVppCore doThrowTimeoutExceptionWhen()
throws InterruptedException, ExecutionException, TimeoutException {
/**
* Return pre-stubed mock that will throw {@link VppInvocationException},
* while performing desired method
+ *
+ * @return pre-stubed mock that will throw {@link VppInvocationException}
*/
protected FutureJVppCore doThrowFailExceptionWhen() {
return doReturn(failedFuture()).when(api);
/**
* Return pre-stubed mock that will return specified result
* while performing desired method
+ *
+ * @param replyDump type of reply dump
+ * @return pre-stubed mock that will return specified result
*/
protected <U> FutureJVppCore doReturnResponseWhen(U replyDump) {
return doReturn(future(replyDump)).when(api);
*
* @param result returned when {@link CompletableFuture#get()} is invoked
* @param <T> the result type of returned future
+ * @return {@link CompletableFuture} with desired result
*/
default <T> CompletableFuture<T> future(@Nonnull final T result) {
final CompletableFuture<T> future = new CompletableFuture<>();
*
* @param exception to be thrown when {@link CompletableFuture#get()} is invoked
* @param <T> the result type of returned future
+ * @return {@link CompletableFuture} with provided {@link Exception} as a result
*/
default <T> CompletableFuture<T> failedFuture(@Nonnull final Exception exception) {
final CompletableFuture<T> future = new CompletableFuture<>();
* Returns {@link CompletableFuture} with VppCallbackException(retval = -1) as a cause.
*
* @param <T> the result type of returned future
+ * @return {@link CompletableFuture} with VppCallbackException(retval = -1) as a cause
*/
default <T> CompletableFuture<T> failedFuture() {
return failedFuture(new VppCallbackException("test-call", "test error msg", 1 /* ctxId */, -1 /* retval */));
import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
/**
- * Utility that helps stubbing {@link io.fd.hc2vpp.common.translate.util.NamingContext} methods.
+ * Utility that helps stubbing {@link NamingContext} methods.
*/
// TODO(HONEYCOMB-226): the class needs to be refactored or even removed after extracting interface from NamingContext
public interface NamingContextHelper {
}
/**
- * Stubs {@link MappingContext#read} for given {@link NamingContext} to return {@link Optional#absent} for provided
+ * Stubs {@link MappingContext#read} for given {@link NamingContext} to return {@link Optional#empty} for provided
* name.
*
* @param mappingContext mock instance of {@link MappingContext}
/**
* Optional setup for subclasses. Invoked after parent initialization.
+ *
+ * @throws Exception unspecified exception while setting up tests
*/
protected void setUpTest() throws Exception {
// this method would normally trigger this warning while compiling:
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
/**
* Defines vlan tag rewrite config options for VPP.
- * <p/>
+ *
* TODO HONEYCOMB-184 corresponding enum (defined in l2_vtr.h) should be defined in vpe.api
* (does vpp's IDL support enum type definition?)
* which would allow to generate this class in jvpp
<properties>
<mockito-core.version>2.2.9</mockito-core.version>
<junit.version>4.11</junit.version>
- <guice.version>4.1.0</guice.version>
- <asm.version>5.2</asm.version>
+ <guice.version>4.2.2</guice.version>
+ <asm.version>7.0</asm.version>
<asciidoctorj.version>1.5.4</asciidoctorj.version>
<slf4j-simple.version>1.7.25</slf4j-simple.version>
<jvpp.version>19.04-SNAPSHOT</jvpp.version>
String reference,
Set<PluginMethodReference> foundReferences,
Set<String> allreadyProcessedLocalMethods) {
- super(Opcodes.ASM5);
+ super(Opcodes.ASM7);
this.currentClass = currentClass;
this.methodName = methodName;
this.reference = reference;
public MethodPluginCoverageVisitor(String currentClass, Set<PluginMethodReference> foundReferences,
String reference,
Set<String> allreadyProcessedLocal) {
- super(Opcodes.ASM5);
+ super(Opcodes.ASM7);
this.currentClass = currentClass;
this.foundReferences = foundReferences;
this.reference = reference;
<name>${project.artifactId}</name>
<properties>
+ <maven.groovy.version>1.6.2</maven.groovy.version>
+ <groovy.version>2.5.4</groovy.version>
<!-- List of modules that are used to extract Writer/Reader factories, and therefore generate api documentation -->
<api.docs.modules>
io.fd.hc2vpp.docs.core.mock.binding.MockBindingModule,
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.6.1</version>
+ <version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>groovy-maven-plugin</artifactId>
+ <groupId>org.codehaus.gmavenplus</groupId>
+ <artifactId>gmavenplus-plugin</artifactId>
+ <version>${maven.groovy.version}</version>
<executions>
<execution>
<id>generate-coverage-doc</id>
<goal>execute</goal>
</goals>
<configuration>
- <source>
- io.fd.hc2vpp.docs.scripts.ApiDocsIndexGenerator.generate(project, log)
- </source>
+ <scripts>
+ <script>
+ <![CDATA[
+ import io.fd.hc2vpp.docs.scripts.ApiDocsIndexGenerator
+ ApiDocsIndexGenerator.generate(project, log)
+ ]]>
+ </script>
+ </scripts>
</configuration>
</execution>
</executions>
<dependencies>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <type>pom</type>
+ <version>${groovy.version}</version>
+ </dependency>
<dependency>
<groupId>io.fd.hc2vpp.docs</groupId>
<artifactId>scripts</artifactId>
<name>${project.artifactId}</name>
<properties>
- <groovy.version>2.4.7</groovy.version>
- <groovy.eclipse.compiler.version>2.9.2-01</groovy.eclipse.compiler.version>
- <groovy.eclipse.batch.version>2.4.3-01</groovy.eclipse.batch.version>
+ <groovy.version>2.5.4</groovy.version>
+ <groovy.eclipse.compiler.version>3.3.0-01</groovy.eclipse.compiler.version>
+ <groovy.eclipse.batch.version>2.5.6-02</groovy.eclipse.batch.version>
<jvpp.version>19.04-SNAPSHOT</jvpp.version>
<junit.version>4.11</junit.version>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-templates</artifactId>
+ <version>${groovy.version}</version>
</dependency>
<dependency>
<groupId>io.fd.jvpp</groupId>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
+ <version>3.1.1</version>
<executions>
<!-- Dependencies are copied by parent project -->
<execution>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
+ <excludeTypes>pom</excludeTypes>
<includes>**/honeycomb-minimal-resources/</includes>
<outputDirectory>${project.build.outputDirectory}/</outputDirectory>
</configuration>
<artifactId>groovy-eclipse-batch</artifactId>
<version>${groovy.eclipse.batch.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-templates</artifactId>
+ <version>${groovy.version}</version>
+ </dependency>
</dependencies>
</plugin>
</plugins>
.map { moduleName -> moduleName.trim() }
.map { moduleName ->
log.info "Loading class $moduleName"
- loader.loadClass(moduleName).newInstance()
+ loader.loadClass(moduleName).getDeclaredConstructor().newInstance()
}
.collect(toList())
ClassPathTypeIndex classPathIndex = new ClassPathTypeIndex(projectRoot)
log.info "Generating VPP API to YANG mapping"
+
PLUGIN_CLASSES.stream()
.forEach { pluginClass ->
log.info "Generating mapping for ${pluginClass}"