Bug-8168: Neutron VPP mapper initial configuration file fix 22/54422/2
authorMichal Cmarada <mcmarada@cisco.com>
Mon, 10 Apr 2017 12:50:19 +0000 (14:50 +0200)
committerMichal Cmarada <mcmarada@cisco.com>
Mon, 10 Apr 2017 13:11:55 +0000 (15:11 +0200)
When neutron vpp mapper feature is installed a default config file
was not created. This fixes the issue

Change-Id: Ic8c53b35742234be32e108aef91d198580eb28e9
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
artifacts/pom.xml
features/pom.xml
features/src/main/features/features.xml
neutron-vpp-mapper/pom.xml
neutron-vpp-mapper/src/main/resources/org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.cfg [deleted file]
neutron-vpp-mapper/src/main/resources/org/opendaylight/blueprint/neutron-vpp-mapper.xml
neutron-vpp-mapper/src/main/resources/startup.cfg [new file with mode: 0644]

index c0745a9718fb10e5e2568f3ecc3330bcb5fda1c9..8dfb9aff0a064ca904bbe05599d837c8d6225f72 100755 (executable)
         <type>xml</type>
         <classifier>config</classifier>
       </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>neutron-vpp-mapper</artifactId>
+        <version>${project.version}</version>
+        <type>cfg</type>
+        <classifier>config</classifier>
+      </dependency>
       <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>neutron-ovsdb</artifactId>
index 70b4452e8aa8fbf8e82fe270122f08525d3c7f41..f20ee3f7b26a6efe1194abf7714e523bd5d490e0 100755 (executable)
       <classifier>config</classifier>
     </dependency>
     <dependency>
+      <!-- finalname="/etc/org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup.cfg" -->
       <groupId>org.opendaylight.groupbasedpolicy</groupId>
       <artifactId>neutron-vpp-mapper</artifactId>
-      <type>xml</type>
+      <type>cfg</type>
       <classifier>config</classifier>
     </dependency>
     <dependency>
index a555ef27877a9da3a66aa0a2e2d7978abea6b263..d0698f7d00224de32715b005b5cd8efe008652a2 100755 (executable)
         <feature version="${project.version}">odl-groupbasedpolicy-neutronmapper</feature>
         <feature version="${project.version}">odl-groupbasedpolicy-vpp</feature>
         <bundle>mvn:org.opendaylight.groupbasedpolicy/neutron-vpp-mapper/{{VERSION}}</bundle>
-        <configfile finalname="${config.configfile.directory}/15-neutron-vpp-mapper.xml">mvn:org.opendaylight.groupbasedpolicy/neutron-vpp-mapper/{{VERSION}}/xml/config</configfile>
+        <configfile finalname="/etc/org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup.cfg">mvn:org.opendaylight.groupbasedpolicy/neutron-vpp-mapper/{{VERSION}}/cfg/config</configfile>
     </feature>
 
     <!--
index 2c3d01c244ddcd8728d1997f7079db31458cd4d0..e158166e4dcbb8f6e9c2f2833e6fa573c553661a 100644 (file)
           </instructions>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-artifacts</id>
+            <phase>package</phase>
+            <goals>
+              <goal>attach-artifact</goal>
+            </goals>
+            <configuration>
+              <artifacts>
+                <artifact>
+                  <file>${project.build.directory}/classes/startup.cfg</file>
+                  <type>cfg</type>
+                  <classifier>config</classifier>
+                </artifact>
+              </artifacts>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/neutron-vpp-mapper/src/main/resources/org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.cfg b/neutron-vpp-mapper/src/main/resources/org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.cfg
deleted file mode 100644 (file)
index 7428add..0000000
+++ /dev/null
@@ -1 +0,0 @@
-routing-node = compute1
index 6206c00eb314b37f1e40c66c2bd098dc5d87e602..a9ab9ccf49c003ebd47200a0140a34551ad0ee65 100644 (file)
@@ -16,9 +16,9 @@
         <argument ref="clusterSingletonService" />
     </bean>
 
-    <cm:property-placeholder persistent-id="org.opendaylight.groupbasedpolicy.neutron.vpp.mapper" update-strategy="none">
+    <cm:property-placeholder persistent-id="org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup" update-strategy="none">
         <cm:default-properties>
             <cm:property name="routing-node" value="default"/>
         </cm:default-properties>
     </cm:property-placeholder>
-</blueprint>
\ No newline at end of file
+</blueprint>
diff --git a/neutron-vpp-mapper/src/main/resources/startup.cfg b/neutron-vpp-mapper/src/main/resources/startup.cfg
new file mode 100644 (file)
index 0000000..f609624
--- /dev/null
@@ -0,0 +1,8 @@
+# INITIAL NEUTRON VPP MAPPER CONFIGURATION
+#
+# Uncomment lines of this file to change default values of neutron vpp
+# mapper bundle config. The file should be placed to karaf_root_dir/etc
+#
+# To explicitly specify which node is used for routing in openstack, uncomment and modify next line. If not set
+# Neutron VPP mapper will use the same node where dhcp port was created.
+# routing-node = compute1