It's easy to instantiate Qubes object, check it's default_pool, load the pool of this name and check its free space (calculated as total-used). However, when doing this repeatedly, it seems I get a cached value unless I instantiate a completely new instance of Qubes object. In the documentation, I have found nothing about caching. A brief look at the source code also suggests that I could set pool._config = None before reading pool.config again, but that's really unclean solution that relies on the current implementation.
Is there a better way to do it?
Regards,
Vít Šesták 'v6ak'