Skip to content

[tests/generic_config_updater] Replace IP testcase for BGP Listener#5092

Merged
qiluo-msft merged 3 commits intosonic-net:masterfrom
wen587:bgpl_ip_change
Feb 10, 2022
Merged

[tests/generic_config_updater] Replace IP testcase for BGP Listener#5092
qiluo-msft merged 3 commits intosonic-net:masterfrom
wen587:bgpl_ip_change

Conversation

@wen587
Copy link
Contributor

@wen587 wen587 commented Feb 8, 2022

Description of PR

Summary: Replace IP testcase for BGP Listener
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

  1. Add IP replacement case for BGPL;
  2. Modify generators function to adapt to our case

How did you do it?

Add the testcase.

How did you verify/test it?

Run test of sonic-mgmt/tests/generic_config_updater/test_bgpl.py on KVM

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@wen587 wen587 changed the title 1. add bgpl peer address change testcase; 2. small change on generato… [tests/generic_config_updater] Replace IP testcase for BGP Listener Feb 8, 2022
@lgtm-com
Copy link

lgtm-com bot commented Feb 8, 2022

This pull request introduces 2 alerts when merging 137fd15 into 180d891 - view on LGTM.com

new alerts:

  • 2 for Modification of parameter with default

@lgtm-com
Copy link

lgtm-com bot commented Feb 8, 2022

This pull request introduces 2 alerts when merging 8d610ba into 180d891 - view on LGTM.com

new alerts:

  • 2 for Modification of parameter with default

@wen587 wen587 requested a review from bingwang-ms February 9, 2022 01:03
@qiluo-msft qiluo-msft self-requested a review February 9, 2022 01:03
@wen587 wen587 requested a review from ghooo February 9, 2022 01:04


def generate_ip_through_default_route(host):
def generate_ip_through_default_route(host, exclude_ips=[]):
Copy link
Contributor

@qiluo-msft qiluo-msft Feb 9, 2022

Choose a reason for hiding this comment

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

[]

Do not use mutable as default parameter, the behavior is not as expected.
ref: https://codeql.github.com/codeql-query-help/python/py-modification-of-default-value/

Actually LGTM alert is a true issue. #Closed

@wen587 wen587 marked this pull request as ready for review February 9, 2022 10:17
@wen587 wen587 requested a review from a team as a code owner February 9, 2022 10:17
@qiluo-msft qiluo-msft merged commit 377a9e5 into sonic-net:master Feb 10, 2022
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.

2 participants