Skip to content

Commit

Permalink
MgmtVrf , fix for Host Unreachable' error (#1775)
Browse files Browse the repository at this point in the history
  • Loading branch information
chitra-raghavan authored Jul 1, 2020
1 parent 7bfdd0e commit 1661316
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/test_mgmtvrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,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

0 comments on commit 1661316

Please sign in to comment.