def VM_delete(request, project, VMid): print (project, VMid) #debugging if VMid[len(VMid)-1] == '/': #strip ending / VMid = VMid[:len(VMid)-1] nova = api.get_nova(request, project) #get nova object api.delete(nova, VMid) #delete specified Nova object return HttpResponseRedirect('/control/' + project + '/') #back to control
def deleteVM(request, VMname): """ Delete selected VM; called from editVM modal """ api.delete(VMname) return HttpResponseRedirect('/project_space/manage')