Skip to content

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

Open
pkazlenka wants to merge 7 commits into
4964-add-information-about-lacp-connection-status-for-lag-portsfrom
tests/4964-add_lacp_support_to_traffexam
Open

#4964: Modify traffexam to be able to emit LACP data units#5060
pkazlenka wants to merge 7 commits into
4964-add-information-about-lacp-connection-status-for-lag-portsfrom
tests/4964-add_lacp_support_to_traffexam

Conversation

@pkazlenka

Copy link
Copy Markdown
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
Comment thread src-python/lab-service/traffexam/kilda/traffexam/action.py Outdated
Comment thread src-python/lab-service/traffexam/kilda/traffexam/model.py Outdated
Comment thread src-python/lab-service/traffexam/kilda/traffexam/rest.py Outdated
@nikitamarchenko

Copy link
Copy Markdown
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:

@surabujin surabujin Feb 15, 2023

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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