Addition of prober_type in config and show commands for muxcable#3884
Addition of prober_type in config and show commands for muxcable#3884qiluo-msft merged 5 commits intosonic-net:masterfrom
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
f5cbd88 to
07a09fb
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 3884 in repo sonic-net/sonic-utilities |
|
Hi can someone help azure runs are cancelled because of no apparent reason , no reviewer is assigned so not sure whom to reach out |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new "prober_type" field to muxcable commands so that both configuration and output (table and JSON) include the prober type setting.
- Added "prober_type" to muxcable configuration and show commands
- Updated tests and mock configuration to validate the new field
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/muxcable_test.py | Updated test outputs and added tests for the prober_type command |
| tests/mock_tables/config_db.json | Included prober_type entries for specific ports |
| show/muxcable.py | Updated table and JSON dump to display the prober_type field |
| config/muxcable.py | Added a new command and helper to update prober_type in configdb |
Comments suppressed due to low confidence (1)
config/muxcable.py:439
- [nitpick] For consistency and clarity with other parts of the code, consider renaming the variable 'asic_index' to 'asic_id' within this logical block.
if port is not None and port != "all":
| click.echo(tabulate(print_peer_tor, headers=headers)) | ||
| if is_dualtor_active_active[0]: | ||
| headers = ['port', 'state', 'ipv4', 'ipv6', 'cable_type', 'soc_ipv4', 'soc_ipv6'] | ||
| headers = ['port', 'state', 'ipv4', 'ipv6', 'cable_type', 'soc_ipv4', 'soc_ipv6', 'prober_type'] |
There was a problem hiding this comment.
Consider refactoring the header definitions into a shared constant to reduce duplication across similar code blocks.
@harjotsinghpawra - I tried triggering the pipeline, but it was cancelled for same reason. Can you do a rebase and push for a rerun? |
| ctx.fail("Invalid ConfigDB. Error: {}".format(e)) | ||
|
|
||
|
|
||
| def update_configdb_prober_type(config_db, port, val): |
There was a problem hiding this comment.
Do we need to carry over prober type in update_configdb_pck_loss_data as well?
There was a problem hiding this comment.
yes , we need to carry soc_ipv4 field also over to update_configdb_pck_loss_data
There was a problem hiding this comment.
Fixed , updated the diff
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
e101b88 to
9522356
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
9522356 to
8d61e01
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Hi @qiluo-msft - please help merge. |
…ic-net#3884) New prober_type harware is being added to linkmgrd. This is config knob addition for the specific field in mUX_CABLE show command show muxcable config edited to add prober_type field
…4013) Orignal PR was reverted because of pre-test failure as part of following issue #3978 orignal PR #3884 What I did How I did it Fixed show mux config to one format no matter if soc_ipv4 is given or not How to verify it Ran the test_pretest as part of sonic_mgmt Previous command output (if the output of a command-line utility has changed) port state ipv4 ipv6 cable_type soc_ipv4 soc_ipv6 Ethernet8 auto 192.168.0.2/32 fc02:1000::2/128 active-active 192.168.0.3/32 Ethernet16 auto 192.168.0.4/32 fc02:1000::4/128 active-active 192.168.0.5/32 New command output (if the output of a command-line utility has changed) port state ipv4 ipv6 cable_type soc_ipv4 soc_ipv6 prober_type Ethernet8 auto 192.168.0.2/32 fc02:1000::2/128 active-active 192.168.0.3/32 software Ethernet16 auto 192.168.0.4/32 fc02:1000::4/128 active-active 192.168.0.5/32 software
…ble (sonic-net#3884)" (sonic-net#3979) This reverts commit b106a82. This PR caused issue: sonic-net#3978 Need to revert it to unblock submodule advance for sonic-utilities.
…onic-net#4013) Orignal PR was reverted because of pre-test failure as part of following issue sonic-net#3978 orignal PR sonic-net#3884 What I did How I did it Fixed show mux config to one format no matter if soc_ipv4 is given or not How to verify it Ran the test_pretest as part of sonic_mgmt Previous command output (if the output of a command-line utility has changed) port state ipv4 ipv6 cable_type soc_ipv4 soc_ipv6 Ethernet8 auto 192.168.0.2/32 fc02:1000::2/128 active-active 192.168.0.3/32 Ethernet16 auto 192.168.0.4/32 fc02:1000::4/128 active-active 192.168.0.5/32 New command output (if the output of a command-line utility has changed) port state ipv4 ipv6 cable_type soc_ipv4 soc_ipv6 prober_type Ethernet8 auto 192.168.0.2/32 fc02:1000::2/128 active-active 192.168.0.3/32 software Ethernet16 auto 192.168.0.4/32 fc02:1000::4/128 active-active 192.168.0.5/32 software
What I did
How I did it
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)