fix camelcasing of networkPorts -> network_ports
Scott Baker [Fri, 9 Jan 2015 06:37:34 +0000 (22:37 -0800)]
planetstack/core/xoslib/methods/sliceplus.py
planetstack/core/xoslib/objects/sliceplus.py

index 0e0a940..25e4d1e 100644 (file)
@@ -27,7 +27,7 @@ class SlicePlusIdSerializer(serializers.ModelSerializer, PlusSerializerMixin):
 \r
         sliceInfo = serializers.SerializerMethodField("getSliceInfo")\r
         humanReadableName = serializers.SerializerMethodField("getHumanReadableName")\r
-        networkPorts = NetworkPortsField()\r
+        network_ports = NetworkPortsField()\r
 \r
         def getSliceInfo(self, slice):\r
             return slice.getSliceInfo(user=self.context['request'].user)\r
@@ -40,7 +40,7 @@ class SlicePlusIdSerializer(serializers.ModelSerializer, PlusSerializerMixin):
 \r
         class Meta:\r
             model = SlicePlus\r
-            fields = ('humanReadableName', 'id','created','updated','enacted','name','enabled','omf_friendly','description','slice_url','site','max_slivers','image_preference','service','network','mount_data_sets','serviceClass','creator','networks','sliceInfo','networkPorts','backendIcon','backendHtml')
+            fields = ('humanReadableName', 'id','created','updated','enacted','name','enabled','omf_friendly','description','slice_url','site','max_slivers','image_preference','service','network','mount_data_sets','serviceClass','creator','networks','sliceInfo','network_ports','backendIcon','backendHtml')
 
 class SlicePlusList(generics.ListCreateAPIView):
     queryset = SlicePlus.objects.select_related().all()
index f4a5e0a..efb6b2a 100644 (file)
@@ -27,7 +27,7 @@ class SlicePlus(Slice, PlusObjectMixin):
                 "roles": roles}
 
     @property
-    def networkPorts(self):
+    def network_ports(self):
         # XXX this assumes there is only one network that can have ports bound
         # to it for a given slice. This is intended for the tenant view, which
         # will obey this field.
@@ -39,8 +39,8 @@ class SlicePlus(Slice, PlusObjectMixin):
 
         return networkPorts
 
-    @networkPorts.setter
-    def networkPorts(self, value):
+    @network_ports.setter
+    def network_ports(self, value):
         print "XXX set networkPorts to", value
 
     @staticmethod