CORD-1241 eliminate obsolete models and fields
Change-Id: I08bb3b130df9fe78e96fb71f1110b3a5a10a5ec5
diff --git a/xos/api/utility/sliceplus.py b/xos/api/utility/sliceplus.py
index cecea4d..591160f 100644
--- a/xos/api/utility/sliceplus.py
+++ b/xos/api/utility/sliceplus.py
@@ -359,10 +359,10 @@
class Meta:
model = SlicePlus
- fields = ('humanReadableName', 'id', 'created', 'updated', 'enacted', 'name', 'enabled', 'omf_friendly',
+ fields = ('humanReadableName', 'id', 'created', 'updated', 'enacted', 'name', 'enabled',
'description', 'slice_url', 'site', 'max_instances', 'service', 'network', 'mount_data_sets',
'default_image', 'default_flavor',
- 'serviceClass', 'creator',
+ 'creator',
# these are the value-added fields from SlicePlus
'networks', 'network_ports', 'backendIcon', 'backendHtml',
diff --git a/xos/core/admin.py b/xos/core/admin.py
index b9cb66a..428aceb 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -571,7 +571,7 @@
class SliceInline(XOSTabularInline):
model = Slice
- fields = ['backend_status_icon', 'name', 'site', 'serviceClass', 'service']
+ fields = ['backend_status_icon', 'name', 'site', 'service']
readonly_fields = ('backend_status_icon', )
extra = 0
suit_classes = 'suit-tab suit-tab-slices'
@@ -1269,13 +1269,13 @@
class SliceAdmin(XOSBaseAdmin):
form = SliceForm
- fieldList = ['backend_status_text', 'site', 'name', 'serviceClass', 'enabled',
+ fieldList = ['backend_status_text', 'site', 'name', 'enabled',
'description', 'service', 'slice_url', 'max_instances', "default_isolation", "default_image", "network"]
fieldsets = [('Slice Details', {'fields': fieldList, 'classes': [
'suit-tab suit-tab-general']}), ]
readonly_fields = ('backend_status_text', )
list_display = ('backend_status_icon', 'name', 'site',
- 'serviceClass', 'slice_url', 'max_instances')
+ 'slice_url', 'max_instances')
list_display_links = ('backend_status_icon', 'name', )
normal_inlines = [SlicePrivilegeInline, InstanceInline,
SliceNetworkInline]
@@ -1842,21 +1842,6 @@
('controllers', 'Per-controller Dashboard Details'))
-class ServiceResourceInline(XOSTabularInline):
- model = ServiceResource
- extra = 0
-
-
-class ServiceClassAdmin(XOSBaseAdmin):
- list_display = ('backend_status_icon', 'name',
- 'commitment', 'membershipFee')
- list_display_links = ('backend_status_icon', 'name', )
- inlines = [ServiceResourceInline]
-
- user_readonly_fields = ['name', 'commitment', 'membershipFee']
- user_readonly_inlines = []
-
-
class NetworkParameterTypeAdmin(XOSBaseAdmin):
list_display = ("backend_status_icon", "name", )
list_display_links = ('backend_status_icon', 'name', )
@@ -1929,8 +1914,8 @@
fieldsets = [
(None, {'fields': ['backend_status_text', 'name', 'template', 'ports', 'labels',
- 'owner', 'guaranteed_bandwidth', 'permit_all_slices',
- 'permitted_slices', 'network_id', 'router_id', 'subnet_id',
+ 'owner', 'permit_all_slices',
+ 'permitted_slices',
'subnet', 'autoconnect'],
'classes':['suit-tab suit-tab-general']}),
(None, {'fields': ['topology_parameters', 'controller_url', 'controller_parameters'],
@@ -1938,9 +1923,9 @@
]
readonly_fields = ('backend_status_text', )
- user_readonly_fields = ['name', 'template', 'ports', 'labels', 'owner', 'guaranteed_bandwidth',
- 'permit_all_slices', 'permitted_slices', 'network_id', 'router_id',
- 'subnet_id', 'subnet', 'autoconnect']
+ user_readonly_fields = ['name', 'template', 'ports', 'labels', 'owner',
+ 'permit_all_slices', 'permitted_slices',
+ 'subnet', 'autoconnect']
@property
def suit_form_tabs(self):
@@ -1959,14 +1944,13 @@
class NetworkTemplateAdmin(XOSBaseAdmin):
- list_display = ("backend_status_icon", "name",
- "guaranteed_bandwidth", "visibility")
+ list_display = ("backend_status_icon", "name", "visibility")
list_display_links = ('backend_status_icon', 'name', )
- user_readonly_fields = ["name", "guaranteed_bandwidth", "visibility"]
+ user_readonly_fields = ["name", "visibility"]
user_readonly_inlines = []
# inlines = [NetworkParameterInline, ]
fieldsets = [
- (None, {'fields': ['name', 'description', 'guaranteed_bandwidth', 'visibility', 'translation', 'access', 'shared_network_name', 'shared_network_id', 'topology_kind', 'controller_kind', 'vtn_kind'],
+ (None, {'fields': ['name', 'description', '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'))
@@ -2076,7 +2060,6 @@
if True:
admin.site.register(NetworkParameterType, NetworkParameterTypeAdmin)
- admin.site.register(ServiceClass, ServiceClassAdmin)
admin.site.register(Tag, TagAdmin)
admin.site.register(ControllerRole)
admin.site.register(SiteRole)
diff --git a/xos/core/models/attic/header.py b/xos/core/models/attic/header.py
index fe0a7f6..c7cac96 100644
--- a/xos/core/models/attic/header.py
+++ b/xos/core/models/attic/header.py
@@ -137,13 +137,6 @@
def get_query_set(self):
return self.get_queryset()
-def get_default_serviceclass():
- from core.models.serviceclass import ServiceClass
- try:
- return ServiceClass.objects.get(name="Best Effort")
- except ServiceClass.DoesNotExist:
- return None
-
class ControllerLinkDeletionManager(PlCoreBaseDeletionManager):
def get_queryset(self):
parent=super(ControllerLinkDeletionManager, self)
diff --git a/xos/core/models/attic/network_header.py b/xos/core/models/attic/network_header.py
deleted file mode 100644
index e7c67bf..0000000
--- a/xos/core/models/attic/network_header.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# If true, then IP addresses will be allocated by the model. If false, then
-# we will assume the observer handles it.
-NO_OBSERVER=False
diff --git a/xos/core/models/attic/network_model.py b/xos/core/models/attic/network_model.py
index b3a3493..673ea4b 100644
--- a/xos/core/models/attic/network_model.py
+++ b/xos/core/models/attic/network_model.py
@@ -1,10 +1,6 @@
def __unicode__(self): return u'%s' % (self.name)
def save(self, *args, **kwds):
- if (not self.subnet) and (NO_OBSERVER):
- from util.network_subnet_allocator import find_unused_subnet
- self.subnet = find_unused_subnet(existing_subnets=[x.subnet for x in Network.objects.all()])
- print "DEF_MOD_NET_IP", self.start_ip
super(Network, self).save(*args, **kwds)
def can_update(self, user):
diff --git a/xos/core/models/attic/serviceclass_model.py b/xos/core/models/attic/serviceclass_model.py
deleted file mode 100644
index ebdfdfe..0000000
--- a/xos/core/models/attic/serviceclass_model.py
+++ /dev/null
@@ -1,8 +0,0 @@
-class Meta(PlCoreBase.Meta):
- verbose_name_plural = "Service classes"
-
-def __unicode__(self): return u'%s' % (self.name)
-
-def save_by_user(self, user, *args, **kwds):
- if self.can_update(user):
- super(ServiceClass, self).save(*args, **kwds)
diff --git a/xos/core/models/attic/serviceresource_model.py b/xos/core/models/attic/serviceresource_model.py
deleted file mode 100644
index 3fd623e..0000000
--- a/xos/core/models/attic/serviceresource_model.py
+++ /dev/null
@@ -1 +0,0 @@
-def __unicode__(self): return u'%s' % (self.name)
diff --git a/xos/core/models/network.xproto b/xos/core/models/network.xproto
index 4e66a1f..5305416 100644
--- a/xos/core/models/network.xproto
+++ b/xos/core/models/network.xproto
@@ -9,14 +9,7 @@
optional string ports = 6 [db_index = False, max_length = 1024, null = True, blank = True];
optional string labels = 7 [db_index = False, max_length = 1024, null = True, blank = True];
required manytoone owner->Slice:ownedNetworks = 8 [help_text = "Slice that owns control of this Network", null = False, db_index = True, blank = False];
- required int32 guaranteed_bandwidth = 9 [default = 0, null = False, db_index = False, blank = False];
required bool permit_all_slices = 10 [default = False, null = False, db_index = False, blank = True];
- optional string topology_parameters = 11 [db_index = False, null = True, blank = True];
- optional string controller_url = 12 [db_index = False, max_length = 1024, null = True, blank = True];
- optional string controller_parameters = 13 [db_index = False, null = True, blank = True];
- optional string network_id = 14 [help_text = "Quantum network", max_length = 256, null = True, db_index = False, blank = True];
- optional string router_id = 15 [help_text = "Quantum router id", max_length = 256, null = True, db_index = False, blank = True];
- optional string subnet_id = 16 [help_text = "Quantum subnet id", max_length = 256, null = True, db_index = False, blank = True];
required bool autoconnect = 17 [help_text = "This network can be autoconnected to the slice that owns it", default = True, null = False, db_index = False, blank = True];
required manytomany permitted_slices->Slice/Network_permitted_slices:availableNetworks = 18 [db_index = False, null = False, blank = True];
required manytomany slices->Slice/NetworkSlice:networks = 19 [db_index = False, null = False, blank = True];
diff --git a/xos/core/models/network_header.py b/xos/core/models/network_header.py
deleted file mode 120000
index 1573aea..0000000
--- a/xos/core/models/network_header.py
+++ /dev/null
@@ -1 +0,0 @@
-attic/network_header.py
\ No newline at end of file
diff --git a/xos/core/models/networktemplate.xproto b/xos/core/models/networktemplate.xproto
index 3d17277..4957784 100644
--- a/xos/core/models/networktemplate.xproto
+++ b/xos/core/models/networktemplate.xproto
@@ -3,7 +3,6 @@
message NetworkTemplate (PlCoreBase,ParameterMixin){
required string name = 1 [db_index = False, max_length = 32, null = False, blank = False];
optional string description = 2 [db_index = False, max_length = 1024, null = True, blank = True];
- required int32 guaranteed_bandwidth = 3 [default = 0, null = False, db_index = False, blank = False];
required string visibility = 4 [default = "private", choices = "(('public', 'public'), ('private', 'private'))", max_length = 30, blank = False, null = False, db_index = False];
required string translation = 5 [default = "none", choices = "(('none', 'none'), ('NAT', 'NAT'))", max_length = 30, blank = False, null = False, db_index = False];
optional string access = 6 [choices = "((None, 'None'), ('indirect', 'Indirect'), ('direct', 'Direct'))", max_length = 30, blank = True, help_text = "Advertise this network as a means for other slices to contact this slice", null = True, db_index = False];
diff --git a/xos/core/models/role.xproto b/xos/core/models/role.xproto
index cb36794..9e48abc 100644
--- a/xos/core/models/role.xproto
+++ b/xos/core/models/role.xproto
@@ -4,5 +4,4 @@
required string role_type = 1 [db_index = False, max_length = 80, null = False, content_type = "stripped", blank = False];
optional string role = 2 [db_index = False, max_length = 80, null = True, content_type = "stripped", blank = True];
required string description = 3 [db_index = False, max_length = 120, null = False, content_type = "stripped", blank = False];
- required string content_type = 4 [max_length = 1024, content_type = "stripped", blank = False, help_text = "Content type id linked to this role", null = False, db_index = False];
}
diff --git a/xos/core/models/serviceclass.xproto b/xos/core/models/serviceclass.xproto
deleted file mode 100644
index 9f1e4cf..0000000
--- a/xos/core/models/serviceclass.xproto
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-message ServiceClass (PlCoreBase){
- required string name = 1 [db_index = False, max_length = 32, null = False, content_type = "stripped", blank = False];
- required string description = 2 [db_index = False, max_length = 255, null = False, content_type = "stripped", blank = False];
- required int32 commitment = 3 [default = 365, null = False, db_index = False, blank = False];
- required int32 membershipFee = 4 [default = 0, null = False, db_index = False, blank = False];
- required int32 membershipFeeMonths = 5 [default = 12, null = False, db_index = False, blank = False];
- required bool upgradeRequiresApproval = 6 [default = False, null = False, db_index = False, blank = True];
- required manytomany upgradeFrom->ServiceClass/ServiceClass_upgradeFrom:upgradeFrom_rel_+ = 7 [db_index = False, null = False, blank = True];
-}
diff --git a/xos/core/models/serviceresource.xproto b/xos/core/models/serviceresource.xproto
deleted file mode 100644
index 46cb5c4..0000000
--- a/xos/core/models/serviceresource.xproto
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-message ServiceResource (PlCoreBase){
- required manytoone serviceClass->ServiceClass:serviceresources = 1 [db_index = True, null = False, blank = False];
- required string name = 2 [db_index = False, max_length = 32, null = False, content_type = "stripped", blank = False];
- required int32 maxUnitsDeployment = 3 [default = 1, null = False, db_index = False, blank = False];
- required int32 maxUnitsNode = 4 [default = 1, null = False, db_index = False, blank = False];
- required int32 maxDuration = 5 [default = 1, null = False, db_index = False, blank = False];
- required int32 bucketInRate = 6 [default = 0, null = False, db_index = False, blank = False];
- required int32 bucketMaxSize = 7 [default = 0, null = False, db_index = False, blank = False];
- required int32 cost = 8 [default = 0, null = False, db_index = False, blank = False];
- required bool calendarReservable = 9 [default = True, null = False, db_index = False, blank = True];
-}
diff --git a/xos/core/models/slice.xproto b/xos/core/models/slice.xproto
index fde818f..222813d 100644
--- a/xos/core/models/slice.xproto
+++ b/xos/core/models/slice.xproto
@@ -1,7 +1,6 @@
message Slice (PlCoreBase){
required string name = 1 [max_length = 80, content_type = "stripped", blank = False, help_text = "The Name of the Slice", null = False, db_index = False];
required bool enabled = 2 [help_text = "Status for this Slice", default = True, null = False, db_index = False, blank = True];
- required bool omf_friendly = 3 [default = False, null = False, db_index = False, blank = True];
required string description = 4 [help_text = "High level description of the slice and expected activities", max_length = 1024, null = False, db_index = False, blank = True];
required string slice_url = 5 [db_index = False, max_length = 512, null = False, content_type = "url", blank = True];
required manytoone site->Site:slices = 6 [help_text = "The Site this Slice belongs to", null = False, db_index = True, blank = False];
@@ -9,7 +8,6 @@
optional manytoone service->Service:slices = 8 [db_index = True, null = True, blank = True];
optional string network = 9 [blank = True, max_length = 256, null = True, db_index = False, choices = "((None, 'Default'), ('host', 'Host'), ('bridged', 'Bridged'), ('noauto', 'No Automatic Networks'))"];
optional string exposed_ports = 10 [db_index = False, max_length = 256, null = True, blank = True];
- optional manytoone serviceClass->ServiceClass:slices = 11 [db_index = True, null = True, blank = True];
optional manytoone creator->User:slices = 12 [db_index = True, null = True, blank = True];
optional manytoone default_flavor->Flavor:slices = 13 [db_index = True, null = True, blank = True];
optional manytoone default_image->Image:slices = 14 [db_index = True, null = True, blank = True];
diff --git a/xos/xos/xosapi.py b/xos/xos/xosapi.py
index da7ea7e..5b7e310 100644
--- a/xos/xos/xosapi.py
+++ b/xos/xos/xosapi.py
@@ -105,9 +105,6 @@
url(r'xos/diags/$', DiagList.as_view(), name='diag-list-legacy'),
url(r'xos/diags/(?P<pk>[a-zA-Z0-9\-]+)/$', DiagDetail.as_view(), name ='diag-detail-legacy'),
- url(r'xos/serviceclasses/$', ServiceClassList.as_view(), name='serviceclass-list-legacy'),
- url(r'xos/serviceclasses/(?P<pk>[a-zA-Z0-9\-]+)/$', ServiceClassDetail.as_view(), name ='serviceclass-detail-legacy'),
-
url(r'xos/tenantattributes/$', TenantAttributeList.as_view(), name='tenantattribute-list-legacy'),
url(r'xos/tenantattributes/(?P<pk>[a-zA-Z0-9\-]+)/$', TenantAttributeDetail.as_view(), name ='tenantattribute-detail-legacy'),
@@ -174,9 +171,6 @@
url(r'xos/networkslices/$', NetworkSliceList.as_view(), name='networkslice-list-legacy'),
url(r'xos/networkslices/(?P<pk>[a-zA-Z0-9\-]+)/$', NetworkSliceDetail.as_view(), name ='networkslice-detail-legacy'),
- url(r'xos/tenantroots/$', TenantRootList.as_view(), name='tenantroot-list-legacy'),
- url(r'xos/tenantroots/(?P<pk>[a-zA-Z0-9\-]+)/$', TenantRootDetail.as_view(), name ='tenantroot-detail-legacy'),
-
url(r'xos/services/$', ServiceList.as_view(), name='service-list-legacy'),
url(r'xos/services/(?P<pk>[a-zA-Z0-9\-]+)/$', ServiceDetail.as_view(), name ='service-detail-legacy'),
@@ -204,8 +198,8 @@
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/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'),
+ url(r'xos/tenantroots/$', TenantRootList.as_view(), name='tenantroot-list-legacy'),
+ url(r'xos/tenantroots/(?P<pk>[a-zA-Z0-9\-]+)/$', TenantRootDetail.as_view(), name ='tenantroot-detail-legacy'),
url(r'xos/serviceprivileges/$', ServicePrivilegeList.as_view(), name='serviceprivilege-list-legacy'),
url(r'xos/serviceprivileges/(?P<pk>[a-zA-Z0-9\-]+)/$', ServicePrivilegeDetail.as_view(), name ='serviceprivilege-detail-legacy'),
@@ -280,9 +274,6 @@
url(r'api/core/diags/$', DiagList.as_view(), name='diag-list'),
url(r'api/core/diags/(?P<pk>[a-zA-Z0-9\-]+)/$', DiagDetail.as_view(), name ='diag-detail'),
- url(r'api/core/serviceclasses/$', ServiceClassList.as_view(), name='serviceclass-list'),
- url(r'api/core/serviceclasses/(?P<pk>[a-zA-Z0-9\-]+)/$', ServiceClassDetail.as_view(), name ='serviceclass-detail'),
-
url(r'api/core/tenantattributes/$', TenantAttributeList.as_view(), name='tenantattribute-list'),
url(r'api/core/tenantattributes/(?P<pk>[a-zA-Z0-9\-]+)/$', TenantAttributeDetail.as_view(), name ='tenantattribute-detail'),
@@ -349,9 +340,6 @@
url(r'api/core/networkslices/$', NetworkSliceList.as_view(), name='networkslice-list'),
url(r'api/core/networkslices/(?P<pk>[a-zA-Z0-9\-]+)/$', NetworkSliceDetail.as_view(), name ='networkslice-detail'),
- url(r'api/core/tenantroots/$', TenantRootList.as_view(), name='tenantroot-list'),
- url(r'api/core/tenantroots/(?P<pk>[a-zA-Z0-9\-]+)/$', TenantRootDetail.as_view(), name ='tenantroot-detail'),
-
url(r'api/core/services/$', ServiceList.as_view(), name='service-list'),
url(r'api/core/services/(?P<pk>[a-zA-Z0-9\-]+)/$', ServiceDetail.as_view(), name ='service-detail'),
@@ -379,8 +367,8 @@
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/serviceresources/$', ServiceResourceList.as_view(), name='serviceresource-list'),
- url(r'api/core/serviceresources/(?P<pk>[a-zA-Z0-9\-]+)/$', ServiceResourceDetail.as_view(), name ='serviceresource-detail'),
+ url(r'api/core/tenantroots/$', TenantRootList.as_view(), name='tenantroot-list'),
+ url(r'api/core/tenantroots/(?P<pk>[a-zA-Z0-9\-]+)/$', TenantRootDetail.as_view(), name ='tenantroot-detail'),
url(r'api/core/serviceprivileges/$', ServicePrivilegeList.as_view(), name='serviceprivilege-list'),
url(r'api/core/serviceprivileges/(?P<pk>[a-zA-Z0-9\-]+)/$', ServicePrivilegeDetail.as_view(), name ='serviceprivilege-detail'),
@@ -412,7 +400,6 @@
'networks': reverse('network-list-legacy', request=request, format=format),
'controllerroles': reverse('controllerrole-list-legacy', request=request, format=format),
'diags': reverse('diag-list-legacy', request=request, format=format),
- '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),
'roles': reverse('role-list-legacy', request=request, format=format),
@@ -435,7 +422,6 @@
'tenants': reverse('tenant-list-legacy', request=request, format=format),
'xoses': reverse('xos-list-legacy', request=request, format=format),
'networkslices': reverse('networkslice-list-legacy', request=request, format=format),
- '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),
'deploymentprivileges': reverse('deploymentprivilege-list-legacy', request=request, format=format),
@@ -445,7 +431,7 @@
'deploymentroles': reverse('deploymentrole-list-legacy', request=request, format=format),
'tenantrootprivileges': reverse('tenantrootprivilege-list-legacy', request=request, format=format),
'networktemplates': reverse('networktemplate-list-legacy', request=request, format=format),
- 'serviceresources': reverse('serviceresource-list-legacy', request=request, format=format),
+ 'tenantroots': reverse('tenantroot-list-legacy', request=request, format=format),
'serviceprivileges': reverse('serviceprivilege-list-legacy', request=request, format=format),
})
@@ -475,7 +461,6 @@
'networks': reverse('network-list', request=request, format=format),
'controllerroles': reverse('controllerrole-list', request=request, format=format),
'diags': reverse('diag-list', request=request, format=format),
- 'serviceclasses': reverse('serviceclass-list', request=request, format=format),
'tenantattributes': reverse('tenantattribute-list', request=request, format=format),
'instances': reverse('instance-list', request=request, format=format),
'roles': reverse('role-list', request=request, format=format),
@@ -498,7 +483,6 @@
'tenants': reverse('tenant-list', request=request, format=format),
'xoses': reverse('xos-list', request=request, format=format),
'networkslices': reverse('networkslice-list', request=request, format=format),
- 'tenantroots': reverse('tenantroot-list', request=request, format=format),
'services': reverse('service-list', request=request, format=format),
'controllersliceprivileges': reverse('controllersliceprivilege-list', request=request, format=format),
'deploymentprivileges': reverse('deploymentprivilege-list', request=request, format=format),
@@ -508,7 +492,7 @@
'deploymentroles': reverse('deploymentrole-list', request=request, format=format),
'tenantrootprivileges': reverse('tenantrootprivilege-list', request=request, format=format),
'networktemplates': reverse('networktemplate-list', request=request, format=format),
- 'serviceresources': reverse('serviceresource-list', request=request, format=format),
+ 'tenantroots': reverse('tenantroot-list', request=request, format=format),
'serviceprivileges': reverse('serviceprivilege-list', request=request, format=format),
})
@@ -1285,7 +1269,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',)
+ 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','permit_all_slices','autoconnect','template','owner','slices','slices','instances',)
class NetworkIdSerializer(XOSModelSerializer):
id = IdField()
@@ -1313,7 +1297,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',)
+ 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','permit_all_slices','autoconnect','template','owner','slices','slices','instances',)
@@ -1388,41 +1372,6 @@
-class ServiceClassSerializer(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 = ServiceClass
- 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','commitment','membershipFee','membershipFeeMonths','upgradeRequiresApproval',)
-
-class ServiceClassIdSerializer(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 = ServiceClass
- 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','commitment','membershipFee','membershipFeeMonths','upgradeRequiresApproval',)
-
-
-
-
class TenantAttributeSerializer(serializers.HyperlinkedModelSerializer):
id = IdField()
@@ -1515,7 +1464,7 @@
return None
class Meta:
model = Role
- 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','role_type','role','description','content_type',)
+ 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','role_type','role','description',)
class RoleIdSerializer(XOSModelSerializer):
id = IdField()
@@ -1531,7 +1480,7 @@
return None
class Meta:
model = Role
- 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','role_type','role','description','content_type',)
+ 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','role_type','role','description',)
@@ -1983,7 +1932,7 @@
return None
class Meta:
model = Slice
- 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','enabled','omf_friendly','description','slice_url','max_instances','network','exposed_ports','mount_data_sets','default_isolation','site','service','serviceClass','creator','default_flavor','default_image','default_node','networks','networks',)
+ 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','enabled','description','slice_url','max_instances','network','exposed_ports','mount_data_sets','default_isolation','site','service','creator','default_flavor','default_image','default_node','networks','networks',)
class SliceIdSerializer(XOSModelSerializer):
id = IdField()
@@ -2007,7 +1956,7 @@
return None
class Meta:
model = Slice
- 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','enabled','omf_friendly','description','slice_url','max_instances','network','exposed_ports','mount_data_sets','default_isolation','site','service','serviceClass','creator','default_flavor','default_image','default_node','networks','networks',)
+ 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','enabled','description','slice_url','max_instances','network','exposed_ports','mount_data_sets','default_isolation','site','service','creator','default_flavor','default_image','default_node','networks','networks',)
@@ -2289,41 +2238,6 @@
-class TenantRootSerializer(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 = TenantRoot
- 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','kind','name','service_specific_attribute','service_specific_id',)
-
-class TenantRootIdSerializer(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 = TenantRoot
- 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','kind','name','service_specific_attribute','service_specific_id',)
-
-
-
-
class ServiceSerializer(serializers.HyperlinkedModelSerializer):
id = IdField()
@@ -2618,7 +2532,7 @@
return None
class Meta:
model = NetworkTemplate
- 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','guaranteed_bandwidth','visibility','translation','access','shared_network_name','shared_network_id','topology_kind','controller_kind','vtn_kind',)
+ 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','visibility','translation','access','shared_network_name','shared_network_id','topology_kind','controller_kind','vtn_kind',)
class NetworkTemplateIdSerializer(XOSModelSerializer):
id = IdField()
@@ -2634,12 +2548,12 @@
return None
class Meta:
model = NetworkTemplate
- 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','guaranteed_bandwidth','visibility','translation','access','shared_network_name','shared_network_id','topology_kind','controller_kind','vtn_kind',)
+ 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','visibility','translation','access','shared_network_name','shared_network_id','topology_kind','controller_kind','vtn_kind',)
-class ServiceResourceSerializer(serializers.HyperlinkedModelSerializer):
+class TenantRootSerializer(serializers.HyperlinkedModelSerializer):
id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
@@ -2652,10 +2566,10 @@
except:
return None
class Meta:
- model = ServiceResource
- 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','maxUnitsDeployment','maxUnitsNode','maxDuration','bucketInRate','bucketMaxSize','cost','calendarReservable','serviceClass',)
+ model = TenantRoot
+ 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','kind','name','service_specific_attribute','service_specific_id',)
-class ServiceResourceIdSerializer(XOSModelSerializer):
+class TenantRootIdSerializer(XOSModelSerializer):
id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
@@ -2668,8 +2582,8 @@
except:
return None
class Meta:
- model = ServiceResource
- 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','maxUnitsDeployment','maxUnitsNode','maxDuration','bucketInRate','bucketMaxSize','cost','calendarReservable','serviceClass',)
+ model = TenantRoot
+ 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','kind','name','service_specific_attribute','service_specific_id',)
@@ -2755,8 +2669,6 @@
Diag: DiagSerializer,
- ServiceClass: ServiceClassSerializer,
-
TenantAttribute: TenantAttributeSerializer,
Instance: InstanceSerializer,
@@ -2801,8 +2713,6 @@
NetworkSlice: NetworkSliceSerializer,
- TenantRoot: TenantRootSerializer,
-
Service: ServiceSerializer,
ControllerSlicePrivilege: ControllerSlicePrivilegeSerializer,
@@ -2821,7 +2731,7 @@
NetworkTemplate: NetworkTemplateSerializer,
- ServiceResource: ServiceResourceSerializer,
+ TenantRoot: TenantRootSerializer,
ServicePrivilege: ServicePrivilegeSerializer,
@@ -3729,7 +3639,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',)
+ 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','permit_all_slices','autoconnect','template','owner','slices','slices','instances',)
def get_serializer_class(self):
no_hyperlinks=False
@@ -3865,53 +3775,6 @@
-class ServiceClassList(XOSListCreateAPIView):
- queryset = ServiceClass.objects.select_related().all()
- serializer_class = ServiceClassSerializer
- id_serializer_class = ServiceClassIdSerializer
- 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','commitment','membershipFee','membershipFeeMonths','upgradeRequiresApproval',)
-
- 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 ServiceClass.select_by_user(self.request.user)
-
-
-class ServiceClassDetail(XOSRetrieveUpdateDestroyAPIView):
- queryset = ServiceClass.objects.select_related().all()
- serializer_class = ServiceClassSerializer
- id_serializer_class = ServiceClassIdSerializer
-
- 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 ServiceClass.select_by_user(self.request.user)
-
- # update() is handled by XOSRetrieveUpdateDestroyAPIView
-
- # destroy() is handled by XOSRetrieveUpdateDestroyAPIView
-
-
-
class TenantAttributeList(XOSListCreateAPIView):
queryset = TenantAttribute.objects.select_related().all()
serializer_class = TenantAttributeSerializer
@@ -4011,7 +3874,7 @@
serializer_class = RoleSerializer
id_serializer_class = RoleIdSerializer
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','role_type','role','description','content_type',)
+ 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','role_type','role','description',)
def get_serializer_class(self):
no_hyperlinks=False
@@ -4575,7 +4438,7 @@
serializer_class = SliceSerializer
id_serializer_class = SliceIdSerializer
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','enabled','omf_friendly','description','slice_url','max_instances','network','exposed_ports','mount_data_sets','default_isolation','site','service','serviceClass','creator','default_flavor','default_image','default_node','networks','networks',)
+ 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','enabled','description','slice_url','max_instances','network','exposed_ports','mount_data_sets','default_isolation','site','service','creator','default_flavor','default_image','default_node','networks','networks',)
def get_serializer_class(self):
no_hyperlinks=False
@@ -4946,53 +4809,6 @@
-class TenantRootList(XOSListCreateAPIView):
- queryset = TenantRoot.objects.select_related().all()
- serializer_class = TenantRootSerializer
- id_serializer_class = TenantRootIdSerializer
- 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','kind','name','service_specific_attribute','service_specific_id',)
-
- 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 TenantRoot.select_by_user(self.request.user)
-
-
-class TenantRootDetail(XOSRetrieveUpdateDestroyAPIView):
- queryset = TenantRoot.objects.select_related().all()
- serializer_class = TenantRootSerializer
- id_serializer_class = TenantRootIdSerializer
-
- 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 TenantRoot.select_by_user(self.request.user)
-
- # update() is handled by XOSRetrieveUpdateDestroyAPIView
-
- # destroy() is handled by XOSRetrieveUpdateDestroyAPIView
-
-
-
class ServiceList(XOSListCreateAPIView):
queryset = Service.objects.select_related().all()
serializer_class = ServiceSerializer
@@ -5374,7 +5190,7 @@
serializer_class = NetworkTemplateSerializer
id_serializer_class = NetworkTemplateIdSerializer
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','guaranteed_bandwidth','visibility','translation','access','shared_network_name','shared_network_id','topology_kind','controller_kind','vtn_kind',)
+ 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','visibility','translation','access','shared_network_name','shared_network_id','topology_kind','controller_kind','vtn_kind',)
def get_serializer_class(self):
no_hyperlinks=False
@@ -5416,12 +5232,12 @@
-class ServiceResourceList(XOSListCreateAPIView):
- queryset = ServiceResource.objects.select_related().all()
- serializer_class = ServiceResourceSerializer
- id_serializer_class = ServiceResourceIdSerializer
+class TenantRootList(XOSListCreateAPIView):
+ queryset = TenantRoot.objects.select_related().all()
+ serializer_class = TenantRootSerializer
+ id_serializer_class = TenantRootIdSerializer
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','maxUnitsDeployment','maxUnitsNode','maxDuration','bucketInRate','bucketMaxSize','cost','calendarReservable','serviceClass',)
+ 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','kind','name','service_specific_attribute','service_specific_id',)
def get_serializer_class(self):
no_hyperlinks=False
@@ -5435,13 +5251,13 @@
def get_queryset(self):
if (not self.request.user.is_authenticated()):
raise XOSNotAuthenticated()
- return ServiceResource.select_by_user(self.request.user)
+ return TenantRoot.select_by_user(self.request.user)
-class ServiceResourceDetail(XOSRetrieveUpdateDestroyAPIView):
- queryset = ServiceResource.objects.select_related().all()
- serializer_class = ServiceResourceSerializer
- id_serializer_class = ServiceResourceIdSerializer
+class TenantRootDetail(XOSRetrieveUpdateDestroyAPIView):
+ queryset = TenantRoot.objects.select_related().all()
+ serializer_class = TenantRootSerializer
+ id_serializer_class = TenantRootIdSerializer
def get_serializer_class(self):
no_hyperlinks=False
@@ -5455,7 +5271,7 @@
def get_queryset(self):
if (not self.request.user.is_authenticated()):
raise XOSNotAuthenticated()
- return ServiceResource.select_by_user(self.request.user)
+ return TenantRoot.select_by_user(self.request.user)
# update() is handled by XOSRetrieveUpdateDestroyAPIView