quantum_adapter: exception when VM deletion

> Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 390, in run
>     result = self._run(*self.args, **self.kwargs)
>   File "/opt/stack/ryu/ryu/base/app_manager.py", line 86, in _event_loop
>     handler(ev)
>   File "/opt/stack/ryu/ryu/app/quantum_adapter.py", line 368, in dp_handler
>     ovs_switch.close()
> AttributeError: 'OVSSwitch' object has no attribute 'close'

This is legacy from the old code, so remove calling close method

Reported-by: Yoshihiro Kaneko <y.kaneko__0929@nifty.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Isaku Yamahata 2013-02-13 08:26:51 +09:00 committed by FUJITA Tomonori
parent b82c2909f1
commit e87f7d5be3

View File

@ -363,9 +363,7 @@ class QuantumAdapter(app_manager.RyuApp):
# can be disconnected for some reason.
# TODO: configuration needed to tell that this dp is really
# removed.
ovs_switch = self.dps.pop(dpid, None)
if ovs_switch:
ovs_switch.close()
self.dps.pop(dpid, None)
@handler.set_ev_cls(dpset.EventPortAdd)
def port_add_handler(self, ev):