summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-02-03 12:21:14 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-02-03 12:21:14 +0900
commit78e3eba75d3f4c6c0f540d56360a9243df7f5efa (patch)
tree1732688029e77bc5055b60bb1c62db72763de3c5
parent89a3f010b8a66e395d399ec8ddd645d9ec54fcb2 (diff)
remove unused members in Datapath class
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/controller/controller.py6
-rw-r--r--ryu/controller/handler.py9
2 files changed, 7 insertions, 8 deletions
diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py
index 7d77bd4f..c370b5d0 100644
--- a/ryu/controller/controller.py
+++ b/ryu/controller/controller.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation.
+# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp>
#
# This program is free software: you can redistribute it and/or modify
@@ -87,9 +87,6 @@ class Datapath(object):
handler.HANDSHAKE_DISPATCHER,
weakref.ref(self))
- self.version_sent = None
- self.version_recv = None
- self.version_used = None
self.set_version(max(self.supported_ofp_version))
self.xid = random.randint(0, self.ofproto.MAX_XID)
self.id = None # datapath_id is unknown yet
@@ -153,7 +150,6 @@ class Datapath(object):
ev_thr = gevent.spawn(self._event_loop)
# send hello message immediately
- self.version_sent = self.ofproto.OFP_VERSION
hello = self.ofproto_parser.OFPHello(self)
self.send_msg(hello)
diff --git a/ryu/controller/handler.py b/ryu/controller/handler.py
index 5d754cbb..d6a33bed 100644
--- a/ryu/controller/handler.py
+++ b/ryu/controller/handler.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation.
+# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp>
#
# This program is free software: you can redistribute it and/or modify
@@ -155,8 +155,11 @@ class HandShakeHandler(object):
datapath.send_msg(error_msg)
return
- datapath.version = min(datapath.version_sent, msg.version)
- datapath.set_version(datapath.version)
+ # should we again send HELLO with the version that the switch
+ # supports?
+ # msg.version != datapath.ofproto.OFP_VERSION:
+
+ datapath.set_version(msg.version)
# now send feature
features_reqeust = datapath.ofproto_parser.OFPFeaturesRequest(datapath)