harbor/tests/apitests/python/library/containerd.py
Yang Jiao a56d927143
Remove the log in testcase (#17500)
Remove logs that do not need to be printed

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-09-06 14:15:45 +08:00

18 lines
548 B
Python

# -*- coding: utf-8 -*-
import base
import json
import docker_api
def ctr_images_pull(username, password, oci):
command = ["ctr", "images", "pull","--snapshotter", "native", "-u", username+":"+password, oci]
ret = base.run_command(command)
def ctr_images_list(oci_ref = None):
command = ["ctr", "images", "list", "--q"]
ret = base.run_command(command)
if oci_ref is not None and oci_ref not in ret.split("\n"):
raise Exception(r" Get OCI ref failed, expected ref is [{}], but return ref list is [{}]".format (ret))