Bug 1764 - implementation of default config pusher 21/12021/3
authorMartin Bobak <mbobak@cisco.com>
Wed, 15 Oct 2014 08:32:36 +0000 (10:32 +0200)
committerMartin Bobak <mbobak@cisco.com>
Sun, 19 Oct 2014 10:30:41 +0000 (10:30 +0000)
Change-Id: I6f910c3b68f6e50fb3de2e12b01fc33bb28eb80c
Signed-off-by: Martin Bobak <mbobak@cisco.com>
applications/of-switch-config-pusher/pom.xml
applications/of-switch-config-pusher/src/main/java/org/opendaylight/openflowplugin/openflow/ofswitch/config/DefaultConfigPusher.java [new file with mode: 0644]
applications/of-switch-config-pusher/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/openflow/applications/of/_switch/config/pusher/rev141015/DefaultConfigPusherModule.java [new file with mode: 0644]
applications/of-switch-config-pusher/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/openflow/applications/of/_switch/config/pusher/rev141015/DefaultConfigPusherModuleFactory.java [new file with mode: 0644]
applications/of-switch-config-pusher/src/main/resources/initial/70-of-switch-config-pusher.xml [new file with mode: 0644]
applications/of-switch-config-pusher/src/main/yang/of-switch-config-pusher.yang [new file with mode: 0644]
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/ModelDrivenSwitch.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/ConnectionConductorImpl.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/ModelDrivenSwitchImpl.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/OFRpcTaskFactory.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/ConnectionConductorImplTest.java

index de085e43caf7c1e043e526a70484bef7b53aa4e9..025c49728ba44462ec47def4ac675061f0275643 100644 (file)
     <artifactId>of-switch-config-pusher</artifactId>
     <packaging>bundle</packaging>
     <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.openflowplugin</groupId>
+            <artifactId>openflowplugin-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-binding-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-binding-broker-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller.model</groupId>
+            <artifactId>model-inventory</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller.model</groupId>
+            <artifactId>model-flow-service</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>3.8.1</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller.model</groupId>
+            <artifactId>model-flow-service</artifactId>
+        </dependency>
+
     </dependencies>
     <build>
         <plugins>
                     </excludes>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.opendaylight.yangtools</groupId>
+                <artifactId>yang-maven-plugin</artifactId>
+            </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>
diff --git a/applications/of-switch-config-pusher/src/main/java/org/opendaylight/openflowplugin/openflow/ofswitch/config/DefaultConfigPusher.java b/applications/of-switch-config-pusher/src/main/java/org/opendaylight/openflowplugin/openflow/ofswitch/config/DefaultConfigPusher.java
new file mode 100644 (file)
index 0000000..902581d
--- /dev/null
@@ -0,0 +1,52 @@
+package org.opendaylight.openflowplugin.openflow.ofswitch.config;/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+import java.util.Set;
+import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
+import org.opendaylight.openflowplugin.api.OFConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.NodeConfigService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.SetConfigInputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.SwitchConfigFlag;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+
+/**
+ * Created by Martin Bobak mbobak@cisco.com on 10/14/14.
+ */
+public class DefaultConfigPusher implements AutoCloseable, DataChangeListener {
+
+    private NodeConfigService nodeConfigService;
+
+    public DefaultConfigPusher(NodeConfigService nodeConfigService) {
+        this.nodeConfigService = nodeConfigService;
+    }
+
+    @Override
+    public void close() throws Exception {
+
+    }
+
+    @Override
+    public void onDataChanged(AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> change) {
+        final Set<InstanceIdentifier<?>> changedDataKeys = change.getCreatedData().keySet();
+
+        if (changedDataKeys != null) {
+            for (InstanceIdentifier<?> key : changedDataKeys) {
+                SetConfigInputBuilder setConfigInputBuilder = new SetConfigInputBuilder();
+                setConfigInputBuilder.setFlag(SwitchConfigFlag.FRAGNORMAL.toString());
+                setConfigInputBuilder.setMissSearchLength(OFConstants.OFPCML_NO_BUFFER);
+                setConfigInputBuilder.setNode(new NodeRef(key.firstIdentifierOf(Node.class)));
+                nodeConfigService.setConfig(setConfigInputBuilder.build());
+            }
+        }
+
+    }
+}
diff --git a/applications/of-switch-config-pusher/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/openflow/applications/of/_switch/config/pusher/rev141015/DefaultConfigPusherModule.java b/applications/of-switch-config-pusher/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/openflow/applications/of/_switch/config/pusher/rev141015/DefaultConfigPusherModule.java
new file mode 100644 (file)
index 0000000..ff0ce1e
--- /dev/null
@@ -0,0 +1,37 @@
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.of._switch.config.pusher.rev141015;
+
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.openflowplugin.openflow.ofswitch.config.DefaultConfigPusher;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.NodeConfigService;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+
+public class DefaultConfigPusherModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.of._switch.config.pusher.rev141015.AbstractDefaultConfigPusherModule {
+    public DefaultConfigPusherModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+        super(identifier, dependencyResolver);
+    }
+
+    public DefaultConfigPusherModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.of._switch.config.pusher.rev141015.DefaultConfigPusherModule oldModule, java.lang.AutoCloseable oldInstance) {
+        super(identifier, dependencyResolver, oldModule, oldInstance);
+    }
+
+    @Override
+    public void customValidation() {
+        // add custom validation form module attributes here.
+    }
+
+    @Override
+    public java.lang.AutoCloseable createInstance() {
+        InstanceIdentifier<FlowCapableNode> path = InstanceIdentifier.create(Nodes.class).child(Node.class).augmentation(FlowCapableNode.class);
+        NodeConfigService nodeConfigService = getRpcRegistryDependency().getRpcService(NodeConfigService.class);
+        return getDataBrokerDependency().registerDataChangeListener(
+                LogicalDatastoreType.OPERATIONAL,
+                path,
+                new DefaultConfigPusher(nodeConfigService),
+                AsyncDataBroker.DataChangeScope.BASE);
+    }
+
+}
diff --git a/applications/of-switch-config-pusher/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/openflow/applications/of/_switch/config/pusher/rev141015/DefaultConfigPusherModuleFactory.java b/applications/of-switch-config-pusher/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/openflow/applications/of/_switch/config/pusher/rev141015/DefaultConfigPusherModuleFactory.java
new file mode 100644 (file)
index 0000000..e3150ef
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+* Generated file
+*
+* Generated from: yang module name: of-switch-config-pusher yang module local name: of-switch-config-pusher
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Wed Oct 15 10:43:24 CEST 2014
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.of._switch.config.pusher.rev141015;
+public class DefaultConfigPusherModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.of._switch.config.pusher.rev141015.AbstractDefaultConfigPusherModuleFactory {
+
+}
diff --git a/applications/of-switch-config-pusher/src/main/resources/initial/70-of-switch-config-pusher.xml b/applications/of-switch-config-pusher/src/main/resources/initial/70-of-switch-config-pusher.xml
new file mode 100644 (file)
index 0000000..4ab4a12
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+  ~
+  ~ This program and the accompanying materials are made available under the
+  ~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+  ~ and is available at http://www.eclipse.org/legal/epl-v10.html
+  -->
+
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+
+<snapshot>
+    <configuration>
+        <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+            <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+                <module>
+                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflow:applications:of-switch-config-pusher">prefix:of-switch-config-pusher</type>
+                    <name>of-switch-config-pusher</name>
+                    <data-broker>
+                        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
+                        <name>binding-data-broker</name>
+                    </data-broker>
+                    <rpc-registry>
+                        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
+                        <name>binding-rpc-broker</name>
+                    </rpc-registry>
+                </module>
+
+            </modules>
+        </data>
+    </configuration>
+</snapshot>
\ No newline at end of file
diff --git a/applications/of-switch-config-pusher/src/main/yang/of-switch-config-pusher.yang b/applications/of-switch-config-pusher/src/main/yang/of-switch-config-pusher.yang
new file mode 100644 (file)
index 0000000..463edb6
--- /dev/null
@@ -0,0 +1,42 @@
+module of-switch-config-pusher {
+       yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:openflow:applications:of-switch-config-pusher";
+    prefix "of-switch-config-pusher";
+    import config {prefix config; revision-date 2013-04-05;}
+    import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
+
+    description
+        "of-switch-config-pusher-custom-config-impl";
+
+    revision "2014-10-15" {
+        description
+            "Initial revision";
+    }
+
+    identity of-switch-config-pusher {
+        base "config:module-type";
+        config:java-name-prefix DefaultConfigPusher;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        case of-switch-config-pusher {
+            when "/config:modules/config:module/config:type = 'of-switch-config-pusher'";
+            container rpc-registry {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity mdsal:binding-rpc-registry;
+                    }
+                }
+            }
+            container data-broker {
+                uses config:service-ref {
+                    refine type {
+                        mandatory false;
+                        config:required-identity mdsal:binding-async-data-broker;
+                    }
+                }
+            }
+        }
+    }
+}
index c9d715a91246a15b765855de06027d1ccb557953..9ba867b6484e295b308a893725190c2e253c1efa 100644 (file)
@@ -18,6 +18,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.OpendaylightMeterStatisticsService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.NodeConfigService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.SalPortService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService;
@@ -36,7 +37,8 @@ public interface ModelDrivenSwitch extends //
         SalMeterService, //
         SalTableService,//
         SalPortService,
-        PacketProcessingService, //
+        PacketProcessingService,
+        NodeConfigService,//
         OpendaylightGroupStatisticsService, //
         OpendaylightMeterStatisticsService, //
         OpendaylightFlowStatisticsService, //
index 45cc511d21454bd4489a808d06a3fa8eb02ffc42..fe063ed1d525f4c97383f418455d318e81d16950 100644 (file)
@@ -432,7 +432,6 @@ public class ConnectionConductorImpl implements OpenflowProtocolListener,
         postHandshakeBasic(featureOutput, negotiatedVersion);
         
         // post-handshake actions
-        setDefaultConfig();
         if(version == OFConstants.OFP_VERSION_1_3){
             requestPorts();
             requestGroupFeatures();
@@ -466,16 +465,6 @@ public class ConnectionConductorImpl implements OpenflowProtocolListener,
         QueueKeeperFactory.plugQueue(queueProcessor, queue);
     }
 
-    private void setDefaultConfig(){
-        SetConfigInputBuilder builder = new SetConfigInputBuilder();
-        builder.setVersion(getVersion());
-        builder.setXid(getSessionContext().getNextXid());
-        SwitchConfigFlag flag = SwitchConfigFlag.FRAGNORMAL;
-        builder.setFlags(flag);
-        builder.setMissSendLen(OFConstants.OFPCML_NO_BUFFER);
-        getConnectionAdapter().setConfig(builder.build());
-    }
-
     /*
      *  Send an OFPMP_DESC request message to the switch
      */
index 873d6a0c86ed57682f9cc1b3d2d0738ec345a1a6..110af9890bfb0ab423faac9ee1b37ee9085985f0 100644 (file)
@@ -7,9 +7,10 @@
  */
 package org.opendaylight.openflowplugin.openflow.md.core.sal;
 
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
-
 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
 import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.PacketOutConvertor;
@@ -65,6 +66,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterFeaturesOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.SetConfigInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.SetConfigOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.ConnectionCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInput;
@@ -86,9 +89,6 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
-
 /**
  * RPC implementation of MD-switch
  */
@@ -100,19 +100,19 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
     private short version = 0;
     private NotificationProviderService rpcNotificationProviderService;
     private OFRpcTaskContext rpcTaskContext;
-    
+
     // TODO:read timeout from configSubsystem
     protected long maxTimeout = 1000;
     protected TimeUnit maxTimeoutUnit = TimeUnit.MILLISECONDS;
-    
-    protected ModelDrivenSwitchImpl(final NodeId nodeId, final InstanceIdentifier<Node> identifier, 
-            final SessionContext sessionContext) {
+
+    protected ModelDrivenSwitchImpl(final NodeId nodeId, final InstanceIdentifier<Node> identifier,
+                                    final SessionContext sessionContext) {
         super(identifier, sessionContext);
         this.nodeId = nodeId;
         messageService = sessionContext.getMessageDispatchService();
         version = sessionContext.getPrimaryConductor().getVersion();
         rpcNotificationProviderService = OFSessionUtil.getSessionManager().getNotificationProviderService();
-        
+
         rpcTaskContext = new OFRpcTaskContext();
         rpcTaskContext.setSession(sessionContext);
         rpcTaskContext.setMessageService(messageService);
@@ -128,11 +128,11 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
         LOG.debug("Calling the FlowMod RPC method on MessageDispatchService");
         // use primary connection
         SwitchConnectionDistinguisher cookie = null;
-        
+
         OFRpcTask<AddFlowInput, RpcResult<UpdateFlowOutput>> task =
                 OFRpcTaskFactory.createAddFlowTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdateFlowOutput>> result = task.submit();
-        
+
         return Futures.transform(result, OFRpcFutureResultTransformFactory.createForAddFlowOutput());
     }
 
@@ -140,38 +140,38 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
     @Override
     public Future<RpcResult<AddGroupOutput>> addGroup(final AddGroupInput input) {
         LOG.debug("Calling the GroupMod RPC method on MessageDispatchService");
-        
+
         // use primary connection
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<AddGroupInput, RpcResult<UpdateGroupOutput>> task = 
+
+        OFRpcTask<AddGroupInput, RpcResult<UpdateGroupOutput>> task =
                 OFRpcTaskFactory.createAddGroupTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdateGroupOutput>> result = task.submit();
-        
+
         return Futures.transform(result, OFRpcFutureResultTransformFactory.createForAddGroupOutput());
     }
 
     @Override
     public Future<RpcResult<AddMeterOutput>> addMeter(final AddMeterInput input) {
         LOG.debug("Calling the MeterMod RPC method on MessageDispatchService");
-        
+
         // use primary connection
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<AddMeterInput, RpcResult<UpdateMeterOutput>> task = 
+
+        OFRpcTask<AddMeterInput, RpcResult<UpdateMeterOutput>> task =
                 OFRpcTaskFactory.createAddMeterTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdateMeterOutput>> result = task.submit();
-        
+
         return Futures.transform(result, OFRpcFutureResultTransformFactory.createForAddMeterOutput());
     }
 
     @Override
     public Future<RpcResult<RemoveFlowOutput>> removeFlow(final RemoveFlowInput input) {
         LOG.debug("Calling the removeFlow RPC method on MessageDispatchService");
-        
+
         // use primary connection
         SwitchConnectionDistinguisher cookie = null;
-        OFRpcTask<RemoveFlowInput, RpcResult<UpdateFlowOutput>> task = 
+        OFRpcTask<RemoveFlowInput, RpcResult<UpdateFlowOutput>> task =
                 OFRpcTaskFactory.createRemoveFlowTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdateFlowOutput>> result = task.submit();
 
@@ -183,10 +183,10 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
         LOG.debug("Calling the Remove Group RPC method on MessageDispatchService");
 
         SwitchConnectionDistinguisher cookie = null;
-        OFRpcTask<RemoveGroupInput, RpcResult<UpdateGroupOutput>> task = 
+        OFRpcTask<RemoveGroupInput, RpcResult<UpdateGroupOutput>> task =
                 OFRpcTaskFactory.createRemoveGroupTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdateGroupOutput>> result = task.submit();
-        
+
         return Futures.transform(result, OFRpcFutureResultTransformFactory.createForRemoveGroupOutput());
     }
 
@@ -195,10 +195,10 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
         LOG.debug("Calling the Remove MeterMod RPC method on MessageDispatchService");
 
         SwitchConnectionDistinguisher cookie = null;
-        OFRpcTask<RemoveMeterInput, RpcResult<UpdateMeterOutput>> task = 
+        OFRpcTask<RemoveMeterInput, RpcResult<UpdateMeterOutput>> task =
                 OFRpcTaskFactory.createRemoveMeterTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdateMeterOutput>> result = task.submit();
-        
+
         return Futures.transform(result, OFRpcFutureResultTransformFactory.createForRemoveMeterOutput());
     }
 
@@ -222,42 +222,42 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
     @Override
     public Future<RpcResult<UpdateFlowOutput>> updateFlow(final UpdateFlowInput input) {
         LOG.debug("Calling the updateFlow RPC method on MessageDispatchService");
-        
+
         // use primary connection
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<UpdateFlowInput, RpcResult<UpdateFlowOutput>> task = 
+
+        OFRpcTask<UpdateFlowInput, RpcResult<UpdateFlowOutput>> task =
                 OFRpcTaskFactory.createUpdateFlowTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdateFlowOutput>> result = task.submit();
-        
+
         return result;
     }
 
     @Override
     public Future<RpcResult<UpdateGroupOutput>> updateGroup(final UpdateGroupInput input) {
         LOG.debug("Calling the update Group Mod RPC method on MessageDispatchService");
-        
+
         // use primary connection
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<UpdateGroupInput, RpcResult<UpdateGroupOutput>> task = 
+
+        OFRpcTask<UpdateGroupInput, RpcResult<UpdateGroupOutput>> task =
                 OFRpcTaskFactory.createUpdateGroupTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdateGroupOutput>> result = task.submit();
-        
+
         return result;
     }
 
     @Override
     public Future<RpcResult<UpdateMeterOutput>> updateMeter(final UpdateMeterInput input) {
         LOG.debug("Calling the MeterMod RPC method on MessageDispatchService");
-        
+
         // use primary connection
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<UpdateMeterInput, RpcResult<UpdateMeterOutput>> task = 
+
+        OFRpcTask<UpdateMeterInput, RpcResult<UpdateMeterOutput>> task =
                 OFRpcTaskFactory.createUpdateMeterTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdateMeterOutput>> result = task.submit();
-        
+
         return result;
     }
 
@@ -266,17 +266,17 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
         return nodeId;
     }
 
