From 0f73b4e805ce9015ac05cca70fcb9b39b6717b17 Mon Sep 17 00:00:00 2001 From: HenryWinterbottom-NOAA Date: Mon, 26 Jun 2023 14:23:45 +0000 Subject: [PATCH] Added NOAA CSPs to allowable hosts. --- workflow/hosts.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/workflow/hosts.py b/workflow/hosts.py index fa1362ef2c..bb0128cb01 100644 --- a/workflow/hosts.py +++ b/workflow/hosts.py @@ -34,6 +34,7 @@ def detect(cls): machine = 'NOTFOUND' container = os.getenv('SINGULARITY_NAME', None) + pw_csp = os.getenv('PW_CSP', None) if os.path.exists('/scratch1/NCEPDEV'): machine = 'HERA' @@ -47,6 +48,11 @@ def detect(cls): machine = 'S4' elif container is not None: machine = 'CONTAINER' + elif pw_csp is not None: + if pw_csp.lower() not in ['azure', 'aws', 'gcp']: + raise ValueError( + f'NOAA cloud service provider "{pw_csp}" is not supported.') + machine = f"{pw_csp.upper()}PW" if machine not in Host.SUPPORTED_HOSTS: raise NotImplementedError(f'This machine is not a supported host.\n' +