-
Notifications
You must be signed in to change notification settings - Fork 663
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
[config]: Filter table from input config while config validation\DPB #1020
base: master
Are you sure you want to change the base?
[config]: Filter table from input config while config validation\DPB #1020
Conversation
dd9fa08
to
8a6275f
Compare
force push due to rebasing. |
retest this please |
Gentle Reminder for review. |
retest this please |
@jleveque : kindly review needed to fix one not needed check in DPB. |
Retest this please |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
…ion\DPB. Changes: -- Filter table, which does not impact Back-End, from input config while config validation or while Dynamic Port Breakout(DPB). -- Ask for confirmation from user while DPB, only when deleted ports exists in extra tables[i.e in tables without YANG]. -- Test for filter Table. -- Filter BREAKOUT_CFG table while DPB, because back-end does not process BREAKOUT_CFG table. Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
8a6275f
to
4d6bdc6
Compare
Force pushed due to rebasing. |
Can someone merge it, please |
@@ -78,6 +78,30 @@ def test_break_out(self): | |||
self.dpb_port4_4x25G_2x50G_f_l(curConfig) | |||
return | |||
|
|||
def test_extra_brk_cfg_tables_cases(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have 3 different test cases:
1> Tables that we should ignore specifically even with/without Yang, and no warning. (we probably don't need this based on my latest comments: sonic-net/sonic-buildimage#6801 (comment) ), and I don't see other cases.
2> Tables that does not have Yang models but not depending on port to be deleted. By default , it should continue with warning.
3> Tables that does not have Yang models but depending on the port to be deleted. It should ask user to confirm.
void | ||
""" | ||
# nonConfigTables should not be considered in Input Config. | ||
nonConfigTables = ['BREAKOUT_CFG'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on sonic-net/sonic-buildimage#6801 (comment) , I would suggest we don't do anything specific for this table.
Changes:
-- Filter table, which does not impact Back-End, from input config
while config validation or while Dynamic Port Breakout(DPB).
-- Ask for confirmation from user while DPB, only when deleted ports
exists in extra tables[i.e in tables without YANG].
-- Test for filter Table.
-- Filter BREAKOUT_CFG table while DPB, because back-end does not process
BREAKOUT_CFG table.
Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
- What I did
-- Filter table, which does not impact Back-End, from input config
while config validation or while Dynamic Port Breakout(DPB).
-- Ask for confirmation from user while DPB, only when deleted ports
exists in extra tables[i.e in tables without YANG].
-- Test for filter Table.
-- Filter BREAKOUT_CFG table while DPB, because back-end does not process
BREAKOUT_CFG table.
- How I did it
Added a function which filter predefined tables from config. There predefined tables do not impact back-end, so better to filter them.
Change in config/main.py to ask for user permission when any table exists in config for which YANG models are not written. Note: Now, We ask user confirmation only if delete PORTs exist in these extra tables.
Added test code.
- How to verify it
- 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)