Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import swagger_client
from swagger_client.rest import ApiException
api_client = swagger_client.ApiClient(host="https://{}/api/ni".format("my-vrni-platform-fdqn-or-ip"))
user_creds = swagger_client.UserCredential(username="admin@local", password="VMware1!", domain=dict(domain_type="LOCAL"))
auth_api = swagger_client.AuthenticationApi(api_client=api_client)
auth_token = auth_api.create(user_creds)
print(auth_token)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.