gcp allow manual network configuration (#3748)

This commit is contained in:
James Casbon
2019-01-12 22:02:20 +00:00
committed by Eric Liang
parent fbea1ece2e
commit 528bb3afd9
+6
View File
@@ -267,6 +267,12 @@ def _configure_key_pair(config):
def _configure_subnet(config):
"""Pick a reasonable subnet if not specified by the config."""
# Rationale: avoid subnet lookup if the network is already
# completely manually configured
if ("networkInterfaces" in config["head_node"]
and "networkInterfaces" in config["worker_nodes"]):
return config
subnets = _list_subnets(config)
if not subnets: