(context)
return Resources()
Generate template config based on python objects.
Generate template config based on python objects.
Generate template config based on python objects .
def GenerateConfig(context):
  """Generate template config based on python objects."""
  compute_resource_util.SetContext(context)
  properties = context.properties
  assert ('region' in properties) ^ ('zone' in properties), (
      'Need to specify exactly only one from zone or region')
  if 'region' in properties:
    ComputeResource('ig', compute_constants.REGIONINSTANCEGROUPS, {
        'region': properties['region']
    })
  else:
    ComputeResource('ig', compute_constants.INSTANCEGROUPS, {
        'zone': properties['zone']
    })
  return Resources()
def GenerateConfig ( context ) : compute_resource_util . SetContext ( context ) properties = context . properties assert ( 'region' in properties ) ^ ( 'zone' in properties ) , ( 'Need to specify exactly only one from zone or region' ) if 'region' in properties : ComputeResource ( 'ig' , compute_constants . REGIONINSTANCEGROUPS , { 'region' : properties [ 'region' ] } ) else : ComputeResource ( 'ig' , compute_constants . INSTANCEGROUPS , { 'zone' : properties [ 'zone' ] } ) return Resources ( )