diff --git a/xos/apigen/api.template.py b/xos/apigen/api.template.py
index 080beb7..9bd5a22 100644
--- a/xos/apigen/api.template.py
+++ b/xos/apigen/api.template.py
@@ -62,18 +62,18 @@
 
             So, let's strip out these m2m relations, and deal with them ourself.
         """
-        obj._complex_m2m_data={};
-        if getattr(obj, '_m2m_data', None):
-            for relatedObject in obj._meta.get_all_related_many_to_many_objects():
-                if (relatedObject.field.rel.through._meta.auto_created):
-                    # These are non-trough ManyToMany relations and
-                    # can be updated just fine
-                    continue
-                fieldName = relatedObject.get_accessor_name()
-                if fieldName in obj._m2m_data.keys():
-                    obj._complex_m2m_data[fieldName] = (relatedObject, obj._m2m_data[fieldName])
-                    del obj._m2m_data[fieldName]
-
+        obj._complex_m2m_data={};
+        if getattr(obj, '_m2m_data', None):
+            for relatedObject in obj._meta.get_all_related_many_to_many_objects():
+                if (relatedObject.field.rel.through._meta.auto_created):
+                    # These are non-trough ManyToMany relations and
+                    # can be updated just fine
+                    continue
+                fieldName = relatedObject.get_accessor_name()
+                if fieldName in obj._m2m_data.keys():
+                    obj._complex_m2m_data[fieldName] = (relatedObject, obj._m2m_data[fieldName])
+                    del obj._m2m_data[fieldName]
+
         serializers.ModelSerializer.save_object(self, obj, **kwargs);
 
         for (accessor, stuff) in obj._complex_m2m_data.items():
@@ -117,7 +117,7 @@
     {% endfor %}
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -139,14 +139,14 @@
     {% endfor %}
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = {{ object.camel }}
         fields = ('humanReadableName', 'validators', {% for prop in object.props %}'{{ prop }}',{% endfor %}{% for ref in object.refs %}{%if ref.multi %}'{{ ref.plural }}'{% else %}'{{ ref }}'{% endif %},{% endfor %})
 
diff --git a/xos/core/acl.py b/xos/core/acl.py
index 5b02055..518d199 100644
--- a/xos/core/acl.py
+++ b/xos/core/acl.py
@@ -3,17 +3,17 @@
 """
     A General-purpose ACL mechanism.
 
