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

[MgmtVrf ]: fix for Host Unreachable' error #1775

Merged
merged 1 commit into from
Jul 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions tests/test_mgmtvrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,25 @@ def setup_mvrf(duthost, testbed, localhost):
var['ptf_ip'] = testbed['ptf_ip']
var['filename'] = 'README.md'
duthost.command('sudo config vrf add mgmt')
logger.info('waiting for ssh to startup')
SONIC_SSH_REGEX = 'OpenSSH_[\\w\\.]+ Debian'

res = localhost.wait_for(host=var['dut_ip'],
port=22,
state='started',
search_regex=SONIC_SSH_REGEX,
timeout=90)
time.sleep(5)
verify_show_command(duthost)
yield
mvrf = False
logging.info(' Unconfigure mgmt vrf')
duthost.copy(src="mvrf/config_vrf_del.sh",dest="/tmp/config_vrf_del.sh",mode=0755)
duthost.shell("nohup /tmp/config_vrf_del.sh < /dev/null > /dev/null 2>&1 &")
res = localhost.wait_for(host=var['dut_ip'],
port=22,
state='stopped',
search_regex=SONIC_SSH_REGEX,
timeout=90)

res = localhost.wait_for(host=var['dut_ip'],
port=22,
state='started',
search_regex=SONIC_SSH_REGEX,
timeout=90)
time.sleep(10)

duthost.command('sudo config save -y')
verify_show_command(duthost, mvrf=False)
Expand Down