ryu/app/rest_firewall.py: handling of no switch connection
This patch improves operation when there is no switch connection. Cc: Shivaram Mysore <shivaram.mysore@gmail.com> Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
committed by
FUJITA Tomonori
parent
c3c6ad3426
commit
67c4f23e4e
@@ -217,8 +217,11 @@ class FirewallOfsList(dict):
|
||||
super(FirewallOfsList, self).__init__()
|
||||
|
||||
def get_ofs(self, dp_id):
|
||||
if len(self) == 0:
|
||||
raise ValueError('firewall sw is not connected.')
|
||||
|
||||
dps = {}
|
||||
if dp_id == REST_ALL and len(self) > 0:
|
||||
if dp_id == REST_ALL:
|
||||
dps = self
|
||||
else:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user