From f74329a44140e94080737d94ca065956cd7cd5a4 Mon Sep 17 00:00:00 2001 From: Matthias Gatto Date: Mon, 21 Mar 2022 15:26:44 +0100 Subject: [PATCH] credential: support OSC_PROFILE Signed-off-by: Matthias Gatto --- osc_sdk_python/credentials.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osc_sdk_python/credentials.py b/osc_sdk_python/credentials.py index 32f98bf..ed77ea2 100644 --- a/osc_sdk_python/credentials.py +++ b/osc_sdk_python/credentials.py @@ -10,6 +10,8 @@ class Credentials: def __init__(self, region, profile, access_key, secret_key): self.region = None + if profile is None: + profile = os.environ.get('OSC_PROFILE') if profile != None: # Overide with environmental configuration if available self.load_credentials_from_env()