def reboot(request, cluster_slug, instance): cluster = get_object_or_404(Cluster, slug=cluster_slug) auditlog = auditlog_entry(request, "Reboot", instance, cluster_slug) jobid = cluster.reboot_instance(instance) auditlog.update(job_id=jobid) action = {'action': _("Please wait... rebooting")} clear_cluster_user_cache(request.user.username, cluster_slug) return HttpResponse(json.dumps(action))
def startup(request, cluster_slug, instance): cluster = get_object_or_404(Cluster, slug=cluster_slug) auditlog = auditlog_entry(request, 'Start', instance, cluster_slug) jobid = cluster.startup_instance(instance) auditlog.update(job_id=jobid) action = {'action': _('Please wait... starting-up')} clear_cluster_user_cache(request.user.username, cluster_slug) return HttpResponse(json.dumps(action))
def reboot(request, cluster_slug, instance): cluster = get_object_or_404(Cluster, slug=cluster_slug) auditlog = auditlog_entry(request, "Reboot", instance, cluster_slug) jobid = cluster.reboot_instance(instance) auditlog.update(job_id=jobid) action = {"action": _("Please wait... rebooting")} clear_cluster_user_cache(request.user.username, cluster_slug) return HttpResponse(json.dumps(action))
def startup(request, cluster_slug, instance): cluster = get_object_or_404(Cluster, slug=cluster_slug) auditlog = auditlog_entry(request, 'Start', instance, cluster_slug) jobid = cluster.startup_instance(instance) auditlog.update(job_id=jobid) action = { 'action': _('Please wait... starting-up') } clear_cluster_user_cache(request.user.username, cluster_slug) return HttpResponse(json.dumps(action))