-    
+
     @Override
     public Future<RpcResult<GetAllGroupStatisticsOutput>> getAllGroupStatistics(final GetAllGroupStatisticsInput input) {
-     // use primary connection
+        // use primary connection
         LOG.debug("Calling the getAllGroupStatistics RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetAllGroupStatisticsInput, RpcResult<GetAllGroupStatisticsOutput>> task = 
+
+        OFRpcTask<GetAllGroupStatisticsInput, RpcResult<GetAllGroupStatisticsOutput>> task =
                 OFRpcTaskFactory.createGetAllGroupStatisticsTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetAllGroupStatisticsOutput>> result = task.submit();
-        
+
         return result;
 
     }
@@ -285,30 +285,30 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
     public Future<RpcResult<GetGroupDescriptionOutput>> getGroupDescription(final GetGroupDescriptionInput input) {
         LOG.debug("Calling the getGroupDescription RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetGroupDescriptionInput, RpcResult<GetGroupDescriptionOutput>> task = 
+
+        OFRpcTask<GetGroupDescriptionInput, RpcResult<GetGroupDescriptionOutput>> task =
                 OFRpcTaskFactory.createGetGroupDescriptionTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetGroupDescriptionOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetGroupFeaturesOutput>> getGroupFeatures(final GetGroupFeaturesInput input) {
         LOG.debug("Calling the getGroupFeatures RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetGroupFeaturesInput, RpcResult<GetGroupFeaturesOutput>> task = 
+
+        OFRpcTask<GetGroupFeaturesInput, RpcResult<GetGroupFeaturesOutput>> task =
                 OFRpcTaskFactory.createGetGroupFeaturesTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetGroupFeaturesOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetGroupStatisticsOutput>> getGroupStatistics(final GetGroupStatisticsInput input) {
         LOG.debug("Calling the getGroupStatistics RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetGroupStatisticsInput, RpcResult<GetGroupStatisticsOutput>> task = 
+
+        OFRpcTask<GetGroupStatisticsInput, RpcResult<GetGroupStatisticsOutput>> task =
                 OFRpcTaskFactory.createGetGroupStatisticsTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetGroupStatisticsOutput>> result = task.submit();
         return result;
@@ -319,97 +319,97 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
             final GetAllMeterConfigStatisticsInput input) {
         LOG.debug("Calling the getAllMeterConfigStatistics RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetAllMeterConfigStatisticsInput, RpcResult<GetAllMeterConfigStatisticsOutput>> task = 
+
+        OFRpcTask<GetAllMeterConfigStatisticsInput, RpcResult<GetAllMeterConfigStatisticsOutput>> task =
                 OFRpcTaskFactory.createGetAllMeterConfigStatisticsTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetAllMeterConfigStatisticsOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetAllMeterStatisticsOutput>> getAllMeterStatistics(
             final GetAllMeterStatisticsInput input) {
         LOG.debug("Calling the getAllMeterStatistics RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetAllMeterStatisticsInput, RpcResult<GetAllMeterStatisticsOutput>> task = 
+
+        OFRpcTask<GetAllMeterStatisticsInput, RpcResult<GetAllMeterStatisticsOutput>> task =
                 OFRpcTaskFactory.createGetAllMeterStatisticsTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetAllMeterStatisticsOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetMeterFeaturesOutput>> getMeterFeatures(
             final GetMeterFeaturesInput input) {
         LOG.debug("Calling the getMeterFeatures RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetMeterFeaturesInput, RpcResult<GetMeterFeaturesOutput>> task = 
+
+        OFRpcTask<GetMeterFeaturesInput, RpcResult<GetMeterFeaturesOutput>> task =
                 OFRpcTaskFactory.createGetMeterFeaturesTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetMeterFeaturesOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetMeterStatisticsOutput>> getMeterStatistics(
             final GetMeterStatisticsInput input) {
         LOG.debug("Calling the getMeterStatistics RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetMeterStatisticsInput, RpcResult<GetMeterStatisticsOutput>> task = 
+
+        OFRpcTask<GetMeterStatisticsInput, RpcResult<GetMeterStatisticsOutput>> task =
                 OFRpcTaskFactory.createGetMeterStatisticsTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetMeterStatisticsOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetAllNodeConnectorsStatisticsOutput>> getAllNodeConnectorsStatistics(
             final GetAllNodeConnectorsStatisticsInput input) {
         LOG.debug("Calling the getAllNodeConnectorsStatistics RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetAllNodeConnectorsStatisticsInput, RpcResult<GetAllNodeConnectorsStatisticsOutput>> task = 
+
+        OFRpcTask<GetAllNodeConnectorsStatisticsInput, RpcResult<GetAllNodeConnectorsStatisticsOutput>> task =
                 OFRpcTaskFactory.createGetAllNodeConnectorsStatisticsTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetAllNodeConnectorsStatisticsOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetNodeConnectorStatisticsOutput>> getNodeConnectorStatistics(
             final GetNodeConnectorStatisticsInput input) {
         LOG.debug("Calling the getNodeConnectorStatistics RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetNodeConnectorStatisticsInput, RpcResult<GetNodeConnectorStatisticsOutput>> task = 
+
+        OFRpcTask<GetNodeConnectorStatisticsInput, RpcResult<GetNodeConnectorStatisticsOutput>> task =
                 OFRpcTaskFactory.createGetNodeConnectorStatisticsTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetNodeConnectorStatisticsOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<UpdatePortOutput>> updatePort(final UpdatePortInput input) {
         LOG.debug("Calling the updatePort RPC method on MessageDispatchService");
-        
+
         // use primary connection
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<UpdatePortInput, RpcResult<UpdatePortOutput>> task = 
+
+        OFRpcTask<UpdatePortInput, RpcResult<UpdatePortOutput>> task =
                 OFRpcTaskFactory.createUpdatePortTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdatePortOutput>> result = task.submit();
-        
+
         return result;
     }
 
     @Override
     public Future<RpcResult<UpdateTableOutput>> updateTable(final UpdateTableInput input) {
         LOG.debug("Calling the updateTable RPC method on MessageDispatchService");
-        
+
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<UpdateTableInput, RpcResult<UpdateTableOutput>> task = 
+
+        OFRpcTask<UpdateTableInput, RpcResult<UpdateTableOutput>> task =
                 OFRpcTaskFactory.createUpdateTableTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<UpdateTableOutput>> result = task.submit();
-        
+
         return result;
     }
 
@@ -418,106 +418,114 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
             final GetAllFlowStatisticsFromFlowTableInput input) {
         LOG.debug("Calling the getAllFlowStatisticsFromFlowTable RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetAllFlowStatisticsFromFlowTableInput, RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> task = 
+
+        OFRpcTask<GetAllFlowStatisticsFromFlowTableInput, RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> task =
                 OFRpcTaskFactory.createGetAllFlowStatisticsFromFlowTableTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> getAllFlowsStatisticsFromAllFlowTables(
             final GetAllFlowsStatisticsFromAllFlowTablesInput input) {
         LOG.debug("Calling the getAllFlowsStatisticsFromAllFlowTables RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetAllFlowsStatisticsFromAllFlowTablesInput, RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> task = 
+
+        OFRpcTask<GetAllFlowsStatisticsFromAllFlowTablesInput, RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> task =
                 OFRpcTaskFactory.createGetAllFlowsStatisticsFromAllFlowTablesTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetFlowStatisticsFromFlowTableOutput>> getFlowStatisticsFromFlowTable(
             final GetFlowStatisticsFromFlowTableInput input) {
         LOG.debug("Calling the getFlowStatisticsFromFlowTable RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetFlowStatisticsFromFlowTableInput, RpcResult<GetFlowStatisticsFromFlowTableOutput>> task = 
+
+        OFRpcTask<GetFlowStatisticsFromFlowTableInput, RpcResult<GetFlowStatisticsFromFlowTableOutput>> task =
                 OFRpcTaskFactory.createGetFlowStatisticsFromFlowTableTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetFlowStatisticsFromFlowTableOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> getAggregateFlowStatisticsFromFlowTableForAllFlows(
             final GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input) {
         LOG.debug("Calling the getAggregateFlowStatisticsFromFlowTableForAllFlows RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> task = 
+
+        OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> task =
                 OFRpcTaskFactory.createGetAggregateFlowStatisticsFromFlowTableForAllFlowsTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> getAggregateFlowStatisticsFromFlowTableForGivenMatch(
             final GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput input) {
         LOG.debug("Calling the getAggregateFlowStatisticsFromFlowTableForGivenMatch RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> task = 
+
+        OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> task =
                 OFRpcTaskFactory.createGetAggregateFlowStatisticsFromFlowTableForGivenMatchTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetFlowTablesStatisticsOutput>> getFlowTablesStatistics(
             final GetFlowTablesStatisticsInput input) {
         LOG.debug("Calling the getFlowTablesStatistics RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetFlowTablesStatisticsInput, RpcResult<GetFlowTablesStatisticsOutput>> task = 
+
+        OFRpcTask<GetFlowTablesStatisticsInput, RpcResult<GetFlowTablesStatisticsOutput>> task =
                 OFRpcTaskFactory.createGetFlowTablesStatisticsTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetFlowTablesStatisticsOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> getAllQueuesStatisticsFromAllPorts(
             final GetAllQueuesStatisticsFromAllPortsInput input) {
         LOG.debug("Calling the getAllQueuesStatisticsFromAllPorts RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetAllQueuesStatisticsFromAllPortsInput, RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> task = 
+
+        OFRpcTask<GetAllQueuesStatisticsFromAllPortsInput, RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> task =
                 OFRpcTaskFactory.createGetAllQueuesStatisticsFromAllPortsTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> getAllQueuesStatisticsFromGivenPort(
             final GetAllQueuesStatisticsFromGivenPortInput input) {
         LOG.debug("Calling the getAllQueuesStatisticsFromGivenPort RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetAllQueuesStatisticsFromGivenPortInput, RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> task = 
+
+        OFRpcTask<GetAllQueuesStatisticsFromGivenPortInput, RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> task =
                 OFRpcTaskFactory.createGetAllQueuesStatisticsFromGivenPortTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> result = task.submit();
         return result;
     }
-    
+
     @Override
     public Future<RpcResult<GetQueueStatisticsFromGivenPortOutput>> getQueueStatisticsFromGivenPort(
             final GetQueueStatisticsFromGivenPortInput input) {
         LOG.debug("Calling the getQueueStatisticsFromGivenPort RPC method on MessageDispatchService");
         SwitchConnectionDistinguisher cookie = null;
-        
-        OFRpcTask<GetQueueStatisticsFromGivenPortInput, RpcResult<GetQueueStatisticsFromGivenPortOutput>> task = 
+
+        OFRpcTask<GetQueueStatisticsFromGivenPortInput, RpcResult<GetQueueStatisticsFromGivenPortOutput>> task =
                 OFRpcTaskFactory.createGetQueueStatisticsFromGivenPortTask(rpcTaskContext, input, cookie);
         ListenableFuture<RpcResult<GetQueueStatisticsFromGivenPortOutput>> result = task.submit();
         return result;
     }
+
+    @Override
+    public Future<RpcResult<SetConfigOutput>> setConfig(SetConfigInput input) {
+        SwitchConnectionDistinguisher cookie = null;
+        OFRpcTask<SetConfigInput, RpcResult<SetConfigOutput>> task = OFRpcTaskFactory.createSetNodeConfigTask(rpcTaskContext, input, cookie);
+        ListenableFuture<RpcResult<SetConfigOutput>> result = task.submit();
+        return result;
+    }
 }
index 5a364afd5dc5e0bd9f8821efaca08d9efc8ae661..b9607d59791a4b5e00965c44e057b05271a3031c 100644 (file)
@@ -13,6 +13,10 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.JdkFutureAdapters;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.SettableFuture;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Future;
 import org.opendaylight.openflowjava.protocol.api.util.BinContent;
 import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher;
@@ -105,16 +109,21 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.Meter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.SetConfigInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.SetConfigOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.SetConfigOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartRequestFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.SwitchConfigFlag;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GroupModInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MeterModInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortModInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortModInputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.SetConfigInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCaseBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestFlowCaseBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestGroupCaseBuilder;
@@ -163,11 +172,6 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Future;
-
 /**
  *
  */
@@ -175,42 +179,42 @@ public abstract class OFRpcTaskFactory {
     protected static final Logger logger = LoggerFactory.getLogger(OFRpcTaskFactory.class);
 
     /**
-     * @param taskContext 
-     * @param input 
-     * @param cookie 
+     * @param taskContext
+     * @param input
+     * @param cookie
      * @return UpdateFlow task
      */
     public static OFRpcTask<AddFlowInput, RpcResult<UpdateFlowOutput>> createAddFlowTask(
             OFRpcTaskContext taskContext, AddFlowInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<AddFlowInput, RpcResult<UpdateFlowOutput>> task = 
+        OFRpcTask<AddFlowInput, RpcResult<UpdateFlowOutput>> task =
                 new OFRpcTask<AddFlowInput, RpcResult<UpdateFlowOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<UpdateFlowOutput>> call() {
-                ListenableFuture<RpcResult<UpdateFlowOutput>> result = SettableFuture.create();
-                
-                // Convert the AddFlowInput to FlowModInput
-                List<FlowModInputBuilder> ofFlowModInputs = FlowConvertor.toFlowModInputs(getInput(),
-                        getVersion(), getSession().getFeatures().getDatapathId());
-
-                logger.debug("Number of flows to push to switch: {}", ofFlowModInputs.size());
-
-                result = chainFlowMods(ofFlowModInputs, 0, getTaskContext(), getCookie());
-
-                
-                result = OFRpcTaskUtil.chainFutureBarrier(this, result);
-                OFRpcTaskUtil.hookFutureNotification(this, result,
-                    getRpcNotificationProviderService(),
-                    createFlowAddedNotification(getInput()));
-                return result;
-            }
-            
-            @Override
-            public Boolean isBarrier() {
-                return getInput().isBarrier();
-            }
-        };
+
+                    @Override
+                    public ListenableFuture<RpcResult<UpdateFlowOutput>> call() {
+                        ListenableFuture<RpcResult<UpdateFlowOutput>> result = SettableFuture.create();
+
+                        // Convert the AddFlowInput to FlowModInput
+                        List<FlowModInputBuilder> ofFlowModInputs = FlowConvertor.toFlowModInputs(getInput(),
+                                getVersion(), getSession().getFeatures().getDatapathId());
+
+                        logger.debug("Number of flows to push to switch: {}", ofFlowModInputs.size());
+
+                        result = chainFlowMods(ofFlowModInputs, 0, getTaskContext(), getCookie());
+
+
+                        result = OFRpcTaskUtil.chainFutureBarrier(this, result);
+                        OFRpcTaskUtil.hookFutureNotification(this, result,
+                                getRpcNotificationProviderService(),
+                                createFlowAddedNotification(getInput()));
+                        return result;
+                    }
+
+                    @Override
+                    public Boolean isBarrier() {
+                        return getInput().isBarrier();
+                    }
+                };
         return task;
     }
 
@@ -223,29 +227,29 @@ public abstract class OFRpcTaskFactory {
      * the notification
      */
     protected static ListenableFuture<RpcResult<UpdateFlowOutput>> chainFlowMods(
-        final List<FlowModInputBuilder> ofFlowModInputs, final int index,
-        final OFRpcTaskContext taskContext, final SwitchConnectionDistinguisher cookie) {
+            final List<FlowModInputBuilder> ofFlowModInputs, final int index,
+            final OFRpcTaskContext taskContext, final SwitchConnectionDistinguisher cookie) {
 
         Future<RpcResult<UpdateFlowOutput>> resultFromOFLib =
-            createResultForFlowMod(taskContext, ofFlowModInputs.get(index), cookie);
+                createResultForFlowMod(taskContext, ofFlowModInputs.get(index), cookie);
 
-        ListenableFuture<RpcResult<UpdateFlowOutput>> result  = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+        ListenableFuture<RpcResult<UpdateFlowOutput>> result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
 
-        if(ofFlowModInputs.size() > index + 1) {
+        if (ofFlowModInputs.size() > index + 1) {
             // there are more flowmods to chain
             return Futures.transform(result,
-                new AsyncFunction<RpcResult<UpdateFlowOutput>, RpcResult<UpdateFlowOutput>>() {
-                    @Override
-                    public ListenableFuture<RpcResult<UpdateFlowOutput>> apply(RpcResult<UpdateFlowOutput> input) throws Exception {
-                        if (input.isSuccessful()) {
-                            return chainFlowMods(ofFlowModInputs, index + 1, taskContext, cookie);
-                        } else {
-                            logger.warn("Flowmod failed. Any chained flowmods are ignored. xid:{}",
-                                ofFlowModInputs.get(index).getXid());
-                            return Futures.immediateFuture(input);
+                    new AsyncFunction<RpcResult<UpdateFlowOutput>, RpcResult<UpdateFlowOutput>>() {
+                        @Override
+                        public ListenableFuture<RpcResult<UpdateFlowOutput>> apply(RpcResult<UpdateFlowOutput> input) throws Exception {
+                            if (input.isSuccessful()) {
+                                return chainFlowMods(ofFlowModInputs, index + 1, taskContext, cookie);
+                            } else {
+                                logger.warn("Flowmod failed. Any chained flowmods are ignored. xid:{}",
+                                        ofFlowModInputs.get(index).getXid());
+                                return Futures.immediateFuture(input);
+                            }
                         }
                     }
-                }
             );
         } else {
             return result;
@@ -253,8 +257,8 @@ public abstract class OFRpcTaskFactory {
     }
 
     private static Future<RpcResult<UpdateFlowOutput>> createResultForFlowMod(
-        OFRpcTaskContext taskContext, FlowModInputBuilder flowModInput,
-        SwitchConnectionDistinguisher cookie) {
+            OFRpcTaskContext taskContext, FlowModInputBuilder flowModInput,
+            SwitchConnectionDistinguisher cookie) {
         flowModInput.setXid(taskContext.getSession().getNextXid());
         return taskContext.getMessageService().flowMod(flowModInput.build(), cookie);
     }
@@ -278,63 +282,63 @@ public abstract class OFRpcTaskFactory {
     }
 
     /**
-     * @param taskContext 
-     * @param input 
-     * @param cookie 
+     * @param taskContext
+     * @param input
+     * @param cookie
      * @return UpdateFlow task
      */
     public static OFRpcTask<UpdateFlowInput, RpcResult<UpdateFlowOutput>> createUpdateFlowTask(
-            final OFRpcTaskContext taskContext, UpdateFlowInput input, 
+            final OFRpcTaskContext taskContext, UpdateFlowInput input,
             SwitchConnectionDistinguisher cookie) {
-        
-        OFRpcTask<UpdateFlowInput, RpcResult<UpdateFlowOutput>> task = 
+
+        OFRpcTask<UpdateFlowInput, RpcResult<UpdateFlowOutput>> task =
                 new OFRpcTask<UpdateFlowInput, RpcResult<UpdateFlowOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<UpdateFlowOutput>> call() {
-                ListenableFuture<RpcResult<UpdateFlowOutput>> result = null;
-                    
-                boolean updatedFlow = (getInput().getUpdatedFlow().getMatch().equals(getInput().getOriginalFlow().getMatch())) &&
-                        (getInput().getUpdatedFlow().getPriority().equals(getInput().getOriginalFlow().getPriority()));
-
-                List<FlowModInputBuilder> allFlowMods = new ArrayList<>();
-                List<FlowModInputBuilder> ofFlowModInputs;
-
-                if (updatedFlow == false) {
-                    // if neither match nor priority matches, then we would need to remove the flow and add it
-                    //remove flow
-                    RemoveFlowInputBuilder removeflow = new RemoveFlowInputBuilder(getInput().getOriginalFlow());
-                    List<FlowModInputBuilder> ofFlowRemoveInput = FlowConvertor.toFlowModInputs(removeflow.build(),
-                            getVersion(),getSession().getFeatures().getDatapathId());
-                    // remove flow should be the first
-                    allFlowMods.addAll(ofFlowRemoveInput);
-                    AddFlowInputBuilder addFlowInputBuilder = new AddFlowInputBuilder(getInput().getUpdatedFlow());
-                    ofFlowModInputs = FlowConvertor.toFlowModInputs(addFlowInputBuilder.build(),
-                            getVersion(), getSession().getFeatures().getDatapathId());
-                } else {
-                    ofFlowModInputs = FlowConvertor.toFlowModInputs(getInput().getUpdatedFlow(),
-                            getVersion(), getSession().getFeatures().getDatapathId());
-                }
-
-                allFlowMods.addAll(ofFlowModInputs);
-                logger.debug("Number of flows to push to switch: {}", allFlowMods.size());
-                result = chainFlowMods(allFlowMods, 0, getTaskContext(), getCookie());
-
-                result = OFRpcTaskUtil.chainFutureBarrier(this, result);
-                OFRpcTaskUtil.hookFutureNotification(this, result,
-                        getRpcNotificationProviderService(),
-                        createFlowUpdatedNotification(getInput()));
-                return result;
-            }
-            
-            @Override
-            public Boolean isBarrier() {
-                return getInput().getUpdatedFlow().isBarrier();
-            }
-        };
+
+                    @Override
+                    public ListenableFuture<RpcResult<UpdateFlowOutput>> call() {
+                        ListenableFuture<RpcResult<UpdateFlowOutput>> result = null;
+
+                        boolean updatedFlow = (getInput().getUpdatedFlow().getMatch().equals(getInput().getOriginalFlow().getMatch())) &&
+                                (getInput().getUpdatedFlow().getPriority().equals(getInput().getOriginalFlow().getPriority()));
+
+                        List<FlowModInputBuilder> allFlowMods = new ArrayList<>();
+                        List<FlowModInputBuilder> ofFlowModInputs;
+
+                        if (updatedFlow == false) {
+                            // if neither match nor priority matches, then we would need to remove the flow and add it
+                            //remove flow
+                            RemoveFlowInputBuilder removeflow = new RemoveFlowInputBuilder(getInput().getOriginalFlow());
+                            List<FlowModInputBuilder> ofFlowRemoveInput = FlowConvertor.toFlowModInputs(removeflow.build(),
+                                    getVersion(), getSession().getFeatures().getDatapathId());
+                            // remove flow should be the first
+                            allFlowMods.addAll(ofFlowRemoveInput);
+                            AddFlowInputBuilder addFlowInputBuilder = new AddFlowInputBuilder(getInput().getUpdatedFlow());
+                            ofFlowModInputs = FlowConvertor.toFlowModInputs(addFlowInputBuilder.build(),
+                                    getVersion(), getSession().getFeatures().getDatapathId());
+                        } else {
+                            ofFlowModInputs = FlowConvertor.toFlowModInputs(getInput().getUpdatedFlow(),
+                                    getVersion(), getSession().getFeatures().getDatapathId());
+                        }
+
+                        allFlowMods.addAll(ofFlowModInputs);
+                        logger.debug("Number of flows to push to switch: {}", allFlowMods.size());
+                        result = chainFlowMods(allFlowMods, 0, getTaskContext(), getCookie());
+
+                        result = OFRpcTaskUtil.chainFutureBarrier(this, result);
+                        OFRpcTaskUtil.hookFutureNotification(this, result,
+                                getRpcNotificationProviderService(),
+                                createFlowUpdatedNotification(getInput()));
+                        return result;
+                    }
+
+                    @Override
+                    public Boolean isBarrier() {
+                        return getInput().getUpdatedFlow().isBarrier();
+                    }
+                };
         return task;
     }
-    
+
 
     /**
      * @param xId
@@ -352,7 +356,7 @@ public abstract class OFRpcTaskFactory {
             }
         };
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -360,41 +364,41 @@ public abstract class OFRpcTaskFactory {
      * @return update group task
      */
     public static OFRpcTask<AddGroupInput, RpcResult<UpdateGroupOutput>> createAddGroupTask(
-            final OFRpcTaskContext taskContext, AddGroupInput input, 
+            final OFRpcTaskContext taskContext, AddGroupInput input,
             final SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<AddGroupInput, RpcResult<UpdateGroupOutput>> task = 
+        OFRpcTask<AddGroupInput, RpcResult<UpdateGroupOutput>> task =
                 new OFRpcTask<AddGroupInput, RpcResult<UpdateGroupOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<UpdateGroupOutput>> call() {
-                ListenableFuture<RpcResult<UpdateGroupOutput>> result = SettableFuture.create();
-                
-                // Convert the AddGroupInput to GroupModInput
-                GroupModInputBuilder ofGroupModInput = GroupConvertor.toGroupModInput(getInput(), 
-                        getVersion(), getSession().getFeatures().getDatapathId());
-                final Long xId = getSession().getNextXid();
-                ofGroupModInput.setXid(xId);
-
-                Future<RpcResult<UpdateGroupOutput>> resultFromOFLib = getMessageService()
-                        .groupMod(ofGroupModInput.build(), getCookie());
-                result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-
-                result = OFRpcTaskUtil.chainFutureBarrier(this, result);
-                OFRpcTaskUtil.hookFutureNotification(this, result, 
-                        getRpcNotificationProviderService(), createGroupAddedNotification(getInput()));
 
-                return result;
-            }
-            
-            @Override
-            public Boolean isBarrier() {
-                return getInput().isBarrier();
-            }
-        };
-        
+                    @Override
+                    public ListenableFuture<RpcResult<UpdateGroupOutput>> call() {
+                        ListenableFuture<RpcResult<UpdateGroupOutput>> result = SettableFuture.create();
+
+                        // Convert the AddGroupInput to GroupModInput
+                        GroupModInputBuilder ofGroupModInput = GroupConvertor.toGroupModInput(getInput(),
+                                getVersion(), getSession().getFeatures().getDatapathId());
+                        final Long xId = getSession().getNextXid();
+                        ofGroupModInput.setXid(xId);
+
+                        Future<RpcResult<UpdateGroupOutput>> resultFromOFLib = getMessageService()
+                                .groupMod(ofGroupModInput.build(), getCookie());
+                        result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        result = OFRpcTaskUtil.chainFutureBarrier(this, result);
+                        OFRpcTaskUtil.hookFutureNotification(this, result,
+                                getRpcNotificationProviderService(), createGroupAddedNotification(getInput()));
+
+                        return result;
+                    }
+
+                    @Override
+                    public Boolean isBarrier() {
+                        return getInput().isBarrier();
+                    }
+                };
+
         return task;
     }
-    
+
 
     /**
      * @param input
@@ -422,37 +426,37 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<AddMeterInput, RpcResult<UpdateMeterOutput>> createAddMeterTask(
             OFRpcTaskContext taskContext, AddMeterInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<AddMeterInput, RpcResult<UpdateMeterOutput>> task = 
+        OFRpcTask<AddMeterInput, RpcResult<UpdateMeterOutput>> task =
                 new OFRpcTask<AddMeterInput, RpcResult<UpdateMeterOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<UpdateMeterOutput>> call() {
-                ListenableFuture<RpcResult<UpdateMeterOutput>> result = SettableFuture.create();
-                
-                // Convert the AddGroupInput to GroupModInput
-                MeterModInputBuilder ofMeterModInput = MeterConvertor.toMeterModInput(getInput(), getVersion());
-                final Long xId = getSession().getNextXid();
-                ofMeterModInput.setXid(xId);
-                
-                Future<RpcResult<UpdateMeterOutput>> resultFromOFLib = getMessageService()
-                        .meterMod(ofMeterModInput.build(), getCookie());
-                result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                
-                result = OFRpcTaskUtil.chainFutureBarrier(this, result);
-                OFRpcTaskUtil.hookFutureNotification(this, result, 
-                        getRpcNotificationProviderService(), createMeterAddedNotification(getInput()));
 
-                return result;
-            }
-            
-            @Override
-            public Boolean isBarrier() {
-                return getInput().isBarrier();
-            }
-        };
-        
+                    @Override
+                    public ListenableFuture<RpcResult<UpdateMeterOutput>> call() {
+                        ListenableFuture<RpcResult<UpdateMeterOutput>> result = SettableFuture.create();
+
+                        // Convert the AddGroupInput to GroupModInput
+                        MeterModInputBuilder ofMeterModInput = MeterConvertor.toMeterModInput(getInput(), getVersion());
+                        final Long xId = getSession().getNextXid();
+                        ofMeterModInput.setXid(xId);
+
+                        Future<RpcResult<UpdateMeterOutput>> resultFromOFLib = getMessageService()
+                                .meterMod(ofMeterModInput.build(), getCookie());
+                        result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        result = OFRpcTaskUtil.chainFutureBarrier(this, result);
+                        OFRpcTaskUtil.hookFutureNotification(this, result,
+                                getRpcNotificationProviderService(), createMeterAddedNotification(getInput()));
+
+                        return result;
+                    }
+
+                    @Override
+                    public Boolean isBarrier() {
+                        return getInput().isBarrier();
+                    }
+                };
+
         return task;
-        
+
     }
 
     /**
@@ -471,44 +475,44 @@ public abstract class OFRpcTaskFactory {
             }
         };
     }
-    
+
     /**
-     * @param taskContext 
-     * @param input 
-     * @param cookie 
+     * @param taskContext
+     * @param input
+     * @param cookie
      * @return UpdateFlow task
      */
     public static OFRpcTask<UpdateGroupInput, RpcResult<UpdateGroupOutput>> createUpdateGroupTask(
-            OFRpcTaskContext taskContext, UpdateGroupInput input, 
+            OFRpcTaskContext taskContext, UpdateGroupInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<UpdateGroupInput, RpcResult<UpdateGroupOutput>> task = 
+        OFRpcTask<UpdateGroupInput, RpcResult<UpdateGroupOutput>> task =
                 new OFRpcTask<UpdateGroupInput, RpcResult<UpdateGroupOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<UpdateGroupOutput>> call() {
-                ListenableFuture<RpcResult<UpdateGroupOutput>> result = null;
-                
-                // Convert the UpdateGroupInput to GroupModInput
-                GroupModInputBuilder ofGroupModInput = GroupConvertor.toGroupModInput(
-                        getInput().getUpdatedGroup(), getVersion(),
-                        getSession().getFeatures().getDatapathId());
-                final Long xId = getSession().getNextXid();
-                ofGroupModInput.setXid(xId);
-
-                Future<RpcResult<UpdateGroupOutput>> resultFromOFLib = 
-                        getMessageService().groupMod(ofGroupModInput.build(), getCookie());
-                result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-
-                result = OFRpcTaskUtil.chainFutureBarrier(this, result);
-                OFRpcTaskUtil.hookFutureNotification(this, result, 
-                        getRpcNotificationProviderService(), createGroupUpdatedNotification(getInput()));
-                
-                return result;
-            }
-        };
+
+                    @Override
+                    public ListenableFuture<RpcResult<UpdateGroupOutput>> call() {
+                        ListenableFuture<RpcResult<UpdateGroupOutput>> result = null;
+
+                        // Convert the UpdateGroupInput to GroupModInput
+                        GroupModInputBuilder ofGroupModInput = GroupConvertor.toGroupModInput(
+                                getInput().getUpdatedGroup(), getVersion(),
+                                getSession().getFeatures().getDatapathId());
+                        final Long xId = getSession().getNextXid();
+                        ofGroupModInput.setXid(xId);
+
+                        Future<RpcResult<UpdateGroupOutput>> resultFromOFLib =
+                                getMessageService().groupMod(ofGroupModInput.build(), getCookie());
+                        result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        result = OFRpcTaskUtil.chainFutureBarrier(this, result);
+                        OFRpcTaskUtil.hookFutureNotification(this, result,
+                                getRpcNotificationProviderService(), createGroupUpdatedNotification(getInput()));
+
+                        return result;
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param input
      * @return
@@ -527,40 +531,40 @@ public abstract class OFRpcTaskFactory {
     }
 
     /**
-     * @param taskContext 
+     * @param taskContext
      * @param input
      * @param cookie
-     * @return update meter task 
+     * @return update meter task
      */
     public static OFRpcTask<UpdateMeterInput, RpcResult<UpdateMeterOutput>> createUpdateMeterTask(
             OFRpcTaskContext taskContext, UpdateMeterInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<UpdateMeterInput, RpcResult<UpdateMeterOutput>> task = 
+        OFRpcTask<UpdateMeterInput, RpcResult<UpdateMeterOutput>> task =
                 new OFRpcTask<UpdateMeterInput, RpcResult<UpdateMeterOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<UpdateMeterOutput>> call() {
-                ListenableFuture<RpcResult<UpdateMeterOutput>> result = null;
-
-                // Convert the UpdateMeterInput to MeterModInput
-                MeterModInputBuilder ofMeterModInput = MeterConvertor.toMeterModInput(
-                        getInput().getUpdatedMeter(), getVersion());
-                final Long xId = getSession().getNextXid();
-                ofMeterModInput.setXid(xId);
-
-                Future<RpcResult<UpdateMeterOutput>> resultFromOFLib = 
-                        getMessageService().meterMod(ofMeterModInput.build(), getCookie());
-                result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-
-                result = OFRpcTaskUtil.chainFutureBarrier(this, result);
-                OFRpcTaskUtil.hookFutureNotification(this, result,
-                        getRpcNotificationProviderService(), createMeterUpdatedNotification(getInput()));
-                return result;
-            }
-        };
+
+                    @Override
+                    public ListenableFuture<RpcResult<UpdateMeterOutput>> call() {
+                        ListenableFuture<RpcResult<UpdateMeterOutput>> result = null;
+
+                        // Convert the UpdateMeterInput to MeterModInput
+                        MeterModInputBuilder ofMeterModInput = MeterConvertor.toMeterModInput(
+                                getInput().getUpdatedMeter(), getVersion());
+                        final Long xId = getSession().getNextXid();
+                        ofMeterModInput.setXid(xId);
+
+                        Future<RpcResult<UpdateMeterOutput>> resultFromOFLib =
+                                getMessageService().meterMod(ofMeterModInput.build(), getCookie());
+                        result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        result = OFRpcTaskUtil.chainFutureBarrier(this, result);
+                        OFRpcTaskUtil.hookFutureNotification(this, result,
+                                getRpcNotificationProviderService(), createMeterUpdatedNotification(getInput()));
+                        return result;
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param input
      * @return
@@ -577,8 +581,8 @@ public abstract class OFRpcTaskFactory {
             }
         };
     }
-    
-    
+
+
     /**
      * @param taskContext
      * @param input
@@ -588,34 +592,34 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<RemoveFlowInput, RpcResult<UpdateFlowOutput>> createRemoveFlowTask(
             OFRpcTaskContext taskContext, RemoveFlowInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<RemoveFlowInput, RpcResult<UpdateFlowOutput>> task = 
+        OFRpcTask<RemoveFlowInput, RpcResult<UpdateFlowOutput>> task =
                 new OFRpcTask<RemoveFlowInput, RpcResult<UpdateFlowOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<UpdateFlowOutput>> call() {
-                ListenableFuture<RpcResult<UpdateFlowOutput>> result = SettableFuture.create();
 
-                // Convert the AddFlowInput to FlowModInput
-                FlowModInputBuilder ofFlowModInput = FlowConvertor.toFlowModInput(getInput(), 
-                        getVersion(), getSession().getFeatures().getDatapathId());
-                final Long xId = getSession().getNextXid();
-                ofFlowModInput.setXid(xId);
+                    @Override
+                    public ListenableFuture<RpcResult<UpdateFlowOutput>> call() {
+                        ListenableFuture<RpcResult<UpdateFlowOutput>> result = SettableFuture.create();
 
-                Future<RpcResult<UpdateFlowOutput>> resultFromOFLib = 
-                        getMessageService().flowMod(ofFlowModInput.build(), getCookie());
-                result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+                        // Convert the AddFlowInput to FlowModInput
+                        FlowModInputBuilder ofFlowModInput = FlowConvertor.toFlowModInput(getInput(),
+                                getVersion(), getSession().getFeatures().getDatapathId());
+                        final Long xId = getSession().getNextXid();
+                        ofFlowModInput.setXid(xId);
 
-                result = OFRpcTaskUtil.chainFutureBarrier(this, result);
-                OFRpcTaskUtil.hookFutureNotification(this, result, 
-                        getRpcNotificationProviderService(), createFlowRemovedNotification(getInput()));
+                        Future<RpcResult<UpdateFlowOutput>> resultFromOFLib =
+                                getMessageService().flowMod(ofFlowModInput.build(), getCookie());
+                        result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        result = OFRpcTaskUtil.chainFutureBarrier(this, result);
+                        OFRpcTaskUtil.hookFutureNotification(this, result,
+                                getRpcNotificationProviderService(), createFlowRemovedNotification(getInput()));
+
+                        return result;
+                    }
+                };
 
-                return result;
-            }
-        };
-        
         return task;
     }
-    
+
     /**
      * @param input
      * @return
@@ -632,8 +636,8 @@ public abstract class OFRpcTaskFactory {
             }
         };
     }
-    
-    
+
+
     /**
      * @param taskContext
      * @param input
@@ -641,39 +645,39 @@ public abstract class OFRpcTaskFactory {
      * @return task
      */
     public static OFRpcTask<RemoveGroupInput, RpcResult<UpdateGroupOutput>> createRemoveGroupTask(
-            final OFRpcTaskContext taskContext, RemoveGroupInput input, 
+            final OFRpcTaskContext taskContext, RemoveGroupInput input,
             final SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<RemoveGroupInput, RpcResult<UpdateGroupOutput>> task = 
+        OFRpcTask<RemoveGroupInput, RpcResult<UpdateGroupOutput>> task =
                 new OFRpcTask<RemoveGroupInput, RpcResult<UpdateGroupOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<UpdateGroupOutput>> call() {
-                ListenableFuture<RpcResult<UpdateGroupOutput>> result = SettableFuture.create();
 
-                // Convert the AddGroupInput to GroupModInput
-                GroupModInputBuilder ofGroupModInput = GroupConvertor.toGroupModInput(getInput(), 
-                        getVersion(), getSession().getFeatures().getDatapathId());
-                final Long xId = getSession().getNextXid();
-                ofGroupModInput.setXid(xId);
+                    @Override
+                    public ListenableFuture<RpcResult<UpdateGroupOutput>> call() {
+                        ListenableFuture<RpcResult<UpdateGroupOutput>> result = SettableFuture.create();
 
-                Future<RpcResult<UpdateGroupOutput>> resultFromOFLib = getMessageService()
-                        .groupMod(ofGroupModInput.build(), getCookie());
-                result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+                        // Convert the AddGroupInput to GroupModInput
+                        GroupModInputBuilder ofGroupModInput = GroupConvertor.toGroupModInput(getInput(),
+                                getVersion(), getSession().getFeatures().getDatapathId());
+                        final Long xId = getSession().getNextXid();
+                        ofGroupModInput.setXid(xId);
 
-                result = OFRpcTaskUtil.chainFutureBarrier(this, result);
-                OFRpcTaskUtil.hookFutureNotification(this, result, 
-                        getRpcNotificationProviderService(), createGroupRemovedNotification(getInput()));
+                        Future<RpcResult<UpdateGroupOutput>> resultFromOFLib = getMessageService()
+                                .groupMod(ofGroupModInput.build(), getCookie());
+                        result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
 
-                return result;
-            }
-        };
+                        result = OFRpcTaskUtil.chainFutureBarrier(this, result);
+                        OFRpcTaskUtil.hookFutureNotification(this, result,
+                                getRpcNotificationProviderService(), createGroupRemovedNotification(getInput()));
+
+                        return result;
+                    }
+                };
 
         return task;
     }
-    
+
     /**
      * @param input
-     * @return 
+     * @return
      */
     protected static NotificationComposer<GroupRemoved> createGroupRemovedNotification(
             final RemoveGroupInput input) {
@@ -687,7 +691,7 @@ public abstract class OFRpcTaskFactory {
             }
         };
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -697,34 +701,34 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<RemoveMeterInput, RpcResult<UpdateMeterOutput>> createRemoveMeterTask(
             OFRpcTaskContext taskContext, RemoveMeterInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<RemoveMeterInput, RpcResult<UpdateMeterOutput>> task = 
+        OFRpcTask<RemoveMeterInput, RpcResult<UpdateMeterOutput>> task =
                 new OFRpcTask<RemoveMeterInput, RpcResult<UpdateMeterOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<UpdateMeterOutput>> call() {
-                ListenableFuture<RpcResult<UpdateMeterOutput>> result = SettableFuture.create();
 
-                // Convert the AddGroupInput to GroupModInput
-                MeterModInputBuilder ofMeterModInput = MeterConvertor.toMeterModInput(getInput(), getVersion());
-                final Long xId = getSession().getNextXid();
-                ofMeterModInput.setXid(xId);
+                    @Override
+                    public ListenableFuture<RpcResult<UpdateMeterOutput>> call() {
+                        ListenableFuture<RpcResult<UpdateMeterOutput>> result = SettableFuture.create();
 
-                Future<RpcResult<UpdateMeterOutput>> resultFromOFLib = getMessageService()
-                        .meterMod(ofMeterModInput.build(), getCookie());
-                result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+                        // Convert the AddGroupInput to GroupModInput
+                        MeterModInputBuilder ofMeterModInput = MeterConvertor.toMeterModInput(getInput(), getVersion());
+                        final Long xId = getSession().getNextXid();
+                        ofMeterModInput.setXid(xId);
 
-                result = OFRpcTaskUtil.chainFutureBarrier(this, result);
-                OFRpcTaskUtil.hookFutureNotification(this, result, 
-                        getRpcNotificationProviderService(), createMeterRemovedNotification(getInput()));
+                        Future<RpcResult<UpdateMeterOutput>> resultFromOFLib = getMessageService()
+                                .meterMod(ofMeterModInput.build(), getCookie());
+                        result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        result = OFRpcTaskUtil.chainFutureBarrier(this, result);
+                        OFRpcTaskUtil.hookFutureNotification(this, result,
+                                getRpcNotificationProviderService(), createMeterRemovedNotification(getInput()));
+
+                        return result;
+                    }
+                };
 
-                return result;
-            }
-        };
-        
         return task;
-        
+
     }
-    
+
     /**
      * @param input
      * @return
@@ -741,7 +745,7 @@ public abstract class OFRpcTaskFactory {
             }
         };
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -751,60 +755,60 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<GetAllGroupStatisticsInput, RpcResult<GetAllGroupStatisticsOutput>> createGetAllGroupStatisticsTask(
             final OFRpcTaskContext taskContext, GetAllGroupStatisticsInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetAllGroupStatisticsInput, RpcResult<GetAllGroupStatisticsOutput>> task = 
+        OFRpcTask<GetAllGroupStatisticsInput, RpcResult<GetAllGroupStatisticsOutput>> task =
                 new OFRpcTask<GetAllGroupStatisticsInput, RpcResult<GetAllGroupStatisticsOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<GetAllGroupStatisticsOutput>> call() {
-                final SettableFuture<RpcResult<GetAllGroupStatisticsOutput>> result = SettableFuture.create();
-             
-                if (taskContext.getSession().getPrimaryConductor().getVersion() == OFConstants.OFP_VERSION_1_0) {
-                    RpcResult<GetAllGroupStatisticsOutput> rpcResult = RpcResultBuilder.success(
-                            new GetAllGroupStatisticsOutputBuilder().build()).build();
-                    
-                    return Futures.immediateFuture(rpcResult);
-                } else {   
-                
-                 // Generate xid to associate it with the request
-                    final Long xid = taskContext.getSession().getNextXid();
-    
-                 // Create multipart request body for fetch all the group stats
-                    MultipartRequestGroupCaseBuilder caseBuilder = new MultipartRequestGroupCaseBuilder();
-                    MultipartRequestGroupBuilder mprGroupBuild = new MultipartRequestGroupBuilder();
-                    mprGroupBuild.setGroupId(new GroupId(BinContent.intToUnsignedLong(
-                            org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731
-                            .Group.OFPGALL.getIntValue())));
-                    caseBuilder.setMultipartRequestGroup(mprGroupBuild.build());
-                    
-                    // Create multipart request header
-                    MultipartRequestInputBuilder mprInput = createMultipartHeader(MultipartType.OFPMPGROUP, 
-                            taskContext, xid);
-                    
-                    // Set request body to main multipart request
-                    mprInput.setMultipartRequestBody(caseBuilder.build());
-    
-                    // Send the request, no cookies associated, use any connection
-                    
-                    Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                            .multipartRequest(mprInput.build(), getCookie());
-                    ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                    
-                    Futures.addCallback(resultLib, new ResultCallback<GetAllGroupStatisticsOutput>(result) {
-                        @Override
-                        public GetAllGroupStatisticsOutput createResult() {
-                            GetAllGroupStatisticsOutputBuilder groupStatBuilder = new GetAllGroupStatisticsOutputBuilder()
-                            .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                            return groupStatBuilder.build();
+
+                    @Override
+                    public ListenableFuture<RpcResult<GetAllGroupStatisticsOutput>> call() {
+                        final SettableFuture<RpcResult<GetAllGroupStatisticsOutput>> result = SettableFuture.create();
+
+                        if (taskContext.getSession().getPrimaryConductor().getVersion() == OFConstants.OFP_VERSION_1_0) {
+                            RpcResult<GetAllGroupStatisticsOutput> rpcResult = RpcResultBuilder.success(
+                                    new GetAllGroupStatisticsOutputBuilder().build()).build();
+
+                            return Futures.immediateFuture(rpcResult);
+                        } else {
+
+                            // Generate xid to associate it with the request
+                            final Long xid = taskContext.getSession().getNextXid();
+
+                            // Create multipart request body for fetch all the group stats
+                            MultipartRequestGroupCaseBuilder caseBuilder = new MultipartRequestGroupCaseBuilder();
+                            MultipartRequestGroupBuilder mprGroupBuild = new MultipartRequestGroupBuilder();
+                            mprGroupBuild.setGroupId(new GroupId(BinContent.intToUnsignedLong(
+                                    org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731
+                                            .Group.OFPGALL.getIntValue())));
+                            caseBuilder.setMultipartRequestGroup(mprGroupBuild.build());
+
+                            // Create multipart request header
+                            MultipartRequestInputBuilder mprInput = createMultipartHeader(MultipartType.OFPMPGROUP,
+                                    taskContext, xid);
+
+                            // Set request body to main multipart request
+                            mprInput.setMultipartRequestBody(caseBuilder.build());
+
+                            // Send the request, no cookies associated, use any connection
+
+                            Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                    .multipartRequest(mprInput.build(), getCookie());
+                            ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                            Futures.addCallback(resultLib, new ResultCallback<GetAllGroupStatisticsOutput>(result) {
+                                @Override
+                                public GetAllGroupStatisticsOutput createResult() {
+                                    GetAllGroupStatisticsOutputBuilder groupStatBuilder = new GetAllGroupStatisticsOutputBuilder()
+                                            .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                    return groupStatBuilder.build();
+                                }
+                            });
+
+                            return result;
                         }
-                    });
-                        
-                    return result;
-                }
-            }
-        };
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -814,45 +818,45 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<GetGroupDescriptionInput, RpcResult<GetGroupDescriptionOutput>> createGetGroupDescriptionTask(
             final OFRpcTaskContext taskContext, GetGroupDescriptionInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetGroupDescriptionInput, RpcResult<GetGroupDescriptionOutput>> task = 
+        OFRpcTask<GetGroupDescriptionInput, RpcResult<GetGroupDescriptionOutput>> task =
                 new OFRpcTask<GetGroupDescriptionInput, RpcResult<GetGroupDescriptionOutput>>(taskContext, cookie, input) {
 
                     @Override
                     public ListenableFuture<RpcResult<GetGroupDescriptionOutput>> call()
                             throws Exception {
                         final SettableFuture<RpcResult<GetGroupDescriptionOutput>> result = SettableFuture.create();
-                        
+
                         if (taskContext.getSession().getPrimaryConductor().getVersion() == OFConstants.OFP_VERSION_1_0) {
-                            RpcResult<GetGroupDescriptionOutput> rpcResult = RpcResultBuilder.success( 
+                            RpcResult<GetGroupDescriptionOutput> rpcResult = RpcResultBuilder.success(
                                     new GetGroupDescriptionOutputBuilder().build()).build();
                             return Futures.immediateFuture(rpcResult);
                         } else {
                             final Long xid = taskContext.getSession().getNextXid();
-                            
-                            MultipartRequestGroupDescCaseBuilder mprGroupDescCaseBuild = 
-                                                  new MultipartRequestGroupDescCaseBuilder();
-                            MultipartRequestInputBuilder mprInput = 
+
+                            MultipartRequestGroupDescCaseBuilder mprGroupDescCaseBuild =
+                                    new MultipartRequestGroupDescCaseBuilder();
+                            MultipartRequestInputBuilder mprInput =
                                     createMultipartHeader(MultipartType.OFPMPGROUPDESC, taskContext, xid);
                             mprInput.setMultipartRequestBody(mprGroupDescCaseBuild.build());
                             Future<RpcResult<Void>> resultFromOFLib = getMessageService()
                                     .multipartRequest(mprInput.build(), getCookie());
                             ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                            
+
                             Futures.addCallback(resultLib, new ResultCallback<GetGroupDescriptionOutput>(result) {
                                 @Override
                                 public GetGroupDescriptionOutput createResult() {
                                     GetGroupDescriptionOutputBuilder groupStatBuilder = new GetGroupDescriptionOutputBuilder()
-                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                            .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
                                     return groupStatBuilder.build();
                                 }
                             });
                             return result;
                         }
-                    }  
-        };
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -862,45 +866,45 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<GetGroupFeaturesInput, RpcResult<GetGroupFeaturesOutput>> createGetGroupFeaturesTask(
             final OFRpcTaskContext taskContext, GetGroupFeaturesInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetGroupFeaturesInput, RpcResult<GetGroupFeaturesOutput>> task = 
+        OFRpcTask<GetGroupFeaturesInput, RpcResult<GetGroupFeaturesOutput>> task =
                 new OFRpcTask<GetGroupFeaturesInput, RpcResult<GetGroupFeaturesOutput>>(taskContext, cookie, input) {
 
                     @Override
                     public ListenableFuture<RpcResult<GetGroupFeaturesOutput>> call()
                             throws Exception {
                         final SettableFuture<RpcResult<GetGroupFeaturesOutput>> result = SettableFuture.create();
-                        
+
                         if (taskContext.getSession().getPrimaryConductor().getVersion() == OFConstants.OFP_VERSION_1_0) {
-                            RpcResult<GetGroupFeaturesOutput> rpcResult = RpcResultBuilder.success( 
+                            RpcResult<GetGroupFeaturesOutput> rpcResult = RpcResultBuilder.success(
                                     new GetGroupFeaturesOutputBuilder().build()).build();
                             return Futures.immediateFuture(rpcResult);
                         } else {
                             final Long xid = taskContext.getSession().getNextXid();
-                            
-                            MultipartRequestGroupFeaturesCaseBuilder mprGroupFeaturesBuild = 
-                                                  new MultipartRequestGroupFeaturesCaseBuilder();
-                            MultipartRequestInputBuilder mprInput = 
+
+                            MultipartRequestGroupFeaturesCaseBuilder mprGroupFeaturesBuild =
+                                    new MultipartRequestGroupFeaturesCaseBuilder();
+                            MultipartRequestInputBuilder mprInput =
                                     createMultipartHeader(MultipartType.OFPMPGROUPFEATURES, taskContext, xid);
                             mprInput.setMultipartRequestBody(mprGroupFeaturesBuild.build());
                             Future<RpcResult<Void>> resultFromOFLib = getMessageService()
                                     .multipartRequest(mprInput.build(), getCookie());
                             ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                            
+
                             Futures.addCallback(resultLib, new ResultCallback<GetGroupFeaturesOutput>(result) {
                                 @Override
                                 public GetGroupFeaturesOutput createResult() {
                                     GetGroupFeaturesOutputBuilder groupFeatureBuilder = new GetGroupFeaturesOutputBuilder()
-                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                            .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
                                     return groupFeatureBuilder.build();
                                 }
                             });
                             return result;
                         }
-                    }  
-        };
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -910,49 +914,49 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<GetGroupStatisticsInput, RpcResult<GetGroupStatisticsOutput>> createGetGroupStatisticsTask(
             final OFRpcTaskContext taskContext, final GetGroupStatisticsInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetGroupStatisticsInput, RpcResult<GetGroupStatisticsOutput>> task = 
+        OFRpcTask<GetGroupStatisticsInput, RpcResult<GetGroupStatisticsOutput>> task =
                 new OFRpcTask<GetGroupStatisticsInput, RpcResult<GetGroupStatisticsOutput>>(taskContext, cookie, input) {
 
                     @Override
                     public ListenableFuture<RpcResult<GetGroupStatisticsOutput>> call()
                             throws Exception {
                         final SettableFuture<RpcResult<GetGroupStatisticsOutput>> result = SettableFuture.create();
-                        
+
                         if (taskContext.getSession().getPrimaryConductor().getVersion() == OFConstants.OFP_VERSION_1_0) {
                             RpcResult<GetGroupStatisticsOutput> rpcResult = RpcResultBuilder.success(
                                     new GetGroupStatisticsOutputBuilder().build()).build();
                             return Futures.immediateFuture(rpcResult);
                         } else {
                             final Long xid = taskContext.getSession().getNextXid();
-                            
+
                             MultipartRequestGroupCaseBuilder caseBuilder = new MultipartRequestGroupCaseBuilder();
                             MultipartRequestGroupBuilder mprGroupBuild = new MultipartRequestGroupBuilder();
                             mprGroupBuild.setGroupId(new GroupId(input.getGroupId().getValue()));
                             caseBuilder.setMultipartRequestGroup(mprGroupBuild.build());
-                            
-                            MultipartRequestInputBuilder mprInput = 
+
+                            MultipartRequestInputBuilder mprInput =
                                     createMultipartHeader(MultipartType.OFPMPGROUP, taskContext, xid);
                             mprInput.setMultipartRequestBody(caseBuilder.build());
                             Future<RpcResult<Void>> resultFromOFLib = getMessageService()
                                     .multipartRequest(mprInput.build(), getCookie());
                             ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                            
+
                             Futures.addCallback(resultLib, new ResultCallback<GetGroupStatisticsOutput>(result) {
                                 @Override
                                 public GetGroupStatisticsOutput createResult() {
-                                    GetGroupStatisticsOutputBuilder groupStatisticsBuilder = 
+                                    GetGroupStatisticsOutputBuilder groupStatisticsBuilder =
                                             new GetGroupStatisticsOutputBuilder()
-                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
                                     return groupStatisticsBuilder.build();
                                 }
                             });
                             return result;
                         }
-                    }  
-        };
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -962,53 +966,53 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<GetAllMeterConfigStatisticsInput, RpcResult<GetAllMeterConfigStatisticsOutput>> createGetAllMeterConfigStatisticsTask(
             final OFRpcTaskContext taskContext, final GetAllMeterConfigStatisticsInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetAllMeterConfigStatisticsInput, RpcResult<GetAllMeterConfigStatisticsOutput>> task = 
+        OFRpcTask<GetAllMeterConfigStatisticsInput, RpcResult<GetAllMeterConfigStatisticsOutput>> task =
                 new OFRpcTask<GetAllMeterConfigStatisticsInput, RpcResult<GetAllMeterConfigStatisticsOutput>>(taskContext, cookie, input) {
 
                     @Override
                     public ListenableFuture<RpcResult<GetAllMeterConfigStatisticsOutput>> call()
                             throws Exception {
                         final SettableFuture<RpcResult<GetAllMeterConfigStatisticsOutput>> result = SettableFuture.create();
-                        
+
                         if (taskContext.getSession().getPrimaryConductor().getVersion() == OFConstants.OFP_VERSION_1_0) {
                             RpcResult<GetAllMeterConfigStatisticsOutput> rpcResult = RpcResultBuilder.success(
                                     new GetAllMeterConfigStatisticsOutputBuilder().build()).build();
                             return Futures.immediateFuture(rpcResult);
                         } else {
                             final Long xid = taskContext.getSession().getNextXid();
-                            
-                            MultipartRequestMeterConfigCaseBuilder caseBuilder = 
+
+                            MultipartRequestMeterConfigCaseBuilder caseBuilder =
                                     new MultipartRequestMeterConfigCaseBuilder();
-                            MultipartRequestMeterConfigBuilder mprMeterConfigBuild = 
+                            MultipartRequestMeterConfigBuilder mprMeterConfigBuild =
                                     new MultipartRequestMeterConfigBuilder();
                             mprMeterConfigBuild.setMeterId(new MeterId(BinContent.intToUnsignedLong(
                                     org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common
-                                    .types.rev130731.Meter.OFPMALL.getIntValue())));
+                                            .types.rev130731.Meter.OFPMALL.getIntValue())));
                             caseBuilder.setMultipartRequestMeterConfig(mprMeterConfigBuild.build());
-                            
-                            MultipartRequestInputBuilder mprInput = 
+
+                            MultipartRequestInputBuilder mprInput =
                                     createMultipartHeader(MultipartType.OFPMPMETERCONFIG, taskContext, xid);
                             mprInput.setMultipartRequestBody(caseBuilder.build());
                             Future<RpcResult<Void>> resultFromOFLib = getMessageService()
                                     .multipartRequest(mprInput.build(), getCookie());
                             ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                            
+
                             Futures.addCallback(resultLib, new ResultCallback<GetAllMeterConfigStatisticsOutput>(result) {
                                 @Override
                                 public GetAllMeterConfigStatisticsOutput createResult() {
-                                    GetAllMeterConfigStatisticsOutputBuilder allMeterConfStatBuilder = 
+                                    GetAllMeterConfigStatisticsOutputBuilder allMeterConfStatBuilder =
                                             new GetAllMeterConfigStatisticsOutputBuilder()
-                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
                                     return allMeterConfStatBuilder.build();
                                 }
                             });
                             return result;
                         }
-                    }  
-        };
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -1018,53 +1022,53 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<GetAllMeterStatisticsInput, RpcResult<GetAllMeterStatisticsOutput>> createGetAllMeterStatisticsTask(
             final OFRpcTaskContext taskContext, final GetAllMeterStatisticsInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetAllMeterStatisticsInput, RpcResult<GetAllMeterStatisticsOutput>> task = 
+        OFRpcTask<GetAllMeterStatisticsInput, RpcResult<GetAllMeterStatisticsOutput>> task =
                 new OFRpcTask<GetAllMeterStatisticsInput, RpcResult<GetAllMeterStatisticsOutput>>(taskContext, cookie, input) {
 
                     @Override
                     public ListenableFuture<RpcResult<GetAllMeterStatisticsOutput>> call()
                             throws Exception {
                         final SettableFuture<RpcResult<GetAllMeterStatisticsOutput>> result = SettableFuture.create();
-                        
+
                         if (taskContext.getSession().getPrimaryConductor().getVersion() == OFConstants.OFP_VERSION_1_0) {
                             RpcResult<GetAllMeterStatisticsOutput> rpcResult = RpcResultBuilder.success(
                                     new GetAllMeterStatisticsOutputBuilder().build()).build();
                             return Futures.immediateFuture(rpcResult);
                         } else {
                             final Long xid = taskContext.getSession().getNextXid();
-                            
-                            MultipartRequestMeterCaseBuilder caseBuilder = 
+
+                            MultipartRequestMeterCaseBuilder caseBuilder =
                                     new MultipartRequestMeterCaseBuilder();
-                            MultipartRequestMeterBuilder mprMeterBuild = 
+                            MultipartRequestMeterBuilder mprMeterBuild =
                                     new MultipartRequestMeterBuilder();
                             mprMeterBuild.setMeterId(new MeterId(BinContent.intToUnsignedLong(
                                     org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common
-                                    .types.rev130731.Meter.OFPMALL.getIntValue())));
+                                            .types.rev130731.Meter.OFPMALL.getIntValue())));
                             caseBuilder.setMultipartRequestMeter(mprMeterBuild.build());
-                            
-                            MultipartRequestInputBuilder mprInput = 
+
+                            MultipartRequestInputBuilder mprInput =
                                     createMultipartHeader(MultipartType.OFPMPMETER, taskContext, xid);
                             mprInput.setMultipartRequestBody(caseBuilder.build());
                             Future<RpcResult<Void>> resultFromOFLib = getMessageService()
                                     .multipartRequest(mprInput.build(), getCookie());
                             ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                            
+
                             Futures.addCallback(resultLib, new ResultCallback<GetAllMeterStatisticsOutput>(result) {
                                 @Override
                                 public GetAllMeterStatisticsOutput createResult() {
-                                    GetAllMeterStatisticsOutputBuilder allMeterStatBuilder = 
+                                    GetAllMeterStatisticsOutputBuilder allMeterStatBuilder =
                                             new GetAllMeterStatisticsOutputBuilder()
-                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
                                     return allMeterStatBuilder.build();
                                 }
                             });
                             return result;
                         }
-                    }  
-        };
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -1074,47 +1078,47 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<GetMeterFeaturesInput, RpcResult<GetMeterFeaturesOutput>> createGetMeterFeaturesTask(
             final OFRpcTaskContext taskContext, final GetMeterFeaturesInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetMeterFeaturesInput, RpcResult<GetMeterFeaturesOutput>> task = 
+        OFRpcTask<GetMeterFeaturesInput, RpcResult<GetMeterFeaturesOutput>> task =
                 new OFRpcTask<GetMeterFeaturesInput, RpcResult<GetMeterFeaturesOutput>>(taskContext, cookie, input) {
 
                     @Override
                     public ListenableFuture<RpcResult<GetMeterFeaturesOutput>> call()
                             throws Exception {
                         final SettableFuture<RpcResult<GetMeterFeaturesOutput>> result = SettableFuture.create();
-                        
+
                         if (taskContext.getSession().getPrimaryConductor().getVersion() == OFConstants.OFP_VERSION_1_0) {
                             RpcResult<GetMeterFeaturesOutput> rpcResult = RpcResultBuilder.success(
                                     new GetMeterFeaturesOutputBuilder().build()).build();
                             return Futures.immediateFuture(rpcResult);
                         } else {
                             final Long xid = taskContext.getSession().getNextXid();
-                            
-                            MultipartRequestMeterFeaturesCaseBuilder mprMeterFeaturesBuild = 
+
+                            MultipartRequestMeterFeaturesCaseBuilder mprMeterFeaturesBuild =
                                     new MultipartRequestMeterFeaturesCaseBuilder();
-                            
-                            MultipartRequestInputBuilder mprInput = 
+
+                            MultipartRequestInputBuilder mprInput =
                                     createMultipartHeader(MultipartType.OFPMPMETERFEATURES, taskContext, xid);
                             mprInput.setMultipartRequestBody(mprMeterFeaturesBuild.build());
                             Future<RpcResult<Void>> resultFromOFLib = getMessageService()
                                     .multipartRequest(mprInput.build(), getCookie());
                             ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                            
+
                             Futures.addCallback(resultLib, new ResultCallback<GetMeterFeaturesOutput>(result) {
                                 @Override
                                 public GetMeterFeaturesOutput createResult() {
-                                    GetMeterFeaturesOutputBuilder meterFeaturesBuilder = 
+                                    GetMeterFeaturesOutputBuilder meterFeaturesBuilder =
                                             new GetMeterFeaturesOutputBuilder()
-                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
                                     return meterFeaturesBuilder.build();
                                 }
                             });
                             return result;
                         }
-                    }  
-        };
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -1124,171 +1128,171 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<GetMeterStatisticsInput, RpcResult<GetMeterStatisticsOutput>> createGetMeterStatisticsTask(
             final OFRpcTaskContext taskContext, final GetMeterStatisticsInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetMeterStatisticsInput, RpcResult<GetMeterStatisticsOutput>> task = 
+        OFRpcTask<GetMeterStatisticsInput, RpcResult<GetMeterStatisticsOutput>> task =
                 new OFRpcTask<GetMeterStatisticsInput, RpcResult<GetMeterStatisticsOutput>>(taskContext, cookie, input) {
 
                     @Override
                     public ListenableFuture<RpcResult<GetMeterStatisticsOutput>> call()
                             throws Exception {
                         final SettableFuture<RpcResult<GetMeterStatisticsOutput>> result = SettableFuture.create();
-                        
+
                         if (taskContext.getSession().getPrimaryConductor().getVersion() == OFConstants.OFP_VERSION_1_0) {
                             RpcResult<GetMeterStatisticsOutput> rpcResult = RpcResultBuilder.success(
                                     new GetMeterStatisticsOutputBuilder().build()).build();
                             return Futures.immediateFuture(rpcResult);
                         } else {
                             final Long xid = taskContext.getSession().getNextXid();
-                            
-                            MultipartRequestMeterCaseBuilder caseBuilder = 
+
+                            MultipartRequestMeterCaseBuilder caseBuilder =
                                     new MultipartRequestMeterCaseBuilder();
-                            MultipartRequestMeterBuilder mprMeterBuild = 
+                            MultipartRequestMeterBuilder mprMeterBuild =
                                     new MultipartRequestMeterBuilder();
                             mprMeterBuild.setMeterId(new MeterId(input.getMeterId().getValue()));
                             caseBuilder.setMultipartRequestMeter(mprMeterBuild.build());
-                            
-                            MultipartRequestInputBuilder mprInput = 
+
+                            MultipartRequestInputBuilder mprInput =
                                     createMultipartHeader(MultipartType.OFPMPMETER, taskContext, xid);
                             mprInput.setMultipartRequestBody(caseBuilder.build());
                             Future<RpcResult<Void>> resultFromOFLib = getMessageService()
                                     .multipartRequest(mprInput.build(), getCookie());
                             ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                            
+
                             Futures.addCallback(resultLib, new ResultCallback<GetMeterStatisticsOutput>(result) {
                                 @Override
                                 public GetMeterStatisticsOutput createResult() {
-                                    GetMeterStatisticsOutputBuilder meterStatBuilder = 
+                                    GetMeterStatisticsOutputBuilder meterStatBuilder =
                                             new GetMeterStatisticsOutputBuilder()
-                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
                                     return meterStatBuilder.build();
                                 }
                             });
                             return result;
                         }
-                    }  
-        };
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
      * @param cookie
      * @return task
      */
-    public static OFRpcTask<GetAllNodeConnectorsStatisticsInput, RpcResult<GetAllNodeConnectorsStatisticsOutput>> 
-                                                    createGetAllNodeConnectorsStatisticsTask(
+    public static OFRpcTask<GetAllNodeConnectorsStatisticsInput, RpcResult<GetAllNodeConnectorsStatisticsOutput>>
+    createGetAllNodeConnectorsStatisticsTask(
             final OFRpcTaskContext taskContext, final GetAllNodeConnectorsStatisticsInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetAllNodeConnectorsStatisticsInput, RpcResult<GetAllNodeConnectorsStatisticsOutput>> task = 
+        OFRpcTask<GetAllNodeConnectorsStatisticsInput, RpcResult<GetAllNodeConnectorsStatisticsOutput>> task =
                 new OFRpcTask<GetAllNodeConnectorsStatisticsInput, RpcResult<GetAllNodeConnectorsStatisticsOutput>>(taskContext, cookie, input) {
 
                     @Override
                     public ListenableFuture<RpcResult<GetAllNodeConnectorsStatisticsOutput>> call()
                             throws Exception {
                         final SettableFuture<RpcResult<GetAllNodeConnectorsStatisticsOutput>> result = SettableFuture.create();
-                        
-                            final Long xid = taskContext.getSession().getNextXid();
-                            
-                            MultipartRequestPortStatsCaseBuilder caseBuilder = 
-                                    new MultipartRequestPortStatsCaseBuilder();
-                            MultipartRequestPortStatsBuilder mprPortStatsBuilder = 
-                                    new MultipartRequestPortStatsBuilder();
-                            // Select all ports
-                            mprPortStatsBuilder.setPortNo(OFConstants.OFPP_ANY);
-                            caseBuilder.setMultipartRequestPortStats(mprPortStatsBuilder.build());
-                            
-                            MultipartRequestInputBuilder mprInput = 
-                                    createMultipartHeader(MultipartType.OFPMPPORTSTATS, taskContext, xid);
-                            mprInput.setMultipartRequestBody(caseBuilder.build());
-                            Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                                    .multipartRequest(mprInput.build(), getCookie());
-                            ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                            
-                            Futures.addCallback(resultLib, new ResultCallback<GetAllNodeConnectorsStatisticsOutput>(result) {
-                                @Override
-                                public GetAllNodeConnectorsStatisticsOutput createResult() {
-                                    GetAllNodeConnectorsStatisticsOutputBuilder allNodeConnectorStatBuilder = 
-                                            new GetAllNodeConnectorsStatisticsOutputBuilder()
-                                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                                    return allNodeConnectorStatBuilder.build();
-                                }
-                            });
-                            return result;
-                        }
-        };
+
+                        final Long xid = taskContext.getSession().getNextXid();
+
+                        MultipartRequestPortStatsCaseBuilder caseBuilder =
+                                new MultipartRequestPortStatsCaseBuilder();
+                        MultipartRequestPortStatsBuilder mprPortStatsBuilder =
+                                new MultipartRequestPortStatsBuilder();
+                        // Select all ports
+                        mprPortStatsBuilder.setPortNo(OFConstants.OFPP_ANY);
+                        caseBuilder.setMultipartRequestPortStats(mprPortStatsBuilder.build());
+
+                        MultipartRequestInputBuilder mprInput =
+                                createMultipartHeader(MultipartType.OFPMPPORTSTATS, taskContext, xid);
+                        mprInput.setMultipartRequestBody(caseBuilder.build());
+                        Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                .multipartRequest(mprInput.build(), getCookie());
+                        ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        Futures.addCallback(resultLib, new ResultCallback<GetAllNodeConnectorsStatisticsOutput>(result) {
+                            @Override
+                            public GetAllNodeConnectorsStatisticsOutput createResult() {
+                                GetAllNodeConnectorsStatisticsOutputBuilder allNodeConnectorStatBuilder =
+                                        new GetAllNodeConnectorsStatisticsOutputBuilder()
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                return allNodeConnectorStatBuilder.build();
+                            }
+                        });
+                        return result;
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
      * @param cookie
      * @return task
      */
-    public static OFRpcTask<GetNodeConnectorStatisticsInput, RpcResult<GetNodeConnectorStatisticsOutput>> 
-                                                    createGetNodeConnectorStatisticsTask(
+    public static OFRpcTask<GetNodeConnectorStatisticsInput, RpcResult<GetNodeConnectorStatisticsOutput>>
+    createGetNodeConnectorStatisticsTask(
             final OFRpcTaskContext taskContext, final GetNodeConnectorStatisticsInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetNodeConnectorStatisticsInput, RpcResult<GetNodeConnectorStatisticsOutput>> task = 
+        OFRpcTask<GetNodeConnectorStatisticsInput, RpcResult<GetNodeConnectorStatisticsOutput>> task =
                 new OFRpcTask<GetNodeConnectorStatisticsInput, RpcResult<GetNodeConnectorStatisticsOutput>>(taskContext, cookie, input) {
 
-                @Override
-                public ListenableFuture<RpcResult<GetNodeConnectorStatisticsOutput>> call()
-                        throws Exception {
-                    final SettableFuture<RpcResult<GetNodeConnectorStatisticsOutput>> result = SettableFuture.create();
-                    
+                    @Override
+                    public ListenableFuture<RpcResult<GetNodeConnectorStatisticsOutput>> call()
+                            throws Exception {
+                        final SettableFuture<RpcResult<GetNodeConnectorStatisticsOutput>> result = SettableFuture.create();
+
                         final Long xid = taskContext.getSession().getNextXid();
-                        
-                        MultipartRequestPortStatsCaseBuilder caseBuilder = 
+
+                        MultipartRequestPortStatsCaseBuilder caseBuilder =
                                 new MultipartRequestPortStatsCaseBuilder();
-                        MultipartRequestPortStatsBuilder mprPortStatsBuilder = 
+                        MultipartRequestPortStatsBuilder mprPortStatsBuilder =
                                 new MultipartRequestPortStatsBuilder();
                         // Set specific port
                         mprPortStatsBuilder
                                 .setPortNo(InventoryDataServiceUtil.portNumberfromNodeConnectorId(
-                                        OpenflowVersion.get(taskContext.getSession().getFeatures().getVersion()), 
+                                        OpenflowVersion.get(taskContext.getSession().getFeatures().getVersion()),
                                         input.getNodeConnectorId()));
                         caseBuilder.setMultipartRequestPortStats(mprPortStatsBuilder.build());
-                        
-                        MultipartRequestInputBuilder mprInput = 
+
+                        MultipartRequestInputBuilder mprInput =
                                 createMultipartHeader(MultipartType.OFPMPPORTSTATS, taskContext, xid);
                         mprInput.setMultipartRequestBody(caseBuilder.build());
                         Future<RpcResult<Void>> resultFromOFLib = getMessageService()
                                 .multipartRequest(mprInput.build(), getCookie());
                         ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                        
+
                         Futures.addCallback(resultLib, new ResultCallback<GetNodeConnectorStatisticsOutput>(result) {
                             @Override
                             public GetNodeConnectorStatisticsOutput createResult() {
-                                GetNodeConnectorStatisticsOutputBuilder allNodeConnectorStatBuilder = 
+                                GetNodeConnectorStatisticsOutputBuilder allNodeConnectorStatBuilder =
                                         new GetNodeConnectorStatisticsOutputBuilder()
-                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
                                 return allNodeConnectorStatBuilder.build();
                             }
                         });
                         return result;
                     }
-        };
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
      * @param cookie
      * @return task
      */
-    public static OFRpcTask<GetAllFlowStatisticsFromFlowTableInput, RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> 
-                                                    createGetAllFlowStatisticsFromFlowTableTask(
-            final OFRpcTaskContext taskContext, 
+    public static OFRpcTask<GetAllFlowStatisticsFromFlowTableInput, RpcResult<GetAllFlowStatisticsFromFlowTableOutput>>
+    createGetAllFlowStatisticsFromFlowTableTask(
+            final OFRpcTaskContext taskContext,
             final GetAllFlowStatisticsFromFlowTableInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetAllFlowStatisticsFromFlowTableInput, RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> task = 
-        new OFRpcTask<GetAllFlowStatisticsFromFlowTableInput, RpcResult<GetAllFlowStatisticsFromFlowTableOutput>>(taskContext, cookie, input) {
+        OFRpcTask<GetAllFlowStatisticsFromFlowTableInput, RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> task =
+                new OFRpcTask<GetAllFlowStatisticsFromFlowTableInput, RpcResult<GetAllFlowStatisticsFromFlowTableOutput>>(taskContext, cookie, input) {
 
-                @Override
-                public ListenableFuture<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> call() throws Exception {
-                    final SettableFuture<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> result = SettableFuture.create();
+                    @Override
+                    public ListenableFuture<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> call() throws Exception {
+                        final SettableFuture<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> result = SettableFuture.create();
 
                         final Long xid = taskContext.getSession().getNextXid();
 
@@ -1304,280 +1308,280 @@ public abstract class OFRpcTaskFactory {
                         MultipartRequestFlowCaseBuilder multipartRequestFlowCaseBuilder = new MultipartRequestFlowCaseBuilder();
                         multipartRequestFlowCaseBuilder.setMultipartRequestFlow(mprFlowRequestBuilder.build());
 
-                        MultipartRequestInputBuilder mprInput = 
+                        MultipartRequestInputBuilder mprInput =
                                 createMultipartHeader(MultipartType.OFPMPFLOW, taskContext, xid);
                         mprInput.setMultipartRequestBody(multipartRequestFlowCaseBuilder.build());
                         Future<RpcResult<Void>> resultFromOFLib = getMessageService()
                                 .multipartRequest(mprInput.build(), getCookie());
                         ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                        
+
                         Futures.addCallback(resultLib, new ResultCallback<GetAllFlowStatisticsFromFlowTableOutput>(result) {
                             @Override
                             public GetAllFlowStatisticsFromFlowTableOutput createResult() {
-                                GetAllFlowStatisticsFromFlowTableOutputBuilder allFlowStatsFromFlowTableBuilder = 
+                                GetAllFlowStatisticsFromFlowTableOutputBuilder allFlowStatsFromFlowTableBuilder =
                                         new GetAllFlowStatisticsFromFlowTableOutputBuilder()
-                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
                                 return allFlowStatsFromFlowTableBuilder.build();
                             }
                         });
                         return result;
                     }
-        };
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
      * @param cookie
      * @return task
      */
-    public static OFRpcTask<GetAllFlowsStatisticsFromAllFlowTablesInput, RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> 
-                                                    createGetAllFlowsStatisticsFromAllFlowTablesTask(
-            final OFRpcTaskContext taskContext, 
+    public static OFRpcTask<GetAllFlowsStatisticsFromAllFlowTablesInput, RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>>
+    createGetAllFlowsStatisticsFromAllFlowTablesTask(
+            final OFRpcTaskContext taskContext,
             final GetAllFlowsStatisticsFromAllFlowTablesInput input,
             SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetAllFlowsStatisticsFromAllFlowTablesInput, 
-        RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> task = 
-        new OFRpcTask<GetAllFlowsStatisticsFromAllFlowTablesInput, 
-        RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>>(taskContext, cookie, input) {
+        OFRpcTask<GetAllFlowsStatisticsFromAllFlowTablesInput,
+                RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> task =
+                new OFRpcTask<GetAllFlowsStatisticsFromAllFlowTablesInput,
+                        RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>>(taskContext, cookie, input) {
 
-            @Override
-            public ListenableFuture<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> call() throws Exception {
-                final SettableFuture<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> result = SettableFuture.create();
-                
-                    final Long xid = taskContext.getSession().getNextXid();
-                    
-                 // Create multipart request body for fetch all the group stats
-                    MultipartRequestFlowCaseBuilder multipartRequestFlowCaseBuilder = 
-                            new MultipartRequestFlowCaseBuilder();
-                    MultipartRequestFlowBuilder mprFlowRequestBuilder = 
-                            new MultipartRequestFlowBuilder();
-                    mprFlowRequestBuilder.setTableId(OFConstants.OFPTT_ALL);
-                    mprFlowRequestBuilder.setOutPort(OFConstants.OFPP_ANY);
-                    mprFlowRequestBuilder.setOutGroup(OFConstants.OFPG_ANY);
-                    mprFlowRequestBuilder.setCookie(OFConstants.DEFAULT_COOKIE);
-                    mprFlowRequestBuilder.setCookieMask(OFConstants.DEFAULT_COOKIE_MASK);
-                    FlowCreatorUtil.setWildcardedFlowMatch(taskContext.getSession()
-                            .getPrimaryConductor().getVersion(), mprFlowRequestBuilder);
-                    
-                    MultipartRequestInputBuilder mprInput = 
-                            createMultipartHeader(MultipartType.OFPMPFLOW, taskContext, xid);
-                    multipartRequestFlowCaseBuilder.setMultipartRequestFlow(mprFlowRequestBuilder.build());
-                    mprInput.setMultipartRequestBody(multipartRequestFlowCaseBuilder.build());
-                    Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                            .multipartRequest(mprInput.build(), getCookie());
-                    ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                    
-                    Futures.addCallback(resultLib, new ResultCallback<GetAllFlowsStatisticsFromAllFlowTablesOutput>(result) {
-                        @Override
-                        public GetAllFlowsStatisticsFromAllFlowTablesOutput createResult() {
-                            GetAllFlowsStatisticsFromAllFlowTablesOutputBuilder allFlowStatsFromAllFlowTableBuilder = 
-                                    new GetAllFlowsStatisticsFromAllFlowTablesOutputBuilder()
-                            .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                            return allFlowStatsFromAllFlowTableBuilder.build();
-                        }
-                    });
-                    return result;
-                }
-        };
+                    @Override
+                    public ListenableFuture<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> call() throws Exception {
+                        final SettableFuture<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> result = SettableFuture.create();
+
+                        final Long xid = taskContext.getSession().getNextXid();
+
+                        // Create multipart request body for fetch all the group stats
+                        MultipartRequestFlowCaseBuilder multipartRequestFlowCaseBuilder =
+                                new MultipartRequestFlowCaseBuilder();
+                        MultipartRequestFlowBuilder mprFlowRequestBuilder =
+                                new MultipartRequestFlowBuilder();
+                        mprFlowRequestBuilder.setTableId(OFConstants.OFPTT_ALL);
+                        mprFlowRequestBuilder.setOutPort(OFConstants.OFPP_ANY);
+                        mprFlowRequestBuilder.setOutGroup(OFConstants.OFPG_ANY);
+                        mprFlowRequestBuilder.setCookie(OFConstants.DEFAULT_COOKIE);
+                        mprFlowRequestBuilder.setCookieMask(OFConstants.DEFAULT_COOKIE_MASK);
+                        FlowCreatorUtil.setWildcardedFlowMatch(taskContext.getSession()
+                                .getPrimaryConductor().getVersion(), mprFlowRequestBuilder);
+
+                        MultipartRequestInputBuilder mprInput =
+                                createMultipartHeader(MultipartType.OFPMPFLOW, taskContext, xid);
+                        multipartRequestFlowCaseBuilder.setMultipartRequestFlow(mprFlowRequestBuilder.build());
+                        mprInput.setMultipartRequestBody(multipartRequestFlowCaseBuilder.build());
+                        Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                .multipartRequest(mprInput.build(), getCookie());
+                        ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        Futures.addCallback(resultLib, new ResultCallback<GetAllFlowsStatisticsFromAllFlowTablesOutput>(result) {
+                            @Override
+                            public GetAllFlowsStatisticsFromAllFlowTablesOutput createResult() {
+                                GetAllFlowsStatisticsFromAllFlowTablesOutputBuilder allFlowStatsFromAllFlowTableBuilder =
+                                        new GetAllFlowsStatisticsFromAllFlowTablesOutputBuilder()
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                return allFlowStatsFromAllFlowTableBuilder.build();
+                            }
+                        });
+                        return result;
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
      * @param cookie
      * @return task
      */
-    public static OFRpcTask<GetFlowStatisticsFromFlowTableInput, RpcResult<GetFlowStatisticsFromFlowTableOutput>> 
-                                                    createGetFlowStatisticsFromFlowTableTask(
-            final OFRpcTaskContext taskContext, 
-            final GetFlowStatisticsFromFlowTableInput input,SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetFlowStatisticsFromFlowTableInput, RpcResult<GetFlowStatisticsFromFlowTableOutput>> task = 
-        new OFRpcTask<GetFlowStatisticsFromFlowTableInput, RpcResult<GetFlowStatisticsFromFlowTableOutput>>(taskContext, cookie, input) {
-
-            @Override
-            public ListenableFuture<RpcResult<GetFlowStatisticsFromFlowTableOutput>> call() throws Exception {
-                final SettableFuture<RpcResult<GetFlowStatisticsFromFlowTableOutput>> result = SettableFuture.create();
-                
-                    final Long xid = taskContext.getSession().getNextXid();
-                    
-                 // Create multipart request body for fetch all the group stats
-                    MultipartRequestFlowCaseBuilder multipartRequestFlowCaseBuilder = new MultipartRequestFlowCaseBuilder();
-                    MultipartRequestFlowBuilder mprFlowRequestBuilder = new MultipartRequestFlowBuilder();
-                    mprFlowRequestBuilder.setTableId(input.getTableId());
-
-                    if (input.getOutPort() != null)
-                        mprFlowRequestBuilder.setOutPort(input.getOutPort().longValue());
-                    else
-                        mprFlowRequestBuilder.setOutPort(OFConstants.OFPP_ANY);
+    public static OFRpcTask<GetFlowStatisticsFromFlowTableInput, RpcResult<GetFlowStatisticsFromFlowTableOutput>>
+    createGetFlowStatisticsFromFlowTableTask(
+            final OFRpcTaskContext taskContext,
+            final GetFlowStatisticsFromFlowTableInput input, SwitchConnectionDistinguisher cookie) {
+        OFRpcTask<GetFlowStatisticsFromFlowTableInput, RpcResult<GetFlowStatisticsFromFlowTableOutput>> task =
+                new OFRpcTask<GetFlowStatisticsFromFlowTableInput, RpcResult<GetFlowStatisticsFromFlowTableOutput>>(taskContext, cookie, input) {
 
-                    if (input.getOutGroup() != null)
-                        mprFlowRequestBuilder.setOutGroup(input.getOutGroup());
-                    else
-                        mprFlowRequestBuilder.setOutGroup(OFConstants.OFPG_ANY);
+                    @Override
+                    public ListenableFuture<RpcResult<GetFlowStatisticsFromFlowTableOutput>> call() throws Exception {
+                        final SettableFuture<RpcResult<GetFlowStatisticsFromFlowTableOutput>> result = SettableFuture.create();
 
-                    if (input.getCookie() != null)
-                        mprFlowRequestBuilder.setCookie(input.getCookie().getValue());
-                    else
-                        mprFlowRequestBuilder.setCookie(OFConstants.DEFAULT_COOKIE);
+                        final Long xid = taskContext.getSession().getNextXid();
 
-                    if (input.getCookieMask() != null)
-                        mprFlowRequestBuilder.setCookieMask(input.getCookieMask().getValue());
-                    else
-                        mprFlowRequestBuilder.setCookieMask(OFConstants.DEFAULT_COOKIE_MASK);
+                        // Create multipart request body for fetch all the group stats
+                        MultipartRequestFlowCaseBuilder multipartRequestFlowCaseBuilder = new MultipartRequestFlowCaseBuilder();
+                        MultipartRequestFlowBuilder mprFlowRequestBuilder = new MultipartRequestFlowBuilder();
+                        mprFlowRequestBuilder.setTableId(input.getTableId());
+
+                        if (input.getOutPort() != null)
+                            mprFlowRequestBuilder.setOutPort(input.getOutPort().longValue());
+                        else
+                            mprFlowRequestBuilder.setOutPort(OFConstants.OFPP_ANY);
+
+                        if (input.getOutGroup() != null)
+                            mprFlowRequestBuilder.setOutGroup(input.getOutGroup());
+                        else
+                            mprFlowRequestBuilder.setOutGroup(OFConstants.OFPG_ANY);
+
+                        if (input.getCookie() != null)
+                            mprFlowRequestBuilder.setCookie(input.getCookie().getValue());
+                        else
+                            mprFlowRequestBuilder.setCookie(OFConstants.DEFAULT_COOKIE);
+
+                        if (input.getCookieMask() != null)
+                            mprFlowRequestBuilder.setCookieMask(input.getCookieMask().getValue());
+                        else
+                            mprFlowRequestBuilder.setCookieMask(OFConstants.DEFAULT_COOKIE_MASK);
+
+                        // convert and inject match
+                        MatchReactor.getInstance().convert(input.getMatch(), taskContext.getSession()
+                                        .getPrimaryConductor().getVersion(), mprFlowRequestBuilder,
+                                taskContext.getSession().getFeatures().getDatapathId());
+
+                        // Set request body to main multipart request
+                        multipartRequestFlowCaseBuilder.setMultipartRequestFlow(mprFlowRequestBuilder.build());
+                        MultipartRequestInputBuilder mprInput =
+                                createMultipartHeader(MultipartType.OFPMPFLOW, taskContext, xid);
+                        mprInput.setMultipartRequestBody(multipartRequestFlowCaseBuilder.build());
+                        Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                .multipartRequest(mprInput.build(), getCookie());
+                        ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
 
-                    // convert and inject match
-                    MatchReactor.getInstance().convert(input.getMatch(), taskContext.getSession()
-                            .getPrimaryConductor().getVersion(), mprFlowRequestBuilder,
-                            taskContext.getSession().getFeatures().getDatapathId());
-
-                    // Set request body to main multipart request
-                    multipartRequestFlowCaseBuilder.setMultipartRequestFlow(mprFlowRequestBuilder.build());
-                    MultipartRequestInputBuilder mprInput = 
-                            createMultipartHeader(MultipartType.OFPMPFLOW, taskContext, xid);
-                    mprInput.setMultipartRequestBody(multipartRequestFlowCaseBuilder.build());
-                    Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                            .multipartRequest(mprInput.build(), getCookie());
-                    ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                    
-                    Futures.addCallback(resultLib, new ResultCallback<GetFlowStatisticsFromFlowTableOutput>(result) {
-                        @Override
-                        public GetFlowStatisticsFromFlowTableOutput createResult() {
-                            GetFlowStatisticsFromFlowTableOutputBuilder flowStatsFromFlowTableBuilder = 
-                                    new GetFlowStatisticsFromFlowTableOutputBuilder()
-                            .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                            return flowStatsFromFlowTableBuilder.build();
-                        }
-                    });
-                    return result;
-                }
-        };
+                        Futures.addCallback(resultLib, new ResultCallback<GetFlowStatisticsFromFlowTableOutput>(result) {
+                            @Override
+                            public GetFlowStatisticsFromFlowTableOutput createResult() {
+                                GetFlowStatisticsFromFlowTableOutputBuilder flowStatsFromFlowTableBuilder =
+                                        new GetFlowStatisticsFromFlowTableOutputBuilder()
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                return flowStatsFromFlowTableBuilder.build();
+                            }
+                        });
+                        return result;
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
      * @param cookie
      * @return task
      */
-    public static OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> 
-                                                    createGetAggregateFlowStatisticsFromFlowTableForAllFlowsTask(
-            final OFRpcTaskContext taskContext, 
-            final GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input,SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> task = 
-        new OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>>(taskContext, cookie, input) {
+    public static OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>>
+    createGetAggregateFlowStatisticsFromFlowTableForAllFlowsTask(
+            final OFRpcTaskContext taskContext,
+            final GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input, SwitchConnectionDistinguisher cookie) {
+        OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> task =
+                new OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>>(taskContext, cookie, input) {
 
-        @Override
-        public ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> call() throws Exception {
-            final SettableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> result = SettableFuture.create();
-            
-                final Long xid = taskContext.getSession().getNextXid();
-                
-             // Create multipart request body for fetch all the group stats
-                MultipartRequestAggregateCaseBuilder multipartRequestAggregateCaseBuilder = new MultipartRequestAggregateCaseBuilder();
-                MultipartRequestAggregateBuilder mprAggregateRequestBuilder = new MultipartRequestAggregateBuilder();
-                mprAggregateRequestBuilder.setTableId(input.getTableId().getValue());
-                mprAggregateRequestBuilder.setOutPort(OFConstants.OFPP_ANY);
-                mprAggregateRequestBuilder.setOutGroup(OFConstants.OFPG_ANY);
-                mprAggregateRequestBuilder.setCookie(OFConstants.DEFAULT_COOKIE);
-                mprAggregateRequestBuilder.setCookieMask(OFConstants.DEFAULT_COOKIE_MASK);
-
-                FlowCreatorUtil.setWildcardedFlowMatch(taskContext.getSession()
-                        .getPrimaryConductor().getVersion(), mprAggregateRequestBuilder);
-
-                // Set request body to main multipart request
-                multipartRequestAggregateCaseBuilder.setMultipartRequestAggregate(mprAggregateRequestBuilder.build());
-                MultipartRequestInputBuilder mprInput = 
-                        createMultipartHeader(MultipartType.OFPMPAGGREGATE, taskContext, xid);
-                mprInput.setMultipartRequestBody(multipartRequestAggregateCaseBuilder.build());
-                Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                        .multipartRequest(mprInput.build(), getCookie());
-                ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                
-                Futures.addCallback(resultLib, new ResultCallback<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>(result) {
                     @Override
-                    public GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput createResult() {
-                        GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutputBuilder flowStatsFromFlowTableBuilder = 
-                                new GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutputBuilder()
-                        .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                        return flowStatsFromFlowTableBuilder.build();
+                    public ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> call() throws Exception {
+                        final SettableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> result = SettableFuture.create();
+
+                        final Long xid = taskContext.getSession().getNextXid();
+
+                        // Create multipart request body for fetch all the group stats
+                        MultipartRequestAggregateCaseBuilder multipartRequestAggregateCaseBuilder = new MultipartRequestAggregateCaseBuilder();
+                        MultipartRequestAggregateBuilder mprAggregateRequestBuilder = new MultipartRequestAggregateBuilder();
+                        mprAggregateRequestBuilder.setTableId(input.getTableId().getValue());
+                        mprAggregateRequestBuilder.setOutPort(OFConstants.OFPP_ANY);
+                        mprAggregateRequestBuilder.setOutGroup(OFConstants.OFPG_ANY);
+                        mprAggregateRequestBuilder.setCookie(OFConstants.DEFAULT_COOKIE);
+                        mprAggregateRequestBuilder.setCookieMask(OFConstants.DEFAULT_COOKIE_MASK);
+
+                        FlowCreatorUtil.setWildcardedFlowMatch(taskContext.getSession()
+                                .getPrimaryConductor().getVersion(), mprAggregateRequestBuilder);
+
+                        // Set request body to main multipart request
+                        multipartRequestAggregateCaseBuilder.setMultipartRequestAggregate(mprAggregateRequestBuilder.build());
+                        MultipartRequestInputBuilder mprInput =
+                                createMultipartHeader(MultipartType.OFPMPAGGREGATE, taskContext, xid);
+                        mprInput.setMultipartRequestBody(multipartRequestAggregateCaseBuilder.build());
+                        Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                .multipartRequest(mprInput.build(), getCookie());
+                        ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        Futures.addCallback(resultLib, new ResultCallback<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>(result) {
+                            @Override
+                            public GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput createResult() {
+                                GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutputBuilder flowStatsFromFlowTableBuilder =
+                                        new GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutputBuilder()
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                return flowStatsFromFlowTableBuilder.build();
+                            }
+                        });
+                        return result;
                     }
-                });
-                return result;
-            }
-        };
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
      * @param cookie
      * @return task
      */
-    public static OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> 
-                                                    createGetAggregateFlowStatisticsFromFlowTableForGivenMatchTask(
-            final OFRpcTaskContext taskContext, 
-            final GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput input,SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> task = 
-        new OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>>(taskContext, cookie, input) {
+    public static OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>>
+    createGetAggregateFlowStatisticsFromFlowTableForGivenMatchTask(
+            final OFRpcTaskContext taskContext,
+            final GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput input, SwitchConnectionDistinguisher cookie) {
+        OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> task =
+                new OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>>(taskContext, cookie, input) {
 
-        @Override
-        public ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> call() throws Exception {
-            final SettableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> result = SettableFuture.create();
-            
-                final Long xid = taskContext.getSession().getNextXid();
-                
-                MultipartRequestAggregateCaseBuilder multipartRequestAggregateCaseBuilder = new MultipartRequestAggregateCaseBuilder();
-                MultipartRequestAggregateBuilder mprAggregateRequestBuilder = new MultipartRequestAggregateBuilder();
-                mprAggregateRequestBuilder.setTableId(input.getTableId());
-                mprAggregateRequestBuilder.setOutPort(input.getOutPort().longValue());
-             // TODO: repeating code
-                if (taskContext.getSession().getPrimaryConductor().getVersion() == 
-                                                                OFConstants.OFP_VERSION_1_3) {
-                    mprAggregateRequestBuilder.setCookie(input.getCookie().getValue());
-                    mprAggregateRequestBuilder.setCookieMask(input.getCookieMask().getValue());
-                    mprAggregateRequestBuilder.setOutGroup(input.getOutGroup());
-                } else {
-                    mprAggregateRequestBuilder.setOutGroup(OFConstants.OFPG_ANY);
-                    mprAggregateRequestBuilder.setCookie(OFConstants.DEFAULT_COOKIE);
-                    mprAggregateRequestBuilder.setCookieMask(OFConstants.DEFAULT_COOKIE_MASK);
-                }
-                
-                MatchReactor.getInstance().convert(input.getMatch(), taskContext.getSession()
-                        .getPrimaryConductor().getVersion(), mprAggregateRequestBuilder,
-                        taskContext.getSession().getFeatures().getDatapathId());
-
-                FlowCreatorUtil.setWildcardedFlowMatch(taskContext.getSession()
-                        .getPrimaryConductor().getVersion(), mprAggregateRequestBuilder);
-
-                // Set request body to main multipart request
-                multipartRequestAggregateCaseBuilder.setMultipartRequestAggregate(mprAggregateRequestBuilder.build());
-                MultipartRequestInputBuilder mprInput = 
-                        createMultipartHeader(MultipartType.OFPMPAGGREGATE, taskContext, xid);
-                mprInput.setMultipartRequestBody(multipartRequestAggregateCaseBuilder.build());
-                Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                        .multipartRequest(mprInput.build(), getCookie());
-                ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                
-                Futures.addCallback(resultLib, new ResultCallback<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>(result) {
                     @Override
-                    public GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput createResult() {
-                        GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutputBuilder aggregFlowStatsFromFlowTableBuilder = 
-                                new GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutputBuilder()
-                        .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                        return aggregFlowStatsFromFlowTableBuilder.build();
+                    public ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> call() throws Exception {
+                        final SettableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> result = SettableFuture.create();
+
+                        final Long xid = taskContext.getSession().getNextXid();
+
+                        MultipartRequestAggregateCaseBuilder multipartRequestAggregateCaseBuilder = new MultipartRequestAggregateCaseBuilder();
+                        MultipartRequestAggregateBuilder mprAggregateRequestBuilder = new MultipartRequestAggregateBuilder();
+                        mprAggregateRequestBuilder.setTableId(input.getTableId());
+                        mprAggregateRequestBuilder.setOutPort(input.getOutPort().longValue());
+                        // TODO: repeating code
+                        if (taskContext.getSession().getPrimaryConductor().getVersion() ==
+                                OFConstants.OFP_VERSION_1_3) {
+                            mprAggregateRequestBuilder.setCookie(input.getCookie().getValue());
+                            mprAggregateRequestBuilder.setCookieMask(input.getCookieMask().getValue());
+                            mprAggregateRequestBuilder.setOutGroup(input.getOutGroup());
+                        } else {
+                            mprAggregateRequestBuilder.setOutGroup(OFConstants.OFPG_ANY);
+                            mprAggregateRequestBuilder.setCookie(OFConstants.DEFAULT_COOKIE);
+                            mprAggregateRequestBuilder.setCookieMask(OFConstants.DEFAULT_COOKIE_MASK);
+                        }
+
+                        MatchReactor.getInstance().convert(input.getMatch(), taskContext.getSession()
+                                        .getPrimaryConductor().getVersion(), mprAggregateRequestBuilder,
+                                taskContext.getSession().getFeatures().getDatapathId());
+
+                        FlowCreatorUtil.setWildcardedFlowMatch(taskContext.getSession()
+                                .getPrimaryConductor().getVersion(), mprAggregateRequestBuilder);
+
+                        // Set request body to main multipart request
+                        multipartRequestAggregateCaseBuilder.setMultipartRequestAggregate(mprAggregateRequestBuilder.build());
+                        MultipartRequestInputBuilder mprInput =
+                                createMultipartHeader(MultipartType.OFPMPAGGREGATE, taskContext, xid);
+                        mprInput.setMultipartRequestBody(multipartRequestAggregateCaseBuilder.build());
+                        Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                .multipartRequest(mprInput.build(), getCookie());
+                        ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        Futures.addCallback(resultLib, new ResultCallback<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>(result) {
+                            @Override
+                            public GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput createResult() {
+                                GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutputBuilder aggregFlowStatsFromFlowTableBuilder =
+                                        new GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutputBuilder()
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                return aggregFlowStatsFromFlowTableBuilder.build();
+                            }
+                        });
+                        return result;
                     }
-                });
-                return result;
-            }
-        };
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -1585,45 +1589,45 @@ public abstract class OFRpcTaskFactory {
      * @return task
      */
     public static OFRpcTask<GetFlowTablesStatisticsInput, RpcResult<GetFlowTablesStatisticsOutput>> createGetFlowTablesStatisticsTask(
-            final OFRpcTaskContext taskContext, final GetFlowTablesStatisticsInput input,SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetFlowTablesStatisticsInput, RpcResult<GetFlowTablesStatisticsOutput>> task = 
-        new OFRpcTask<GetFlowTablesStatisticsInput, RpcResult<GetFlowTablesStatisticsOutput>>(taskContext, cookie, input) {
+            final OFRpcTaskContext taskContext, final GetFlowTablesStatisticsInput input, SwitchConnectionDistinguisher cookie) {
+        OFRpcTask<GetFlowTablesStatisticsInput, RpcResult<GetFlowTablesStatisticsOutput>> task =
+                new OFRpcTask<GetFlowTablesStatisticsInput, RpcResult<GetFlowTablesStatisticsOutput>>(taskContext, cookie, input) {
 
-        @Override
-        public ListenableFuture<RpcResult<GetFlowTablesStatisticsOutput>> call() throws Exception {
-            final SettableFuture<RpcResult<GetFlowTablesStatisticsOutput>> result = SettableFuture.create();
-            
-                final Long xid = taskContext.getSession().getNextXid();
-                
-             // Create multipart request body for fetch all the group stats
-                MultipartRequestTableCaseBuilder multipartRequestTableCaseBuilder = new MultipartRequestTableCaseBuilder();
-                MultipartRequestTableBuilder multipartRequestTableBuilder = new MultipartRequestTableBuilder();
-                multipartRequestTableBuilder.setEmpty(true);
-                multipartRequestTableCaseBuilder.setMultipartRequestTable(multipartRequestTableBuilder.build());
-
-                // Set request body to main multipart request
-                MultipartRequestInputBuilder mprInput = 
-                        createMultipartHeader(MultipartType.OFPMPTABLE, taskContext, xid);
-                mprInput.setMultipartRequestBody(multipartRequestTableCaseBuilder.build());
-                Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                        .multipartRequest(mprInput.build(), getCookie());
-                ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                
-                Futures.addCallback(resultLib, new ResultCallback<GetFlowTablesStatisticsOutput>(result) {
                     @Override
-                    public GetFlowTablesStatisticsOutput createResult() {
-                        GetFlowTablesStatisticsOutputBuilder flowTableStatsBuilder = 
-                                new GetFlowTablesStatisticsOutputBuilder()
-                        .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                        return flowTableStatsBuilder.build();
+                    public ListenableFuture<RpcResult<GetFlowTablesStatisticsOutput>> call() throws Exception {
+                        final SettableFuture<RpcResult<GetFlowTablesStatisticsOutput>> result = SettableFuture.create();
+
+                        final Long xid = taskContext.getSession().getNextXid();
+
+                        // Create multipart request body for fetch all the group stats
+                        MultipartRequestTableCaseBuilder multipartRequestTableCaseBuilder = new MultipartRequestTableCaseBuilder();
+                        MultipartRequestTableBuilder multipartRequestTableBuilder = new MultipartRequestTableBuilder();
+                        multipartRequestTableBuilder.setEmpty(true);
+                        multipartRequestTableCaseBuilder.setMultipartRequestTable(multipartRequestTableBuilder.build());
+
+                        // Set request body to main multipart request
+                        MultipartRequestInputBuilder mprInput =
+                                createMultipartHeader(MultipartType.OFPMPTABLE, taskContext, xid);
+                        mprInput.setMultipartRequestBody(multipartRequestTableCaseBuilder.build());
+                        Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                .multipartRequest(mprInput.build(), getCookie());
+                        ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        Futures.addCallback(resultLib, new ResultCallback<GetFlowTablesStatisticsOutput>(result) {
+                            @Override
+                            public GetFlowTablesStatisticsOutput createResult() {
+                                GetFlowTablesStatisticsOutputBuilder flowTableStatsBuilder =
+                                        new GetFlowTablesStatisticsOutputBuilder()
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                return flowTableStatsBuilder.build();
+                            }
+                        });
+                        return result;
                     }
-                });
-                return result;
-            }
-        };
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -1631,47 +1635,47 @@ public abstract class OFRpcTaskFactory {
      * @return task
      */
     public static OFRpcTask<GetAllQueuesStatisticsFromAllPortsInput, RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> createGetAllQueuesStatisticsFromAllPortsTask(
-            final OFRpcTaskContext taskContext, final GetAllQueuesStatisticsFromAllPortsInput input,SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetAllQueuesStatisticsFromAllPortsInput, RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> task = 
-        new OFRpcTask<GetAllQueuesStatisticsFromAllPortsInput, RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>>(taskContext, cookie, input) {
+            final OFRpcTaskContext taskContext, final GetAllQueuesStatisticsFromAllPortsInput input, SwitchConnectionDistinguisher cookie) {
+        OFRpcTask<GetAllQueuesStatisticsFromAllPortsInput, RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> task =
+                new OFRpcTask<GetAllQueuesStatisticsFromAllPortsInput, RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>>(taskContext, cookie, input) {
 
-        @Override
-        public ListenableFuture<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> call() throws Exception {
-            final SettableFuture<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> result = SettableFuture.create();
-            
-            final Long xid = taskContext.getSession().getNextXid();
-            
-            MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
-            MultipartRequestQueueBuilder mprQueueBuilder = new MultipartRequestQueueBuilder();
-            // Select all ports
-            mprQueueBuilder.setPortNo(OFConstants.OFPP_ANY);
-            // Select all the ports
-            mprQueueBuilder.setQueueId(OFConstants.OFPQ_ANY);
-            caseBuilder.setMultipartRequestQueue(mprQueueBuilder.build());
-
-            // Set request body to main multipart request
-            MultipartRequestInputBuilder mprInput = 
-                    createMultipartHeader(MultipartType.OFPMPQUEUE, taskContext, xid);
-            mprInput.setMultipartRequestBody(caseBuilder.build());
-            Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                    .multipartRequest(mprInput.build(), getCookie());
-            ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-            
-            Futures.addCallback(resultLib, new ResultCallback<GetAllQueuesStatisticsFromAllPortsOutput>(result) {
-                @Override
-                public GetAllQueuesStatisticsFromAllPortsOutput createResult() {
-                    GetAllQueuesStatisticsFromAllPortsOutputBuilder allQueueStatsBuilder = 
-                            new GetAllQueuesStatisticsFromAllPortsOutputBuilder()
-                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                    return allQueueStatsBuilder.build();
-                }
-            });
-            return result;
-        }
-       };
+                    @Override
+                    public ListenableFuture<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> call() throws Exception {
+                        final SettableFuture<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> result = SettableFuture.create();
+
+                        final Long xid = taskContext.getSession().getNextXid();
+
+                        MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
+                        MultipartRequestQueueBuilder mprQueueBuilder = new MultipartRequestQueueBuilder();
+                        // Select all ports
+                        mprQueueBuilder.setPortNo(OFConstants.OFPP_ANY);
+                        // Select all the ports
+                        mprQueueBuilder.setQueueId(OFConstants.OFPQ_ANY);
+                        caseBuilder.setMultipartRequestQueue(mprQueueBuilder.build());
+
+                        // Set request body to main multipart request
+                        MultipartRequestInputBuilder mprInput =
+                                createMultipartHeader(MultipartType.OFPMPQUEUE, taskContext, xid);
+                        mprInput.setMultipartRequestBody(caseBuilder.build());
+                        Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                .multipartRequest(mprInput.build(), getCookie());
+                        ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        Futures.addCallback(resultLib, new ResultCallback<GetAllQueuesStatisticsFromAllPortsOutput>(result) {
+                            @Override
+                            public GetAllQueuesStatisticsFromAllPortsOutput createResult() {
+                                GetAllQueuesStatisticsFromAllPortsOutputBuilder allQueueStatsBuilder =
+                                        new GetAllQueuesStatisticsFromAllPortsOutputBuilder()
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                return allQueueStatsBuilder.build();
+                            }
+                        });
+                        return result;
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -1679,49 +1683,49 @@ public abstract class OFRpcTaskFactory {
      * @return task
      */
     public static OFRpcTask<GetAllQueuesStatisticsFromGivenPortInput, RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> createGetAllQueuesStatisticsFromGivenPortTask(
-            final OFRpcTaskContext taskContext, final GetAllQueuesStatisticsFromGivenPortInput input,SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetAllQueuesStatisticsFromGivenPortInput, RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> task = 
-        new OFRpcTask<GetAllQueuesStatisticsFromGivenPortInput, RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>>(taskContext, cookie, input) {
+            final OFRpcTaskContext taskContext, final GetAllQueuesStatisticsFromGivenPortInput input, SwitchConnectionDistinguisher cookie) {
+        OFRpcTask<GetAllQueuesStatisticsFromGivenPortInput, RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> task =
+                new OFRpcTask<GetAllQueuesStatisticsFromGivenPortInput, RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>>(taskContext, cookie, input) {
 
-        @Override
-        public ListenableFuture<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> call() throws Exception {
-            final SettableFuture<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> result = SettableFuture.create();
-            
-            final Long xid = taskContext.getSession().getNextXid();
-            
-            MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
-            MultipartRequestQueueBuilder mprQueueBuilder = new MultipartRequestQueueBuilder();
-            // Select all queues
-            mprQueueBuilder.setQueueId(OFConstants.OFPQ_ANY);
-            // Select specific port
-            mprQueueBuilder.setPortNo(InventoryDataServiceUtil.portNumberfromNodeConnectorId(
-                    OpenflowVersion.get(taskContext.getSession().getFeatures().getVersion()),
-                    input.getNodeConnectorId()));
-            caseBuilder.setMultipartRequestQueue(mprQueueBuilder.build());
-
-            // Set request body to main multipart request
-            MultipartRequestInputBuilder mprInput = 
-                    createMultipartHeader(MultipartType.OFPMPQUEUE, taskContext, xid);
-            mprInput.setMultipartRequestBody(caseBuilder.build());
-            Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                    .multipartRequest(mprInput.build(), getCookie());
-            ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-            
-            Futures.addCallback(resultLib, new ResultCallback<GetAllQueuesStatisticsFromGivenPortOutput>(result) {
-                @Override
-                public GetAllQueuesStatisticsFromGivenPortOutput createResult() {
-                    GetAllQueuesStatisticsFromGivenPortOutputBuilder allQueueStatsBuilder = 
-                            new GetAllQueuesStatisticsFromGivenPortOutputBuilder()
-                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                    return allQueueStatsBuilder.build();
-                }
-            });
-            return result;
-        }
-       };
+                    @Override
+                    public ListenableFuture<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> call() throws Exception {
+                        final SettableFuture<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> result = SettableFuture.create();
+
+                        final Long xid = taskContext.getSession().getNextXid();
+
+                        MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
+                        MultipartRequestQueueBuilder mprQueueBuilder = new MultipartRequestQueueBuilder();
+                        // Select all queues
+                        mprQueueBuilder.setQueueId(OFConstants.OFPQ_ANY);
+                        // Select specific port
+                        mprQueueBuilder.setPortNo(InventoryDataServiceUtil.portNumberfromNodeConnectorId(
+                                OpenflowVersion.get(taskContext.getSession().getFeatures().getVersion()),
+                                input.getNodeConnectorId()));
+                        caseBuilder.setMultipartRequestQueue(mprQueueBuilder.build());
+
+                        // Set request body to main multipart request
+                        MultipartRequestInputBuilder mprInput =
+                                createMultipartHeader(MultipartType.OFPMPQUEUE, taskContext, xid);
+                        mprInput.setMultipartRequestBody(caseBuilder.build());
+                        Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                .multipartRequest(mprInput.build(), getCookie());
+                        ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        Futures.addCallback(resultLib, new ResultCallback<GetAllQueuesStatisticsFromGivenPortOutput>(result) {
+                            @Override
+                            public GetAllQueuesStatisticsFromGivenPortOutput createResult() {
+                                GetAllQueuesStatisticsFromGivenPortOutputBuilder allQueueStatsBuilder =
+                                        new GetAllQueuesStatisticsFromGivenPortOutputBuilder()
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                return allQueueStatsBuilder.build();
+                            }
+                        });
+                        return result;
+                    }
+                };
         return task;
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -1729,51 +1733,51 @@ public abstract class OFRpcTaskFactory {
      * @return task
      */
     public static OFRpcTask<GetQueueStatisticsFromGivenPortInput, RpcResult<GetQueueStatisticsFromGivenPortOutput>> createGetQueueStatisticsFromGivenPortTask(
-            final OFRpcTaskContext taskContext, final GetQueueStatisticsFromGivenPortInput input,SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<GetQueueStatisticsFromGivenPortInput, RpcResult<GetQueueStatisticsFromGivenPortOutput>> task = 
-        new OFRpcTask<GetQueueStatisticsFromGivenPortInput, RpcResult<GetQueueStatisticsFromGivenPortOutput>>(taskContext, cookie, input) {
+            final OFRpcTaskContext taskContext, final GetQueueStatisticsFromGivenPortInput input, SwitchConnectionDistinguisher cookie) {
+        OFRpcTask<GetQueueStatisticsFromGivenPortInput, RpcResult<GetQueueStatisticsFromGivenPortOutput>> task =
+                new OFRpcTask<GetQueueStatisticsFromGivenPortInput, RpcResult<GetQueueStatisticsFromGivenPortOutput>>(taskContext, cookie, input) {
 
-        @Override
-        public ListenableFuture<RpcResult<GetQueueStatisticsFromGivenPortOutput>> call() throws Exception {
-            final SettableFuture<RpcResult<GetQueueStatisticsFromGivenPortOutput>> result = SettableFuture.create();
-            
-            final Long xid = taskContext.getSession().getNextXid();
-            
-            MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
-            MultipartRequestQueueBuilder mprQueueBuilder = new MultipartRequestQueueBuilder();
-            // Select specific queue
-            mprQueueBuilder.setQueueId(input.getQueueId().getValue());
-            // Select specific port
-            mprQueueBuilder.setPortNo(InventoryDataServiceUtil.portNumberfromNodeConnectorId(
-                    OpenflowVersion.get(taskContext.getSession().getFeatures().getVersion()),
-                    input.getNodeConnectorId()));
-            caseBuilder.setMultipartRequestQueue(mprQueueBuilder.build());
-
-            // Set request body to main multipart request
-            MultipartRequestInputBuilder mprInput = 
-                    createMultipartHeader(MultipartType.OFPMPQUEUE, taskContext, xid);
-            mprInput.setMultipartRequestBody(caseBuilder.build());
-            Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                    .multipartRequest(mprInput.build(), getCookie());
-            ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-            
-            Futures.addCallback(resultLib, new ResultCallback<GetQueueStatisticsFromGivenPortOutput>(result) {
-                @Override
-                public GetQueueStatisticsFromGivenPortOutput createResult() {
-                    GetQueueStatisticsFromGivenPortOutputBuilder queueStatsFromPortBuilder = 
-                            new GetQueueStatisticsFromGivenPortOutputBuilder()
-                    .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                    return queueStatsFromPortBuilder.build();
-                }
-            });
-            return result;
-        }
-       };
+                    @Override
+                    public ListenableFuture<RpcResult<GetQueueStatisticsFromGivenPortOutput>> call() throws Exception {
+                        final SettableFuture<RpcResult<GetQueueStatisticsFromGivenPortOutput>> result = SettableFuture.create();
+
+                        final Long xid = taskContext.getSession().getNextXid();
+
+                        MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
+                        MultipartRequestQueueBuilder mprQueueBuilder = new MultipartRequestQueueBuilder();
+                        // Select specific queue
+                        mprQueueBuilder.setQueueId(input.getQueueId().getValue());
+                        // Select specific port
+                        mprQueueBuilder.setPortNo(InventoryDataServiceUtil.portNumberfromNodeConnectorId(
+                                OpenflowVersion.get(taskContext.getSession().getFeatures().getVersion()),
+                                input.getNodeConnectorId()));
+                        caseBuilder.setMultipartRequestQueue(mprQueueBuilder.build());
+
+                        // Set request body to main multipart request
+                        MultipartRequestInputBuilder mprInput =
+                                createMultipartHeader(MultipartType.OFPMPQUEUE, taskContext, xid);
+                        mprInput.setMultipartRequestBody(caseBuilder.build());
+                        Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                .multipartRequest(mprInput.build(), getCookie());
+                        ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        Futures.addCallback(resultLib, new ResultCallback<GetQueueStatisticsFromGivenPortOutput>(result) {
+                            @Override
+                            public GetQueueStatisticsFromGivenPortOutput createResult() {
+                                GetQueueStatisticsFromGivenPortOutputBuilder queueStatsFromPortBuilder =
+                                        new GetQueueStatisticsFromGivenPortOutputBuilder()
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                return queueStatsFromPortBuilder.build();
+                            }
+                        });
+                        return result;
+                    }
+                };
         return task;
     }
-    
-    static MultipartRequestInputBuilder createMultipartHeader(MultipartType multipart, 
-            OFRpcTaskContext taskContext, Long xid) {
+
+    static MultipartRequestInputBuilder createMultipartHeader(MultipartType multipart,
+                                                              OFRpcTaskContext taskContext, Long xid) {
         MultipartRequestInputBuilder mprInput = new MultipartRequestInputBuilder();
         mprInput.setType(multipart);
         mprInput.setVersion(taskContext.getSession().getPrimaryConductor().getVersion());
@@ -1781,9 +1785,9 @@ public abstract class OFRpcTaskFactory {
         mprInput.setFlags(new MultipartRequestFlags(false));
         return mprInput;
     }
-    
+
     private static abstract class ResultCallback<T> implements FutureCallback<RpcResult<Void>> {
-        
+
         private SettableFuture<RpcResult<T>> result;
 
         /**
@@ -1803,14 +1807,14 @@ public abstract class OFRpcTaskFactory {
         @Override
         public void onFailure(Throwable t) {
             result.set(RpcResultBuilder.<T>failed().withWarning(
-                            ErrorType.RPC,
-                            OFConstants.ERROR_TAG_TIMEOUT, 
-                            "something wrong happened", 
-                            OFConstants.APPLICATION_TAG, 
-                            "", t).build());
+                    ErrorType.RPC,
+                    OFConstants.ERROR_TAG_TIMEOUT,
+                    "something wrong happened",
+                    OFConstants.APPLICATION_TAG,
+                    "", t).build());
         }
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -1820,33 +1824,33 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<UpdatePortInput, RpcResult<UpdatePortOutput>> createUpdatePortTask(
             final OFRpcTaskContext taskContext, final UpdatePortInput input,
             final SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<UpdatePortInput, RpcResult<UpdatePortOutput>> task = 
+        OFRpcTask<UpdatePortInput, RpcResult<UpdatePortOutput>> task =
                 new OFRpcTask<UpdatePortInput, RpcResult<UpdatePortOutput>>(taskContext, cookie, input) {
-            
-            @Override
-            public ListenableFuture<RpcResult<UpdatePortOutput>> call() {
-                ListenableFuture<RpcResult<UpdatePortOutput>> result = SettableFuture.create();
-                final Long xid = taskContext.getSession().getNextXid();
-                Port inputPort = input.getUpdatedPort().getPort().getPort().get(0);
-                
-                    PortModInput ofPortModInput = PortConvertor.toPortModInput(inputPort, 
-                            taskContext.getSession().getPrimaryConductor().getVersion());
 
-                    PortModInputBuilder mdInput = new PortModInputBuilder(ofPortModInput);
-                    mdInput.setXid(xid);
+                    @Override
+                    public ListenableFuture<RpcResult<UpdatePortOutput>> call() {
+                        ListenableFuture<RpcResult<UpdatePortOutput>> result = SettableFuture.create();
+                        final Long xid = taskContext.getSession().getNextXid();
+                        Port inputPort = input.getUpdatedPort().getPort().getPort().get(0);
 
-                    Future<RpcResult<UpdatePortOutput>> resultFromOFLib = getMessageService()
-                            .portMod(mdInput.build(), cookie);
-                    result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+                        PortModInput ofPortModInput = PortConvertor.toPortModInput(inputPort,
+                                taskContext.getSession().getPrimaryConductor().getVersion());
+
+                        PortModInputBuilder mdInput = new PortModInputBuilder(ofPortModInput);
+                        mdInput.setXid(xid);
+
+                        Future<RpcResult<UpdatePortOutput>> resultFromOFLib = getMessageService()
+                                .portMod(mdInput.build(), cookie);
+                        result = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        return result;
+                    }
+                };
 
-                return result;
-            }
-        };
-        
         return task;
-        
+
     }
-    
+
     /**
      * @param taskContext
      * @param input
@@ -1856,44 +1860,74 @@ public abstract class OFRpcTaskFactory {
     public static OFRpcTask<UpdateTableInput, RpcResult<UpdateTableOutput>> createUpdateTableTask(
             final OFRpcTaskContext taskContext, final UpdateTableInput input,
             final SwitchConnectionDistinguisher cookie) {
-        OFRpcTask<UpdateTableInput, RpcResult<UpdateTableOutput>> task = 
+        OFRpcTask<UpdateTableInput, RpcResult<UpdateTableOutput>> task =
                 new OFRpcTask<UpdateTableInput, RpcResult<UpdateTableOutput>>(taskContext, cookie, input) {
-            
+
+                    @Override
+                    public ListenableFuture<RpcResult<UpdateTableOutput>> call() {
+                        final SettableFuture<RpcResult<UpdateTableOutput>> result = SettableFuture.create();
+
+                        final Long xid = taskContext.getSession().getNextXid();
+
+                        MultipartRequestTableFeaturesCaseBuilder caseBuilder = new MultipartRequestTableFeaturesCaseBuilder();
+                        MultipartRequestTableFeaturesBuilder requestBuilder = new MultipartRequestTableFeaturesBuilder();
+                        List<TableFeatures> ofTableFeatureList = TableFeaturesConvertor
+                                .toTableFeaturesRequest(input.getUpdatedTable());
+                        requestBuilder.setTableFeatures(ofTableFeatureList);
+                        caseBuilder.setMultipartRequestTableFeatures(requestBuilder.build());
+
+                        // Set request body to main multipart request
+                        MultipartRequestInputBuilder mprInput =
+                                createMultipartHeader(MultipartType.OFPMPTABLEFEATURES, taskContext, xid);
+                        mprInput.setMultipartRequestBody(caseBuilder.build());
+
+                        Future<RpcResult<Void>> resultFromOFLib = getMessageService()
+                                .multipartRequest(mprInput.build(), getCookie());
+                        ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+
+                        Futures.addCallback(resultLib, new ResultCallback<UpdateTableOutput>(result) {
+                            @Override
+                            public UpdateTableOutput createResult() {
+                                UpdateTableOutputBuilder queueStatsFromPortBuilder =
+                                        new UpdateTableOutputBuilder()
+                                                .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                                return queueStatsFromPortBuilder.build();
+                            }
+                        });
+                        return result;
+                    }
+                };
+        return task;
+    }
+
+    public static OFRpcTask<SetConfigInput, RpcResult<SetConfigOutput>> createSetNodeConfigTask(final OFRpcTaskContext taskContext,
+                                                                                                final SetConfigInput input,
+                                                                                                final SwitchConnectionDistinguisher cookie) {
+        OFRpcTask<SetConfigInput, RpcResult<SetConfigOutput>> rpcTask = new OFRpcTask<SetConfigInput, RpcResult<SetConfigOutput>>(taskContext, cookie, input) {
             @Override
-            public ListenableFuture<RpcResult<UpdateTableOutput>> call() {
-                final SettableFuture<RpcResult<UpdateTableOutput>> result = SettableFuture.create();
-                
+            public ListenableFuture<RpcResult<SetConfigOutput>> call() throws Exception {
+
+                final SettableFuture<RpcResult<SetConfigOutput>> result = SettableFuture.create();
                 final Long xid = taskContext.getSession().getNextXid();
-                
-                MultipartRequestTableFeaturesCaseBuilder caseBuilder = new MultipartRequestTableFeaturesCaseBuilder();
-                MultipartRequestTableFeaturesBuilder requestBuilder = new MultipartRequestTableFeaturesBuilder();
-                List<TableFeatures> ofTableFeatureList = TableFeaturesConvertor
-                        .toTableFeaturesRequest(input.getUpdatedTable());
-                requestBuilder.setTableFeatures(ofTableFeatureList);
-                caseBuilder.setMultipartRequestTableFeatures(requestBuilder.build());
-                
-                // Set request body to main multipart request
-                MultipartRequestInputBuilder mprInput = 
-                        createMultipartHeader(MultipartType.OFPMPTABLEFEATURES, taskContext, xid);
-                mprInput.setMultipartRequestBody(caseBuilder.build());
-                
-                Future<RpcResult<Void>> resultFromOFLib = getMessageService()
-                        .multipartRequest(mprInput.build(), getCookie());
-                ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-                
-                Futures.addCallback(resultLib, new ResultCallback<UpdateTableOutput>(result) {
+
+                SetConfigInputBuilder builder = new SetConfigInputBuilder();
+                SwitchConfigFlag flag = SwitchConfigFlag.valueOf(input.getFlag());
+                builder.setXid(xid);
+                builder.setFlags(flag);
+                builder.setMissSendLen(input.getMissSearchLength());
+                ListenableFuture<RpcResult<Void>> resultLib = JdkFutureAdapters.listenInPoolThread(taskContext.getSession().getPrimaryConductor().getConnectionAdapter().setConfig(builder.build()));
+                Futures.addCallback(resultLib, new ResultCallback<SetConfigOutput>(result) {
                     @Override
-                    public UpdateTableOutput createResult() {
-                        UpdateTableOutputBuilder queueStatsFromPortBuilder = 
-                                new UpdateTableOutputBuilder()
-                        .setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
-                        return queueStatsFromPortBuilder.build();
+                    public SetConfigOutput createResult() {
+                        SetConfigOutputBuilder setConfigOutputBuilder = new SetConfigOutputBuilder();
+                        setConfigOutputBuilder.setTransactionId(new TransactionId(BigInteger.valueOf(xid)));
+                        return setConfigOutputBuilder.build();
                     }
                 });
                 return result;
             }
         };
-        return task;
+        return rpcTask;
     }
-    
+
 }
index f93b9b5e32d6743c818dd01f7fabbd24f59cdc6b..e46a87b46ff878d32e22bd46fe225304cdee884e 100644 (file)
@@ -255,7 +255,6 @@ public class ConnectionConductorImplTest {
                 EventFactory.DEFAULT_VERSION, getFeatureResponseMsg()));
 
         int i = 1;
-        eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "setConfig"));
         eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
         eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
         eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
@@ -285,7 +284,6 @@ public class ConnectionConductorImplTest {
                 EventFactory.DEFAULT_VERSION, getFeatureResponseMsg()));
 
         int i = 1;
-        eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "setConfig"));
         eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
         eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
         eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
@@ -326,7 +324,6 @@ public class ConnectionConductorImplTest {
                 EventFactory.DEFAULT_VERSION, getFeatureResponseMsg()));
 
         int i = 1;
-        eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "setConfig"));
         eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
 
         executeNow();
@@ -365,7 +362,6 @@ public class ConnectionConductorImplTest {
                 EventFactory.DEFAULT_VERSION, getFeatureResponseMsg()));
 
         int i = 1;
-        eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "setConfig"));
         eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
 
         executeNow();