(context)
return backends
Generates dictionary of IGMs connected to a backeend service.
Generates dictionary of IGMs connected to a backeend service.
Generates dictionary of IGMs connected to a backeend service .
def GenerateBackends(context):
  """Generates dictionary of IGMs connected to a backeend service."""
  name = context.env['name']
  prop = context.properties
  replicas = prop[REPLICAS]
  backends = []
  for zone_dict in replicas:
    short_abbrv = common.ShortenZoneName(zone_dict[default.ZONE])
    ig_name = common.AutoName(name, default.IGM, short_abbrv)
    zone_dict[GEN_NAME] = ig_name
    backend = {'name': ig_name, 'group': common.RefGroup(ig_name)}
    backends.append(backend)
  prop[GENERATED_PROP][REPLICAS] = copy.deepcopy(replicas)
  return backends
def GenerateBackends ( context ) : name = context . env [ 'name' ] prop = context . properties replicas = prop [ REPLICAS ] backends = [ ] for zone_dict in replicas : short_abbrv = common . ShortenZoneName ( zone_dict [ default . ZONE ] ) ig_name = common . AutoName ( name , default . IGM , short_abbrv ) zone_dict [ GEN_NAME ] = ig_name backend = { 'name' : ig_name , 'group' : common . RefGroup ( ig_name ) } backends . append ( backend ) prop [ GENERATED_PROP ] [ REPLICAS ] = copy . deepcopy ( replicas ) return backends