add ServicePrivilegeAdmin to cord/hpc/rr admins
diff --git a/xos/cord/admin.py b/xos/cord/admin.py
index caf5d08..a21a58b 100644
--- a/xos/cord/admin.py
+++ b/xos/cord/admin.py
@@ -10,7 +10,7 @@
from django.utils import timezone
from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
-from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline
+from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline
from functools import update_wrapper
from django.contrib.admin.views.main import ChangeList
@@ -29,7 +29,7 @@
list_display_links = ('backend_status_icon', 'name', )
fieldsets = [(None, {'fields': ['backend_status_text', 'name','enabled','versionNumber', 'description',"view_url","icon_url" ], 'classes':['suit-tab suit-tab-general']})]
readonly_fields = ('backend_status_text', )
- inlines = [SliceInline,ServiceAttrAsTabInline]
+ inlines = [SliceInline,ServiceAttrAsTabInline,ServicePrivilegeInline]
extracontext_registered_admins = True
@@ -40,6 +40,7 @@
#('tools', 'Tools'),
('slices','Slices'),
('serviceattrs','Additional Attributes'),
+ ('serviceprivileges','Privileges'),
)
suit_form_includes = (('voltadmin.html', 'top', 'administration'),
@@ -82,7 +83,7 @@
list_display_links = ('backend_status_icon', 'name', )
fieldsets = [(None, {'fields': ['backend_status_text', 'name','enabled','versionNumber', 'description', "view_url","icon_url" ], 'classes':['suit-tab suit-tab-general']})]
readonly_fields = ('backend_status_text', )
- inlines = [SliceInline,ServiceAttrAsTabInline]
+ inlines = [SliceInline,ServiceAttrAsTabInline,ServicePrivilegeInline]
extracontext_registered_admins = True
@@ -93,6 +94,7 @@
#('tools', 'Tools'),
('slices','Slices'),
('serviceattrs','Additional Attributes'),
+ ('serviceprivileges','Privileges') ,
)
suit_form_includes = (('vcpeadmin.html', 'top', 'administration'),
@@ -135,7 +137,7 @@
list_display_links = ('backend_status_icon', 'name', )
fieldsets = [(None, {'fields': ['backend_status_text', 'name','enabled','versionNumber', 'description', "view_url","icon_url" ], 'classes':['suit-tab suit-tab-general']})]
readonly_fields = ('backend_status_text', )
- inlines = [SliceInline,ServiceAttrAsTabInline]
+ inlines = [SliceInline,ServiceAttrAsTabInline,ServicePrivilegeInline]
extracontext_registered_admins = True
@@ -146,6 +148,7 @@
#('tools', 'Tools'),
('slices','Slices'),
('serviceattrs','Additional Attributes'),
+ ('serviceprivileges','Privileges'),
)
suit_form_includes = (('vbngadmin.html', 'top', 'administration'),
diff --git a/xos/hpc/admin.py b/xos/hpc/admin.py
index 08a1cdb..6a6fb5c 100644
--- a/xos/hpc/admin.py
+++ b/xos/hpc/admin.py
@@ -10,7 +10,7 @@
from django.utils import timezone
from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
-from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, SliderWidget
+from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, SliderWidget, ServicePrivilegeInline
from functools import update_wrapper
from django.contrib.admin.views.main import ChangeList
@@ -128,7 +128,7 @@
list_display_links = ('backend_status_icon', 'name', )
fieldsets = [(None, {'fields': ['backend_status_text', 'name','scale','enabled','versionNumber', 'description', "cmi_hostname"], 'classes':['suit-tab suit-tab-general']})]
readonly_fields = ('backend_status_text', )
- inlines = [SliceInline,ServiceAttrAsTabInline]
+ inlines = [SliceInline,ServiceAttrAsTabInline,ServicePrivilegeInline]
form = HpcServiceForm
extracontext_registered_admins = True
@@ -140,6 +140,7 @@
('tools', 'Tools'),
('slices','Slices'),
('serviceattrs','Additional Attributes'),
+ ('serviceprivileges','Privileges'),
)
suit_form_includes = (('hpcadmin.html', 'top', 'administration'),
diff --git a/xos/requestrouter/admin.py b/xos/requestrouter/admin.py
index d5d3d19..510dd27 100644
--- a/xos/requestrouter/admin.py
+++ b/xos/requestrouter/admin.py
@@ -10,7 +10,7 @@
from django.utils import timezone
from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
-from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin
+from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, ServicePrivilegeInline
class RequestRouterAdmin(ReadOnlyAwareAdmin):
# Change the application breadcrumb to point to an RR Service if one is
@@ -33,7 +33,7 @@
verbose_name_plural = "Request Router Service"
list_display = ("name","enabled")
fieldsets = [(None, {'fields': ['name','enabled','versionNumber', 'description','behindNat','defaultTTL','defaultAction','lastResortAction','maxAnswers'], 'classes':['suit-tab suit-tab-general']})]
- inlines = [SliceInline,ServiceAttrAsTabInline]
+ inlines = [SliceInline,ServiceAttrAsTabInline,ServicePrivilegeInline]
user_readonly_fields = ["name", "enabled", "versionNumber", "description", "behindNat", "defaultTTL", "defaultAction", "lastResortAction", "maxAnswers"]
@@ -41,6 +41,7 @@
('administration', 'Administration'),
('slices','Slices'),
('serviceattrs','Additional Attributes'),
+ ('serviceprivileges','Privileges'),
)
suit_form_includes = (('rradmin.html', 'top', 'administration'),)