Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions common/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@

import argparse

REGION_LIST = (
"us",
"asia-southeast1",
"europe",
"europe-west2",
"australia-southeast1",
"me-west1",
)


def add_argument_region(parser: argparse.ArgumentParser):
"""Adds a shared command-line argument to all the sample modules."""
Expand All @@ -28,13 +37,7 @@ def add_argument_region(parser: argparse.ArgumentParser):
type=str,
required=False,
default="us",
choices=(
"asia-southeast1",
"europe",
"us",
"europe-west2",
"australia-southeast1",
),
choices=REGION_LIST,
help="the region where the customer is located (default: us)",
)

Expand Down