(has_external_ip, network)
return network_interfaces
Helper method to create a network config.
Helper method to create a network config.
Helper method to create a network config .
def GetNetworkConfig(has_external_ip, network):
  """Helper method to create a network config."""
  network_interfaces = {
      'network': network
  }
  if has_external_ip:
    network_interfaces['accessConfigs'] = [{
        'name': 'external-nat',
        'type': 'ONE_TO_ONE_NAT'
    }]
  return network_interfaces
def GetNetworkConfig ( has_external_ip , network ) : network_interfaces = { 'network' : network } if has_external_ip : network_interfaces [ 'accessConfigs' ] = [ { 'name' : 'external-nat' , 'type' : 'ONE_TO_ONE_NAT' } ] return network_interfaces