Updating yang revisions in hostconfig for VPP 61/56361/5
authorTomas Cechvala <tcechval@cisco.com>
Tue, 2 May 2017 11:33:28 +0000 (13:33 +0200)
committerDileep <dileep.ranganathan@intel.com>
Tue, 2 May 2017 11:08:44 +0000 (11:08 +0000)
Added 2017-03-15 revision for honeycomb 1704
Config file is automatically copied to ${KARAF}/etc

Change-Id: I1b8bfa4d1f7230252286ead5b95af8c1c3192f70
SIGned-off-by: Tomas Cechvala <tcechval@cisco.com>
Signed-off-by: Dileep <dileep.ranganathan@intel.com>
artifacts/pom.xml
features/production/features-neutron/src/main/features/features.xml
features/production/odl-neutron-hostconfig-vpp/pom.xml
neutron-hostconfig/vpp/pom.xml
neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/NeutronHostconfigVppListener.java
neutron-hostconfig/vpp/src/main/resources/config/startup.cfg [moved from neutron-hostconfig/vpp/src/main/resources/config/org.opendaylight.neutron.hostconfig.vpp with 96% similarity]
neutron-hostconfig/vpp/src/main/resources/org/opendaylight/blueprint/neutron-hostconfig-vpp.xml
neutron-hostconfig/vpp/src/test/java/org/opendaylight/neutron/hostconfig/vpp/NeutronHostconfigVppListenerTest.java

index dcbcff2ce958b0adcd42e99740fc331b59dd7ed8..ddcf9ba7cf4359a944576600d3ccdfe36d7cdb3b 100644 (file)
                 <type>xml</type>
                 <classifier>features</classifier>
             </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>odl-neutron-hostconfig-vpp</artifactId>
+                <version>${project.version}</version>
+                <type>cfg</type>
+                <classifier>config</classifier>
+            </dependency>
         </dependencies>
     </dependencyManagement>
     <!--
index 6a07b733095a986077b608b1a64b9c9e21e87f86..80138d583643201e923d5bcfa61b7a54e8a8cb6c 100644 (file)
@@ -69,5 +69,6 @@
     <bundle>mvn:org.opendaylight.neutron/neutron-hostconfig-utils/{{VERSION}}</bundle>
     <bundle>mvn:org.opendaylight.neutron/neutron-hostconfig-vpp/{{VERSION}}</bundle>
     <bundle>mvn:org.osgi/org.osgi.core/{{VERSION}}</bundle>
+    <configfile finalname="/etc/org.opendaylight.neutron.hostconfig.vpp.startup.cfg">mvn:org.opendaylight.neutron/neutron-hostconfig-vpp/{{VERSION}}/cfg/config</configfile>
   </feature>
 </features>
index 13e5b191e2eb1686758fa3f9368986386af88658..72ea52a1dc5c59217edb197f2a4783cda1d4104a 100644 (file)
             <artifactId>neutron-hostconfig-vpp</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <!-- finalname="/etc/org.opendaylight.vbd.impl.startup.cfg" -->
+            <groupId>${project.groupId}</groupId>
+            <artifactId>neutron-hostconfig-vpp</artifactId>
+            <version>${project.version}</version>
+            <type>cfg</type>
+            <classifier>config</classifier>
+        </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
index e37edd802e14e314853484016699d32a1f17fd5c..ade702ddbf7e7ef4de4fe9f4655caf3e839a7a0d 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/config/startup.cfg</file>
+                              <type>cfg</type>
+                              <classifier>config</classifier>
+                          </artifact>
+                      </artifacts>
+                  </configuration>
+              </execution>
+          </executions>
+      </plugin>
     </plugins>
   </build>
   <scm>
index 42e34a9362511e87bf0209f89e859c9dd17c0f9f..5acfdf9023b5c4c368b44a017c0946d82e92e1c4 100644 (file)
@@ -52,7 +52,11 @@ public class NeutronHostconfigVppListener implements ClusteredDataTreeChangeList
     private final ExecutorService executorService = Executors.newFixedThreadPool(1);
 
     private static final TopologyId TOPOLOGY_NETCONF = new TopologyId("topology-netconf");
