def repository_argument(func):
"""
Add the repository selection argument to the decorated command func.
:param func: Click CLI command to decorate
:return: decorated CLI command
"""
return argument(
'repository', nargs=1, type=Choice([
Repository.origin,
Repository.enterprise,
Repository.web_console,
Repository.web_console_server,
Repository.source_to_image,
Repository.metrics,
Repository.logging,
Repository.online,
Repository.online_hibernation,
Repository.release,
Repository.aoscdjobs,
Repository.openshift_ansible,
Repository.jenkins,
Repository.wildfly,
Repository.jenkins_plugin,
Repository.jenkins_sync_plugin,
Repository.jenkins_client_plugin,
Repository.jenkins_login_plugin,
Repository.image_registry,
Repository.cluster_operator,
Repository.kubernetes_metrics_server,
])
)(func)
评论列表
文章目录