summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>2013-11-14 18:11:10 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-11-15 09:11:50 +0900
commitbe9ebaf43192f10ff62a7eff06a00df3cb82dd66 (patch)
treea6f60bc19b1778271fabc6fd20e36ee436c2af43
parent8aa44aa32432fc3f2cae2bf7d418d09326cce27e (diff)
dpset: remove dead code
this "dp_type" stuff has been there for almost 2 years without being used at all. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/controller/dp_type.py27
-rw-r--r--ryu/controller/dpset.py19
2 files changed, 0 insertions, 46 deletions
diff --git a/ryu/controller/dp_type.py b/ryu/controller/dp_type.py
deleted file mode 100644
index dc9704c0..00000000
--- 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 39422d52..259eed68 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)