-    [allow | deny] <type_of_object> <text_pattern>
-
-    "allow all" and "deny all" are shorthand for allowing or denying all objects.
-    Lines are executed from top to bottom until a match was found, typical
-    iptables style. An implicit 'deny all' exists at the bottom of the list.
-
-    For example,
-    allow site Max Planck Institute
-    deny site Arizona
-    allow region US
-    deny user scott@onlab.us
+    [allow | deny] <type_of_object> <text_pattern>
+
+    "allow all" and "deny all" are shorthand for allowing or denying all objects.
+    Lines are executed from top to bottom until a match was found, typical
+    iptables style. An implicit 'deny all' exists at the bottom of the list.
+
+    For example,
+    allow site Max Planck Institute
+    deny site Arizona
+    allow region US
+    deny user scott@onlab.us
     allow user *@onlab.us
 """
 class ACLValidationError(Exception): pass
diff --git a/xos/core/admin.py b/xos/core/admin.py
index 8874ae5..9d473da 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -48,12 +48,12 @@
 class UploadTextareaWidget(AdminTextareaWidget):
     def render(self, name, value, attrs=None):
         if value is None:
-            value = ''
-        final_attrs = self.build_attrs(attrs, name=name)
-        return format_html('<input type="file" style="width: 0; height: 0" id="btn_upload_%s" onChange="uploadTextarea(event,\'%s\');">' \
-                           '<button onClick="$(\'#btn_upload_%s\').click(); return false;">Upload</button>' \
-                           '<br><textarea{0}>\r\n{1}</textarea>' % (attrs["id"], attrs["id"], attrs["id"]),
-                           flatatt(final_attrs),
+            value = ''
+        final_attrs = self.build_attrs(attrs, name=name)
+        return format_html('<input type="file" style="width: 0; height: 0" id="btn_upload_%s" onChange="uploadTextarea(event,\'%s\');">' \
+                           '<button onClick="$(\'#btn_upload_%s\').click(); return false;">Upload</button>' \
+                           '<br><textarea{0}>\r\n{1}</textarea>' % (attrs["id"], attrs["id"], attrs["id"]),
+                           flatatt(final_attrs),
                            force_text(value))
 
 class PlainTextWidget(forms.HiddenInput):
@@ -95,8 +95,8 @@
         #
         # code from forms/models.py save_existing_objects()
         try:
-            forms_to_delete = formset.deleted_forms
-        except AttributeError:
+            forms_to_delete = formset.deleted_forms
+        except AttributeError:
             forms_to_delete = []
         if formset.initial_forms:
             for form in formset.initial_forms:
@@ -120,19 +120,19 @@
 
     def change_view(self,request,object_id, extra_context=None):
         if self.__user_is_readonly(request):
-            if not hasattr(self, "readonly_save"):
-                # save the original readonly fields
-                self.readonly_save = self.readonly_fields
-                self.inlines_save = self.inlines
-            if hasattr(self, "user_readonly_fields"):
-                self.readonly_fields=self.user_readonly_fields
-            if hasattr(self, "user_readonly_inlines"):
-                self.inlines = self.user_readonly_inlines
-        else:
-            if hasattr(self, "readonly_save"):
-                # restore the original readonly fields
-                self.readonly_fields = self.readonly_save
-            if hasattr(self, "inlines_save"):
+            if not hasattr(self, "readonly_save"):
+                # save the original readonly fields
+                self.readonly_save = self.readonly_fields
+                self.inlines_save = self.inlines
+            if hasattr(self, "user_readonly_fields"):
+                self.readonly_fields=self.user_readonly_fields
+            if hasattr(self, "user_readonly_inlines"):
+                self.inlines = self.user_readonly_inlines
+        else:
+            if hasattr(self, "readonly_save"):
+                # restore the original readonly fields
+                self.readonly_fields = self.readonly_save
+            if hasattr(self, "inlines_save"):
                 self.inlines = self.inlines_save
 
         try:
@@ -253,8 +253,8 @@
         if obj.id:
             url = self.get_change_url(self.selflink_model, obj.id)
             return "<a href='%s'>Details</a>" % str(url)
-        else:
-            return "Not present"
+        else:
+            return "Not present"
 
     selflink.allow_tags = True
     selflink.short_description = "Details"
@@ -352,7 +352,8 @@
 
     def formfield_for_foreignkey(self, db_field, request=None, **kwargs):
         if db_field.name == 'deployment':
-           kwargs['queryset'] = Deployment.select_by_acl(request.user)
+             
+           kwargs['queryset'] = Deployment.select_by_acl(request.user).filter(sitedeployments__nodes__isnull=False).distinct()
            kwargs['widget'] = forms.Select(attrs={'onChange': "sliver_deployment_changed(this);"})
         if db_field.name == 'flavor':
            kwargs['widget'] = forms.Select(attrs={'onChange': "sliver_flavor_changed(this);"})
@@ -701,6 +702,13 @@
     extra = 0
     suit_classes = 'suit-tab suit-tab-nodes'
 
+    def formfield_for_foreignkey(self, db_field, request, **kwargs):
+        # only display site deployments associated with this site
+        if db_field.name ==  'site_deployment':
+            kwargs['queryset'] = SiteDeployment.objects.filter(site__id=int(request.path.split('/')[-2]))
+
+        return super(SiteNodeInline, self).formfield_for_foreignkey(db_field, request, **kwargs)
+
 class SiteAdmin(XOSBaseAdmin):
     #fieldList = ['backend_status_text', 'name', 'site_url', 'enabled', 'is_public', 'login_base', 'accountLink','location']
     fieldList = ['backend_status_text', 'name', 'site_url', 'enabled', 'is_public', 'login_base', 'location']
@@ -1279,15 +1287,15 @@
                 field.queryset = field.queryset.filter(serviceClass = request._slice.serviceClass, calendarReservable=True)
                 if len(field.queryset) > 0:
                     field.initial = field.queryset.all()[0]
-            else:
-                field.queryset = field.queryset.none()
-        elif db_field.name == 'sliver':
-            # restrict slivers to those that belong to the slice
-            if request._slice is not None:
+            else:
+                field.queryset = field.queryset.none()
+        elif db_field.name == 'sliver':
+            # restrict slivers to those that belong to the slice
+            if request._slice is not None:
                 field.queryset = field.queryset.filter(slice = request._slice)
             else:
-                field.queryset = field.queryset.none()
-
+                field.queryset = field.queryset.none()
+
         return field
 
     def queryset(self, request):
diff --git a/xos/core/dashboard/sites.py b/xos/core/dashboard/sites.py
index 4a2e742..550c79f 100644
--- a/xos/core/dashboard/sites.py
+++ b/xos/core/dashboard/sites.py
@@ -51,8 +51,8 @@
                url(r'^createnewslice/$', self.admin_view(TenantCreateSlice.as_view()),
                     name="createnewslice"),
                url(r'^adduser/$', self.admin_view(TenantAddUser.as_view()),
-                      name="adduser"),
-               url(r'^requestaccess/$', RequestAccessView.as_view(),
+                      name="adduser"),
+               url(r'^requestaccess/$', RequestAccessView.as_view(),
                       name="requestacces"),
 	       url(r'^updateslice/$', self.admin_view(TenantUpdateSlice.as_view()),
                     name="updateslice"),
diff --git a/xos/core/dashboard/views/customize.py b/xos/core/dashboard/views/customize.py
index 2c399eb..6005562 100644
--- a/xos/core/dashboard/views/customize.py
+++ b/xos/core/dashboard/views/customize.py
@@ -1,22 +1,22 @@
 from view_common import *
 
 class DashboardCustomize(View):
-    def post(self, request, *args, **kwargs):
-        if request.user.isReadOnlyUser():
-            return HttpResponseForbidden("User is in read-only mode")
-
-        dashboards = request.POST.get("dashboards", None)
-        if not dashboards:
-            dashboards=[]
-        else:
-            dashboards = [x.strip() for x in dashboards.split(",")]
-            dashboards = [DashboardView.objects.get(name=x) for x in dashboards]
-
-        request.user.userdashboardviews.all().delete()
-
-        for i,dashboard in enumerate(dashboards):
-            udbv = UserDashboardView(user=request.user, dashboardView=dashboard, order=i)
-            udbv.save()
-
+    def post(self, request, *args, **kwargs):
+        if request.user.isReadOnlyUser():
+            return HttpResponseForbidden("User is in read-only mode")
+
+        dashboards = request.POST.get("dashboards", None)
+        if not dashboards:
+            dashboards=[]
+        else:
+            dashboards = [x.strip() for x in dashboards.split(",")]
+            dashboards = [DashboardView.objects.get(name=x) for x in dashboards]
+
+        request.user.userdashboardviews.all().delete()
+
+        for i,dashboard in enumerate(dashboards):
+            udbv = UserDashboardView(user=request.user, dashboardView=dashboard, order=i)
+            udbv.save()
+
         return HttpResponse(json.dumps("Success"), content_type='application/javascript')
 
diff --git a/xos/core/dashboard/views/home.py b/xos/core/dashboard/views/home.py
index 4270d6d..045cd34 100644
--- a/xos/core/dashboard/views/home.py
+++ b/xos/core/dashboard/views/home.py
@@ -115,10 +115,10 @@
 
         response_kwargs = {}
         response_kwargs.setdefault('content_type', self.content_type)
-        return self.response_class(
-            request = request,
-            template = t,
-            context = context,
+        return self.response_class(
+            request = request,
+            template = t,
+            context = context,
             **response_kwargs)
 
     def singleDashboardView(self, request, name, context):
@@ -129,10 +129,10 @@
 
         response_kwargs = {}
         response_kwargs.setdefault('content_type', self.content_type)
-        return self.response_class(
-            request = request,
-            template = t,
-            context = context,
+        return self.response_class(
+            request = request,
+            template = t,
+            context = context,
             **response_kwargs)
 
     def singleFullView(self, request, name, context):
@@ -143,9 +143,9 @@
 
         response_kwargs = {}
         response_kwargs.setdefault('content_type', self.content_type)
-        return self.response_class(
-            request = request,
-            template = t,
-            context = context,
+        return self.response_class(
+            request = request,
+            template = t,
+            context = context,
             **response_kwargs)
 
diff --git a/xos/core/dashboard/views/tenant.py b/xos/core/dashboard/views/tenant.py
index 5012087..951efc2 100644
--- a/xos/core/dashboard/views/tenant.py
+++ b/xos/core/dashboard/views/tenant.py
@@ -74,14 +74,14 @@
            newSlice = Slice(name=sliceName,serviceClass=serviceClass,site=site,image_preference=image,mount_data_sets=mountDataSets)
            newSlice.save()
 	   privateTemplate="Private"
-	   publicTemplate="Public shared IPv4"
-	   privateNetworkName = sliceName+"-"+privateTemplate
-	   publicNetworkName = sliceName+"-"+publicTemplate
-	   slice=Slice.objects.get(name=sliceName)
-	   addNetwork(privateNetworkName,privateTemplate,slice)
-	   addNetwork(publicNetworkName,publicTemplate,slice)
-	   addOrModifyPorts(networkPorts,sliceName)
-	   if privateVolume=="true":
+	   publicTemplate="Public shared IPv4"
+	   privateNetworkName = sliceName+"-"+privateTemplate
+	   publicNetworkName = sliceName+"-"+publicTemplate
+	   slice=Slice.objects.get(name=sliceName)
+	   addNetwork(privateNetworkName,privateTemplate,slice)
+	   addNetwork(publicNetworkName,publicTemplate,slice)
+	   addOrModifyPorts(networkPorts,sliceName)
+	   if privateVolume=="true":
 	   	privateVolForSlice(request.user,sliceName)
 	   slicePrivs=SlicePrivilege(user=User.objects.get(email=userEmail),slice=Slice.objects.get(name=sliceName),role=SliceRole.objects.get(role="admin"))
            slicePrivs.save()
@@ -99,63 +99,63 @@
         return HttpResponse(json.dumps("Slice created"), content_type='application/javascript')
 
 def privateVolForSlice(user,sliceName):
-	if not hasPrivateVolume(sliceName):
-	   volumeName=createPrivateVolume(user,sliceName)
-	   readWrite="true"
+	if not hasPrivateVolume(sliceName):
+	   volumeName=createPrivateVolume(user,sliceName)
+	   readWrite="true"
 	   mountVolume(sliceName,volumeName,readWrite)
 
 class TenantUpdateSlice(View):
-    def post(self, request, *args, **kwargs):
-        if request.user.isReadOnlyUser():
-            return HttpResponseForbidden("User is in read-only mode")
-
-        sliceName = request.POST.get("sliceName", "0")
-        serviceClass = request.POST.get("serviceClass", "0")
-        imageName = request.POST.get("imageName", "0")
-        actionToDo = request.POST.get("actionToDo", "0")
-        networkPorts = request.POST.get("networkPorts","0")
-        dataSet = request.POST.get("dataSet","0")
-        privateVolume = request.POST.get("privateVolume","0")
-        slice = Slice.objects.all()
-        for entry in slice:
-                serviceClass = ServiceClass.objects.get(name=serviceClass)
-                if(entry.name==sliceName):
-                         if (actionToDo == "update"):
-                                setattr(entry,'serviceClass',serviceClass)
-                                setattr(entry,'image_preference',imageName)
-                                setattr(entry,'mount_data_sets',dataSet)
-                                entry.save()
-                                break
-	addOrModifyPorts(networkPorts,sliceName)
-	if privateVolume=="true":
-                privateVolForSlice(request.user,sliceName)
-        return HttpResponse(json.dumps("Slice updated"), content_type='application/javascript')
-
-def addNetwork(name,template,sliceName):
-	networkTemplate=NetworkTemplate.objects.get(name=template)
-	newNetwork = Network(name = name,
-                              template = networkTemplate,
-                              owner = sliceName)
-        newNetwork.save()
-	addNetworkSlice(newNetwork,sliceName)
-
-def addNetworkSlice(networkSlice,sliceName):
-	newNetworkSlice=NetworkSlice(network =networkSlice,
-				     slice=sliceName)
-	newNetworkSlice.save()
-
-def addOrModifyPorts(networkPorts,sliceName):
-	networkList = Network.objects.all()
-        networkInfo = []
-        if networkPorts:
-           for networkEntry in networkList:
-               networkSlices = networkEntry.slices.all()
-               for slice in networkSlices:
-                   if slice.name==sliceName:
-                          if networkEntry.template.name=="Public shared IPv4":
-                             setattr(networkEntry,'ports',networkPorts)
-                             networkEntry.save()
-
+    def post(self, request, *args, **kwargs):
+        if request.user.isReadOnlyUser():
+            return HttpResponseForbidden("User is in read-only mode")
+
+        sliceName = request.POST.get("sliceName", "0")
+        serviceClass = request.POST.get("serviceClass", "0")
+        imageName = request.POST.get("imageName", "0")
+        actionToDo = request.POST.get("actionToDo", "0")
+        networkPorts = request.POST.get("networkPorts","0")
+        dataSet = request.POST.get("dataSet","0")
+        privateVolume = request.POST.get("privateVolume","0")
+        slice = Slice.objects.all()
+        for entry in slice:
+                serviceClass = ServiceClass.objects.get(name=serviceClass)
+                if(entry.name==sliceName):
+                         if (actionToDo == "update"):
+                                setattr(entry,'serviceClass',serviceClass)
+                                setattr(entry,'image_preference',imageName)
+                                setattr(entry,'mount_data_sets',dataSet)
+                                entry.save()
+                                break
+	addOrModifyPorts(networkPorts,sliceName)
+	if privateVolume=="true":
+                privateVolForSlice(request.user,sliceName)
+        return HttpResponse(json.dumps("Slice updated"), content_type='application/javascript')
+
+def addNetwork(name,template,sliceName):
+	networkTemplate=NetworkTemplate.objects.get(name=template)
+	newNetwork = Network(name = name,
+                              template = networkTemplate,
+                              owner = sliceName)
+        newNetwork.save()
+	addNetworkSlice(newNetwork,sliceName)
+
+def addNetworkSlice(networkSlice,sliceName):
+	newNetworkSlice=NetworkSlice(network =networkSlice,
+				     slice=sliceName)
+	newNetworkSlice.save()
+
+def addOrModifyPorts(networkPorts,sliceName):
+	networkList = Network.objects.all()
+        networkInfo = []
+        if networkPorts:
+           for networkEntry in networkList:
+               networkSlices = networkEntry.slices.all()
+               for slice in networkSlices:
+                   if slice.name==sliceName:
+                          if networkEntry.template.name=="Public shared IPv4":
+                             setattr(networkEntry,'ports',networkPorts)
+                             networkEntry.save()
+
 def getTenantSliceInfo(user, tableFormat = False):
     tenantSliceDetails = {}
     tenantSliceData = getTenantInfo(user)
@@ -227,10 +227,10 @@
 	return tenantSiteInfo
 
 def getPublicKey(user):
-	users=User.objects.all()
-        for key in users:
-        	if (str(key.email)==str(user)):
-                    	sshKey = key.public_key
+	users=User.objects.all()
+        for key in users:
+        	if (str(key.email)==str(user)):
+                    	sshKey = key.public_key
         return sshKey
 
 def getServiceClassInfo(user):
@@ -310,11 +310,11 @@
      return False
 
 def getMountDataSets():
-        dataSetInfo=[]
-        for volume in Volume.objects.all():
-            if not volume.private:
-                dataSetInfo.append({'DataSet': volume.name})
-
+        dataSetInfo=[]
+        for volume in Volume.objects.all():
+            if not volume.private:
+                dataSetInfo.append({'DataSet': volume.name})
+
         return dataSetInfo
 
 def getDeploymentSites():
@@ -334,13 +334,13 @@
     return list(set(available_sites))
 
 class TenantDeleteSliceView(View):
-        def post(self,request):
-                if request.user.isReadOnlyUser():
-                    return HttpResponseForbidden("User is in read-only mode")
-                sliceName = request.POST.get("sliceName",None)
-                slice = Slice.objects.get(name=sliceName)
-                #print slice, slice.id
-                sliceToDel=Slice(name=sliceName, id=slice.id)
+        def post(self,request):
+                if request.user.isReadOnlyUser():
+                    return HttpResponseForbidden("User is in read-only mode")
+                sliceName = request.POST.get("sliceName",None)
+                slice = Slice.objects.get(name=sliceName)
+                #print slice, slice.id
+                sliceToDel=Slice(name=sliceName, id=slice.id)
                 sliceToDel.delete()
                 return HttpResponse(json.dumps("Slice deleted"), content_type='application/javascript')
 
diff --git a/xos/core/dashboard/views/view_common.py b/xos/core/dashboard/views/view_common.py
index 7d59278..37da7cf 100644
--- a/xos/core/dashboard/views/view_common.py
+++ b/xos/core/dashboard/views/view_common.py
@@ -144,11 +144,11 @@
     for sliver in list(slice.slivers.all()):
         if count>0:
             if(not siteNames) or (sliver.node.site.name in siteNames):
-                sliver.delete()
-                print "deleting sliver",sliver.name,"at node",sliver.node.name
-                count=count-1
-                sitesChanged[sliver.node.site.name] = sitesChanged.get(sliver.node.site.name,0) - 1
-
+                sliver.delete()
+                print "deleting sliver",sliver.name,"at node",sliver.node.name
+                count=count-1
+                sitesChanged[sliver.node.site.name] = sitesChanged.get(sliver.node.site.name,0) - 1
+
     return sitesChanged
 
 def haversine(site_lat, site_lon, lat, lon):
diff --git a/xos/core/models/plcorebase.py b/xos/core/models/plcorebase.py
index e610d1b..5ca2a88 100644
--- a/xos/core/models/plcorebase.py
+++ b/xos/core/models/plcorebase.py
@@ -67,10 +67,10 @@
                              self._meta.fields])
 
     def fields_differ(self,f1,f2):
-        if isinstance(f1,datetime.datetime) and isinstance(f2,datetime.datetime) and (timezone.is_aware(f1) != timezone.is_aware(f2)):
-            return True
-        else:
-            return (f1 != f2)
+        if isinstance(f1,datetime.datetime) and isinstance(f2,datetime.datetime) and (timezone.is_aware(f1) != timezone.is_aware(f2)):
+            return True
+        else:
+            return (f1 != f2)
 
     @property
     def diff(self):
diff --git a/xos/core/models/site.py b/xos/core/models/site.py
index 670398a..c0596f9 100644
--- a/xos/core/models/site.py
+++ b/xos/core/models/site.py
@@ -151,8 +151,8 @@
     #deleted_objects = DeploymentDeletionManager()
     name = models.CharField(max_length=200, unique=True, help_text="Name of the Deployment")
     #admin_user = models.CharField(max_length=200, null=True, blank=True, help_text="Username of an admin user at this deployment")
-    #admin_password = models.CharField(max_length=200, null=True, blank=True, help_text="Password of theadmin user at this deployment")
-    #admin_tenant = models.CharField(max_length=200, null=True, blank=True, help_text="Name of the tenant the admin user belongs to")
+    #admin_password = models.CharField(max_length=200, null=True, blank=True, help_text="Password of theadmin user at this deployment")
+    #admin_tenant = models.CharField(max_length=200, null=True, blank=True, help_text="Name of the tenant the admin user belongs to")
     #auth_url = models.CharField(max_length=200, null=True, blank=True, help_text="Auth url for the deployment")
     #backend_type = models.CharField(max_length=200, null=True, blank=True, help_text="Type of deployment, e.g. EC2, OpenStack, or OpenStack version")
     #availability_zone = models.CharField(max_length=200, null=True, blank=True, help_text="OpenStack availability zone")
diff --git a/xos/core/models/user.py b/xos/core/models/user.py
index 144e0c9..cce2dcd 100644
--- a/xos/core/models/user.py
+++ b/xos/core/models/user.py
@@ -220,9 +220,9 @@
             self.set_password(self.password)
         print "XXX", self, self.is_active, self.is_registering
         if self.is_active and self.is_registering:
-            self.send_temporary_password()
-            self.is_registering=False
-
+            self.send_temporary_password()
+            self.is_registering=False
+
         self.username = self.email
         super(User, self).save(*args, **kwds)
 
@@ -230,13 +230,13 @@
 
     def send_temporary_password(self):
         password = User.objects.make_random_password()
-        self.set_password(password)
-        subject, from_email, to = 'OpenCloud Account Credentials', 'support@opencloud.us', str(self.email)
-        text_content = 'This is an important message.'
-        userUrl="http://%s/" % get_request().get_host()
-        html_content = """<p>Your account has been created on OpenCloud. Please log in <a href="""+userUrl+""">here</a> to activate your account<br><br>Username: """+self.email+"""<br>Temporary Password: """+password+"""<br>Please change your password once you successully login into the site.</p>"""
-        msg = EmailMultiAlternatives(subject,text_content, from_email, [to])
-        msg.attach_alternative(html_content, "text/html")
+        self.set_password(password)
+        subject, from_email, to = 'OpenCloud Account Credentials', 'support@opencloud.us', str(self.email)
+        text_content = 'This is an important message.'
+        userUrl="http://%s/" % get_request().get_host()
+        html_content = """<p>Your account has been created on OpenCloud. Please log in <a href="""+userUrl+""">here</a> to activate your account<br><br>Username: """+self.email+"""<br>Temporary Password: """+password+"""<br>Please change your password once you successully login into the site.</p>"""
+        msg = EmailMultiAlternatives(subject,text_content, from_email, [to])
+        msg.attach_alternative(html_content, "text/html")
         msg.send()
 
     def can_update(self, user):
diff --git a/xos/core/xoslib/methods/plus.py b/xos/core/xoslib/methods/plus.py
index 018f648..280c468 100644
--- a/xos/core/xoslib/methods/plus.py
+++ b/xos/core/xoslib/methods/plus.py
@@ -9,7 +9,7 @@
     Implements Serializer fields that are common to all OpenCloud objects. For
     example, stuff related to backend fields.
 """
