def upload_stemcell(my_settings: settings.Settings, path: str):
for stemcell in os.listdir(path):
if stemcell.endswith(".tgz"):
print("uploading stemcell {0}".format(stemcell))
cmd = "{om_with_auth} upload-stemcell -s '{path}'".format(
om_with_auth=om_manager.get_om_with_auth(my_settings), path=os.path.join(path, stemcell)
)
out, err, exit_code = util.exponential_backoff_cmd(cmd)
if exit_code != 0:
return out, err, exit_code
return "", "", 0
download_and_import.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录