Commit bca0eb03 by Karsa Zoltán István

port post

parent ee2742ae
...@@ -348,9 +348,10 @@ class SetupPortREST(APIView): ...@@ -348,9 +348,10 @@ class SetupPortREST(APIView):
vlan=Vlan.objects.get(pk=vlan_id) vlan=Vlan.objects.get(pk=vlan_id)
interface = Interface.objects.filter(instance=instance).filter(vlan=vlan).get() interface = Interface.objects.filter(instance=instance).filter(vlan=vlan).get()
if addport.is_valid(): if addport.is_valid():
AddPortOperation(instance).call(port=int(data['port_destination']), proto=str(data['type']), host=interface.host) AddPortOperation(instance).call(port=int(data['port_destination']), proto=str(data['type']), host=interface.host, user=request.user)
rules = Rule.objects.filter(host=interface.host)
return JsonResponse({}, status=201) return JsonResponse({}, status=201)
return JsonResponse(status=400) return JsonResponse({}, status=400)
def delete(self, request, vm_id, vlan_id, format=None): def delete(self, request, vm_id, vlan_id, format=None):
......
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