def check_image_size(task):
    i_info = deploy_utils.parse_instance_info(task.node)
    image_path = _get_image_file_path(task.node.uuid)
    image_mb = disk_utils.get_image_mb(image_path)
    root_mb = 1024 * int(i_info['root_gb'])
    if image_mb > root_mb:
        msg = (_('Root partition is too small for requested image. Image '
                 'virtual size: %(image_mb)d MB, Root size: %(root_mb)d MB')
               % {'image_mb': image_mb, 'root_mb': root_mb})
        raise exception.InstanceDeployFailure(msg)
Get the user's permissions for this object, formatted in a specific way.
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/iscsi_deploy.py/check_image_size--crossover with--dataset/ETHPy150Open callowayproject/django-objectpermissions/objectpermissions/registration.py/user_get_object_permissions