fix camelcasing of networkPorts -> network_ports
diff --git a/planetstack/core/xoslib/methods/sliceplus.py b/planetstack/core/xoslib/methods/sliceplus.py
index 0e0a940..25e4d1e 100644
--- a/planetstack/core/xoslib/methods/sliceplus.py
+++ b/planetstack/core/xoslib/methods/sliceplus.py
@@ -27,7 +27,7 @@
sliceInfo = serializers.SerializerMethodField("getSliceInfo")
humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
- networkPorts = NetworkPortsField()
+ network_ports = NetworkPortsField()
def getSliceInfo(self, slice):
return slice.getSliceInfo(user=self.context['request'].user)
@@ -40,7 +40,7 @@
class Meta:
model = SlicePlus
- 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()
diff --git a/planetstack/core/xoslib/objects/sliceplus.py b/planetstack/core/xoslib/objects/sliceplus.py
index f4a5e0a..efb6b2a 100644
--- a/planetstack/core/xoslib/objects/sliceplus.py
+++ b/planetstack/core/xoslib/objects/sliceplus.py
@@ -27,7 +27,7 @@
"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 @@
return networkPorts
- @networkPorts.setter
- def networkPorts(self, value):
+ @network_ports.setter
+ def network_ports(self, value):
print "XXX set networkPorts to", value
@staticmethod