- #print self.name, ": obtain_port_correspondence ports:", self.pp2ofi
- return 0, self.pp2ofi
- except (requests.exceptions.RequestException, ValueError) as e:
- #ValueError in the case that JSON can not be decoded
+ # print self.name, ": obtain_port_correspondence ports:", self.pp2ofi
+ return self.pp2ofi
+ except requests.exceptions.RequestException as e:
+ error_text = type(e).__name__ + ": " + str(e)
+ self.logger.error("obtain_port_correspondence " + error_text)
+ raise openflow_conn.OpenflowconnConnectionException(error_text)
+ except ValueError as e:
+ # ValueError in the case that JSON can not be decoded