X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fcore%2Fauth.py;fp=osm_mon%2Fcore%2Fauth.py;h=947175a927f8729a260a92d0152eefe2d08d7c95;hb=821a62e1e29bb603de56b028d92ad885f06fd68c;hp=6f5e20ad30cead534c735aac27d0cf46bb043d86;hpb=e4be37f562f1d0c394d1ccdd0238202ec8f6f949;p=osm%2FMON.git diff --git a/osm_mon/core/auth.py b/osm_mon/core/auth.py index 6f5e20a..947175a 100644 --- a/osm_mon/core/auth.py +++ b/osm_mon/core/auth.py @@ -28,7 +28,6 @@ from osm_mon.core.database import VimCredentials, DatabaseManager class AuthManager: - def __init__(self): self.database_manager = DatabaseManager() @@ -41,15 +40,8 @@ class AuthManager: credentials.user = creds_dict['vim_user'] credentials.password = creds_dict['vim_password'] credentials.tenant_name = creds_dict['vim_tenant_name'] - credentials.config = json.dumps(creds_dict['config']) - if creds_dict.get('OS_REGION_NAME'): - credentials.region_name = creds_dict['OS_REGION_NAME'] - else: - credentials.region_name = "RegionOne" - if creds_dict.get('OS_ENDPOINT_TYPE'): - credentials.endpoint_type = creds_dict['OS_ENDPOINT_TYPE'] - else: - credentials.endpoint_type = "publicURL" + if 'config' in creds_dict: + credentials.config = json.dumps(creds_dict['config']) self.database_manager.save_credentials(credentials) def get_credentials(self, vim_uuid): @@ -59,4 +51,3 @@ class AuthManager: credentials = self.get_credentials(creds_dict['_id']) if credentials: credentials.delete_instance() -