CORD-1241 remove obsolete models
Change-Id: I7dd71bdfa9039fb194ccab6bd3369a497a3948d6
diff --git a/xos/core/admin.py b/xos/core/admin.py
index 8752f24..b9cb66a 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -1864,21 +1864,6 @@
user_readonly_inlines = []
-class RouterAdmin(XOSBaseAdmin):
- list_display = ("backend_status_icon", "name", )
- list_display_links = ('backend_status_icon', 'name', )
- user_readonly_fields = ['name']
- user_readonly_inlines = []
-
-
-class RouterInline(XOSTabularInline):
- model = Router.networks.through
- extra = 0
- verbose_name_plural = "Routers"
- verbose_name = "Router"
- suit_classes = 'suit-tab suit-tab-routers'
-
-
class NetworkParameterInline(PlStackGenericTabularInline):
model = NetworkParameter
extra = 0
@@ -1937,8 +1922,7 @@
list_display = ("backend_status_icon", "name", "subnet", "ports", "labels")
list_display_links = ('backend_status_icon', 'name', )
readonly_fields = ("subnet", )
- inlines = [NetworkParameterInline, NetworkPortInline,
- NetworkSlicesInline, RouterInline]
+ inlines = [NetworkPortInline, NetworkSlicesInline] # NetworkParameterInline,
admin_inlines = [ControllerNetworkInline]
form = NetworkForm
@@ -1965,7 +1949,6 @@
('netparams', 'Parameters'),
('ports', 'Ports'),
('networkslices', 'Slices'),
- ('routers', 'Routers'),
]
request = getattr(_thread_locals, "request", None)
@@ -1981,19 +1964,18 @@
list_display_links = ('backend_status_icon', 'name', )
user_readonly_fields = ["name", "guaranteed_bandwidth", "visibility"]
user_readonly_inlines = []
- inlines = [NetworkParameterInline, ]
+ # inlines = [NetworkParameterInline, ]
fieldsets = [
(None, {'fields': ['name', 'description', 'guaranteed_bandwidth', 'visibility', 'translation', 'access', 'shared_network_name', 'shared_network_id', 'topology_kind', 'controller_kind', 'vtn_kind'],
'classes':['suit-tab suit-tab-general']}), ]
- suit_form_tabs = (('general', 'Network Template Details'),
- ('netparams', 'Parameters'))
+ suit_form_tabs = (('general', 'Network Template Details'), ('netparams', 'Parameters'))
class PortAdmin(XOSBaseAdmin):
list_display = ("backend_status_icon", "id", "ip")
list_display_links = ('backend_status_icon', 'id')
readonly_fields = ("subnet", )
- inlines = [NetworkParameterInline]
+ #inlines = [NetworkParameterInline]
fieldsets = [
(None, {'fields': ['backend_status_text', 'network', 'instance', 'ip', 'port_id', 'mac'],
@@ -2020,54 +2002,11 @@
request.session['auth'] = auth
user_logged_in.connect(cache_credentials)
-class ProgramForm(forms.ModelForm):
-
- class Meta:
- model = Program
- widgets = {
- 'contents': UploadTextareaWidget(attrs={'rows': 20, 'cols': 80, 'class': "input-xxlarge"}),
- 'description': forms.Textarea(attrs={'rows': 3, 'cols': 80, 'class': 'input-xxlarge'}),
- 'messages': forms.Textarea(attrs={'rows': 20, 'cols': 80, 'class': 'input-xxlarge'}),
- 'output': forms.Textarea(attrs={'rows': 3, 'cols': 80, 'class': 'input-xxlarge'})
- }
- fields = '__all__'
-
-
-class ProgramAdmin(XOSBaseAdmin):
- list_display = ("name", "status")
- list_display_links = ('name', "status")
-
- form = ProgramForm
-
- fieldsets = [
- (None, {'fields': ['name', 'command', 'kind', 'description', 'output', 'status'],
- 'classes':['suit-tab suit-tab-general']}),
- (None, {'fields': ['contents'],
- 'classes':['suit-tab suit-tab-contents']}),
- (None, {'fields': ['messages'],
- 'classes':['suit-tab suit-tab-messages']}),
- ]
-
- readonly_fields = ("status",)
-
- @property
- def suit_form_tabs(self):
- tabs = [('general', 'Program Details'),
- ('contents', 'Program Source'),
- ('messages', 'Messages'),
- ]
-
- request = getattr(_thread_locals, "request", None)
- if request and request.user.is_admin:
- tabs.append(('admin-only', 'Admin-Only'))
-
- return tabs
-
class AddressPoolForm(forms.ModelForm):
class Meta:
- model = Program
+ model = AddressPool
widgets = {
'addresses': UploadTextareaWidget(attrs={'rows': 20, 'cols': 80, 'class': "input-xxlarge"}),
}
@@ -2089,15 +2028,9 @@
@property
def suit_form_tabs(self):
- tabs = [('general', 'Program Details'),
- ('contents', 'Program Source'),
- ('messages', 'Messages'),
+ tabs = [('general', 'Address Pool Details'),
]
-# request=getattr(_thread_locals, "request", None)
-# if request and request.user.is_admin:
-# tabs.append( ('admin-only', 'Admin-Only') )
-
return tabs
class AddressPoolInline(XOSTabularInline):
@@ -2139,9 +2072,7 @@
admin.site.register(XOS, XosModelAdmin)
admin.site.register(Network, NetworkAdmin)
admin.site.register(Port, PortAdmin)
-admin.site.register(Router, RouterAdmin)
admin.site.register(NetworkTemplate, NetworkTemplateAdmin)
-admin.site.register(Program, ProgramAdmin)
if True:
admin.site.register(NetworkParameterType, NetworkParameterTypeAdmin)
@@ -2152,8 +2083,6 @@
admin.site.register(SliceRole)
admin.site.register(Node, NodeAdmin)
admin.site.register(NodeLabel, NodeLabelAdmin)
- #admin.site.register(SlicePrivilege, SlicePrivilegeAdmin)
- #admin.site.register(SitePrivilege, SitePrivilegeAdmin)
admin.site.register(Instance, InstanceAdmin)
admin.site.register(Image, ImageAdmin)
admin.site.register(DashboardView, DashboardViewAdmin)
diff --git a/xos/core/models/attic/program_model.py b/xos/core/models/attic/program_model.py
deleted file mode 100644
index dc7ccdf..0000000
--- a/xos/core/models/attic/program_model.py
+++ /dev/null
@@ -1,18 +0,0 @@
-@classmethod
-def select_by_user(cls, user):
- return cls.objects.all()
-
-def __unicode__(self): return u'%s' % (self.name)
-
-def can_update(self, user):
- return True
-
-def save(self, *args, **kwargs):
- # set creator on first save
- if not self.owner and hasattr(self, 'caller'):
- self.owner = self.caller
-
- if (self.command in ["run", "destroy"]) and (self.status in ["complete", "exception"]):
- self.status = "queued"
-
- super(Program, self).save(*args, **kwargs)
diff --git a/xos/core/models/attic/project_model.py b/xos/core/models/attic/project_model.py
deleted file mode 100644
index 3fd623e..0000000
--- a/xos/core/models/attic/project_model.py
+++ /dev/null
@@ -1 +0,0 @@
-def __unicode__(self): return u'%s' % (self.name)
diff --git a/xos/core/models/attic/router_model.py b/xos/core/models/attic/router_model.py
deleted file mode 100644
index a538cd4..0000000
--- a/xos/core/models/attic/router_model.py
+++ /dev/null
@@ -1,5 +0,0 @@
-def __unicode__(self): return u'%s' % (self.name)
-
-def can_update(self, user):
- return user.can_update_slice(self.owner)
-
diff --git a/xos/core/models/attic/singletonmodel.py b/xos/core/models/attic/singletonmodel.py
deleted file mode 100644
index 4ab6f6e..0000000
--- a/xos/core/models/attic/singletonmodel.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from django.db import models
-
-class SingletonModel(models.Model):
- class Meta:
- abstract = True
-
- def save(self, *args, **kwargs):
- self.__class__.objects.exclude(id=self.id).delete()
- super(SingletonModel, self).save(*args, **kwargs)
-
- @classmethod
- def load(cls):
- try:
- return cls.objects.get()
- except cls.DoesNotExist:
- return cls()
diff --git a/xos/core/models/attic/sitecredential_model.py b/xos/core/models/attic/sitecredential_model.py
deleted file mode 100644
index df937ad..0000000
--- a/xos/core/models/attic/sitecredential_model.py
+++ /dev/null
@@ -1,4 +0,0 @@
-def __unicode__(self):
- return self.name
-
-
diff --git a/xos/core/models/attic/slicecredential_model.py b/xos/core/models/attic/slicecredential_model.py
deleted file mode 100644
index f876fd6..0000000
--- a/xos/core/models/attic/slicecredential_model.py
+++ /dev/null
@@ -1,3 +0,0 @@
-def __unicode__(self):
- return self.name
-
diff --git a/xos/core/models/attic/slicetag_model.py b/xos/core/models/attic/slicetag_model.py
deleted file mode 100644
index 87f00e4..0000000
--- a/xos/core/models/attic/slicetag_model.py
+++ /dev/null
@@ -1,11 +0,0 @@
-def can_update(self, user):
- return user.can_update_slice(self.slice)
-
-@staticmethod
-def select_by_user(user):
- if user.is_admin:
- qs = SliceTag.objects.all()
- else:
- slices = Slice.select_by_user(user)
- qs = SliceTag.objects.filter(slice__in=slices)
- return qs
diff --git a/xos/core/models/attic/usercredential_model.py b/xos/core/models/attic/usercredential_model.py
deleted file mode 100644
index e6feca2..0000000
--- a/xos/core/models/attic/usercredential_model.py
+++ /dev/null
@@ -1,3 +0,0 @@
-
-def __unicode__(self):
- return self.name
diff --git a/xos/core/models/program.xproto b/xos/core/models/program.xproto
deleted file mode 100644
index 38b083e..0000000
--- a/xos/core/models/program.xproto
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-message Program (PlCoreBase){
- required string name = 1 [max_length = 30, content_type = "stripped", blank = False, help_text = "Service Name", null = False, db_index = False];
- optional string description = 2 [help_text = "Description of Service", max_length = 254, null = True, db_index = False, blank = True];
- required string kind = 3 [choices = "(('tosca', 'Tosca'),)", max_length = 30, content_type = "stripped", blank = False, help_text = "Kind of service", null = False, db_index = False];
- optional string command = 4 [choices = "(('run', 'Run'), ('destroy', 'Destroy'))", max_length = 30, content_type = "stripped", blank = True, help_text = "Command to run", null = True, db_index = False];
- optional manytoone owner->User:programs = 5 [db_index = True, null = True, blank = False];
- optional string contents = 6 [help_text = "Contents of Program", null = True, db_index = False, blank = True];
- optional string output = 7 [help_text = "Output of Program", null = True, db_index = False, blank = True];
- optional string messages = 8 [help_text = "Debug messages", null = True, db_index = False, blank = True];
- optional string status = 9 [help_text = "Status of program", max_length = 30, null = True, db_index = False, blank = True];
-}
diff --git a/xos/core/models/project.xproto b/xos/core/models/project.xproto
deleted file mode 100644
index d857de9..0000000
--- a/xos/core/models/project.xproto
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-message Project (PlCoreBase){
- required string name = 1 [max_length = 200, content_type = "stripped", blank = False, help_text = "Name of Project", null = False, db_index = False];
-}
diff --git a/xos/core/models/router.xproto b/xos/core/models/router.xproto
deleted file mode 100644
index 0e17b20..0000000
--- a/xos/core/models/router.xproto
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-message Router (PlCoreBase){
- required string name = 1 [db_index = False, max_length = 32, null = False, blank = False];
- required manytoone owner->Slice:routers = 2 [db_index = True, null = False, blank = False];
- required manytomany permittedNetworks->Network/Router_permittedNetworks:availableRouters = 3 [db_index = False, null = False, blank = True];
- required manytomany networks->Network/Router_networks:routers = 4 [db_index = False, null = False, blank = True];
-}
diff --git a/xos/core/models/singletonmodel.py b/xos/core/models/singletonmodel.py
deleted file mode 100644
index 4ab6f6e..0000000
--- a/xos/core/models/singletonmodel.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from django.db import models
-
-class SingletonModel(models.Model):
- class Meta:
- abstract = True
-
- def save(self, *args, **kwargs):
- self.__class__.objects.exclude(id=self.id).delete()
- super(SingletonModel, self).save(*args, **kwargs)
-
- @classmethod
- def load(cls):
- try:
- return cls.objects.get()
- except cls.DoesNotExist:
- return cls()
diff --git a/xos/core/models/sitecredential.xproto b/xos/core/models/sitecredential.xproto
deleted file mode 100644
index f6a3fec..0000000
--- a/xos/core/models/sitecredential.xproto
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-message SiteCredential (PlCoreBase){
- required manytoone site->Site:sitecredentials = 1 [help_text = "The User this credential is associated with", null = False, db_index = True, blank = False];
- required string name = 2 [help_text = "The credential type, e.g. ec2", max_length = 128, null = False, db_index = True, blank = False];
- required string key_id = 3 [max_length = 1024, content_type = "stripped", blank = False, help_text = "The backend id of this credential", null = False, db_index = False];
- required string enc_value = 4 [help_text = "The key value of this credential", max_length = 1024, null = False, db_index = False, blank = False];
-}
diff --git a/xos/core/models/slicecredential.xproto b/xos/core/models/slicecredential.xproto
deleted file mode 100644
index 3ae9ed9..0000000
--- a/xos/core/models/slicecredential.xproto
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-message SliceCredential (PlCoreBase){
- required manytoone slice->Slice:slicecredentials = 1 [help_text = "The User this credential is associated with", null = False, db_index = True, blank = False];
- required string name = 2 [help_text = "The credential type, e.g. ec2", max_length = 128, null = False, db_index = True, blank = False];
- required string key_id = 3 [max_length = 1024, content_type = "stripped", blank = False, help_text = "The backend id of this credential", null = False, db_index = False];
- required string enc_value = 4 [help_text = "The key value of this credential", max_length = 1024, null = False, db_index = False, blank = False];
-}
diff --git a/xos/core/models/slicetag.xproto b/xos/core/models/slicetag.xproto
deleted file mode 100644
index a2cac93..0000000
--- a/xos/core/models/slicetag.xproto
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-message SliceTag (PlCoreBase){
- required manytoone slice->Slice:slicetags = 1 [db_index = True, null = False, blank = False];
- required string name = 2 [choices = "(('privatekey', 'Private Key'), ('publickey', 'Public Key'))", max_length = 30, content_type = "stripped", blank = False, help_text = "The name of this tag", null = False, db_index = False];
- required string value = 3 [max_length = 1024, content_type = "stripped", blank = False, help_text = "The value of this tag", null = False, db_index = False];
-}
diff --git a/xos/core/models/usercredential.xproto b/xos/core/models/usercredential.xproto
deleted file mode 100644
index 22fc83c..0000000
--- a/xos/core/models/usercredential.xproto
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-message UserCredential (PlCoreBase){
- required manytoone user->User:usercredentials = 1 [help_text = "The User this credential is associated with", null = False, db_index = True, blank = False];
- required string name = 2 [help_text = "The credential type, e.g. ec2", max_length = 128, null = False, db_index = True, blank = False];
- required string key_id = 3 [max_length = 1024, content_type = "stripped", blank = False, help_text = "The backend id of this credential", null = False, db_index = False];
- required string enc_value = 4 [help_text = "The key value of this credential", max_length = 1024, null = False, db_index = False, blank = False];
-}
diff --git a/xos/core/xoslib/tools/make_defaults.py b/xos/core/xoslib/tools/make_defaults.py
index 1fc5c89..caa5467 100644
--- a/xos/core/xoslib/tools/make_defaults.py
+++ b/xos/core/xoslib/tools/make_defaults.py
@@ -22,7 +22,7 @@
classname = c.__class__.__name__
classname = classname[0].lower() + classname[1:]
- if (classname in ["plCoreBase", "singletonModel"]):
+ if (classname in ["plCoreBase", ]):
continue
fieldNames = [f.name for f in c._meta.fields]
diff --git a/xos/core/xoslib/tools/make_validators.py b/xos/core/xoslib/tools/make_validators.py
index 56dc024..69bfee3 100644
--- a/xos/core/xoslib/tools/make_validators.py
+++ b/xos/core/xoslib/tools/make_validators.py
@@ -22,7 +22,7 @@
classname = c.__class__.__name__
classname = classname[0].lower() + classname[1:]
- if (classname in ["plCoreBase", "singletonModel"]):
+ if (classname in ["plCoreBase", ]):
continue
fields = c.getValidators();
diff --git a/xos/genx/targets/init.xtarget b/xos/genx/targets/init.xtarget
index 4cf3c31..417e145 100644
--- a/xos/genx/targets/init.xtarget
+++ b/xos/genx/targets/init.xtarget
@@ -3,7 +3,6 @@
from .plcorebase import PlCoreBase,PlCoreBaseManager,PlCoreBaseDeletionManager,PlModelMixIn,ModelLink
from .contenttype import ContentType
-from .singletonmodel import SingletonModel
from .site import Site
from .dashboardview import DashboardView
from .user import User
diff --git a/xos/services/syndicate_storage/models.py b/xos/services/syndicate_storage/models.py
index 27db059..6ea9c41 100644
--- a/xos/services/syndicate_storage/models.py
+++ b/xos/services/syndicate_storage/models.py
@@ -1,4 +1,4 @@
-from core.models import User,Site,Service,SingletonModel,PlCoreBase,Slice,SlicePrivilege
+from core.models import User,Site,Service,PlCoreBase,Slice,SlicePrivilege
import os
from django.db import models
from django.db.models import Q
@@ -7,7 +7,7 @@
# Create your models here.
-class SyndicateService(SingletonModel,Service):
+class SyndicateService(Service):
class Meta:
app_label = "syndicate_storage"
verbose_name = "Syndicate Service"
diff --git a/xos/xos/xosapi.py b/xos/xos/xosapi.py
index ba0281b..da7ea7e 100644
--- a/xos/xos/xosapi.py
+++ b/xos/xos/xosapi.py
@@ -72,9 +72,6 @@
url(r'xos/tags/$', TagList.as_view(), name='tag-list-legacy'),
url(r'xos/tags/(?P<pk>[a-zA-Z0-9\-]+)/$', TagDetail.as_view(), name ='tag-detail-legacy'),
- url(r'xos/usercredentials/$', UserCredentialList.as_view(), name='usercredential-list-legacy'),
- url(r'xos/usercredentials/(?P<pk>[a-zA-Z0-9\-]+)/$', UserCredentialDetail.as_view(), name ='usercredential-detail-legacy'),
-
url(r'xos/slice_privileges/$', SlicePrivilegeList.as_view(), name='sliceprivilege-list-legacy'),
url(r'xos/slice_privileges/(?P<pk>[a-zA-Z0-9\-]+)/$', SlicePrivilegeDetail.as_view(), name ='sliceprivilege-detail-legacy'),
@@ -117,18 +114,12 @@
url(r'xos/instances/$', InstanceList.as_view(), name='instance-list-legacy'),
url(r'xos/instances/(?P<pk>[a-zA-Z0-9\-]+)/$', InstanceDetail.as_view(), name ='instance-detail-legacy'),
- url(r'xos/programs/$', ProgramList.as_view(), name='program-list-legacy'),
- url(r'xos/programs/(?P<pk>[a-zA-Z0-9\-]+)/$', ProgramDetail.as_view(), name ='program-detail-legacy'),
-
url(r'xos/roles/$', RoleList.as_view(), name='role-list-legacy'),
url(r'xos/roles/(?P<pk>[a-zA-Z0-9\-]+)/$', RoleDetail.as_view(), name ='role-detail-legacy'),
url(r'xos/nodelabels/$', NodeLabelList.as_view(), name='nodelabel-list-legacy'),
url(r'xos/nodelabels/(?P<pk>[a-zA-Z0-9\-]+)/$', NodeLabelDetail.as_view(), name ='nodelabel-detail-legacy'),
- url(r'xos/slicecredentials/$', SliceCredentialList.as_view(), name='slicecredential-list-legacy'),
- url(r'xos/slicecredentials/(?P<pk>[a-zA-Z0-9\-]+)/$', SliceCredentialDetail.as_view(), name ='slicecredential-detail-legacy'),
-
url(r'xos/nodes/$', NodeList.as_view(), name='node-list-legacy'),
url(r'xos/nodes/(?P<pk>[a-zA-Z0-9\-]+)/$', NodeDetail.as_view(), name ='node-detail-legacy'),
@@ -192,9 +183,6 @@
url(r'xos/controllersliceprivileges/$', ControllerSlicePrivilegeList.as_view(), name='controllersliceprivilege-list-legacy'),
url(r'xos/controllersliceprivileges/(?P<pk>[a-zA-Z0-9\-]+)/$', ControllerSlicePrivilegeDetail.as_view(), name ='controllersliceprivilege-detail-legacy'),
- url(r'xos/sitecredentials/$', SiteCredentialList.as_view(), name='sitecredential-list-legacy'),
- url(r'xos/sitecredentials/(?P<pk>[a-zA-Z0-9\-]+)/$', SiteCredentialDetail.as_view(), name ='sitecredential-detail-legacy'),
-
url(r'xos/deploymentprivileges/$', DeploymentPrivilegeList.as_view(), name='deploymentprivilege-list-legacy'),
url(r'xos/deploymentprivileges/(?P<pk>[a-zA-Z0-9\-]+)/$', DeploymentPrivilegeDetail.as_view(), name ='deploymentprivilege-detail-legacy'),
@@ -210,21 +198,12 @@
url(r'xos/deploymentroles/$', DeploymentRoleList.as_view(), name='deploymentrole-list-legacy'),
url(r'xos/deploymentroles/(?P<pk>[a-zA-Z0-9\-]+)/$', DeploymentRoleDetail.as_view(), name ='deploymentrole-detail-legacy'),
- url(r'xos/projects/$', ProjectList.as_view(), name='project-list-legacy'),
- url(r'xos/projects/(?P<pk>[a-zA-Z0-9\-]+)/$', ProjectDetail.as_view(), name ='project-detail-legacy'),
-
url(r'xos/tenantrootprivileges/$', TenantRootPrivilegeList.as_view(), name='tenantrootprivilege-list-legacy'),
url(r'xos/tenantrootprivileges/(?P<pk>[a-zA-Z0-9\-]+)/$', TenantRootPrivilegeDetail.as_view(), name ='tenantrootprivilege-detail-legacy'),
- url(r'xos/slicetags/$', SliceTagList.as_view(), name='slicetag-list-legacy'),
- url(r'xos/slicetags/(?P<pk>[a-zA-Z0-9\-]+)/$', SliceTagDetail.as_view(), name ='slicetag-detail-legacy'),
-
url(r'xos/networktemplates/$', NetworkTemplateList.as_view(), name='networktemplate-list-legacy'),
url(r'xos/networktemplates/(?P<pk>[a-zA-Z0-9\-]+)/$', NetworkTemplateDetail.as_view(), name ='networktemplate-detail-legacy'),
- url(r'xos/routers/$', RouterList.as_view(), name='router-list-legacy'),
- url(r'xos/routers/(?P<pk>[a-zA-Z0-9\-]+)/$', RouterDetail.as_view(), name ='router-detail-legacy'),
-
url(r'xos/serviceresources/$', ServiceResourceList.as_view(), name='serviceresource-list-legacy'),
url(r'xos/serviceresources/(?P<pk>[a-zA-Z0-9\-]+)/$', ServiceResourceDetail.as_view(), name ='serviceresource-detail-legacy'),
@@ -268,9 +247,6 @@
url(r'api/core/tags/$', TagList.as_view(), name='tag-list'),
url(r'api/core/tags/(?P<pk>[a-zA-Z0-9\-]+)/$', TagDetail.as_view(), name ='tag-detail'),
- url(r'api/core/usercredentials/$', UserCredentialList.as_view(), name='usercredential-list'),
- url(r'api/core/usercredentials/(?P<pk>[a-zA-Z0-9\-]+)/$', UserCredentialDetail.as_view(), name ='usercredential-detail'),
-
url(r'api/core/slice_privileges/$', SlicePrivilegeList.as_view(), name='sliceprivilege-list'),
url(r'api/core/slice_privileges/(?P<pk>[a-zA-Z0-9\-]+)/$', SlicePrivilegeDetail.as_view(), name ='sliceprivilege-detail'),
@@ -313,18 +289,12 @@
url(r'api/core/instances/$', InstanceList.as_view(), name='instance-list'),
url(r'api/core/instances/(?P<pk>[a-zA-Z0-9\-]+)/$', InstanceDetail.as_view(), name ='instance-detail'),
- url(r'api/core/programs/$', ProgramList.as_view(), name='program-list'),
- url(r'api/core/programs/(?P<pk>[a-zA-Z0-9\-]+)/$', ProgramDetail.as_view(), name ='program-detail'),
-
url(r'api/core/roles/$', RoleList.as_view(), name='role-list'),
url(r'api/core/roles/(?P<pk>[a-zA-Z0-9\-]+)/$', RoleDetail.as_view(), name ='role-detail'),
url(r'api/core/nodelabels/$', NodeLabelList.as_view(), name='nodelabel-list'),
url(r'api/core/nodelabels/(?P<pk>[a-zA-Z0-9\-]+)/$', NodeLabelDetail.as_view(), name ='nodelabel-detail'),
- url(r'api/core/slicecredentials/$', SliceCredentialList.as_view(), name='slicecredential-list'),
- url(r'api/core/slicecredentials/(?P<pk>[a-zA-Z0-9\-]+)/$', SliceCredentialDetail.as_view(), name ='slicecredential-detail'),
-
url(r'api/core/nodes/$', NodeList.as_view(), name='node-list'),
url(r'api/core/nodes/(?P<pk>[a-zA-Z0-9\-]+)/$', NodeDetail.as_view(), name ='node-detail'),
@@ -388,9 +358,6 @@
url(r'api/core/controllersliceprivileges/$', ControllerSlicePrivilegeList.as_view(), name='controllersliceprivilege-list'),
url(r'api/core/controllersliceprivileges/(?P<pk>[a-zA-Z0-9\-]+)/$', ControllerSlicePrivilegeDetail.as_view(), name ='controllersliceprivilege-detail'),
- url(r'api/core/sitecredentials/$', SiteCredentialList.as_view(), name='sitecredential-list'),
- url(r'api/core/sitecredentials/(?P<pk>[a-zA-Z0-9\-]+)/$', SiteCredentialDetail.as_view(), name ='sitecredential-detail'),
-
url(r'api/core/deploymentprivileges/$', DeploymentPrivilegeList.as_view(), name='deploymentprivilege-list'),
url(r'api/core/deploymentprivileges/(?P<pk>[a-zA-Z0-9\-]+)/$', DeploymentPrivilegeDetail.as_view(), name ='deploymentprivilege-detail'),
@@ -406,21 +373,12 @@
url(r'api/core/deploymentroles/$', DeploymentRoleList.as_view(), name='deploymentrole-list'),
url(r'api/core/deploymentroles/(?P<pk>[a-zA-Z0-9\-]+)/$', DeploymentRoleDetail.as_view(), name ='deploymentrole-detail'),
- url(r'api/core/projects/$', ProjectList.as_view(), name='project-list'),
- url(r'api/core/projects/(?P<pk>[a-zA-Z0-9\-]+)/$', ProjectDetail.as_view(), name ='project-detail'),
-
url(r'api/core/tenantrootprivileges/$', TenantRootPrivilegeList.as_view(), name='tenantrootprivilege-list'),
url(r'api/core/tenantrootprivileges/(?P<pk>[a-zA-Z0-9\-]+)/$', TenantRootPrivilegeDetail.as_view(), name ='tenantrootprivilege-detail'),
- url(r'api/core/slicetags/$', SliceTagList.as_view(), name='slicetag-list'),
- url(r'api/core/slicetags/(?P<pk>[a-zA-Z0-9\-]+)/$', SliceTagDetail.as_view(), name ='slicetag-detail'),
-
url(r'api/core/networktemplates/$', NetworkTemplateList.as_view(), name='networktemplate-list'),
url(r'api/core/networktemplates/(?P<pk>[a-zA-Z0-9\-]+)/$', NetworkTemplateDetail.as_view(), name ='networktemplate-detail'),
- url(r'api/core/routers/$', RouterList.as_view(), name='router-list'),
- url(r'api/core/routers/(?P<pk>[a-zA-Z0-9\-]+)/$', RouterDetail.as_view(), name ='router-detail'),
-
url(r'api/core/serviceresources/$', ServiceResourceList.as_view(), name='serviceresource-list'),
url(r'api/core/serviceresources/(?P<pk>[a-zA-Z0-9\-]+)/$', ServiceResourceDetail.as_view(), name ='serviceresource-detail'),
@@ -443,7 +401,6 @@
'xosguiextensions': reverse('xosguiextension-list-legacy', request=request, format=format),
'tenantprivileges': reverse('tenantprivilege-list-legacy', request=request, format=format),
'tags': reverse('tag-list-legacy', request=request, format=format),
- 'usercredentials': reverse('usercredential-list-legacy', request=request, format=format),
'sliceprivileges': reverse('sliceprivilege-list-legacy', request=request, format=format),
'flavors': reverse('flavor-list-legacy', request=request, format=format),
'ports': reverse('port-list-legacy', request=request, format=format),
@@ -458,10 +415,8 @@
'serviceclasses': reverse('serviceclass-list-legacy', request=request, format=format),
'tenantattributes': reverse('tenantattribute-list-legacy', request=request, format=format),
'instances': reverse('instance-list-legacy', request=request, format=format),
- 'programs': reverse('program-list-legacy', request=request, format=format),
'roles': reverse('role-list-legacy', request=request, format=format),
'nodelabels': reverse('nodelabel-list-legacy', request=request, format=format),
- 'slicecredentials': reverse('slicecredential-list-legacy', request=request, format=format),
'nodes': reverse('node-list-legacy', request=request, format=format),
'addresspools': reverse('addresspool-list-legacy', request=request, format=format),
'dashboardviews': reverse('dashboardview-list-legacy', request=request, format=format),
@@ -483,17 +438,13 @@
'tenantroots': reverse('tenantroot-list-legacy', request=request, format=format),
'services': reverse('service-list-legacy', request=request, format=format),
'controllersliceprivileges': reverse('controllersliceprivilege-list-legacy', request=request, format=format),
- 'sitecredentials': reverse('sitecredential-list-legacy', request=request, format=format),
'deploymentprivileges': reverse('deploymentprivilege-list-legacy', request=request, format=format),
'networkparametertypes': reverse('networkparametertype-list-legacy', request=request, format=format),
'sitedeployments': reverse('sitedeployment-list-legacy', request=request, format=format),
'tenantwithcontainers': reverse('tenantwithcontainer-list-legacy', request=request, format=format),
'deploymentroles': reverse('deploymentrole-list-legacy', request=request, format=format),
- 'projects': reverse('project-list-legacy', request=request, format=format),
'tenantrootprivileges': reverse('tenantrootprivilege-list-legacy', request=request, format=format),
- 'slicetags': reverse('slicetag-list-legacy', request=request, format=format),
'networktemplates': reverse('networktemplate-list-legacy', request=request, format=format),
- 'routers': reverse('router-list-legacy', request=request, format=format),
'serviceresources': reverse('serviceresource-list-legacy', request=request, format=format),
'serviceprivileges': reverse('serviceprivilege-list-legacy', request=request, format=format),
@@ -513,7 +464,6 @@
'xosguiextensions': reverse('xosguiextension-list', request=request, format=format),
'tenantprivileges': reverse('tenantprivilege-list', request=request, format=format),
'tags': reverse('tag-list', request=request, format=format),
- 'usercredentials': reverse('usercredential-list', request=request, format=format),
'sliceprivileges': reverse('sliceprivilege-list', request=request, format=format),
'flavors': reverse('flavor-list', request=request, format=format),
'ports': reverse('port-list', request=request, format=format),
@@ -528,10 +478,8 @@
'serviceclasses': reverse('serviceclass-list', request=request, format=format),
'tenantattributes': reverse('tenantattribute-list', request=request, format=format),
'instances': reverse('instance-list', request=request, format=format),
- 'programs': reverse('program-list', request=request, format=format),
'roles': reverse('role-list', request=request, format=format),
'nodelabels': reverse('nodelabel-list', request=request, format=format),
- 'slicecredentials': reverse('slicecredential-list', request=request, format=format),
'nodes': reverse('node-list', request=request, format=format),
'addresspools': reverse('addresspool-list', request=request, format=format),
'dashboardviews': reverse('dashboardview-list', request=request, format=format),
@@ -553,17 +501,13 @@
'tenantroots': reverse('tenantroot-list', request=request, format=format),
'services': reverse('service-list', request=request, format=format),
'controllersliceprivileges': reverse('controllersliceprivilege-list', request=request, format=format),
- 'sitecredentials': reverse('sitecredential-list', request=request, format=format),
'deploymentprivileges': reverse('deploymentprivilege-list', request=request, format=format),
'networkparametertypes': reverse('networkparametertype-list', request=request, format=format),
'sitedeployments': reverse('sitedeployment-list', request=request, format=format),
'tenantwithcontainers': reverse('tenantwithcontainer-list', request=request, format=format),
'deploymentroles': reverse('deploymentrole-list', request=request, format=format),
- 'projects': reverse('project-list', request=request, format=format),
'tenantrootprivileges': reverse('tenantrootprivilege-list', request=request, format=format),
- 'slicetags': reverse('slicetag-list', request=request, format=format),
'networktemplates': reverse('networktemplate-list', request=request, format=format),
- 'routers': reverse('router-list', request=request, format=format),
'serviceresources': reverse('serviceresource-list', request=request, format=format),
'serviceprivileges': reverse('serviceprivilege-list', request=request, format=format),
@@ -1027,41 +971,6 @@
-class UserCredentialSerializer(serializers.HyperlinkedModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = UserCredential
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','key_id','enc_value','user',)
-
-class UserCredentialIdSerializer(XOSModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = UserCredential
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','key_id','enc_value','user',)
-
-
-
-
class SlicePrivilegeSerializer(serializers.HyperlinkedModelSerializer):
id = IdField()
@@ -1365,14 +1274,6 @@
instances = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='instance-detail')
-
- routers = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='router-detail')
-
-
-
- routers = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='router-detail')
-
-
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
def getHumanReadableName(self, obj):
@@ -1384,7 +1285,7 @@
return None
class Meta:
model = Network
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','subnet','start_ip','end_ip','ports','labels','guaranteed_bandwidth','permit_all_slices','topology_parameters','controller_url','controller_parameters','network_id','router_id','subnet_id','autoconnect','template','owner','slices','slices','instances','routers','routers',)
+ fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','subnet','start_ip','end_ip','ports','labels','guaranteed_bandwidth','permit_all_slices','topology_parameters','controller_url','controller_parameters','network_id','router_id','subnet_id','autoconnect','template','owner','slices','slices','instances',)
class NetworkIdSerializer(XOSModelSerializer):
id = IdField()
@@ -1401,14 +1302,6 @@
instances = serializers.PrimaryKeyRelatedField(many=True, required=False, queryset = Instance.objects.all())
-
- routers = serializers.PrimaryKeyRelatedField(many=True, required=False, queryset = Router.objects.all())
-
-
-
- routers = serializers.PrimaryKeyRelatedField(many=True, required=False, queryset = Router.objects.all())
-
-
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
def getHumanReadableName(self, obj):
@@ -1420,7 +1313,7 @@
return None
class Meta:
model = Network
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','subnet','start_ip','end_ip','ports','labels','guaranteed_bandwidth','permit_all_slices','topology_parameters','controller_url','controller_parameters','network_id','router_id','subnet_id','autoconnect','template','owner','slices','slices','instances','routers','routers',)
+ fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','subnet','start_ip','end_ip','ports','labels','guaranteed_bandwidth','permit_all_slices','topology_parameters','controller_url','controller_parameters','network_id','router_id','subnet_id','autoconnect','template','owner','slices','slices','instances',)
@@ -1608,41 +1501,6 @@
-class ProgramSerializer(serializers.HyperlinkedModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = Program
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','description','kind','command','contents','output','messages','status','owner',)
-
-class ProgramIdSerializer(XOSModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = Program
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','description','kind','command','contents','output','messages','status','owner',)
-
-
-
-
class RoleSerializer(serializers.HyperlinkedModelSerializer):
id = IdField()
@@ -1721,41 +1579,6 @@
-class SliceCredentialSerializer(serializers.HyperlinkedModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = SliceCredential
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','key_id','enc_value','slice',)
-
-class SliceCredentialIdSerializer(XOSModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = SliceCredential
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','key_id','enc_value','slice',)
-
-
-
-
class NodeSerializer(serializers.HyperlinkedModelSerializer):
id = IdField()
@@ -2571,41 +2394,6 @@
-class SiteCredentialSerializer(serializers.HyperlinkedModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = SiteCredential
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','key_id','enc_value','site',)
-
-class SiteCredentialIdSerializer(XOSModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = SiteCredential
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','key_id','enc_value','site',)
-
-
-
-
class DeploymentPrivilegeSerializer(serializers.HyperlinkedModelSerializer):
id = IdField()
@@ -2781,41 +2569,6 @@
-class ProjectSerializer(serializers.HyperlinkedModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = Project
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name',)
-
-class ProjectIdSerializer(XOSModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = Project
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name',)
-
-
-
-
class TenantRootPrivilegeSerializer(serializers.HyperlinkedModelSerializer):
id = IdField()
@@ -2851,41 +2604,6 @@
-class SliceTagSerializer(serializers.HyperlinkedModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = SliceTag
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','value','slice',)
-
-class SliceTagIdSerializer(XOSModelSerializer):
- id = IdField()
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = SliceTag
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','value','slice',)
-
-
-
-
class NetworkTemplateSerializer(serializers.HyperlinkedModelSerializer):
id = IdField()
@@ -2921,57 +2639,6 @@
-class RouterSerializer(serializers.HyperlinkedModelSerializer):
- id = IdField()
-
-
- networks = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='network-detail')
-
-
-
- networks = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='network-detail')
-
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = Router
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','owner','networks','networks',)
-
-class RouterIdSerializer(XOSModelSerializer):
- id = IdField()
-
-
- networks = serializers.PrimaryKeyRelatedField(many=True, required=False, queryset = Network.objects.all())
-
-
-
- networks = serializers.PrimaryKeyRelatedField(many=True, required=False, queryset = Network.objects.all())
-
-
- humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- validators = serializers.SerializerMethodField("getValidators")
- def getHumanReadableName(self, obj):
- return str(obj)
- def getValidators(self, obj):
- try:
- return obj.getValidators()
- except:
- return None
- class Meta:
- model = Router
- fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','owner','networks','networks',)
-
-
-
-
class ServiceResourceSerializer(serializers.HyperlinkedModelSerializer):
id = IdField()
@@ -3066,8 +2733,6 @@
Tag: TagSerializer,
- UserCredential: UserCredentialSerializer,
-
SlicePrivilege: SlicePrivilegeSerializer,
Flavor: FlavorSerializer,
@@ -3096,14 +2761,10 @@
Instance: InstanceSerializer,
- Program: ProgramSerializer,
-
Role: RoleSerializer,
NodeLabel: NodeLabelSerializer,
- SliceCredential: SliceCredentialSerializer,
-
Node: NodeSerializer,
AddressPool: AddressPoolSerializer,
@@ -3146,8 +2807,6 @@
ControllerSlicePrivilege: ControllerSlicePrivilegeSerializer,
- SiteCredential: SiteCredentialSerializer,
-
DeploymentPrivilege: DeploymentPrivilegeSerializer,
NetworkParameterType: NetworkParameterTypeSerializer,
@@ -3158,16 +2817,10 @@
DeploymentRole: DeploymentRoleSerializer,
- Project: ProjectSerializer,
-
TenantRootPrivilege: TenantRootPrivilegeSerializer,
- SliceTag: SliceTagSerializer,
-
NetworkTemplate: NetworkTemplateSerializer,
- Router: RouterSerializer,
-
ServiceResource: ServiceResourceSerializer,
ServicePrivilege: ServicePrivilegeSerializer,
@@ -3695,53 +3348,6 @@
-class UserCredentialList(XOSListCreateAPIView):
- queryset = UserCredential.objects.select_related().all()
- serializer_class = UserCredentialSerializer
- id_serializer_class = UserCredentialIdSerializer
- filter_backends = (filters.DjangoFilterBackend,)
- filter_fields = ('id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','key_id','enc_value','user',)
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return UserCredential.select_by_user(self.request.user)
-
-
-class UserCredentialDetail(XOSRetrieveUpdateDestroyAPIView):
- queryset = UserCredential.objects.select_related().all()
- serializer_class = UserCredentialSerializer
- id_serializer_class = UserCredentialIdSerializer
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return UserCredential.select_by_user(self.request.user)
-
- # update() is handled by XOSRetrieveUpdateDestroyAPIView
-
- # destroy() is handled by XOSRetrieveUpdateDestroyAPIView
-
-
-
class SlicePrivilegeList(XOSListCreateAPIView):
queryset = SlicePrivilege.objects.select_related().all()
serializer_class = SlicePrivilegeSerializer
@@ -4123,7 +3729,7 @@
serializer_class = NetworkSerializer
id_serializer_class = NetworkIdSerializer
filter_backends = (filters.DjangoFilterBackend,)
- filter_fields = ('id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','subnet','start_ip','end_ip','ports','labels','guaranteed_bandwidth','permit_all_slices','topology_parameters','controller_url','controller_parameters','network_id','router_id','subnet_id','autoconnect','template','owner','slices','slices','instances','routers','routers',)
+ filter_fields = ('id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','subnet','start_ip','end_ip','ports','labels','guaranteed_bandwidth','permit_all_slices','topology_parameters','controller_url','controller_parameters','network_id','router_id','subnet_id','autoconnect','template','owner','slices','slices','instances',)
def get_serializer_class(self):
no_hyperlinks=False
@@ -4400,53 +4006,6 @@
-class ProgramList(XOSListCreateAPIView):
- queryset = Program.objects.select_related().all()
- serializer_class = ProgramSerializer
- id_serializer_class = ProgramIdSerializer
- filter_backends = (filters.DjangoFilterBackend,)
- filter_fields = ('id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','description','kind','command','contents','output','messages','status','owner',)
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return Program.select_by_user(self.request.user)
-
-
-class ProgramDetail(XOSRetrieveUpdateDestroyAPIView):
- queryset = Program.objects.select_related().all()
- serializer_class = ProgramSerializer
- id_serializer_class = ProgramIdSerializer
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return Program.select_by_user(self.request.user)
-
- # update() is handled by XOSRetrieveUpdateDestroyAPIView
-
- # destroy() is handled by XOSRetrieveUpdateDestroyAPIView
-
-
-
class RoleList(XOSListCreateAPIView):
queryset = Role.objects.select_related().all()
serializer_class = RoleSerializer
@@ -4541,53 +4100,6 @@
-class SliceCredentialList(XOSListCreateAPIView):
- queryset = SliceCredential.objects.select_related().all()
- serializer_class = SliceCredentialSerializer
- id_serializer_class = SliceCredentialIdSerializer
- filter_backends = (filters.DjangoFilterBackend,)
- filter_fields = ('id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','key_id','enc_value','slice',)
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return SliceCredential.select_by_user(self.request.user)
-
-
-class SliceCredentialDetail(XOSRetrieveUpdateDestroyAPIView):
- queryset = SliceCredential.objects.select_related().all()
- serializer_class = SliceCredentialSerializer
- id_serializer_class = SliceCredentialIdSerializer
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return SliceCredential.select_by_user(self.request.user)
-
- # update() is handled by XOSRetrieveUpdateDestroyAPIView
-
- # destroy() is handled by XOSRetrieveUpdateDestroyAPIView
-
-
-
class NodeList(XOSListCreateAPIView):
queryset = Node.objects.select_related().all()
serializer_class = NodeSerializer
@@ -5575,53 +5087,6 @@
-class SiteCredentialList(XOSListCreateAPIView):
- queryset = SiteCredential.objects.select_related().all()
- serializer_class = SiteCredentialSerializer
- id_serializer_class = SiteCredentialIdSerializer
- filter_backends = (filters.DjangoFilterBackend,)
- filter_fields = ('id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','key_id','enc_value','site',)
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return SiteCredential.select_by_user(self.request.user)
-
-
-class SiteCredentialDetail(XOSRetrieveUpdateDestroyAPIView):
- queryset = SiteCredential.objects.select_related().all()
- serializer_class = SiteCredentialSerializer
- id_serializer_class = SiteCredentialIdSerializer
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return SiteCredential.select_by_user(self.request.user)
-
- # update() is handled by XOSRetrieveUpdateDestroyAPIView
-
- # destroy() is handled by XOSRetrieveUpdateDestroyAPIView
-
-
-
class DeploymentPrivilegeList(XOSListCreateAPIView):
queryset = DeploymentPrivilege.objects.select_related().all()
serializer_class = DeploymentPrivilegeSerializer
@@ -5857,53 +5322,6 @@
-class ProjectList(XOSListCreateAPIView):
- queryset = Project.objects.select_related().all()
- serializer_class = ProjectSerializer
- id_serializer_class = ProjectIdSerializer
- filter_backends = (filters.DjangoFilterBackend,)
- filter_fields = ('id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name',)
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return Project.select_by_user(self.request.user)
-
-
-class ProjectDetail(XOSRetrieveUpdateDestroyAPIView):
- queryset = Project.objects.select_related().all()
- serializer_class = ProjectSerializer
- id_serializer_class = ProjectIdSerializer
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return Project.select_by_user(self.request.user)
-
- # update() is handled by XOSRetrieveUpdateDestroyAPIView
-
- # destroy() is handled by XOSRetrieveUpdateDestroyAPIView
-
-
-
class TenantRootPrivilegeList(XOSListCreateAPIView):
queryset = TenantRootPrivilege.objects.select_related().all()
serializer_class = TenantRootPrivilegeSerializer
@@ -5951,53 +5369,6 @@
-class SliceTagList(XOSListCreateAPIView):
- queryset = SliceTag.objects.select_related().all()
- serializer_class = SliceTagSerializer
- id_serializer_class = SliceTagIdSerializer
- filter_backends = (filters.DjangoFilterBackend,)
- filter_fields = ('id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','value','slice',)
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return SliceTag.select_by_user(self.request.user)
-
-
-class SliceTagDetail(XOSRetrieveUpdateDestroyAPIView):
- queryset = SliceTag.objects.select_related().all()
- serializer_class = SliceTagSerializer
- id_serializer_class = SliceTagIdSerializer
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return SliceTag.select_by_user(self.request.user)
-
- # update() is handled by XOSRetrieveUpdateDestroyAPIView
-
- # destroy() is handled by XOSRetrieveUpdateDestroyAPIView
-
-
-
class NetworkTemplateList(XOSListCreateAPIView):
queryset = NetworkTemplate.objects.select_related().all()
serializer_class = NetworkTemplateSerializer
@@ -6045,53 +5416,6 @@
-class RouterList(XOSListCreateAPIView):
- queryset = Router.objects.select_related().all()
- serializer_class = RouterSerializer
- id_serializer_class = RouterIdSerializer
- filter_backends = (filters.DjangoFilterBackend,)
- filter_fields = ('id','created','updated','enacted','policed','backend_register','backend_need_delete','backend_need_reap','backend_status','deleted','write_protect','lazy_blocked','no_sync','no_policy','name','owner','networks','networks',)
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return Router.select_by_user(self.request.user)
-
-
-class RouterDetail(XOSRetrieveUpdateDestroyAPIView):
- queryset = Router.objects.select_related().all()
- serializer_class = RouterSerializer
- id_serializer_class = RouterIdSerializer
-
- def get_serializer_class(self):
- no_hyperlinks=False
- if hasattr(self.request,"query_params"):
- no_hyperlinks = self.request.query_params.get('no_hyperlinks', False)
- if (no_hyperlinks):
- return self.id_serializer_class
- else:
- return self.serializer_class
-
- def get_queryset(self):
- if (not self.request.user.is_authenticated()):
- raise XOSNotAuthenticated()
- return Router.select_by_user(self.request.user)
-
- # update() is handled by XOSRetrieveUpdateDestroyAPIView
-
- # destroy() is handled by XOSRetrieveUpdateDestroyAPIView
-
-
-
class ServiceResourceList(XOSListCreateAPIView):
queryset = ServiceResource.objects.select_related().all()
serializer_class = ServiceResourceSerializer