Fix for GCU_DHCP_Relay KVM test Failure in HEAD PR#2990
Closed
ridahanif96 wants to merge 78 commits intosonic-net:masterfrom
ridahanif96:Dhcp_gcu
Closed
Fix for GCU_DHCP_Relay KVM test Failure in HEAD PR#2990ridahanif96 wants to merge 78 commits intosonic-net:masterfrom ridahanif96:Dhcp_gcu
ridahanif96 wants to merge 78 commits intosonic-net:masterfrom
ridahanif96:Dhcp_gcu
Conversation
- What I did Modified config/vlan.py to add new commands with multiple and range options Creation of config/switchport.py which will deal with default Vlan1 Modified the show interface command so it will show the status of port being access or trunk. Before it did not show about access mode only trunk. Modified the Command-Reference.md file to add new commands in it with usage and examples Added new utility functions in utilities_common/cli.py for new Vlan.py and switchport.py commands - How I did Added new commands and modified the existing commands in config/vlan.py for example to accept multiple vids and range of vids in add|del vlan and add|del vlan member as well as except flag in vlan member command Creation of config/switchport.py file to add commands which will deal only with Default Vlan1 which was unable to be defined or assigned in SONiC before New utility functions in utilities_common/cli.py changes in scripts/intfutil. Modified the existing function and now it will display if an interface is in access mode or trunk mode with routed mode. - How to verify it New commands have been added in Command-Reference.md All the syntax and examples have been added there and they can be verified by running the specific command Signed-off-by: Muhammad Umar Asad <[email protected]> < xFlow Research Inc. >
Modified './config/vlan.py' and added switchport mode checks in it as well as other small checks Modified './scripts/intfutil/' to show correct port mode with access option for 'show interfaces status' command and its subfunctions Added utilities functions in './utilities_common/cli.py' for './config/switchport.py' Updated mocktables according to the tests and addded 'Mode' attribute in PORT table as well as 'Vlan' to 'Mode' in intfutil and multi_asic tests expected outputs of vlan_test.py
Fixed config_db_vlan_port_keys_get() in intfutil to show correct port mode updated test cases in '/tests/vlan_test.py' for enhanced vlan commands and new switchport commands which are used with vlan member commands Signed-off-by: Muhammad Umar Asad <[email protected]> xFlow Research Inc.
related testcase removed the fucntionality for checking vlan status to assign IP Address It will now assign IP Address if the port is in 'routed' mode else it won't assign Signed-off-by: Muhammad Umar Asad <[email protected]> xFlow Research Inc.
updated the Command-Reference.md for PortChannel switchport commands as well Updated the test cases for Portchnnel for switchport
updated the merger conflicts in the multi_asic_intfutil_test.py
The vlan.py and other files were modified to add DHCPv4 and DHCPv6 relay tables so the PR was needed to be updated
if vlan member table empty, do not migrate any settings
…onfig_db_port_portchannel_table_for_switchport_mode and added support for portchannel
… its giving error rn
…and expected output
…mmand for routed when it is already in routed mode
qiluo-msft
reviewed
Oct 5, 2023
| old_config = self.config_wrapper.get_config_db_as_json() | ||
|
|
||
|
|
||
| old_config = switchport_mode_remove(old_config) |
Contributor
There was a problem hiding this comment.
Do you want to use self.switchport_mode_remove ?
Please check test failure:
target_config = {'ACL_TABLE': {'DATAACL': {'policy_desc': 'DATAACL', 'ports': ['Ethernet4'], 'stage': 'ingress', 'type': 'L3'}, 'EVERF...}, 'VLAN': {'Vlan1000': {'dhcp_servers': ['192.0.0.1', '192.0.0.2', '192.0.0.3', '192.0.0.4'], 'vlanid': '1000'}}, ...}
def replace(self, target_config):
self.logger.log_notice("Config replacement starting.")
self.logger.log_notice(f"Target config length: {len(json.dumps(target_config))}.")
self.logger.log_notice(".")
old_config = self.config_wrapper.get_config_db_as_json()
> old_config = switchport_mode_remove(old_config)
E NameError: name 'switchport_mode_remove' is not defined
Contributor
Author
There was a problem hiding this comment.
@qiluo-msft , Yes i want to remove "mode" attribute for this created this self.switchport_mode_remove function. All these test failures has been resolved and updated in new PR: #2993. Please consider this new one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
KVM Elastic test cases are failing due to missing mode attribute in configuration Updated GCU function by making it compatible with HEAD PR so that it can pass KVM Elastic test cases
How I did it
Modified generic_updater.py. Added a logic in def replace function such that it will not fail in rollback. In this way it will pass KVM Elastic (GCU_Dhcp_relay.py test)