Allow the size of array to be changed (may override an existing count member).

This commit is contained in:
Mike Auty
2017-09-18 23:23:23 +01:00
parent 255228ecb0
commit 5261da780b
+10
View File
@@ -331,6 +331,16 @@ class Array(interfaces.objects.ObjectInterface, abc.Sequence):
self._vol['count'] = self._check_type(count, int)
self._vol['subtype'] = subtype
@property
def count(self):
"""Returns the count dynamically"""
return self._vol['count']
@count.setter
def count(self, value):
"""Sets the count to a specific value"""
self._vol['count'] = self._check_type(value, int)
class VolTemplateProxy(interfaces.objects.ObjectInterface.VolTemplateProxy):
@classmethod
def size(cls, template):