with static rules based on packet destination MAC address
"""
-import json
-import requests
import base64
+import json
import logging
+
from osm_ro_plugin.openflow_conn import (
OpenflowConn,
OpenflowConnConnectionException,
OpenflowConnUnexpectedResponse,
)
+import requests
# OpenflowConnException, OpenflowConnAuthException, OpenflowConnNotFoundException, \
# OpenflowConnConflictException, OpenflowConnNotSupportedException, OpenflowConnNotImplemented
self.logger.debug("get_of_switches " + error_text)
info = of_response.json()
- if type(info) != dict:
+ if not info.isinstance(dict):
self.logger.error(
"get_of_switches. Unexpected response, not a dict: %s", str(info)
)
info = of_response.json()
- if type(info) != dict:
+ if not info.isinstance(dict):
self.logger.error(
"get_of_rules. Unexpected response, not a dict: %s",
str(info),