Commit 34b69cf4 by Kálmán Viktor

dashboard: create instance and deploy it

parent 40056847
......@@ -122,9 +122,20 @@ class VmCreate(TemplateView):
return context
def post(self, request, *args, **kwargs):
if self.request.user.is_authenticated():
user = self.request.user
user = None
resp = request.POST.copy()
resp['managed-vlans'] = request.POST.getlist('managed-vlans')
resp['unmanaged-vlans'] = request.POST.getlist('unmanaged-vlans')
resp['disks'] = request.POST.getlist('disks')
template = InstanceTemplate.objects.get(
inst = Instance.create_from_template(template=template, owner=user)
# TODO handle response
return HttpResponse(json.dumps(resp), content_type="application/json")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment