this "dp_type" stuff has been there for almost 2 years
without being used at all.

Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
---
 ryu/controller/dp_type.py | 27 ---------------------------
 ryu/controller/dpset.py   | 19 -------------------
 2 files changed, 46 deletions(-)
 delete mode 100644 ryu/controller/dp_type.py

diff --git a/ryu/controller/dp_type.py b/ryu/controller/dp_type.py
deleted file mode 100644
index dc9704c..0000000
--- a/ryu/controller/dp_type.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
-# Copyright (C) 2012 Isaku Yamahata <yamahata at valinux co jp>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# datapath type
-# At this moment, this information is not used yet and unknown type is
-# defined as place-holder.
-# switches are categorized by its rolls and openflow controller may want to
-# handle switch differently depending on it role.
-#
-# unknown:
-#
-
-UNKNOWN = 'UNKNOWN'
diff --git a/ryu/controller/dpset.py b/ryu/controller/dpset.py
index 39422d5..259eed6 100644
--- a/ryu/controller/dpset.py
+++ b/ryu/controller/dpset.py
@@ -18,7 +18,6 @@ import logging
 
 from ryu.base import app_manager
 from ryu.controller import event
-from ryu.controller import dp_type
 from ryu.controller import handler
 from ryu.controller import ofp_event
 from ryu.controller.handler import set_ev_cls
@@ -88,10 +87,6 @@ class DPSet(app_manager.RyuApp):
         super(DPSet, self).__init__()
         self.name = 'dpset'
 
-        # dp registration and type setting can be occur in any order
-        # Sometimes the sw_type is set before dp connection
-        self.dp_types = {}
-
         self.dps = {}   # datapath_id => class Datapath
         self.port_state = {}  # datapath_id => ports
 
@@ -99,10 +94,6 @@ class DPSet(app_manager.RyuApp):
         assert dp.id is not None
         assert dp.id not in self.dps
 
-        dp_type_ = self.dp_types.pop(dp.id, None)
-        if dp_type_ is not None:
-            dp.dp_type = dp_type_
-
         self.dps[dp.id] = dp
         self.port_state[dp.id] = PortState()
         ev = EventDP(dp, True)
@@ -124,16 +115,6 @@ class DPSet(app_manager.RyuApp):
         if dp.id in self.dps:
             del self.dps[dp.id]
             del self.port_state[dp.id]
-            assert dp.id not in self.dp_types
-            self.dp_types[dp.id] = getattr(dp, 'dp_type', dp_type.UNKNOWN)
-
-    def set_type(self, dp_id, dp_type_=dp_type.UNKNOWN):
-        if dp_id in self.dps:
-            dp = self.dps[dp_id]
-            dp.dp_type = dp_type_
-        else:
-            assert dp_id not in self.dp_types
-            self.dp_types[dp_id] = dp_type_
 
     def get(self, dp_id):
         return self.dps.get(dp_id)
-- 
1.8.3.1


------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to