-
+
 class PlusSerializerMixin():
     backendIcon = serializers.SerializerMethodField("getBackendIcon")
     backendHtml = serializers.SerializerMethodField("getBackendHtml")
diff --git a/xos/core/xoslib/methods/sliceplus.py b/xos/core/xoslib/methods/sliceplus.py
index 4de2a6e..12f7c1a 100644
--- a/xos/core/xoslib/methods/sliceplus.py
+++ b/xos/core/xoslib/methods/sliceplus.py
@@ -1,9 +1,9 @@
 from rest_framework.decorators import api_view
-from rest_framework.response import Response
-from rest_framework.reverse import reverse
-from rest_framework import serializers
-from rest_framework import generics
-from core.models import *
+from rest_framework.response import Response
+from rest_framework.reverse import reverse
+from rest_framework import serializers
+from rest_framework import generics
+from core.models import *
 from django.forms import widgets
 from core.xoslib.objects.sliceplus import SlicePlus
 from plus import PlusSerializerMixin
@@ -39,33 +39,33 @@
 
 class SlicePlusIdSerializer(serializers.ModelSerializer, PlusSerializerMixin):
         id = IdField()
-
-        sliceInfo = serializers.SerializerMethodField("getSliceInfo")
-        humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
-        network_ports = NetworkPortsField(required=False)
-        site_allocation = DictionaryField(required=False)
-        site_ready = DictionaryField(required=False)
-        users = ListField(required=False)
-        user_names = ListField(required=False) # readonly = True ?
-        current_user_can_see = serializers.SerializerMethodField("getCurrentUserCanSee")
-
-        def getCurrentUserCanSee(self, slice):
-            # user can 'see' the slice if he is the creator or he has a role
-            current_user = self.context['request'].user
-            if (slice.creator and slice.creator==current_user):
-                return True;
-            return (len(slice.getSliceInfo(current_user)["roles"]) > 0)
-
-        def getSliceInfo(self, slice):
-            return slice.getSliceInfo(user=self.context['request'].user)
-
-        def getHumanReadableName(self, obj):
-            return str(obj)
-
-        networks = serializers.PrimaryKeyRelatedField(many=True, read_only=True)
-
-        class Meta:
-            model = SlicePlus
+
+        sliceInfo = serializers.SerializerMethodField("getSliceInfo")
+        humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
+        network_ports = NetworkPortsField(required=False)
+        site_allocation = DictionaryField(required=False)
+        site_ready = DictionaryField(required=False)
+        users = ListField(required=False)
+        user_names = ListField(required=False) # readonly = True ?
+        current_user_can_see = serializers.SerializerMethodField("getCurrentUserCanSee")
+
+        def getCurrentUserCanSee(self, slice):
+            # user can 'see' the slice if he is the creator or he has a role
+            current_user = self.context['request'].user
+            if (slice.creator and slice.creator==current_user):
+                return True;
+            return (len(slice.getSliceInfo(current_user)["roles"]) > 0)
+
+        def getSliceInfo(self, slice):
+            return slice.getSliceInfo(user=self.context['request'].user)
+
+        def getHumanReadableName(self, obj):
+            return str(obj)
+
+        networks = serializers.PrimaryKeyRelatedField(many=True, read_only=True)
+
+        class Meta:
+            model = SlicePlus
             fields = ('humanReadableName', 'id','created','updated','enacted','name','enabled','omf_friendly','description','slice_url','site','max_slivers','service','network','mount_data_sets',
                       'default_image', 'default_flavor',
                       'serviceClass','creator','networks','sliceInfo','network_ports','backendIcon','backendHtml','site_allocation','site_ready','users',"user_names","current_user_can_see")
diff --git a/xos/core/xoslib/methods/tenantview.py b/xos/core/xoslib/methods/tenantview.py
index 10323a2..6922c17 100644
--- a/xos/core/xoslib/methods/tenantview.py
+++ b/xos/core/xoslib/methods/tenantview.py
@@ -1,10 +1,10 @@
 from rest_framework.decorators import api_view
-from rest_framework.response import Response
-from rest_framework.reverse import reverse
-from rest_framework import serializers
-from rest_framework import generics
-from rest_framework.views import APIView
-from core.models import *
+from rest_framework.response import Response
+from rest_framework.reverse import reverse
+from rest_framework import serializers
+from rest_framework import generics
+from rest_framework.views import APIView
+from core.models import *
 from django.forms import widgets
 from syndicate_storage.models import Volume
 from django.core.exceptions import PermissionDenied
@@ -57,7 +57,7 @@
 
     volumes=[]
     for volume in Volume.objects.all():
-        if not volume.private:
+        if not volume.private:
             volumes.append(volume)
 
     site_users=[]
diff --git a/xos/core/xoslib/tools/make_defaults.py b/xos/core/xoslib/tools/make_defaults.py
index e008845..1fc5c89 100644
--- a/xos/core/xoslib/tools/make_defaults.py
+++ b/xos/core/xoslib/tools/make_defaults.py
@@ -7,7 +7,7 @@
 import django
 import core.models
 from django.db import models
