From 54fa83f3c0c962aa3c5b4e2e803476874a40e80e Mon Sep 17 00:00:00 2001 From: pmikus Date: Mon, 16 Nov 2020 08:15:17 +0000 Subject: Ansible: Remove vpp_device snergster dependency Signed-off-by: pmikus Change-Id: I145a4b5511141f1e2b4e387daa358e32dd2c8015 --- resources/libraries/python/Constants.py | 4 ++-- resources/libraries/python/ContainerUtils.py | 14 +++++++------- .../ansible/roles/csit_sut_image/tasks/main.yaml | 2 +- resources/tools/testbed-setup/ansible/sut.yaml | 2 ++ 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'resources') diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py index faf861d89d..c655a179bc 100644 --- a/resources/libraries/python/Constants.py +++ b/resources/libraries/python/Constants.py @@ -179,10 +179,10 @@ class Constants: QEMU_VM_DPDK = u"/opt/dpdk-20.02" # Docker container SUT image - DOCKER_SUT_IMAGE_UBUNTU = u"snergster/csit-sut:latest" + DOCKER_SUT_IMAGE_UBUNTU = u"csit_sut-ubuntu1804:local" # Docker container arm SUT image - DOCKER_SUT_IMAGE_UBUNTU_ARM = u"snergster/csit-arm-sut:latest" + DOCKER_SUT_IMAGE_UBUNTU_ARM = u"csit_sut-ubuntu1804:local" # TRex install directory TREX_INSTALL_DIR = u"/opt/trex-core-2.82" diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py index 3e4109c907..59d98aa538 100644 --- a/resources/libraries/python/ContainerUtils.py +++ b/resources/libraries/python/ContainerUtils.py @@ -1001,13 +1001,13 @@ class Docker(ContainerEngine): else Constants.DOCKER_SUT_IMAGE_UBUNTU setattr(self.container, u"image", img) - cmd = f"docker pull {self.container.image}" - - ret, _, _ = self.container.ssh.exec_command_sudo(cmd, timeout=1800) - if int(ret) != 0: - raise RuntimeError( - f"Failed to create container {self.container.name}." - ) + if "/" in self.container.image: + cmd = f"docker pull {self.container.image}" + ret, _, _ = self.container.ssh.exec_command_sudo(cmd, timeout=1800) + if int(ret) != 0: + raise RuntimeError( + f"Failed to create container {self.container.name}." + ) if self.container.cpuset_cpus: self._configure_cgroup(u"docker") diff --git a/resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml index 6ea469b415..7b41be8a64 100644 --- a/resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml @@ -21,7 +21,7 @@ tags: csit-sut-image - name: Build CSIT SUT Docker Image - shell: "docker build -t csit_dut-ubuntu1804:local ." + shell: "docker build -t csit_sut-ubuntu1804:local ." args: chdir: "/opt/csit-sut" tags: csit-sut-image \ No newline at end of file diff --git a/resources/tools/testbed-setup/ansible/sut.yaml b/resources/tools/testbed-setup/ansible/sut.yaml index 68ac9b8364..302fa1b78d 100644 --- a/resources/tools/testbed-setup/ansible/sut.yaml +++ b/resources/tools/testbed-setup/ansible/sut.yaml @@ -24,6 +24,8 @@ tags: kubernetes - role: kernel_vm tags: kernel_vm + - role: csit_sut_image + tags: csit_sut_image - role: performance_tuning tags: performance_tuning - role: cleanup -- cgit 1.2.3-korg