Commit 80046baa authored by Brandon Dunn's avatar Brandon Dunn
Browse files

updated

parent 66fc9960
......@@ -57,4 +57,22 @@ class DeleteHost(generics.DestroyAPIView):
# permission_classes - (permissions.IsAuthenticated)
serializer_class = serializers.RecordSerializer
class UpdateRecord(generics.UpdateAPIView):
queryset = models.Record.objects.all()
# permission_classes = (permissions.IsAuthenticated)
serializer_class = serializers.RecordSerializer
class UpdateHost(generics.UpdateAPIView):
queryset = models.Host.objects.all()
# permission_classes = (permissions.IsAuthenticated)
serializer_class = serializers.HostSerializer
class UpdateAdapter(generics.UpdateAPIView):
queryset = models.Adapter.objects.all()
# permission_classes = (permissions.IsAuthenticated)
serializer_class = serializers.AdapterSerializer
class UpdateMac(generics.UpdateAPIView):
queryset = models.Mac_Addr.objects.all()
# permission_classes = (permissions.IsAuthenticated)
serializer_class = serializers.MacAddrSerializer
\ No newline at end of file
......@@ -11,6 +11,11 @@ urlpatterns = [
url(r'^ipam/createadapter/', view=views.CreateAdapter.as_view()),
url(r'^ipam/createmac/', view=views.CreateMac.as_view()),
url(r'^ipam/updateip/(?P<pk>\d+)/$', view=views.UpdateIp.as_view()),
url(r'^ipam/deletehost/(?P<pk>\d+)/$', view=views.DeleteHost.as_view())
url(r'^ipam/deletehost/(?P<pk>\d+)/$', view=views.DeleteHost.as_view()),
url(r'^ipam/updaterecord/(?P<pk>\d+)/$', view=views.UpdateRecord.as_view()),
url(r'^ipam/updatehost/(?P<pk>\d+)/$', view=views.UpdateHost.as_view()),
url(r'^ipam/updateadapter/(?P<pk>\d+)/$', view=views.UpdateAdapter.as_view()),
url(r'^ipam/updatemac/(?P<pk>\d+)/$', view=views.UpdateMac.as_view()),
]
#(?P<id>\d+)/$
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 to comment