def _check_tenant_exists(restapi, allocation):
"""Check if tenant exist."""
tenant_url = '/tenant/{}'.format(allocation)
# Check if tenant exists.
try:
restclient.get(restapi, tenant_url).json()
except restclient.NotFoundError:
raise click.UsageError(
'Allocation not found, '
'run allocation configure {} --systems ...'.format(allocation))
评论列表
文章目录