Skip to content

Revert Fix for GCU_DHCP_Relay to resolve HEAD PR#10093

Merged
yejianquan merged 6 commits intosonic-net:masterfrom
ridahanif96:GCU-Dhcp
Sep 22, 2023
Merged

Revert Fix for GCU_DHCP_Relay to resolve HEAD PR#10093
yejianquan merged 6 commits intosonic-net:masterfrom
ridahanif96:GCU-Dhcp

Conversation

@ridahanif96
Copy link
Copy Markdown
Contributor

@ridahanif96 ridahanif96 commented Sep 21, 2023

Description of PR

This PR is created to resolve issues in KVM test which are failing in advance utilities HEAD PR. KVM Elastic test are failing in generic_config_updater/test_dhcp_relay.py file due to missing mode attribute.

What is the motivation for this PR?

Modified GCU fixtures/duthost_utilities.py to make it compatible for HEAD PR . We have added "switchport mode command" in duthost_utilites to add mode trunk on Ethernet4 so that it will allow addition of vlan membership on ports. Added a function to check "switchport mode explicitly"

@mssonicbld
Copy link
Copy Markdown
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/common/fixtures/duthost_utils.py:453:1: E303 too many blank lines (3)

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@ridahanif96 ridahanif96 changed the title Fix GCU Revert Fix for GCU_DHCP_Relay to resolve HEAD PR Sep 21, 2023
@ridahanif96 ridahanif96 marked this pull request as ready for review September 21, 2023 15:34
Copy link
Copy Markdown
Collaborator

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

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

LGTM

@yejianquan yejianquan merged commit eddc597 into sonic-net:master Sep 22, 2023
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
Description of PR
This PR is created to resolve issues in KVM test which are failing in advance utilities HEAD PR. KVM Elastic test are failing in generic_config_updater/test_dhcp_relay.py file due to missing mode attribute.

What is the motivation for this PR?
Modified GCU fixtures/duthost_utilities.py to make it compatible for HEAD PR . We have added "switchport mode command" in duthost_utilites to add mode trunk on Ethernet4 so that it will allow addition of vlan membership on ports. Removed added function and check "switchport mode explicitly"


co-authorized by: jianquanye@microsoft.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants