Packet in/out streaming from ofagent to core
Getting ready for packet streaming

Change-Id: I8d70d4d6ffbb23c0d7ab20582e9afac49f9f6461

Support flow_delete_strict

Change-Id: I5dab5f74a7daddcddfeb8691a3940347cb2fc11b

Packet out halfway plumbed

Change-Id: I799d3f59d42ac9de0563b5e6b9a0064fd895a6f6

refactored async_twisted

Change-Id: I68f8d12ce6fdbb70cee398f581669529b567d94d

Packet in pipeline and ofagent refactoring

Change-Id: I31ecbf7d52fdd18c3884b8d1870f673488f808df
diff --git a/ofagent/agent.py b/ofagent/agent.py
index 5196e6d..ab1b868 100644
--- a/ofagent/agent.py
+++ b/ofagent/agent.py
@@ -32,10 +32,16 @@
 
 class Agent(protocol.ClientFactory):
 
-    def __init__(self, controller_endpoint, datapath_id, rpc_stub,
+    def __init__(self,
+                 controller_endpoint,
+                 datapath_id,
+                 device_id,
+                 rpc_stub,
                  conn_retry_interval=1):
+
         self.controller_endpoint = controller_endpoint
         self.datapath_id = datapath_id
+        self.device_id = device_id
         self.rpc_stub = rpc_stub
         self.retry_interval = conn_retry_interval
 
@@ -46,6 +52,9 @@
         self.connected = False
         self.exiting = False
 
+    def get_device_id(self):
+        return self.device_id
+
     def run(self):
         if self.running:
             return
@@ -94,7 +103,7 @@
     def protocol(self):
         cxn = OpenFlowConnection(self)  # Low level message handler
         self.proto_handler = OpenFlowProtocolHandler(
-            self.datapath_id, self, cxn, self.rpc_stub)
+            self.datapath_id, self.device_id, self, cxn, self.rpc_stub)
         return cxn
 
     def clientConnectionFailed(self, connector, reason):
@@ -104,6 +113,9 @@
         log.error('client-connection-lost',
                   reason=reason, connector=connector)
 
+    def forward_packet_in(self, ofp_packet_in):
+        self.proto_handler.forward_packet_in(ofp_packet_in)
+
 
 if __name__ == '__main__':
     """Run this to test the agent for N concurrent sessions: