14 from absl
import flags
19 PROJECT = flags.DEFINE_string(
"project",
21 help=
"(required) GCP Project ID.")
22 RESOURCE_PREFIX = flags.DEFINE_string(
25 help=(
"(required) The prefix used to name GCP resources.\n"
26 "Together with `resource_suffix` used to create unique "
28 RESOURCE_SUFFIX = flags.DEFINE_string(
31 help=(
"The suffix used to name GCP resources.\n"
32 "Together with `resource_prefix` used to create unique "
34 "(default: test suite will generate a random suffix, based on suite "
35 "resource management preferences)"))
36 NETWORK = flags.DEFINE_string(
"network",
38 help=
"GCP Network ID")
39 COMPUTE_API_VERSION = flags.DEFINE_string(
40 "compute_api_version",
42 help=
"The version of the GCP Compute API, e.g., v1, v1alpha")
44 XDS_SERVER_URI = flags.DEFINE_string(
47 help=
"Override Traffic Director server URI.")
48 ENSURE_FIREWALL = flags.DEFINE_bool(
51 help=
"Ensure the allow-health-check firewall exists before each test case")
52 FIREWALL_SOURCE_RANGE = flags.DEFINE_list(
53 "firewall_source_range",
54 default=[
'35.191.0.0/16',
'130.211.0.0/22'],
55 help=
"Update the source range of the firewall rule.")
56 FIREWALL_ALLOWED_PORTS = flags.DEFINE_list(
57 "firewall_allowed_ports",
58 default=[
'8080-8100'],
59 help=
"Update the allowed ports of the firewall rule.")
62 SERVER_NAME = flags.DEFINE_string(
64 default=
"psm-grpc-server",
65 help=
"The name to use for test server deployments.")
66 SERVER_PORT = flags.DEFINE_integer(
71 help=
"Server test port.\nMust be within --firewall_allowed_ports.")
72 SERVER_MAINTENANCE_PORT = flags.DEFINE_integer(
73 "server_maintenance_port",
77 help=(
"Server port running maintenance services: Channelz, CSDS, Health, "
78 "XdsUpdateHealth, and ProtoReflection (optional).\n"
79 "Must be within --firewall_allowed_ports.\n"
80 "(default: the port is chosen automatically based on "
81 "the security configuration)"))
82 SERVER_XDS_HOST = flags.DEFINE_string(
84 default=
"xds-test-server",
85 help=(
"The xDS hostname of the test server.\n"
86 "Together with `server_xds_port` makes test server target URI, "
87 "xds:///hostname:port"))
90 SERVER_XDS_PORT = flags.DEFINE_integer(
95 help=(
"The xDS port of the test server.\n"
96 "Together with `server_xds_host` makes test server target URI, "
97 "xds:///hostname:port\n"
98 "Must be unique within a GCP project.\n"
99 "Set to 0 to select any unused port."))
102 CLIENT_NAME = flags.DEFINE_string(
104 default=
"psm-grpc-client",
105 help=
"The name to use for test client deployments")
106 CLIENT_PORT = flags.DEFINE_integer(
112 "The port test client uses to run gRPC services: Channelz, CSDS, "
113 "XdsStats, XdsUpdateClientConfigure, and ProtoReflection (optional).\n"
114 "Doesn't have to be within --firewall_allowed_ports."))
117 TESTING_VERSION = flags.DEFINE_string(
120 help=
"The testing gRPC version branch name. Like master, v1.41.x, v1.37.x")
122 FORCE_CLEANUP = flags.DEFINE_bool(
125 help=
"Force resource cleanup, even if not created by this test run")
127 flags.adopt_module_key_flags(highlighter)
129 flags.mark_flags_as_required([