harbor/tests/apitests/python/library/podman.py
Yang Jiao 61d74b9da1
Add podman pull & push testcase (#18790)
Fix #18788

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-06-06 10:45:28 +08:00

19 lines
518 B
Python

# -*- coding: utf-8 -*-
import base
def login(registry, username, password):
command = ["podman", "login", "-u", username, "-p", password, registry]
base.run_command(command)
def logout(registry):
command = ["podman", "logout", registry]
base.run_command(command)
def pull(artifact):
command = ["podman", "pull", artifact]
base.run_command(command)
def push(source_artifact, target_artifact):
command = ["podman", "push", source_artifact, target_artifact]
base.run_command(command)