-
Notifications
You must be signed in to change notification settings - Fork 0
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
David Amrani
committed
Jun 5, 2018
1 parent
85d1e38
commit e8a7b4b
Showing
3 changed files
with
19 additions
and
2 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from os import environ | ||
from .services import * | ||
|
||
class AzureManager(object): | ||
|
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 |
---|---|---|
@@ -1,10 +1,17 @@ | ||
from os import environ | ||
import sys | ||
from azure.common.client_factory import get_client_from_auth_file | ||
|
||
class BaseService(object): | ||
|
||
def set_client(self, service): | ||
|
||
self.service = service | ||
self.client = get_client_from_auth_file(service) | ||
try: | ||
self.client = get_client_from_auth_file(service) | ||
except (FileNotFoundError, KeyError): | ||
print ('[!] Credentials file not found. Set path in "AZURE_AUTH_LOCATION" environment variable') | ||
sys.exit(0) | ||
|
||
def __init__(self, service): | ||
self.set_client(service) |
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