Last active
June 23, 2019 09:55
-
-
Save smitmartijn/812465dce02487149d978196410bc879 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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