(context)
return resource
Generates the urlMap and globalForwardingRule part of the LB.
Generates the urlMap and globalForwardingRule part of the LB.
Generates the urlMap and globalForwardingRule part of the LB .
def GenerateLoadBalancer(context):
  """Generates the urlMap and globalForwardingRule part of the LB."""
  name = context.env['name']
  prop = context.properties

  resource = [
      {
          'name': common.AutoName(name, default.URL_MAP),
          'type': default.URL_MAP,
          'properties': {
              'defaultService': prop[DEFAULT_SERVICE],
              'hostRules': prop[HOST_RULES],
              'pathMatchers': prop[PATH_MATCHERS],
          }
      }, {
          'name': common.AutoName(name, default.PROXY),
          'type': default.PROXY,
          'properties': {
              'urlMap': common.AutoRef(name, default.URL_MAP),
          }
      },
  ]  # pyformat: disable
  return resource
def GenerateLoadBalancer ( context ) : name = context . env [ 'name' ] prop = context . properties resource = [ { 'name' : common . AutoName ( name , default . URL_MAP ) , 'type' : default . URL_MAP , 'properties' : { 'defaultService' : prop [ DEFAULT_SERVICE ] , 'hostRules' : prop [ HOST_RULES ] , 'pathMatchers' : prop [ PATH_MATCHERS ] , } } , { 'name' : common . AutoName ( name , default . PROXY ) , 'type' : default . PROXY , 'properties' : { 'urlMap' : common . AutoRef ( name , default . URL_MAP ) , } } , ] # pyformat: disable return resource