aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2020-11-16 08:15:17 +0000
committerPeter Mikus <pmikus@cisco.com>2021-03-29 13:15:25 +0000
commit4f7f61257261a99882877cc3ee4a8a7bd32f8b5f (patch)
tree4c42ca2b405858128825e0dd1871b6320f4383c9
parent6572e308323becef0f720726413d08fa881c07cb (diff)
Ansible: Remove vpp_device snergster dependency
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I145a4b5511141f1e2b4e387daa358e32dd2c8015 (cherry picked from commit 54fa83f3c0c962aa3c5b4e2e803476874a40e80e)
-rw-r--r--resources/libraries/python/ContainerUtils.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py
index 71bb1d7d06..2810623e24 100644
--- a/resources/libraries/python/ContainerUtils.py
+++ b/resources/libraries/python/ContainerUtils.py
@@ -1000,13 +1000,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")