-django.setup()
+django.setup()
 from django.forms.models import model_to_dict
 import inspect
 from django.core import serializers
diff --git a/xos/core/xoslib/tools/make_validators.py b/xos/core/xoslib/tools/make_validators.py
index 44ef43a..56dc024 100644
--- a/xos/core/xoslib/tools/make_validators.py
+++ b/xos/core/xoslib/tools/make_validators.py
@@ -7,7 +7,7 @@
 import django
 import core.models
 from django.db import models
-django.setup()
+django.setup()
 from django.forms.models import model_to_dict
 import inspect
 from django.core import serializers
diff --git a/xos/ec2_observer/syncstep.py b/xos/ec2_observer/syncstep.py
index 105daa6..72adb87 100644
--- a/xos/ec2_observer/syncstep.py
+++ b/xos/ec2_observer/syncstep.py
@@ -1,6 +1,9 @@
 import os
 import base64
 from datetime import datetime
+
+from django.db.models import F, Q
+
 from xos.config import Config
 from util.logger import Logger, logging
 from observer.steps import *
@@ -18,7 +21,7 @@
         dependencies    list of names of models that must be synchronized first if the current model depends on them
     """ 
     slow=False
-    def get_prop(prop):
+    def get_prop(self, prop):
         try:
             sync_config_dir = Config().sync_config_dir
         except:
@@ -48,7 +51,7 @@
         # Steps should override it if they have their own logic
         # for figuring out what objects are outstanding.
         main_obj = self.provides[0]
-        if (not deleted):
+        if (not deletion):
             objs = main_obj.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
         else:
             objs = main_obj.deleted_objects.all()
diff --git a/xos/hpc_observer/steps/sync_cdnprefix.py b/xos/hpc_observer/steps/sync_cdnprefix.py
index 8333448..f62f63a 100644
--- a/xos/hpc_observer/steps/sync_cdnprefix.py
+++ b/xos/hpc_observer/steps/sync_cdnprefix.py
@@ -10,7 +10,7 @@
 
 # hpclibrary will be in steps/..
 parentdir = os.path.join(os.path.dirname(__file__),"..")
-sys.path.insert(0,parentdir)
+sys.path.insert(0,parentdir)
 
 from hpclib import HpcLibrary
 
diff --git a/xos/hpc_observer/steps/sync_contentprovider.py b/xos/hpc_observer/steps/sync_contentprovider.py
index 39c15de..e3b3ac1 100644
--- a/xos/hpc_observer/steps/sync_contentprovider.py
+++ b/xos/hpc_observer/steps/sync_contentprovider.py
@@ -10,7 +10,7 @@
 
 # hpclibrary will be in steps/..
 parentdir = os.path.join(os.path.dirname(__file__),"..")
-sys.path.insert(0,parentdir)
+sys.path.insert(0,parentdir)
 
 from hpclib import HpcLibrary
 
diff --git a/xos/hpc_observer/steps/sync_hpcservices.py b/xos/hpc_observer/steps/sync_hpcservices.py
index c5e2679..4fca9c6 100644
--- a/xos/hpc_observer/steps/sync_hpcservices.py
+++ b/xos/hpc_observer/steps/sync_hpcservices.py
@@ -11,7 +11,7 @@
 
 # hpclibrary will be in steps/..
 parentdir = os.path.join(os.path.dirname(__file__),"..")
-sys.path.insert(0,parentdir)
+sys.path.insert(0,parentdir)
 
 from hpclib import HpcLibrary
 
diff --git a/xos/hpc_observer/steps/sync_originserver.py b/xos/hpc_observer/steps/sync_originserver.py
index 405a8a5..b9ea32c 100644
--- a/xos/hpc_observer/steps/sync_originserver.py
+++ b/xos/hpc_observer/steps/sync_originserver.py
@@ -11,7 +11,7 @@
 
 # hpclibrary will be in steps/..
 parentdir = os.path.join(os.path.dirname(__file__),"..")
-sys.path.insert(0,parentdir)
+sys.path.insert(0,parentdir)
 
 from hpclib import HpcLibrary
 
diff --git a/xos/hpc_observer/steps/sync_serviceprovider.py b/xos/hpc_observer/steps/sync_serviceprovider.py
index ac1fc69..44b8ab3 100644
--- a/xos/hpc_observer/steps/sync_serviceprovider.py
+++ b/xos/hpc_observer/steps/sync_serviceprovider.py
@@ -10,7 +10,7 @@
 
 # hpclibrary will be in steps/..
 parentdir = os.path.join(os.path.dirname(__file__),"..")
-sys.path.insert(0,parentdir)
+sys.path.insert(0,parentdir)
 
 from hpclib import HpcLibrary
 
diff --git a/xos/neutron_extension/1:2013.2.2-0ubuntu1~cloud0/ovs_neutron_plugin.py b/xos/neutron_extension/1:2013.2.2-0ubuntu1~cloud0/ovs_neutron_plugin.py
index b7771f8..abf0f80 100644
--- a/xos/neutron_extension/1:2013.2.2-0ubuntu1~cloud0/ovs_neutron_plugin.py
+++ b/xos/neutron_extension/1:2013.2.2-0ubuntu1~cloud0/ovs_neutron_plugin.py
@@ -666,7 +666,7 @@
 
             if forward_ports:
                 ovs_db_v2.clear_port_forwarding(session, updated_port['id'])
-                ovs_db_v2.add_port_forwarding(session, updated_port['id'], forward_ports)
+                ovs_db_v2.add_port_forwarding(session, updated_port['id'], forward_ports)
             self._extend_port_dict_nat(context, updated_port)
 
             need_port_update_notify |= self.update_security_group_on_port(
diff --git a/xos/openstack/manager.py b/xos/openstack/manager.py
index 441a18e..42b1ef1 100644
--- a/xos/openstack/manager.py
+++ b/xos/openstack/manager.py
@@ -8,7 +8,7 @@
 from netaddr import IPAddress, IPNetwork
 from xos import settings
 from django.core import management
-from core.models import * 
+from core.models import *
 from xos.config import Config
 try:
     from openstack.client import OpenStackClient
diff --git a/xos/openstack_observer/steps/sync_controller_images.py b/xos/openstack_observer/steps/sync_controller_images.py
index fa4bd35..68f4321 100644
--- a/xos/openstack_observer/steps/sync_controller_images.py
+++ b/xos/openstack_observer/steps/sync_controller_images.py
@@ -8,7 +8,7 @@
 from core.models import Image, ControllerImages
 from util.logger import Logger, logging
 from observer.ansible import *
-
+
 logger = Logger(level=logging.INFO)
 
 class SyncControllerImages(OpenStackSyncStep):
diff --git a/xos/openstack_observer/steps/sync_controller_slices.py b/xos/openstack_observer/steps/sync_controller_slices.py
index 619a6ed..fa62dba 100644
--- a/xos/openstack_observer/steps/sync_controller_slices.py
+++ b/xos/openstack_observer/steps/sync_controller_slices.py
@@ -70,10 +70,10 @@
 
     def delete_record(self, controller_slice):
         user = User.objects.get(id=controller_slice.slice.creator.id)
-        driver = OpenStackDriver().admin_driver(controller=controller_slice.controller.name)
+        driver = OpenStackDriver().admin_driver(controller=controller_slice.controller)
         client_driver = driver.client_driver(caller=user,
                                              tenant=controller_slice.slice.name,
-                                             controller=controller_slice.controller.name)
+                                             controller=controller_slice.controller)
 
         if controller_slice.router_id and controller_slice.subnet_id:
             client_driver.delete_router_interface(controller_slice.router_id, controller_slice.subnet_id)
diff --git a/xos/openstack_observer/steps/sync_network_slivers.py b/xos/openstack_observer/steps/sync_network_slivers.py
index fe74caf..024e1d6 100644
--- a/xos/openstack_observer/steps/sync_network_slivers.py
+++ b/xos/openstack_observer/steps/sync_network_slivers.py
@@ -62,16 +62,16 @@
                 ports_by_id[port["id"]] = port
 
             # public-nat and public-dedicated networks don't have a net-id anywhere
-            # in the data model, so build up a list of which ids map to which network
-            # templates.
-            try:
-                neutron_networks = driver.shell.quantum.list_networks()["networks"]
-            except:
-                print "failed to get networks from controller %s" % controller
-                continue
-            for network in neutron_networks:
-                for template in NetworkTemplate.objects.all():
-                    if template.shared_network_name == network["name"]:
+            # in the data model, so build up a list of which ids map to which network
+            # templates.
+            try:
+                neutron_networks = driver.shell.quantum.list_networks()["networks"]
+            except:
+                print "failed to get networks from controller %s" % controller
+                continue
+            for network in neutron_networks:
+                for template in NetworkTemplate.objects.all():
+                    if template.shared_network_name == network["name"]:
                         templates_by_id[network["id"]] = template
 
         for port in ports_by_id.values():
@@ -93,13 +93,13 @@
 
             network = networks_by_id.get(port['network_id'], None)
             if not network:
-                # maybe it's public-nat or public-dedicated. Search the templates for
-                # the id, then see if the sliver's slice has some network that uses
-                # that template
-                template = templates_by_id.get(port['network_id'], None)
-                if template and sliver.slice:
-                    for candidate_network in sliver.slice.networks.all():
-                         if candidate_network.template == template:
+                # maybe it's public-nat or public-dedicated. Search the templates for
+                # the id, then see if the sliver's slice has some network that uses
+                # that template
+                template = templates_by_id.get(port['network_id'], None)
+                if template and sliver.slice:
+                    for candidate_network in sliver.slice.networks.all():
+                         if candidate_network.template == template:
                              network=candidate_network
             if not network:
                 logger.info("no network for port %s network %s" % (port["id"], port["network_id"]))
diff --git a/xos/openstack_observer/syncstep.py b/xos/openstack_observer/syncstep.py
index 9bafeff..77a8c17 100644
--- a/xos/openstack_observer/syncstep.py
+++ b/xos/openstack_observer/syncstep.py
@@ -36,7 +36,7 @@
         dependencies    list of names of models that must be synchronized first if the current model depends on them
     """ 
     slow=False
