Skip to content

Commit

Permalink
1) Update the library 'progressbar' into correct version in Requirem…
Browse files Browse the repository at this point in the history
…ents.txt

  2) Fix the image-upgrade by modifying the script name from 'onie-select' into 'dent_boot_select'
  3) Fix the test suite 'suite_group_clean_config' by deleting 'infra_sw1_KEEPALIVED_CONF' and taking out the unnecessary code of staging file in 'test_clean_config.py'

  Signed-off-by: Alisa Li alisa_li@accton.com
  • Loading branch information
Alisa Li committed Oct 22, 2021
1 parent e4c8221 commit 82937fd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Amazon_Framework/DentOsTestbed/Requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ pytest
pytest-asyncio
pytest-html
ixnetwork_restpy
progressbar
progressbar2

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Module for installing OS through onie-select
"""Module for installing OS through dent_boot_select
"""
import os
import time


class OsInstallerOnieSelect:
"""
Implements APIs for installing OS through onie-select
Implements APIs for installing OS through dent_boot_select
"""

DEVICE_UP_WAIT_TIME_SECS = 60 * 3
Expand Down Expand Up @@ -42,7 +42,7 @@ async def install_os(self, device, os_image_download_url, staging_device, stagin
Args:
device (Device): Device on which the OS needs to be installed
os_image_download_url (str): HTTP URL to download the OS image from
staging_device (Device): Device to stage the OS image,from which onie-select picks it up
staging_device (Device): Device to stage the OS image,from which dent_boot_select picks it up
staging_path(str): Path on the staging device to which the OS image is copied to.
Raises:
Expand All @@ -66,7 +66,7 @@ async def verify_os(self, device, os_image_download_url, staging_device, staging
Args:
device (Device): Device on which the OS needs to be installed
os_image_download_url (str): HTTP URL to download the OS image from
staging_device (Device): Device to stage the OS image,from which onie-select picks it up
staging_device (Device): Device to stage the OS image,from which dent_boot_select picks it up
staging_path(str): Path on the staging device to which the OS image is copied to.
Raises:
Expand All @@ -86,7 +86,7 @@ async def verify_os(self, device, os_image_download_url, staging_device, staging

async def _run_onie_select(self, device):
try:
await device.run_cmd("onie-select install", sudo=True)
await device.run_cmd("dent_boot_select install", sudo=True)
except Exception as e:
self.applog.exception(
f"{OsInstallerOnieSelect._run_onie_select.__qualname__}", exc_info=e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ async def test_clean_config(testbed):
- call the helper
"""

package = "/home/neteng/staging/staging.tar.gz"
if not os.path.exists(package):
assert 0, f"{package} could not be found!"
# package = "/home/neteng/staging/staging.tar.gz"
# if not os.path.exists(package):
# assert 0, f"{package} could not be found!"

devices = await tb_get_all_devices(testbed)
cos = []
for device in devices:
cos.append(disable_ztp(device))
results = await asyncio.gather(*cos, return_exceptions=True)
check_asyncio_results(results, "disable_ztp")
cos = []
for device in devices:
cos.append(setup_dent_tools(device, package))
results = await asyncio.gather(*cos, return_exceptions=True)
check_asyncio_results(results, "setup_dent_tools")
# cos = []
# for device in devices:
# cos.append(setup_dent_tools(device, package))
# results = await asyncio.gather(*cos, return_exceptions=True)
# check_asyncio_results(results, "setup_dent_tools")

await tb_clean_config(testbed)

0 comments on commit 82937fd

Please sign in to comment.