Merge "Serialization/Deserialization and a host of other fixes"
authorEd Warnicke <eaw@cisco.com>
Wed, 30 Jul 2014 12:05:21 +0000 (12:05 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 30 Jul 2014 12:05:21 +0000 (12:05 +0000)
features/config/src/main/resources/features.xml
features/nsf/pom.xml [new file with mode: 0644]
features/nsf/src/main/resources/features.xml [new file with mode: 0644]
features/pom.xml
opendaylight/distribution/opendaylight-karaf/pom.xml
opendaylight/md-sal/model/model-flow-statistics/src/main/yang/opendaylight-flow-statistics.yang
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/DeleteNestedAugmentationListenParentTest.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/XSQLAdapter.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/XSQLODLUtils.java
opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/FlowStatsTracker.java
pom.xml

index e18f844622900c8b5a108296c0f3c7174ca78f43..de5b198173f6c88da2c5983c2b2daae9c989ea6d 100644 (file)
@@ -16,7 +16,7 @@
     <bundle>mvn:org.opendaylight.controller/shutdown-api/${project.version}</bundle>
     <bundle>mvn:org.opendaylight.controller/shutdown-impl/${project.version}</bundle>
     <bundle>mvn:org.osgi/org.osgi.core/${osgi.core.version}</bundle>
-    <bundle>wrap:mvn:com.google.guava/guava/${guava.version}</bundle>
+    <bundle>mvn:com.google.guava/guava/${guava.version}</bundle>
     <bundle>mvn:org.javassist/javassist/${javassist.version}</bundle>
   </feature>
   <feature name='odl-config-manager' version='${project.version}'>
diff --git a/features/nsf/pom.xml b/features/nsf/pom.xml
new file mode 100644 (file)
index 0000000..224aef1
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>commons.opendaylight</artifactId>
+    <version>1.4.2-SNAPSHOT</version>
+    <relativePath>../../opendaylight/commons/opendaylight</relativePath>
+  </parent>
+  <artifactId>features-nsf</artifactId>
+  <packaging>pom</packaging>
+  <name>OpenDaylight :: Features :: Network Service Functions</name>
+  <description>Feature for Network Service Functions</description>
+  <properties>
+    <features.file>features.xml</features.file>
+  </properties>
+  <build>
+    <resources>
+      <resource>
+        <filtering>true</filtering>
+        <directory>src/main/resources</directory>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>filter</id>
+            <goals>
+              <goal>resources</goal>
+            </goals>
+            <phase>generate-resources</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-artifacts</id>
+            <goals>
+              <goal>attach-artifact</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              <artifacts>
+                <artifact>
+                  <file>${project.build.directory}/classes/${features.file}</file>
+                  <type>xml</type>
+                  <classifier>features</classifier>
+                </artifact>
+              </artifacts>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/features/nsf/src/main/resources/features.xml b/features/nsf/src/main/resources/features.xml
new file mode 100644 (file)
index 0000000..fb61f33
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<features name="nsf-${project.version}"  xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+    <feature name="odl-nsf-all" description="OpenDaylight :: NSF :: All Network Service Functions" version="${project.version}">
+        <feature version="${sal.version}">odl-adsal-all</feature>
+        <feature version="${project.version}">odl-nsf-managers</feature>
+        <feature version="${project.version}">odl-adsal-northbound</feature>
+        <!--
+         TODO : Resolve this in a follow-up commit
+            <feature>odl-controller-web</feature>
+        -->
+    </feature>
+
+    <feature name="odl-nsf-managers" description="OpenDaylight :: AD-SAL :: Network Service Functions" version="${project.version}">
+        <feature version="${project.version}">base-all</feature>
+        <feature version="${sal.version}">odl-adsal-all</feature>
+        <bundle>mvn:org.opendaylight.controller/usermanager/${usermanager.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/usermanager.implementation/${usermanager.version}</bundle>
+
+        <bundle>mvn:org.opendaylight.controller/appauth/${appauth.version}</bundle>
+
+        <bundle>mvn:org.opendaylight.controller/connectionmanager/${connectionmanager.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/connectionmanager.implementation/${connectionmanager.version}</bundle>
+
+        <bundle>mvn:org.opendaylight.controller/containermanager/${containermanager.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/containermanager.implementation/${containermanager.version}</bundle>
+
+        <bundle>mvn:org.opendaylight.controller/statisticsmanager/${statisticsmanager.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/statisticsmanager.implementation/${statisticsmanager.implementation.version}</bundle>
+
+        <bundle>mvn:org.opendaylight.controller/switchmanager/${switchmanager.api.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/switchmanager.implementation/${switchmanager.implementation.version}</bundle>
+
+        <bundle>mvn:org.opendaylight.controller/forwardingrulesmanager/${forwardingrulesmanager.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/forwardingrulesmanager.implementation/${forwardingrulesmanager.implementation.version}</bundle>
+
+        <bundle>mvn:org.opendaylight.controller/topologymanager/${topologymanager.version}</bundle>
+
+        <bundle>mvn:org.opendaylight.controller/networkconfig.neutron/${networkconfig.neutron.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/networkconfig.neutron.implementation/${networkconfig.neutron.implementation.version}</bundle>
+
+        <bundle>mvn:org.opendaylight.controller/hosttracker/${hosttracker.api.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/hosttracker.implementation/${hosttracker.implementation.version}</bundle>
+
+        <bundle>mvn:org.opendaylight.controller/forwarding.staticrouting</bundle>
+
+        <bundle>mvn:org.opendaylight.controller.thirdparty/net.sf.jung2/2.0.1</bundle>
+        <bundle>mvn:org.opendaylight.controller/routing.dijkstra_implementation</bundle>
+    </feature>
+
+    <feature name="odl-adsal-northbound" description="OpenDaylight :: AD-SAL :: Northbound APIs" version="${project.version}">
+        <feature version="${project.version}">base-all</feature>
+        <feature version="${project.version}">odl-nsf-managers</feature>
+        <bundle start-level="35">mvn:org.ow2.asm/asm-all/${asm.version}</bundle>
+        <!--
+            TODO : Resolve these in a follow-up commit
+            <bundle>mvn:org.opendaylight.controller/httpservice-bridge/${httpservice-bridge.northbound.version}</bundle>
+            <bundle>mvn:org.opendaylight.controller/jolokia-bridge/${jolokia-bridge.version}</bundle>
+        -->
+        <bundle>mvn:org.opendaylight.controller/bundlescanner/${bundlescanner.api.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/bundlescanner.implementation/${bundlescanner.implementation.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/commons.northbound/${northbound.commons.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/flowprogrammer.northbound/${flowprogrammer.northbound.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/hosttracker.northbound/${hosttracker.northbound.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/networkconfig.bridgedomain.northbound/${networkconfig.bridgedomain.northbound.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/networkconfig.neutron.northbound/${networkconfig.neutron.northbound.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/forwarding.staticrouting.northbound/${forwarding.staticrouting.northbound.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/statistics.northbound/${statistics.northbound.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/subnets.northbound/${subnets.northbound.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/switchmanager.northbound/${switchmanager.northbound.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/topology.northbound/${topology.northbound.version}</bundle>
+        <bundle>mvn:org.opendaylight.controller/usermanager.northbound/${usermanager.northbound.version}</bundle>
+    </feature>
+</features>
\ No newline at end of file
index fb40fa93b18f063b0a796b201809df210c13523b..f69190cebd4e5bd45fc0d11fc674305f65a0589c 100644 (file)
     <maven>3.0</maven>
   </prerequisites>
   <modules>
+    <module>base</module>
+    <module>controller</module>
+    <module>adsal</module>
+    <module>nsf</module>
+    <module>extras</module>
     <module>config</module>
     <module>config-persister</module>
     <module>config-netty</module>
index 06e0a92fa6cf3d1c0656736c65f2d0cc76d0cc09..977fab1334ae48791f9901aedbc1420eabb1e2e7 100644 (file)
@@ -69,6 +69,8 @@
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
+
+    <!-- AD-SAL Related Features -->
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>features-adsal</artifactId>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>features-nsf</artifactId>
+      <version>${project.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+
+    <!-- MD-SAL Related Features -->
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>mdsal-features</artifactId>
index e0df924a0ea5434f81a804efec6447169c22448b..f7a0652e45f042bf891c58a1a7fcdb017e811a2c 100644 (file)
@@ -25,7 +25,6 @@ module opendaylight-flow-statistics {
     grouping flow-statistics {
         container flow-statistics {
             //config "false";
-            uses flow-types:flow;
             uses stat-types:generic-statistics;
         }
     }
index fb5fd1fa6c8f438b120078d1d995ca839dc6b5a7..735138a530ab801149adbaceb79e38c3b27d92b9 100644 (file)
@@ -78,13 +78,12 @@ public class DeleteNestedAugmentationListenParentTest extends AbstractDataServic
         FlowBuilder builder = new FlowBuilder()
             .setKey(FLOW_KEY)
             .addAugmentation(FlowStatisticsData.class,new FlowStatisticsDataBuilder()
-                    .setFlowStatistics(new FlowStatisticsBuilder()
-                        .setBarrier(true)
-                        .setMatch(new MatchBuilder()
-                            .build())
-                        .build())
+                    .setFlowStatistics(new FlowStatisticsBuilder().build())
                     .build())
-        ;//.build();
+            .setBarrier(true)
+            .setMatch(new MatchBuilder()
+            .build())
+        ;
         return builder.build();
     }
 
index 4571baf2e467d3c8e86079b89720d88a3584c874..6d4400fe20f1f115d5e09ef56cc9a8fc749c8bfd 100644 (file)
@@ -20,7 +20,7 @@ import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadTransaction;
 import org.opendaylight.controller.md.sal.dom.xsql.jdbc.JDBCResultSet;
 import org.opendaylight.controller.md.sal.dom.xsql.jdbc.JDBCServer;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
@@ -78,7 +78,7 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
                 synchronized (XSQLAdapter.class) {
                     if (l == null) {
                         l = new PrintStream(
-                            new FileOutputStream("/tmp/xql.log"));
+                                new FileOutputStream("/tmp/xql.log"));
                     }
                 }
             }
@@ -96,7 +96,7 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
                 synchronized (XSQLAdapter.class) {
                     if (l == null) {
                         l = new PrintStream(
-                            new FileOutputStream("/tmp/xql.log"));
+                                new FileOutputStream("/tmp/xql.log"));
                     }
                 }
             }
@@ -130,20 +130,20 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
         if (table.getParent().isModule()) {
             try {
                 List<Object> result = new LinkedList<Object>();
-                InstanceIdentifier instanceIdentifier =
-                    InstanceIdentifier.builder()
+                YangInstanceIdentifier instanceIdentifier = YangInstanceIdentifier
+                        .builder()
                         .node(XSQLODLUtils.getPath(table.getODLNode()).get(0))
                         .toInstance();
-                DOMDataReadTransaction t = this.domDataBroker.newReadOnlyTransaction();
-                Object node =
-                    t.read(LogicalDatastoreType.OPERATIONAL, instanceIdentifier)
-                        .get();
+                DOMDataReadTransaction t = this.domDataBroker
+                        .newReadOnlyTransaction();
+                Object node = t.read(LogicalDatastoreType.OPERATIONAL,
+                        instanceIdentifier).get();
                 node = XSQLODLUtils.get(node, "reference");
                 if (node == null) {
                     return result;
                 }
 
-                //XSQLAdapter.log(""+node);
+                // XSQLAdapter.log(""+node);
                 Map<?, ?> children = XSQLODLUtils.getChildren(node);
                 for (Object c : children.values()) {
                     Map<?, ?> sons = XSQLODLUtils.getChildren(c);
@@ -169,7 +169,7 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
         List<NETask> tasks = new LinkedList<XSQLAdapter.NETask>();
 
         for (Object entry : roots) {
-            NETask task = new NETask(rs, entry, main,bluePrint);
+            NETask task = new NETask(rs, entry, main, bluePrint);
             rs.numberOfTasks++;
             tasks.add(task);
         }
@@ -201,7 +201,7 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
     }
 
     protected void processCommand(StringBuffer inputString, PrintStream sout,
-        TelnetConnection tc) {
+            TelnetConnection tc) {
         if (inputString.toString().trim().equals("r")) {
             sout.println(lastInputString);
             inputString = lastInputString;
@@ -211,12 +211,13 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
         if (input.startsWith("setExcel")) {
             String substr = input.substring("setExcel".length()).trim();
             if (!substr.equals("")) {
-                //excelPath01 = substr;
+                // excelPath01 = substr;
             }
-            //sout.println("Excel Path="+excelPath01);
+            // sout.println("Excel Path="+excelPath01);
         } else if (input.startsWith("list vrel")) {
             String substr = input.substring("list vrel".length()).trim();
-            XSQLBluePrintNode node = bluePrint.getBluePrintNodeByTableName(substr);
+            XSQLBluePrintNode node = bluePrint
+                    .getBluePrintNodeByTableName(substr);
             if (node == null) {
                 sout.println("Unknown Interface " + substr);
                 return;
@@ -232,7 +233,8 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
             }
         } else if (input.startsWith("list vfields")) {
             String substr = input.substring("list vfields".length()).trim();
-            XSQLBluePrintNode node = bluePrint.getBluePrintNodeByTableName(substr);
+            XSQLBluePrintNode node = bluePrint
+                    .getBluePrintNodeByTableName(substr);
             if (node == null) {
                 sout.println("Unknown Interface " + substr);
                 return;
@@ -251,11 +253,11 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
             jdbcServer.connectToClient(addr);
             sout.println("Connected To " + addr);
         } else if (input.startsWith("fetch")) {
-            //fetchSize = Integer.parseInt(input.substring(6).trim());
+            // fetchSize = Integer.parseInt(input.substring(6).trim());
         } else if (input.startsWith("list vtables")) {
 
-            String iNames[] =
-                bluePrint.getAllTableNames().toArray(new String[0]);
+            String iNames[] = bluePrint.getAllTableNames().toArray(
+                    new String[0]);
             Arrays.sort(iNames);
             sout.println();
             for (int i = 0; i < iNames.length; i++) {
@@ -281,15 +283,15 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
                 sout.println(s);
             }
         } else if (input.equals("help") || input.equals("?")) {
-            //sout.println(getLongDescription());
+            // sout.println(getLongDescription());
         } else if (input.equals("avmdata")) {
             try {
-                //myConnection.getManagedData();
+                // myConnection.getManagedData();
             } catch (Exception err) {
             }
         } else if (input.equals("innerjoin")) {
-            //innerJoin = !innerJoin;
-            //sout.println("Inner Join set to "+innerJoin);
+            // innerJoin = !innerJoin;
+            // sout.println("Inner Join set to "+innerJoin);
         } else if (input.equals("exit")) {
             try {
                 sout.close();
@@ -305,8 +307,8 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
             if (toCsv) {
                 if (exportToFileName != null) {
                     try {
-                        PrintStream o =
-                            new PrintStream(new File(exportToFileName));
+                        PrintStream o = new PrintStream(new File(
+                                exportToFileName));
                         executeSql(inputString.toString(), o);
                         o.close();
                     } catch (Exception err) {
@@ -314,8 +316,8 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
                     }
                 } else {
                     try {
-                        String fName =
-                            "export-" + System.currentTimeMillis() + ".csv";
+                        String fName = "export-" + System.currentTimeMillis()
+                                + ".csv";
                         PrintStream o = new PrintStream(new File(fName));
                         executeSql(inputString.toString(), o);
                         o.close();
@@ -398,7 +400,6 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
                         }
                     }
 
-
                     if (!toCsv) {
                         out.print("|");
                     }
@@ -416,7 +417,6 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
                         out.print(" ");
                     }
 
-
                     if (loc > 0) {
                         if (toCsv) {
                             out.print("\",\"");
@@ -437,7 +437,6 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
         }
     }
 
-
     public static class NETask implements Runnable {
 
         private JDBCResultSet rs = null;
@@ -445,7 +444,8 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
         private XSQLBluePrintNode main = null;
         private XSQLBluePrint bluePrint = null;
 
-        public NETask(JDBCResultSet _rs, Object _modelRoot,XSQLBluePrintNode _main,XSQLBluePrint _bluePrint) {
+        public NETask(JDBCResultSet _rs, Object _modelRoot,
+                XSQLBluePrintNode _main, XSQLBluePrint _bluePrint) {
             this.rs = _rs;
             this.modelRoot = _modelRoot;
             this.main = _main;
@@ -453,7 +453,8 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
         }
 
         public void run() {
-            rs.addRecords(modelRoot, main, true, main.getBluePrintNodeName(),bluePrint);
+            rs.addRecords(modelRoot, main, true, main.getBluePrintNodeName(),
+                    bluePrint);
             synchronized (rs) {
                 rs.numberOfTasks--;
                 if (rs.numberOfTasks == 0) {
@@ -464,7 +465,6 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
         }
     }
 
-
     private static class NEEntry {
         private Object ne = null;
 
@@ -478,7 +478,6 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
         }
     }
 
-
     private class TelnetConnection extends Thread {
 
         private Socket socket = null;
index 34644afd9c66a66f9ef90d84ac77062dcfa3fb09..6a27230664bb2514222dcc7695ec1a267280c1d3 100644 (file)
@@ -1,15 +1,15 @@
 package org.opendaylight.controller.md.sal.dom.xsql;
 
 import java.lang.reflect.Field;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
@@ -119,7 +119,7 @@ public class XSQLODLUtils {
     }
 
     private static void collectODL(XSQLBluePrint bluePrint,
-        XSQLBluePrintNode parent, Set<DataSchemaNode> nodes, int level) {
+        XSQLBluePrintNode parent, Collection<DataSchemaNode> nodes, int level) {
         if (nodes == null) {
             return;
         }
index add46bd162fc5644a0f4a5bf13fed72e5ad0a6d2..edf7388a769a662a0ea7848694501c08a864ac0a 100644 (file)
@@ -64,31 +64,15 @@ final class FlowStatsTracker extends AbstractListeningStatsTracker<FlowAndStatis
     protected FlowStatsEntry updateSingleStat(final DataModificationTransaction trans, final FlowAndStatisticsMapList map) {
         short tableId = map.getTableId();
 
-        FlowBuilder flowBuilder = new FlowBuilder();
-
         FlowStatisticsDataBuilder flowStatisticsData = new FlowStatisticsDataBuilder();
 
-        FlowBuilder flow = new FlowBuilder();
-        flow.setContainerName(map.getContainerName());
-        flow.setBufferId(map.getBufferId());
-        flow.setCookie(map.getCookie());
-        flow.setCookieMask(map.getCookieMask());
-        flow.setFlags(map.getFlags());
-        flow.setFlowName(map.getFlowName());
-        flow.setHardTimeout(map.getHardTimeout());
-        if(map.getFlowId() != null)
+        FlowBuilder flow = new FlowBuilder(map);
+        if(map.getFlowId() != null) {
             flow.setId(new FlowId(map.getFlowId().getValue()));
-        flow.setIdleTimeout(map.getIdleTimeout());
-        flow.setInstallHw(map.isInstallHw());
-        flow.setInstructions(map.getInstructions());
-        if(map.getFlowId()!= null)
+        }
+        if(map.getFlowId()!= null) {
             flow.setKey(new FlowKey(new FlowId(map.getKey().getFlowId().getValue())));
-        flow.setMatch(map.getMatch());
-        flow.setOutGroup(map.getOutGroup());
-        flow.setOutPort(map.getOutPort());
-        flow.setPriority(map.getPriority());
-        flow.setStrict(map.isStrict());
-        flow.setTableId(tableId);
+        }
 
         Flow flowRule = flow.build();
 
@@ -105,22 +89,6 @@ final class FlowStatsTracker extends AbstractListeningStatsTracker<FlowAndStatis
         flowStatistics.setByteCount(flowStats.getByteCount());
         flowStatistics.setPacketCount(flowStats.getPacketCount());
         flowStatistics.setDuration(flowStats.getDuration());
-        flowStatistics.setContainerName(map.getContainerName());
-        flowStatistics.setBufferId(map.getBufferId());
-        flowStatistics.setCookie(map.getCookie());
-        flowStatistics.setCookieMask(map.getCookieMask());
-        flowStatistics.setFlags(map.getFlags());
-        flowStatistics.setFlowName(map.getFlowName());
-        flowStatistics.setHardTimeout(map.getHardTimeout());
-        flowStatistics.setIdleTimeout(map.getIdleTimeout());
-        flowStatistics.setInstallHw(map.isInstallHw());
-        flowStatistics.setInstructions(map.getInstructions());
-        flowStatistics.setMatch(map.getMatch());
-        flowStatistics.setOutGroup(map.getOutGroup());
-        flowStatistics.setOutPort(map.getOutPort());
-        flowStatistics.setPriority(map.getPriority());
-        flowStatistics.setStrict(map.isStrict());
-        flowStatistics.setTableId(tableId);
 
         flowStatisticsData.setFlowStatistics(flowStatistics.build());
 
@@ -143,13 +111,12 @@ final class FlowStatsTracker extends AbstractListeningStatsTracker<FlowAndStatis
                             .augmentation(FlowCapableNode.class)
                             .child(Table.class, new TableKey(tableId))
                             .child(Flow.class,existingFlow.getKey()).toInstance();
-                    flowBuilder.setKey(existingFlow.getKey());
-                    flowBuilder.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
+                    flow.setKey(existingFlow.getKey());
+                    flow.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
                     logger.debug("Found matching flow in the datastore, augmenting statistics");
                     // Update entry with timestamp of latest response
-                    flow.setKey(existingFlow.getKey());
                     FlowStatsEntry flowStatsEntry = new FlowStatsEntry(tableId,flow.build());
-                    trans.putOperationalData(flowRef, flowBuilder.build());
+                    trans.putOperationalData(flowRef, flow.build());
                     return flowStatsEntry;
                 }
             }
@@ -168,13 +135,12 @@ final class FlowStatsTracker extends AbstractListeningStatsTracker<FlowAndStatis
                                 .augmentation(FlowCapableNode.class)
                                 .child(Table.class, new TableKey(tableId))
                                 .child(Flow.class,existingFlow.getKey()).toInstance();
-                        flowBuilder.setKey(existingFlow.getKey());
-                        flowBuilder.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
+                        flow.setKey(existingFlow.getKey());
+                        flow.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
                         logger.debug("Found matching unaccounted flow in the operational datastore, augmenting statistics");
                         // Update entry with timestamp of latest response
-                        flow.setKey(existingFlow.getKey());
                         FlowStatsEntry flowStatsEntry = new FlowStatsEntry(tableId,flow.build());
-                        trans.putOperationalData(flowRef, flowBuilder.build());
+                        trans.putOperationalData(flowRef, flow.build());
                         return flowStatsEntry;
                     }
                 }
@@ -187,15 +153,15 @@ final class FlowStatsTracker extends AbstractListeningStatsTracker<FlowAndStatis
         InstanceIdentifier<Flow> flowRef = getNodeIdentifierBuilder().augmentation(FlowCapableNode.class)
                     .child(Table.class, new TableKey(tableId))
                     .child(Flow.class,newFlowKey).toInstance();
-        flowBuilder.setKey(newFlowKey);
-        flowBuilder.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
+        flow.setKey(newFlowKey);
+        flow.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
         logger.debug("Flow {} is not present in config data store, augmenting statistics as an unaccounted flow",
-                    flowBuilder.build());
+                    flow.build());
 
         // Update entry with timestamp of latest response
         flow.setKey(newFlowKey);
         FlowStatsEntry flowStatsEntry = new FlowStatsEntry(tableId,flow.build());
-        trans.putOperationalData(flowRef, flowBuilder.build());
+        trans.putOperationalData(flowRef, flow.build());
         return flowStatsEntry;
     }
 
diff --git a/pom.xml b/pom.xml
index 242ab8eb89fce53b5ee7396b02790df9e96b781b..8bebd2aa61050f0d8058d82f312ac572ec44bf86 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <module>opendaylight/commons/filter-valve</module>
 
     <!-- Karaf Distribution -->
-    <module>features/base</module>
-    <module>features/controller</module>
-    <module>features/adsal</module>
-    <module>features/extras</module>
     <module>opendaylight/dummy-console</module>
     <module>opendaylight/karaf-branding</module>
     <module>opendaylight/distribution/opendaylight-karaf</module>