def can_resize_image(image, size):
 LOG.debug('Checking if we can resize image %(image)s. size=%(size)s', {'image': image, 'size': size})
 virt_size = get_disk_size(image)
 if (virt_size >= size):
  LOG.debug('Cannot resize image %s to a smaller size.', image)
  return False
 return True

def can_resize_image ( image , size ) : LOG . debug ( 'Checking if we can resize image %(image)s. size=%(size)s' , { 'image' : image , 'size' : size } ) virt_size = get_disk_size ( image ) if ( virt_size >= size ) : LOG . debug ( 'Cannot resize image %s to a smaller size.' , image ) return False return True
check whether we can resize the container image file .