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

#4964: Modify traffexam to be able to emit LACP data units #5060

Open
wants to merge 7 commits into
base: 4964-add-information-about-lacp-connection-status-for-lag-ports
Choose a base branch
from

Conversation

pkazlenka
Copy link
Collaborator

  • Added new traffexam endpoint (/address//lacp)

@pkazlenka pkazlenka force-pushed the tests/4964-add_lacp_support_to_traffexam branch from 4ac1932 to 5512ae4 Compare February 10, 2023 12:34
@nikitamarchenko
Copy link
Collaborator

Is it ok that the commit base is not the develop branch? Because in case of a merge, that code will not be in the develop.

try:
push_entry = model.LACPPush(payload)
get_context().action.lacp_push(address.iface, push_entry)
except ValueError as e:
Copy link
Collaborator

@surabujin surabujin Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about KeyError(at least for missing keys in payload)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added call to extract_payload_fields() method.

@pkazlenka
Copy link
Collaborator Author

Is it ok that the commit base is not the develop branch? Because in case of a merge, that code will not be in the develop.

Yes. This change (as well as tests) doesn't make sense without changes from feature branch. I guess it's natural to have branches like

develop -> feature/featureX -> tests/featureX

* Updated LACP emitting code to be closer to other methods approach
entry.aggregation,
entry.lacp_timeout,
entry.lacp_activity]:
actor_state_binary += self._bool_to_str(field)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not actor_state_binary += '1' if field or '0'

@nikitamarchenko nikitamarchenko self-requested a review February 17, 2023 10:06
entry.lacp_timeout,
entry.lacp_activity]:
actor_state_binary += self._bool_to_str(field)
# Kilda ignores everything except lacp actor state. If this changes - expand this method with more fields
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true. Kilda stores info about partner's ports, system_id, keys, etc
docker/db-migration/migrations/024-add-lacp-partner-class.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants