rest_framework doesn't have a serializers.ReadOnlyField
diff --git a/planetstack/core/xoslib/methods/sliceplus.py b/planetstack/core/xoslib/methods/sliceplus.py
index b302aec..7e9ae89 100644
--- a/planetstack/core/xoslib/methods/sliceplus.py
+++ b/planetstack/core/xoslib/methods/sliceplus.py
@@ -8,8 +8,15 @@
from core.xoslib.objects.sliceplus import SlicePlus
from plus import PlusSerializerMixin
+if hasattr(serializers, "ReadOnlyField"):
+ # rest_framework 3.x
+ IdField = serializers.ReadOnlyField
+else:
+ # rest_framework 2.x
+ IdField = serializers.Field
+
class SlicePlusIdSerializer(serializers.ModelSerializer, PlusSerializerMixin):
- id = serializers.ReadOnlyField()
+ id = IdField()
sliceInfo = serializers.SerializerMethodField("getSliceInfo")
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
diff --git a/planetstack/genapi.py b/planetstack/genapi.py
index 4e733fc..47d2365 100644
--- a/planetstack/genapi.py
+++ b/planetstack/genapi.py
@@ -10,6 +10,13 @@
from rest_framework import filters
from django.conf.urls import patterns, url
+if hasattr(serializers, "ReadOnlyField"):
+ # rest_framework 3.x
+ IdField = serializers.ReadOnlyField
+else:
+ # rest_framework 2.x
+ IdField = serializers.Field
+
"""
Schema of the generator object:
all: Set of all Model objects
@@ -313,7 +320,7 @@
class FlavorSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
deployments = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='deployment-detail')
@@ -333,7 +340,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','description','flavor','order','default','deployments',)
class FlavorIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
deployments = serializers.PrimaryKeyRelatedField(many=True, queryset = Deployment.objects.all())
@@ -356,7 +363,7 @@
class ServiceAttributeSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -372,7 +379,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','value','service',)
class ServiceAttributeIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -391,7 +398,7 @@
class ControllerImagesSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -407,7 +414,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','image','controller','glance_image_id',)
class ControllerImagesIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -426,7 +433,7 @@
class ImageSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
deployments = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='deployment-detail')
@@ -446,7 +453,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','disk_format','container_format','path','deployments',)
class ImageIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
deployments = serializers.PrimaryKeyRelatedField(many=True, queryset = Deployment.objects.all())
@@ -469,7 +476,7 @@
class NetworkParameterSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -485,7 +492,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','parameter','value','content_type','object_id',)
class NetworkParameterIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -504,7 +511,7 @@
class SiteSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
deployments = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='deployment-detail')
@@ -524,7 +531,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','site_url','enabled','location','longitude','latitude','login_base','is_public','abbreviated_name','deployments',)
class SiteIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
deployments = serializers.PrimaryKeyRelatedField(many=True, queryset = Deployment.objects.all())
@@ -547,7 +554,7 @@
class SliceRoleSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -563,7 +570,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','role',)
class SliceRoleIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -582,7 +589,7 @@
class TagSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -598,7 +605,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','service','name','value','content_type','object_id',)
class TagIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -617,7 +624,7 @@
class InvoiceSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -633,7 +640,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','date','account',)
class InvoiceIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -652,7 +659,7 @@
class SlicePrivilegeSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -668,7 +675,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','user','slice','role',)
class SlicePrivilegeIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -687,7 +694,7 @@
class PlanetStackRoleSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -703,7 +710,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','role',)
class PlanetStackRoleIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -722,7 +729,7 @@
class ControllerPrivilegeSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -738,7 +745,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','user','controller','role',)
class ControllerPrivilegeIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -757,7 +764,7 @@
class NetworkSliverSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -773,7 +780,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','network','sliver','ip','port_id',)
class NetworkSliverIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -792,7 +799,7 @@
class ProjectSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -808,7 +815,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name',)
class ProjectIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -827,7 +834,7 @@
class SliceSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
networks = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='network-detail')
@@ -851,7 +858,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','enabled','omf_friendly','description','slice_url','site','max_slivers','imagePreference','service','network','mountDataSets','serviceClass','creator','networks','networks',)
class SliceIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
networks = serializers.PrimaryKeyRelatedField(many=True, queryset = Network.objects.all())
@@ -878,7 +885,7 @@
class NetworkSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
slices = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='slice-detail')
@@ -914,7 +921,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','template','subnet','ports','labels','owner','guaranteedBandwidth','permitAllSlices','topologyParameters','controllerUrl','controllerParameters','network_id','router_id','subnet_id','slices','slices','slivers','routers','routers',)
class NetworkIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
slices = serializers.PrimaryKeyRelatedField(many=True, queryset = Slice.objects.all())
@@ -953,7 +960,7 @@
class ServiceSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -969,7 +976,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','description','enabled','name','versionNumber','published',)
class ServiceIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -988,7 +995,7 @@
class ServiceClassSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1004,7 +1011,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','description','commitment','membershipFee','membershipFeeMonths','upgradeRequiresApproval',)
class ServiceClassIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1023,7 +1030,7 @@
class ControllerNetworksSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1039,7 +1046,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','network','controller','net_id','router_id','subnet_id','subnet',)
class ControllerNetworksIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1058,7 +1065,7 @@
class ChargeSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1074,7 +1081,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','account','slice','kind','state','date','object','amount','coreHours','invoice',)
class ChargeIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1093,7 +1100,7 @@
class RoleSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1109,7 +1116,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','role_type','role','description','content_type',)
class RoleIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1128,7 +1135,7 @@
class UsableObjectSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1144,7 +1151,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name',)
class UsableObjectIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1163,7 +1170,7 @@
class ControllerSiteDeploymentsSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1179,7 +1186,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','controller','site_deployment','tenant_id',)
class ControllerSiteDeploymentsIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1198,7 +1205,7 @@
class SiteRoleSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1214,7 +1221,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','role',)
class SiteRoleIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1233,7 +1240,7 @@
class SliceCredentialSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1249,7 +1256,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','slice','name','key_id','enc_value',)
class SliceCredentialIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1268,7 +1275,7 @@
class SliverSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
networks = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='network-detail')
@@ -1288,7 +1295,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','instance_id','name','instance_name','ip','image','creator','slice','node','controllerNetwork','numberCores','flavor','userData','networks',)
class SliverIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
networks = serializers.PrimaryKeyRelatedField(many=True, queryset = Network.objects.all())
@@ -1311,7 +1318,7 @@
class NodeSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1327,7 +1334,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','site_deployment',)
class NodeIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1346,7 +1353,7 @@
class DashboardViewSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
controllers = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='controller-detail')
@@ -1366,7 +1373,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','url','controllers',)
class DashboardViewIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
controllers = serializers.PrimaryKeyRelatedField(many=True, queryset = Controller.objects.all())
@@ -1389,7 +1396,7 @@
class ImageDeploymentsSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1405,7 +1412,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','image','deployment',)
class ImageDeploymentsIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1424,7 +1431,7 @@
class ReservedResourceSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1440,7 +1447,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','sliver','resource','quantity','reservationSet',)
class ReservedResourceIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1459,7 +1466,7 @@
class PaymentSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1475,7 +1482,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','account','amount','date',)
class PaymentIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1494,7 +1501,7 @@
class NetworkSliceSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1510,7 +1517,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','network','slice',)
class NetworkSliceIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1529,7 +1536,7 @@
class UserDashboardViewSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1545,7 +1552,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','user','dashboardView','order',)
class UserDashboardViewIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1564,7 +1571,7 @@
class ControllerSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
dashboardviews = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='dashboardview-detail')
@@ -1584,7 +1591,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','version','backend_type','auth_url','admin_user','admin_password','admin_tenant','dashboardviews',)
class ControllerIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
dashboardviews = serializers.PrimaryKeyRelatedField(many=True, queryset = DashboardView.objects.all())
@@ -1607,7 +1614,7 @@
class PlanetStackPrivilegeSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1623,7 +1630,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','user','planetstack','role',)
class PlanetStackPrivilegeIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1642,7 +1649,7 @@
class UserSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1658,7 +1665,7 @@
fields = ('humanReadableName', 'validators', 'id','password','last_login','email','username','firstname','lastname','phone','user_url','site','public_key','is_active','is_admin','is_staff','is_readonly','created','updated','enacted','backend_status','deleted','timezone',)
class UserIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1677,7 +1684,7 @@
class DeploymentSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
flavors = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='flavor-detail')
@@ -1705,7 +1712,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','accessControl','flavors','images','sites',)
class DeploymentIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
flavors = serializers.PrimaryKeyRelatedField(many=True, queryset = Flavor.objects.all())
@@ -1736,7 +1743,7 @@
class ReservationSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1752,7 +1759,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','startTime','slice','duration',)
class ReservationIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1771,7 +1778,7 @@
class SitePrivilegeSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1787,7 +1794,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','user','site','role',)
class SitePrivilegeIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1806,7 +1813,7 @@
class PlanetStackSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1822,7 +1829,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','description',)
class PlanetStackIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1841,7 +1848,7 @@
class ControllerDashboardViewSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1857,7 +1864,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','controller','dashboardView','url',)
class ControllerDashboardViewIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1876,7 +1883,7 @@
class AccountSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1892,7 +1899,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','site',)
class AccountIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1911,7 +1918,7 @@
class ControllerRoleSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1927,7 +1934,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','role',)
class ControllerRoleIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1946,7 +1953,7 @@
class NetworkParameterTypeSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1962,7 +1969,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','description',)
class NetworkParameterTypeIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1981,7 +1988,7 @@
class SiteCredentialSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -1997,7 +2004,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','site','name','key_id','enc_value',)
class SiteCredentialIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2016,7 +2023,7 @@
class DeploymentPrivilegeSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2032,7 +2039,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','user','deployment','role',)
class DeploymentPrivilegeIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2051,7 +2058,7 @@
class ControllerUsersSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2067,7 +2074,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','user','controller','kuser_id',)
class ControllerUsersIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2086,7 +2093,7 @@
class DeploymentRoleSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2102,7 +2109,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','role',)
class DeploymentRoleIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2121,7 +2128,7 @@
class UserCredentialSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2137,7 +2144,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','user','name','key_id','enc_value',)
class UserCredentialIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2156,7 +2163,7 @@
class SiteDeploymentsSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2172,7 +2179,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','site','deployment','controller','availability_zone',)
class SiteDeploymentsIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2191,7 +2198,7 @@
class SliceTagSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2207,7 +2214,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','slice','name','value',)
class SliceTagIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2226,7 +2233,7 @@
class NetworkTemplateSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2242,7 +2249,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','description','guaranteedBandwidth','visibility','translation','sharedNetworkName','sharedNetworkId','topologyKind','controllerKind',)
class NetworkTemplateIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2261,7 +2268,7 @@
class RouterSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
networks = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='network-detail')
@@ -2285,7 +2292,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','name','owner','networks','networks',)
class RouterIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
networks = serializers.PrimaryKeyRelatedField(many=True, queryset = Network.objects.all())
@@ -2312,7 +2319,7 @@
class ServiceResourceSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2328,7 +2335,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','serviceClass','name','maxUnitsDeployment','maxUnitsNode','maxDuration','bucketInRate','bucketMaxSize','cost','calendarReservable',)
class ServiceResourceIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2347,7 +2354,7 @@
class ControllerSlicesSerializer(serializers.HyperlinkedModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")
@@ -2363,7 +2370,7 @@
fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','backend_status','deleted','controller','slice','tenant_id',)
class ControllerSlicesIdSerializer(XOSModelSerializer):
- id = serializers.ReadOnlyField()
+ id = IdField()
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
validators = serializers.SerializerMethodField("getValidators")