Fix obtaining env_uuid from deployment
This patch fixes a check for DEPLOYMENT_UUID in case of missing ENV_UUID. Instead of checking system environment directly, we should call get_global method which loads our source file with default UUIDs. Change-Id: I2314b758339edfe77e1536c37dcdb54af1b6a581
This commit is contained in:
parent
899bffe399
commit
2f2739f9a1
@ -74,9 +74,10 @@ def with_default_env():
|
||||
# NOTE(boris-42): This allows smooth transition from deployment to env
|
||||
# set ENV_ENV from ENV_DEPLOYMENT if ENV is not presented
|
||||
# This should be removed with rally env command
|
||||
if not os.environ.get(ENV_ENV):
|
||||
if os.environ.get(ENV_DEPLOYMENT):
|
||||
os.environ[ENV_ENV] = ENV_DEPLOYMENT
|
||||
if not get_global(ENV_ENV):
|
||||
deployment = get_global(ENV_DEPLOYMENT)
|
||||
if deployment:
|
||||
os.environ[ENV_ENV] = deployment
|
||||
|
||||
return default_from_global(
|
||||
"env", ENV_ENV, "env",
|
||||
@ -89,9 +90,10 @@ def with_default_deployment(cli_arg_name="uuid"):
|
||||
# NOTE(boris-42): This allows smooth transition from deployment to env
|
||||
# set ENV_ENV from ENV_DEPLOYMENT and use ENV_ENV
|
||||
# This should be removed with rally env command
|
||||
if not os.environ.get(ENV_ENV):
|
||||
if os.environ.get(ENV_DEPLOYMENT):
|
||||
os.environ[ENV_ENV] = ENV_DEPLOYMENT
|
||||
if not get_global(ENV_ENV):
|
||||
deployment = get_global(ENV_DEPLOYMENT)
|
||||
if deployment:
|
||||
os.environ[ENV_ENV] = deployment
|
||||
|
||||
return default_from_global(
|
||||
"deployment", ENV_ENV, cli_arg_name,
|
||||
|
Loading…
Reference in New Issue
Block a user