Skip to content

Commit

Permalink
Add NOAA CSPs to allowable hosts. (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryRWinterbottom authored Jun 26, 2023
1 parent 69946cf commit 524c713
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions workflow/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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' +
Expand Down

0 comments on commit 524c713

Please sign in to comment.