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

Changing the DPB fixure to get breakout cfg table #17

Merged
merged 1 commit into from
Dec 13, 2019
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
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,13 @@ def testlog(request, dvs):
dvs.runcmd("logger === finish test %s ===" % request.node.name)

##################### DPB fixtures ###########################################

HWSKU="Force10-S6000"

@pytest.yield_fixture(scope="module")
def create_dpb_config_file(dvs):
cmd = "sonic-cfggen -p /usr/share/sonic/hwsku/platform.json -k {} --print-data > /tmp/ports.json".format(HWSKU)
dvs.runcmd(['sh', '-c', cmd])
cmd = "sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/ports.json --print-data > /tmp/dpb_config_db.json"
dvs.runcmd(['sh', '-c', cmd])
cmd = "mv /etc/sonic/config_db.json /etc/sonic/config_db.json.bak"
Expand All @@ -982,3 +987,4 @@ def dpb_setup_fixture(dvs):
dvs.restart()
yield
remove_dpb_config_file(dvs)