def run_register(args):
api_client = ApiClient()
client = AdminApi(api_client)
account = call_api(lambda: client.get_account_info())
if account.key is not None:
print('Note: this cluster is already registered with an account. '
'You can continue and register with another account.')
read_and_register_account_key()
else:
key_exists = read_yes_no('Do you already have an account key')
if key_exists:
read_and_register_account_key()
else:
register_url = get_riseml_url() + 'register/basic/%s' % account.cluster_id
if browser_available():
webbrowser.open_new_tab(register_url)
else:
print('Please visit this URL and follow instructions'
' to register an account: %s' % register_url)
read_and_register_account_key()
评论列表
文章目录