-    def get_prop(prop):
+    def get_prop(self, prop):
         try:
             sync_config_dir = Config().sync_config_dir
         except:
diff --git a/xos/scripts/opencloud b/xos/scripts/opencloud
index 910c966..4a82c03 100755
--- a/xos/scripts/opencloud
+++ b/xos/scripts/opencloud
@@ -182,6 +182,7 @@
 fi
 if [ "$COMMAND" = "resetdb" ]; then
     stopserver
+    ensure_postgres_running
     dropdb
     createdb
     syncdb
@@ -211,4 +212,4 @@
    remigrate
    createdb
    syncdb
-fi
\ No newline at end of file
+fi
diff --git a/xos/xos/apibase.py b/xos/xos/apibase.py
index c523943..69da468 100644
--- a/xos/xos/apibase.py
+++ b/xos/xos/apibase.py
@@ -37,36 +37,36 @@
     # To handle fine-grained field permissions, we have to check can_update
     # the object has been updated but before it has been saved.
 
-    def update(self, request, *args, **kwargs):
-        partial = kwargs.pop('partial', False)
-        self.object = self.get_object_or_none()
-
-        if self.object is None:
-            raise XOSProgrammingError("Use the List API for creating objects")
-
-        serializer = self.get_serializer(self.object, data=request.DATA,
-                                         files=request.FILES, partial=partial)
-
-        assert(serializer.object is not None)
-
-        serializer.object.caller = request.user
-
-        if not serializer.is_valid():
-            raise XOSValidationError(fields=serializer._errors)
-
-        if not serializer.object.can_update(request.user):
-            raise XOSPermissionDenied()
-
-        if (hasattr(self, "pre_save")):
+    def update(self, request, *args, **kwargs):
+        partial = kwargs.pop('partial', False)
+        self.object = self.get_object_or_none()
+
+        if self.object is None:
+            raise XOSProgrammingError("Use the List API for creating objects")
+
+        serializer = self.get_serializer(self.object, data=request.DATA,
+                                         files=request.FILES, partial=partial)
+
+        assert(serializer.object is not None)
+
+        serializer.object.caller = request.user
+
+        if not serializer.is_valid():
+            raise XOSValidationError(fields=serializer._errors)
+
+        if not serializer.object.can_update(request.user):
+            raise XOSPermissionDenied()
+
+        if (hasattr(self, "pre_save")):
             # rest_framework 2.x
             self.pre_save(serializer.object)
             self.object = serializer.save(force_update=True)
             self.post_save(self.object, created=False)
         else:
             # rest_framework 3.x
