def device_create(request,top_id): res=HttpResponse() dname=request.REQUEST["name"] dpos=request.REQUEST["pos"] p=Device(name=dname,pos=dpos,topology_id=top_id,image="59c08ff9-488f-4b40-b19e-9ccef14006fb",flavor=1) p.save() res.write(str(p.id)) return res
def device_create(request,top_id): res=HttpResponse() dname=request.REQUEST["name"] dpos=request.REQUEST["pos"] p=Device(name=dname,pos=dpos,topology_id=top_id) p.save() res.write(str(p.id)) return res