Example #1
0
def attach_instances(request, group_name):
    try:
        params = request.POST
        hosts = params.get("other_hosts")
        host_ids = hosts.split(',')
        autoscaling_groups_helper.hosts_action_in_group(request, group_name, host_ids, "ATTACH")
        return redirect('/groups/{}/'.format(group_name))
    except:
        log.error(traceback.format_exc())
        return redirect('/groups/{}/'.format(group_name))
Example #2
0
def attach_instances(request, group_name):
    try:
        params = request.POST
        hosts = params.get("other_hosts")
        host_ids = hosts.split(',')
        autoscaling_groups_helper.hosts_action_in_group(request, group_name, host_ids, "ATTACH")
        return redirect('/groups/{}/'.format(group_name))
    except:
        log.error(traceback.format_exc())
        return redirect('/groups/{}/'.format(group_name))
Example #3
0
def instance_action_in_asg(request, group_name):
    host_id = request.GET.get("hostId", "")
    action = request.GET.get("action", "")
    host_ids = []
    host_ids.append(host_id)
    try:
        autoscaling_groups_helper.hosts_action_in_group(request, group_name, host_ids, action)
    except:
        log.error(traceback.format_exc())
        raise
    return redirect('/groups/{}'.format(group_name))
Example #4
0
def instance_action_in_asg(request, group_name):
    host_id = request.GET.get("hostId", "")
    action = request.GET.get("action", "")
    host_ids = []
    host_ids.append(host_id)
    try:
        autoscaling_groups_helper.hosts_action_in_group(request, group_name, host_ids, action)
    except:
        log.error(traceback.format_exc())
        raise
    return redirect('/groups/{}'.format(group_name))