Skip to content
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

[test_fg_ecmp] Fix 'DEFAULT_NAMESPACE' is not defined #3350

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

JibinBao
Copy link
Contributor

Description of PR

In ecmp/test_fgnhg.py , 'DEFAULT_NAMESPACE' is not defined:

def fg_ecmp(ptfhost, duthost, router_mac, net_ports, port_list, ip_to_port, bank_0_port, bank_1_port, prefix_list): 



      # Init base test params 

      if isinstance(ipaddress.ip_network(prefix_list[0]), ipaddress.IPv4Network): 

          ipcmd = "ip route" 

      else: 

          ipcmd = "ipv6 route" 



      vtysh_base_cmd = "vtysh -c 'configure terminal'" 

>       vtysh_base_cmd = duthost.get_vtysh_cmd_for_namespace(vtysh_base_cmd, DEFAULT_NAMESPACE) 

E       NameError: global name 'DEFAULT_NAMESPACE' is not defined 

Summary:
Fixes # (#3323)

Type of change

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

Approach

What is the motivation for this PR?

Fix the issue that 'DEFAULT_NAMESPACE' is not defined

How did you do it?

Import using following line:
from tests.common.helpers.constants import DEFAULT_NAMESPACE

How did you verify/test it?

Run test_fg_ecmpt test case

Any platform specific information?

no

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

no

Documentation

@JibinBao JibinBao requested a review from a team as a code owner April 16, 2021 09:00
@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin wangxin merged commit c066ab1 into sonic-net:master Apr 20, 2021
saravanansv pushed a commit to saravanansv/sonic-mgmt that referenced this pull request May 6, 2021
…_ecmp (sonic-net#3350)

What is the motivation for this PR?
Fix the issue that 'DEFAULT_NAMESPACE' is not defined

How did you do it?
Import using following line:
from tests.common.helpers.constants import DEFAULT_NAMESPACE

How did you verify/test it?
Run test_fg_ecmpt test case
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…_ecmp (sonic-net#3350)

What is the motivation for this PR?
Fix the issue that 'DEFAULT_NAMESPACE' is not defined

How did you do it?
Import using following line:
from tests.common.helpers.constants import DEFAULT_NAMESPACE

How did you verify/test it?
Run test_fg_ecmpt test case
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.

4 participants