From 4e58b18976f932371bd123231d690805d8213ee2 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 15 Mar 2021 15:12:24 -0400 Subject: [PATCH] Ensure cloned volume size is int type --- api-daemon/pvcapid/provisioner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-daemon/pvcapid/provisioner.py b/api-daemon/pvcapid/provisioner.py index 6726e3f8..fa17c7e6 100755 --- a/api-daemon/pvcapid/provisioner.py +++ b/api-daemon/pvcapid/provisioner.py @@ -1229,9 +1229,9 @@ def create_vm(self, vm_name, vm_profile, define_vm=True, start_vm=True, script_r if not volume_data: raise ClusterError('The source volume {}/{} could not be found.'.format(volume['pool'], volume['source_volume'])) if not volume['pool'] in pools: - pools[volume['pool']] = volume_data['stats']['size'].replace('G', '') + pools[volume['pool']] = int(volume_data['stats']['size'].replace('G', '')) else: - pools[volume['pool']] += volume_data['stats']['size'].replace('G', '') + pools[volume['pool']] += int(volume_data['stats']['size'].replace('G', '')) else: if not volume['pool'] in pools: pools[volume['pool']] = volume['disk_size_gb']