def create_autoscaler(gce, mig, params):
 changed = False
 as_policy = _gen_gce_as_policy(params['policy'])
 autoscaler = gce.ex_create_autoscaler(name=params['name'], zone=mig.zone, instance_group=mig, policy=as_policy)
 if autoscaler:
  changed = True
 return changed

def create_autoscaler ( gce , mig , params ) : changed = False as_policy = _gen_gce_as_policy ( params [ 'policy' ] ) autoscaler = gce . ex_create_autoscaler ( name = params [ 'name' ] , zone = mig . zone , instance_group = mig , policy = as_policy ) if autoscaler : changed = True return changed
create a new autoscaler for a mig .