Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue:4094251 PDR plugin resetting port: Expected status code is 202, not 200 #263

Merged
merged 4 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
vg12345 marked this conversation as resolved.
Show resolved Hide resolved
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