Skip to content

Commit

Permalink
issue:4094251 PDR plugin resetting port: Expected status code is 202,…
Browse files Browse the repository at this point in the history
… not 200 (#263)
  • Loading branch information
vg12345 authored Sep 30, 2024
1 parent 5d9a699 commit c77b074
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def reset_port(self, port_name, port_guid):

# Perform reset
ret = self.ufm_client.reset_port(port_name, port_guid)
if not ret or ret.status_code != http.HTTPStatus.OK:
if not ret or ret.status_code != http.HTTPStatus.ACCEPTED:
self.logger.warning("Failed resetting port: %s... status_code= %s", port_name, ret.status_code)
return

Expand Down Expand Up @@ -338,9 +338,10 @@ def main_flow(self):
self.logger.error("Couldn't retrieve telemetry data")
else:
# Detect ports to be isolated or deisolated
self.logger.info("Starting telemetry data analysis")
issues = self.pdr_alg.analyze_telemetry_data(self.ports_data, ports_counters)
except (KeyError, TypeError, ValueError) as exception_error:
self.logger.error(f"failed to read information with error {exception_error}")
self.logger.error(f"Failed to read information with error {exception_error}")

# deal with reported new issues
for issue in issues or []:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PortData:
"""
Represents the port data.
"""
#pylint: disable=too-many-arguments
#pylint: disable=too-many-positional-arguments,too-many-arguments
def __init__(self, port_name=None, port_num=None, peer=None, node_type=None, active_speed=None, port_width=None, port_guid=None):
"""
Initialize a new instance of the PortData class.
Expand Down Expand Up @@ -470,7 +470,7 @@ def check_deisolation_conditions(self, isolated_port):

return True

#pylint: disable=too-many-arguments,too-many-locals
#pylint: disable=too-many-positional-arguments,too-many-arguments,too-many-locals
def calc_symbol_ber_rate(self, port_name, port_speed, port_width, col_name, time_delta):
"""
calculate the symbol BER rate for a given port given the time delta
Expand Down

0 comments on commit c77b074

Please sign in to comment.