Removed enacted field from initial_data.json and admin.py, corrected type on urls.py, removed MemberAdmin from admin.py
diff --git a/planetstack/core/admin.py b/planetstack/core/admin.py
index 90a9700..b80855ee 100644
--- a/planetstack/core/admin.py
+++ b/planetstack/core/admin.py
@@ -17,7 +17,7 @@
import django_evolution
class PlStackTabularInline(admin.TabularInline):
- exclude = ['enacted']
+ pass
class ReservationInline(PlStackTabularInline):
model = Reservation
@@ -43,25 +43,24 @@
class TagInline(generic.GenericTabularInline):
model = Tag
- exclude = ['enacted']
extra = 0
suit_classes = 'suit-tab suit-tab-tags'
class NetworkLookerUpper:
- """ This is a callable that looks up a network name in a sliver and returns
- the ip address for that network.
- """
-
- def __init__(self, name):
- self.short_description = name
- self.__name__ = name
- self.network_name = name
-
- def __call__(self, obj):
- if obj is not None:
- for nbs in obj.networksliver_set.all():
- if (nbs.network.name == self.network_name):
- return nbs.ip
+ """ This is a callable that looks up a network name in a sliver and returns
+ the ip address for that network.
+ """
+
+ def __init__(self, name):
+ self.short_description = name
+ self.__name__ = name
+ self.network_name = name
+
+ def __call__(self, obj):
+ if obj is not None:
+ for nbs in obj.networksliver_set.all():
+ if (nbs.network.name == self.network_name):
+ return nbs.ip
return ""
def __str__(self):
@@ -227,7 +226,6 @@
class PlanetStackBaseAdmin(admin.ModelAdmin):
save_on_top = False
- exclude = ['enacted']
class SliceRoleAdmin(PlanetStackBaseAdmin):
model = SliceRole
@@ -480,7 +478,6 @@
class NodeAdmin(admin.ModelAdmin):
form = NodeForm
- exclude = ['enacted']
list_display = ('name', 'site', 'deployment')
list_filter = ('deployment',)
inlines = [TagInline,SliverInline]
@@ -504,15 +501,9 @@
}
class ProjectAdmin(admin.ModelAdmin):
- exclude = ['enacted']
inlines = [TagInline]
-class MemberAdmin(admin.ModelAdmin):
- exclude = ['enacted']
- list_display = ['role', 'rightContent_type', 'content_type', 'content_object',]
-
class TagAdmin(admin.ModelAdmin):
- exclude = ['enacted']
list_display = ['project', 'name', 'value', 'content_type', 'content_object',]
class SliverAdmin(PlanetStackBaseAdmin):
@@ -672,17 +663,14 @@
return super(UserAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)
class ServiceResourceInline(admin.TabularInline):
- exclude = ['enacted']
model = ServiceResource
extra = 0
class ServiceClassAdmin(admin.ModelAdmin):
- exclude = ['enacted']
list_display = ('name', 'commitment', 'membershipFee')
inlines = [ServiceResourceInline]
class ReservedResourceInline(admin.TabularInline):
- exclude = ['enacted']
model = ReservedResource
extra = 0
suit_classes = 'suit-tab suit-tab-reservedresources'
@@ -759,7 +747,6 @@
return False
class ReservationAdmin(admin.ModelAdmin):
- exclude = ['enacted']
fieldsets = [('Reservation Details', {'fields': ['startTime', 'duration','slice'], 'classes': ['suit-tab suit-tab-general']})]
list_display = ('startTime', 'duration')
form = ReservationAddForm
@@ -815,15 +802,12 @@
return []
class NetworkParameterTypeAdmin(admin.ModelAdmin):
- exclude = ['enacted']
list_display = ("name", )
class RouterAdmin(admin.ModelAdmin):
- exclude = ['enacted']
list_display = ("name", )
class RouterInline(admin.TabularInline):
- # exclude = ['enacted']
model = Router.networks.through
extra = 0
verbose_name_plural = "Routers"
@@ -831,7 +815,6 @@
suit_classes = 'suit-tab suit-tab-routers'
class NetworkParameterInline(generic.GenericTabularInline):
- exclude = ['enacted']
model = NetworkParameter
extra = 1
verbose_name_plural = "Parameters"
@@ -839,7 +822,6 @@
suit_classes = 'suit-tab suit-tab-netparams'
class NetworkSliversInline(admin.TabularInline):
- exclude = ['enacted']
readonly_fields = ("ip", )
model = NetworkSliver
extra = 0
@@ -848,7 +830,6 @@
suit_classes = 'suit-tab suit-tab-networkslivers'
class NetworkSlicesInline(admin.TabularInline):
- exclude = ['enacted']
model = NetworkSlice
extra = 0
verbose_name_plural = "Slices"
@@ -856,7 +837,6 @@
suit_classes = 'suit-tab suit-tab-networkslices'
class NetworkAdmin(admin.ModelAdmin):
- exclude = ['enacted']
list_display = ("name", "subnet", "ports", "labels")
readonly_fields = ("subnet", )
@@ -873,7 +853,6 @@
('routers','Routers'),
)
class NetworkTemplateAdmin(admin.ModelAdmin):
- exclude = ['enacted']
list_display = ("name", "guaranteedBandwidth", "visibility")
# register a signal that caches the user's credentials when they log in
@@ -916,7 +895,6 @@
admin.site.register(Node, NodeAdmin)
#admin.site.register(SlicePrivilege, SlicePrivilegeAdmin)
#admin.site.register(SitePrivilege, SitePrivilegeAdmin)
- admin.site.register(Member, MemberAdmin)
admin.site.register(Sliver, SliverAdmin)
admin.site.register(Image, ImageAdmin)