diff options
author | Michal Cmarada <mcmarada@cisco.com> | 2019-04-09 09:45:46 +0200 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2019-04-29 11:55:17 +0200 |
commit | 7235eeb213a5b4b3ce980b2629e429b7becc4097 (patch) | |
tree | fd717809a66faf4f88ae840171f491b0d985942b | |
parent | 6f9743cd43171d87c9f20339f9ae32f6cd5b952d (diff) |
fixes for samples module
- fix package name
- add copyright
- fix typo
- fix builder
- add dependencies for minimal distribution
Change-Id: Idf183f58c4343f016f7c6c2f02fa76c139dbfc70
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
5 files changed, 29 insertions, 5 deletions
diff --git a/samples/samples-api/pom.xml b/samples/samples-api/pom.xml index 95e43ed40..f6e748d0d 100644 --- a/samples/samples-api/pom.xml +++ b/samples/samples-api/pom.xml @@ -1,6 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<!-- + Copyright (c) 2019 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> @@ -8,9 +21,10 @@ <version>1.19.08-SNAPSHOT</version> <relativePath>../../common/api-parent</relativePath> </parent> + <modelVersion>4.0.0</modelVersion> - <groupId>io.fd.hc2vpp.common</groupId> + <groupId>io.fd.hc2vpp.samples</groupId> <artifactId>samples-api</artifactId> <name>${project.artifactId}</name> <version>1.19.08-SNAPSHOT</version> diff --git a/samples/samples-api/src/main/yang/sample-plugin@2016-12-14.yang b/samples/samples-api/src/main/yang/sample-plugin@2016-12-14.yang index 96edffe32..2c662bf10 100644 --- a/samples/samples-api/src/main/yang/sample-plugin@2016-12-14.yang +++ b/samples/samples-api/src/main/yang/sample-plugin@2016-12-14.yang @@ -16,7 +16,7 @@ module sample-plugin { Mailing List <hc2vpp@lists.fd.io>"; description - "Sample model for demonstration of transation code. + "Sample model for demonstration of translation code. Copyright (c) 2016 Cisco and/or its affiliates. diff --git a/samples/samples-impl/pom.xml b/samples/samples-impl/pom.xml index e5ede225c..317ff299d 100644 --- a/samples/samples-impl/pom.xml +++ b/samples/samples-impl/pom.xml @@ -10,14 +10,16 @@ </parent> <modelVersion>4.0.0</modelVersion> + <groupId>io.fd.hc2vpp.samples</groupId> <artifactId>samples-impl</artifactId> <name>${project.artifactId}</name> <version>1.19.08-SNAPSHOT</version> + <packaging>bundle</packaging> <dependencies> <!-- Api classes generated from yang model --> <dependency> - <groupId>io.fd.hc2vpp.common</groupId> + <groupId>io.fd.hc2vpp.samples</groupId> <artifactId>samples-api</artifactId> <version>${project.version}</version> </dependency> diff --git a/samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/read/VxlanReadCustomizer.java b/samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/read/VxlanReadCustomizer.java index 6fcf50351..b6a5cf462 100644 --- a/samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/read/VxlanReadCustomizer.java +++ b/samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/read/VxlanReadCustomizer.java @@ -162,6 +162,7 @@ public final class VxlanReadCustomizer implements // Now translate all attributes into provided builder final Boolean isIpv6 = byteToBoolean(singleVxlanDetail.isIpv6); + builder.setId(vxlanName); builder.setSrc(arrayToIpAddress(isIpv6, singleVxlanDetail.srcAddress)); builder.setDst(arrayToIpAddress(isIpv6, singleVxlanDetail.dstAddress)); // There are additional attributes of a vxlan tunnel that wont be used here diff --git a/vpp-integration/minimal-distribution/pom.xml b/vpp-integration/minimal-distribution/pom.xml index 641044210..d6ac65082 100644 --- a/vpp-integration/minimal-distribution/pom.xml +++ b/vpp-integration/minimal-distribution/pom.xml @@ -68,6 +68,7 @@ io.fd.hc2vpp.mpls.MplsModule, io.fd.hc2vpp.srv6.Srv6Module, io.fd.hc2vpp.ipsec.IpsecModule + // io.fd.hc2vpp.samples.Module, <!-- Nsh module by default disabled, because it needs vpp-nsh plugin, which is not part of vpp codebase.--> // io.fd.hc2vpp.vppnsh.impl.VppNshModule, <!-- iOAM module by default disabled, because it needs ioam plugin (not part of vpp codebase.)--> @@ -197,5 +198,11 @@ <artifactId>ipsec-impl</artifactId> <version>${project.version}</version> </dependency> +<!-- To use samples uncomment following dependency and rebuild the project --> +<!-- <dependency>--> +<!-- <groupId>io.fd.hc2vpp.samples</groupId>--> +<!-- <artifactId>samples-impl</artifactId>--> +<!-- <version>${project.version}</version>--> +<!-- </dependency>--> </dependencies> </project> |