aboutsummaryrefslogtreecommitdiffstats
path: root/src/resource_inventory/admin.py
diff options
context:
space:
mode:
authorssmith <ssmith@iol.unh.edu>2020-05-18 18:08:35 -0400
committerssmith <ssmith@iol.unh.edu>2020-05-20 17:13:57 -0400
commit9ebe025e1385a0a4fa8e24ad62cc1c0f8808fb9c (patch)
tree3556ad5f3d6a70ce1756240cf68831a4b3684087 /src/resource_inventory/admin.py
parent530271c247a4ce538e3aa69fd3893481fada44ab (diff)
Reworks resource tests into model validation where possible.
Change-Id: Ieb77cc38a42345107c2cac62ba1499bd7974ad77 Signed-off-by: Sean Smith <ssmith@iol.unh.edu>
Diffstat (limited to 'src/resource_inventory/admin.py')
-rw-r--r--src/resource_inventory/admin.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/resource_inventory/admin.py b/src/resource_inventory/admin.py
index 439dad3..2444a98 100644
--- a/src/resource_inventory/admin.py
+++ b/src/resource_inventory/admin.py
@@ -10,6 +10,8 @@
from django.contrib import admin
+from resource_inventory.forms import InterfaceConfigurationForm
+
from resource_inventory.models import (
ResourceProfile,
InterfaceProfile,
@@ -32,9 +34,10 @@ from resource_inventory.models import (
Image,
RemoteInfo,
PhysicalNetwork,
- NetworkConnection
+ NetworkConnection,
)
+
admin.site.register([
ResourceProfile,
InterfaceProfile,
@@ -43,7 +46,6 @@ admin.site.register([
RamProfile,
ResourceTemplate,
ResourceConfiguration,
- InterfaceConfiguration,
Server,
Interface,
Network,
@@ -57,4 +59,12 @@ admin.site.register([
Image,
PhysicalNetwork,
NetworkConnection,
- RemoteInfo])
+ RemoteInfo]
+)
+
+
+class InterfaceConfigurationAdmin(admin.ModelAdmin):
+ form = InterfaceConfigurationForm
+
+
+admin.site.register(InterfaceConfiguration, InterfaceConfigurationAdmin)