X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=RO-plugin%2Fosm_ro_plugin%2Fopenflow_conn.py;h=c41d7bc892529a260a24be7e28251dd12f9dc92d;hb=HEAD;hp=17351b0d2cab66331f00e9844943425b82721140;hpb=80135b928ab442c38898750b4751480205b4affc;p=osm%2FRO.git diff --git a/RO-plugin/osm_ro_plugin/openflow_conn.py b/RO-plugin/osm_ro_plugin/openflow_conn.py index 17351b0d..c41d7bc8 100644 --- a/RO-plugin/osm_ro_plugin/openflow_conn.py +++ b/RO-plugin/osm_ro_plugin/openflow_conn.py @@ -15,11 +15,14 @@ # under the License. # ## -import logging + from http import HTTPStatus -from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError +import logging from uuid import uuid4 +from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError + + """ Implement an Abstract class 'OpenflowConn' and an engine 'SdnConnectorOpenFlow' used for base class for SDN plugings that implements a pro-active opeflow rules. @@ -283,9 +286,9 @@ class SdnConnectorOpenFlow(SdnConnectorBase): rules_to_delete = created_items.get("installed_rules_ids") or [] new_installed_rules_ids = [] error_list = [] + step = "Checking ports and network type compatibility" try: - step = "Checking ports and network type compatibility" if ifaces_nb < 2: pass elif net_type == "ELINE": @@ -366,7 +369,7 @@ class SdnConnectorOpenFlow(SdnConnectorBase): try: self.of_connector.del_flow(flow_id) except OpenflowConnNotFoundException: - pass + self.logger.exception("OpenflowConnNotFoundException occured.") except OpenflowConnException as e: error_text = "Cannot remove rule '{}': {}".format(flow_id, e) error_list.append(error_text)