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

[debug dump util] Match Infrastructure #1666

Merged
merged 20 commits into from
Jul 14, 2021

Conversation

vivekrnv
Copy link
Contributor

@vivekrnv vivekrnv commented Jun 11, 2021

DEBUG DUMP UTIL PR SEQ: 1

What I did

HLD for Dump Utility: HLD.

  • Added the Logic for Match Infrastructure along with corresponding unit tests.

Note: Before merging other PR's, please merge this first

For More Info on MatchRequest and MatchEngine, Check this section in the HLD:
MatchInfra

How I did it

How to verify it

tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_bad_key_pattern PASSED [ 82%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_bad_request PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_invalid_combination PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_invalid_db PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_just_keys_return_fields_compat PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_no_file PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_no_source PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_no_table PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_no_value PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_return_fields_bad_format PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_vague_source PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchRequestValidation::test_valid_match_request PASSED [ 83%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_field_value_match PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_field_value_match_list_type PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_field_value_no_match PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_file_source PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_file_source_with_key_ptrn PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_file_source_with_not_only_return_keys PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_for_no_key_match PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_for_no_match PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_just_keys_false PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_key_pattern_complex PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_key_pattern_wildcard PASSED [ 84%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_match_entire_list PASSED [ 85%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_return_fields_with_all_filtering PASSED [ 85%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_return_fields_with_field_value_filtering PASSED [ 85%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_return_fields_with_key_filtering PASSED [ 85%]
tests/dump_tests/match_engine_test.py::TestMatchEngine::test_return_keys PASSED [ 85%]

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi left a comment

Choose a reason for hiding this comment

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

Please added unit test for namespace DBs as well.

dump/match_infra.py Outdated Show resolved Hide resolved
dump/match_infra.py Show resolved Hide resolved
dump/match_infra.py Outdated Show resolved Hide resolved
dump/match_infra.py Show resolved Hide resolved
dump/match_infra.py Outdated Show resolved Hide resolved
tests/dump_tests/match_engine_test.py Show resolved Hide resolved
@vivekrnv
Copy link
Contributor Author

vivekrnv commented Jun 22, 2021

Please added unit test for namespace DBs as well.

Added the Test

@liat-grozovik
Copy link
Collaborator

@SuvarnaMeenakshi could you please review following unit test added?

Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi left a comment

Choose a reason for hiding this comment

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

LGTM

@SuvarnaMeenakshi SuvarnaMeenakshi merged commit 9ae6f6b into sonic-net:master Jul 14, 2021
@vivekrnv
Copy link
Contributor Author

Request for 202106

raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-utilities that referenced this pull request Aug 10, 2021
What I did
HLD for Dump Utility: HLD.

Added the Logic for Match Infrastructure along with corresponding unit tests.
Note: Before merging other PR's, please merge this first

For More Info on MatchRequest and MatchEngine, Check this section in the HLD:
MatchInfra
judyjoseph pushed a commit that referenced this pull request Aug 26, 2021
What I did
HLD for Dump Utility: HLD.

Added the Logic for Match Infrastructure along with corresponding unit tests.
Note: Before merging other PR's, please merge this first

For More Info on MatchRequest and MatchEngine, Check this section in the HLD:
MatchInfra
SuvarnaMeenakshi pushed a commit that referenced this pull request Nov 10, 2021
What I did
Implemented vlan and vlan_member modules for debug dump utility.

How I did it
Used infrastructure and followed examples in
#1666
#1667
#1668
#1669
#1670

How to verify it
On switch: dump state vlan <vlan_name>
dump state vlan_member '<vlan_name|<member_name>'
Unit test: pytest-3 dump_tests/module_tests/vlan_test.py (same test file covers both vlan and vlan_member)
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