NetworkSlicesInline, to work with the NetworkSlices relation
diff --git a/planetstack/core/admin.py b/planetstack/core/admin.py
index 73fd3db..a16ca71 100644
--- a/planetstack/core/admin.py
+++ b/planetstack/core/admin.py
@@ -766,11 +766,18 @@
verbose_name_plural = "Slivers"
verbose_name = "Sliver"
+class NetworkSlicesInline(admin.TabularInline):
+ exclude = ['enacted']
+ model = NetworkSlice
+ extra = 0
+ verbose_name_plural = "Slices"
+ verbose_name = "Slice"
+
class NetworkAdmin(admin.ModelAdmin):
exclude = ['enacted']
list_display = ("name", "subnet", "ports", "labels")
readonly_fields = ("subnet", )
- inlines = [NetworkParameterInline, NetworkSliversInline, RouterInline]
+ inlines = [NetworkParameterInline, NetworkSliversInline, NetworkSlicesInline, RouterInline]
class NetworkTemplateAdmin(admin.ModelAdmin):
exclude = ['enacted']