-            self.perform_update(serializer)
-
-        return Response(serializer.data, status=status.HTTP_200_OK)
+            self.perform_update(serializer)
+
+        return Response(serializer.data, status=status.HTTP_200_OK)
 
     def destroy(self, request, *args, **kwargs):
         obj = self.get_object()
@@ -96,9 +96,9 @@
         serializer = self.get_serializer(data=request.DATA, files=request.FILES)
 
         # In rest_framework 3.x: we can pass raise_exception=True instead of
-        # raising the exception ourselves
-        if not serializer.is_valid():
-            raise XOSValidationError(fields=serializer._errors)
+        # raising the exception ourselves
+        if not serializer.is_valid():
+            raise XOSValidationError(fields=serializer._errors)
 
         # now do XOS can_update permission checking
 
@@ -119,7 +119,7 @@
             self.perform_create(serializer)
 
         headers = self.get_success_headers(serializer.data)
-        return Response(serializer.data, status=status.HTTP_201_CREATED,
+        return Response(serializer.data, status=status.HTTP_201_CREATED,
                         headers=headers)
 
     def handle_exception(self, exc):
diff --git a/xos/xos/xosapi.py b/xos/xos/xosapi.py
index 7f646bc..ca33794 100644
--- a/xos/xos/xosapi.py
+++ b/xos/xos/xosapi.py
@@ -270,18 +270,18 @@
 
             So, let's strip out these m2m relations, and deal with them ourself.
         """
-        obj._complex_m2m_data={};
-        if getattr(obj, '_m2m_data', None):
-            for relatedObject in obj._meta.get_all_related_many_to_many_objects():
-                if (relatedObject.field.rel.through._meta.auto_created):
-                    # These are non-trough ManyToMany relations and
-                    # can be updated just fine
-                    continue
-                fieldName = relatedObject.get_accessor_name()
-                if fieldName in obj._m2m_data.keys():
-                    obj._complex_m2m_data[fieldName] = (relatedObject, obj._m2m_data[fieldName])
-                    del obj._m2m_data[fieldName]
-
+        obj._complex_m2m_data={};
+        if getattr(obj, '_m2m_data', None):
+            for relatedObject in obj._meta.get_all_related_many_to_many_objects():
+                if (relatedObject.field.rel.through._meta.auto_created):
+                    # These are non-trough ManyToMany relations and
+                    # can be updated just fine
+                    continue
+                fieldName = relatedObject.get_accessor_name()
+                if fieldName in obj._m2m_data.keys():
+                    obj._complex_m2m_data[fieldName] = (relatedObject, obj._m2m_data[fieldName])
+                    del obj._m2m_data[fieldName]
+
         serializers.ModelSerializer.save_object(self, obj, **kwargs);
 
         for (accessor, stuff) in obj._complex_m2m_data.items():
@@ -319,7 +319,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -335,14 +335,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ServiceAttribute
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','value','service',)
 
@@ -354,7 +354,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -370,14 +370,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ControllerImages
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','image','controller','glance_image_id',)
 
@@ -389,7 +389,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -405,14 +405,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ControllerSitePrivilege
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','controller','site_privilege','role_id',)
 
@@ -428,7 +428,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -448,14 +448,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Image
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','disk_format','container_format','path','deployments',)
 
@@ -467,7 +467,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -483,14 +483,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = NetworkParameter
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','parameter','value','content_type','object_id',)
 
@@ -506,7 +506,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -526,14 +526,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Site
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','site_url','enabled','location','longitude','latitude','login_base','is_public','abbreviated_name','deployments',)
 
@@ -545,7 +545,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -561,14 +561,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = SliceRole
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','role',)
 
@@ -580,7 +580,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -596,14 +596,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Tag
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','service','name','value','content_type','object_id',)
 
@@ -615,7 +615,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -631,14 +631,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Invoice
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','date','account',)
 
@@ -650,7 +650,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -666,14 +666,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = SlicePrivilege
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','user','slice','role',)
 
@@ -685,7 +685,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -701,14 +701,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = NetworkSliver
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','network','sliver','ip','port_id',)
 
@@ -724,7 +724,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -744,14 +744,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Flavor
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','description','flavor','order','default','deployments',)
 
@@ -763,7 +763,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -779,14 +779,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ControllerSite
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','site','controller','tenant_id',)
 
@@ -798,7 +798,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -814,14 +814,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Project
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name',)
 
@@ -841,7 +841,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -865,14 +865,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Slice
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','enabled','omf_friendly','description','slice_url','site','max_slivers','service','network','serviceClass','creator','default_flavor','default_image','mount_data_sets','networks','networks',)
 
@@ -904,7 +904,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -940,14 +940,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Network
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','template','subnet','ports','labels','owner','guaranteed_bandwidth','permit_all_slices','topology_parameters','controller_url','controller_parameters','network_id','router_id','subnet_id','slices','slices','slivers','routers','routers',)
 
@@ -959,7 +959,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -975,14 +975,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Service
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','description','enabled','name','versionNumber','published',)
 
@@ -994,7 +994,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1010,14 +1010,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ServiceClass
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','description','commitment','membershipFee','membershipFeeMonths','upgradeRequiresApproval',)
 
@@ -1029,7 +1029,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1045,14 +1045,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Payment
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','account','amount','date',)
 
@@ -1064,7 +1064,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1080,14 +1080,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Charge
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','account','slice','kind','state','date','object','amount','coreHours','invoice',)
 
@@ -1099,7 +1099,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1115,14 +1115,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Role
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','role_type','role','description','content_type',)
 
@@ -1134,7 +1134,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1150,14 +1150,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = UsableObject
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name',)
 
@@ -1169,7 +1169,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1185,14 +1185,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = SiteRole
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','role',)
 
@@ -1204,7 +1204,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1220,14 +1220,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = SliceCredential
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','slice','name','key_id','enc_value',)
 
@@ -1243,7 +1243,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1263,14 +1263,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Sliver
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','instance_id','instance_uuid','name','instance_name','ip','image','creator','slice','deployment','node','numberCores','flavor','userData','networks',)
 
@@ -1282,7 +1282,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1298,14 +1298,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Node
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','site_deployment','site',)
 
@@ -1325,7 +1325,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1349,14 +1349,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = DashboardView
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','url','enabled','controllers','deployments',)
 
@@ -1368,7 +1368,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1384,14 +1384,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ControllerNetwork
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','network','controller','net_id','router_id','subnet_id','subnet',)
 
@@ -1403,7 +1403,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1419,14 +1419,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ImageDeployments
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','image','deployment',)
 
@@ -1438,7 +1438,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1454,14 +1454,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ControllerUser
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','user','controller','kuser_id',)
 
@@ -1473,7 +1473,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1489,14 +1489,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ReservedResource
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','sliver','resource','quantity','reservationSet',)
 
@@ -1508,7 +1508,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1524,14 +1524,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = NetworkSlice
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','network','slice',)
 
@@ -1543,7 +1543,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1559,14 +1559,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = UserDashboardView
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','user','dashboardView','order',)
 
@@ -1582,7 +1582,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1602,14 +1602,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Controller
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','backend_type','version','auth_url','admin_user','admin_password','admin_tenant','domain','deployment','dashboardviews',)
 
@@ -1621,7 +1621,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1637,14 +1637,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = User
         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','is_registering','created','updated','enacted','policed','backend_status','deleted','timezone',)
 
@@ -1672,7 +1672,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1704,14 +1704,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Deployment
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','accessControl','images','sites','flavors','dashboardviews',)
 
@@ -1723,7 +1723,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1739,14 +1739,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Reservation
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','startTime','slice','duration',)
 
@@ -1758,7 +1758,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1774,14 +1774,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = SitePrivilege
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','user','site','role',)
 
@@ -1793,7 +1793,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1809,14 +1809,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ControllerSlice
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','controller','slice','tenant_id',)
 
@@ -1828,7 +1828,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1844,14 +1844,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ControllerDashboardView
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','controller','dashboardView','enabled','url',)
 
@@ -1863,7 +1863,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1879,14 +1879,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Account
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','site',)
 
@@ -1898,7 +1898,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1914,14 +1914,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ControllerRole
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','role',)
 
@@ -1933,7 +1933,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1949,14 +1949,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = NetworkParameterType
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','description',)
 
@@ -1968,7 +1968,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -1984,14 +1984,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = SiteCredential
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','site','name','key_id','enc_value',)
 
@@ -2003,7 +2003,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -2019,14 +2019,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = DeploymentPrivilege
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','user','deployment','role',)
 
@@ -2038,7 +2038,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -2054,14 +2054,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ControllerSlicePrivilege
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','controller','slice_privilege','role_id',)
 
@@ -2073,7 +2073,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -2089,14 +2089,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = SiteDeployment
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','site','deployment','controller','availability_zone',)
 
@@ -2108,7 +2108,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -2124,14 +2124,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = DeploymentRole
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','role',)
 
@@ -2143,7 +2143,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -2159,14 +2159,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = UserCredential
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','user','name','key_id','enc_value',)
 
@@ -2178,7 +2178,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -2194,14 +2194,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = SliceTag
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','slice','name','value',)
 
@@ -2213,7 +2213,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -2229,14 +2229,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = NetworkTemplate
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','description','guaranteed_bandwidth','visibility','translation','shared_network_name','shared_network_id','topology_kind','controller_kind',)
 
@@ -2256,7 +2256,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -2280,14 +2280,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = Router
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','name','owner','networks','networks',)
 
@@ -2299,7 +2299,7 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
+    def getHumanReadableName(self, obj):
         return str(obj)
     def getValidators(self, obj):
         try:
@@ -2315,14 +2315,14 @@
     
     humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
     validators = serializers.SerializerMethodField("getValidators")
-    def getHumanReadableName(self, obj):
-        return str(obj)
-    def getValidators(self, obj):
+    def getHumanReadableName(self, obj):
+        return str(obj)
+    def getValidators(self, obj):
         try:
             return obj.getValidators()
         except:
-            return None
-    class Meta:
+            return None
+    class Meta:
         model = ServiceResource
         fields = ('humanReadableName', 'validators', 'id','created','updated','enacted','policed','backend_register','backend_status','deleted','serviceClass','name','maxUnitsDeployment','maxUnitsNode','maxDuration','bucketInRate','bucketMaxSize','cost','calendarReservable',)
 