-    private static final QName V3PO_CAPABILITY = QName.create(URI.create("urn:opendaylight:params:xml:ns:yang:v3po"),
+    private static final QName V3PO_1704_CAPABILITY = QName.create(
+            URI.create("urn:opendaylight:params:xml:ns:yang:v3po"),
+            NeutronHostconfigUtils.parseDate("2017-03-15"), "v3po");
+    private static final QName V3PO_1701_CAPABILITY = QName.create(
+            URI.create("urn:opendaylight:params:xml:ns:yang:v3po"),
             NeutronHostconfigUtils.parseDate("2016-12-14"), "v3po");
     private static final QName INTERFACES_CAPABILITY =
             QName.create(URI.create("urn:ietf:params:xml:ns:yang:ietf-interfaces"),
@@ -69,7 +73,8 @@ public class NeutronHostconfigVppListener implements ClusteredDataTreeChangeList
         this.socketInfo =
                 new SocketInfo(Preconditions.checkNotNull(spath), Preconditions.checkNotNull(sname), vhostMode);
         this.neutronHostconfig = new NeutronHostconfigUtils(dataBroker);
-        REQUIRED_CAPABILITIES.add(V3PO_CAPABILITY);
+        REQUIRED_CAPABILITIES.add(V3PO_1704_CAPABILITY);
+        REQUIRED_CAPABILITIES.add(V3PO_1701_CAPABILITY);
         REQUIRED_CAPABILITIES.add(INTERFACES_CAPABILITY);
     }
 
index e2205fe25bb61ce30380d5d4c385059fe50da83d..b4b5aa390a38d4ac47c55d0726a47a8c344ed20b 100644 (file)
@@ -8,7 +8,7 @@
       interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
       odl:type="default" />
 
-  <cm:property-placeholder persistent-id="org.opendaylight.neutron.hostconfig.vpp" update-strategy="none">
+  <cm:property-placeholder persistent-id="org.opendaylight.neutron.hostconfig.vpp.startup" update-strategy="none">
     <cm:default-properties>
       <cm:property name="vhostuser-mode" value="server"/>
       <cm:property name="socket-dir" value="/tmp/"/>
index 883d91e6a98976c17977ea0f80b587661a455536..9a001e4150bca85b54a8b36573a988b9bfb9ce35 100644 (file)
@@ -53,7 +53,10 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 public class NeutronHostconfigVppListenerTest extends HostconfigsDataBrokerTest
         implements ClusteredDataTreeChangeListener<Hostconfig> {
 
-    private static final String V3PO = "(urn:opendaylight:params:xml:ns:yang:v3po?revision=2016-12-14)v3po";
+    private static final String V3PO_1704_CAPABILITY =
+        "(urn:opendaylight:params:xml:ns:yang:v3po?revision=2017-03-15)v3po";
+    private static final String V3PO_1701_CAPABILITY =
+        "(urn:opendaylight:params:xml:ns:yang:v3po?revision=2016-12-14)v3po";
     private static final String INTERFACES =
             "(urn:ietf:params:xml:ns:yang:ietf-interfaces?revision=2014-05-08)ietf-interfaces";
     private static final NodeId NODE_ID = new NodeId("node1");
@@ -82,7 +85,8 @@ public class NeutronHostconfigVppListenerTest extends HostconfigsDataBrokerTest
             .child(Topology.class, new TopologyKey(new TopologyId("topology-netconf")))
             .child(Node.class, new NodeKey(new NodeId(NODE_ID)))
             .build();
-        Node node1 = createNetconfNode(NODE_ID, V3PO, INTERFACES);
+        Node node1 =
+            createNetconfNode(NODE_ID, V3PO_1704_CAPABILITY, V3PO_1701_CAPABILITY, INTERFACES);
         WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
         writeTx.put(LogicalDatastoreType.OPERATIONAL, iid, node1, true);
         writeTx.submit().get();