fixes for samples module 57/18757/2
authorMichal Cmarada <[email protected]>
Tue, 9 Apr 2019 07:45:46 +0000 (09:45 +0200)
committerMichal Cmarada <[email protected]>
Mon, 29 Apr 2019 09:55:17 +0000 (11:55 +0200)
 - fix package name
 - add copyright
 - fix typo
 - fix builder
 - add dependencies for minimal distribution

Change-Id: Idf183f58c4343f016f7c6c2f02fa76c139dbfc70
Signed-off-by: Michal Cmarada <[email protected]>
samples/samples-api/pom.xml
samples/samples-api/src/main/yang/[email protected]
samples/samples-impl/pom.xml
samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/read/VxlanReadCustomizer.java
vpp-integration/minimal-distribution/pom.xml

index 95e43ed..f6e748d 100644 (file)
@@ -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>
index 96edffe..2c662bf 100644 (file)
@@ -16,7 +16,7 @@ module sample-plugin {
          Mailing List <[email protected]>";
 
     description
-        "Sample model for demonstration of transation code.
+        "Sample model for demonstration of translation code.
 
          Copyright (c) 2016 Cisco and/or its affiliates.
 
index e5ede22..317ff29 100644 (file)
     </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>
index 6fcf503..b6a5cf4 100644 (file)
@@ -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
index 6410442..d6ac650 100644 (file)
@@ -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.)-->
       <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>