mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-29 03:57:56 +01:00
3b8a2890f9
1. Upgrade robot-framework to 3.1 and Selenium library to 4.4.0. 2. Fix a registry issue for clear filter text input. Signed-off-by: danfengliu <danfengl@vmware.com>
22 lines
672 B
Python
22 lines
672 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
import base
|
|
import json
|
|
import docker_api
|
|
|
|
def ctr_images_pull(username, password, oci):
|
|
command = ["sudo", "ctr", "images", "pull", "-u", username+":"+password, oci]
|
|
print("Command: ", command)
|
|
ret = base.run_command(command)
|
|
print("Command return: ", ret)
|
|
|
|
def ctr_images_list(oci_ref = None):
|
|
command = ["sudo", "ctr", "images", "list", "--q"]
|
|
print("Command: ", command)
|
|
ret = base.run_command(command)
|
|
print("Command return: ", ret)
|
|
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))
|
|
|
|
|