'Check that the base image is not larger than size.
Since images can\'t be generally shrunk, enforce this
constraint taking account of virtual image size.'

def verify_base_size(self, base, size, base_size=0):

    if (size is None):
        return
    if (size and (not base_size)):
        base_size = self.get_disk_size(base)
    if (size < base_size):
        LOG.error('%(base)s    virtual    size    %(base_size)s    larger    than    flavor    root    disk    size    %(size)s', {'base': base, 'base_size': base_size, 'size': size})
        raise exception.FlavorDiskSmallerThanImage(flavor_size=size, image_size=base_size)
