-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9d4bb5
commit 0e9c180
Showing
2 changed files
with
860 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/python | ||
import os | ||
import sys | ||
from smcConnector.Config import get_url, get_api_version, get_api_key | ||
from smc import session | ||
|
||
|
||
parent_dir = os.path.abspath(os.path.dirname(__file__)) | ||
vendor_dir = os.path.join(parent_dir, 'Libs') | ||
pem_dir = os.path.join(parent_dir, 'smc.pem') | ||
sys.path.append(vendor_dir) | ||
|
||
|
||
PROFILE_NAME = "aws_profile" | ||
|
||
try: | ||
session.login(url=get_url(), api_key=get_api_key(), api_version=get_api_version(), verify=pem_dir) | ||
print(f'Your API Client: \'{session.current_user.name}\' can be reached') | ||
|
||
except Exception as e: | ||
print(f'Error connecting: {e}') | ||
session.logout() |
Oops, something went wrong.