Add utility function to read the host's container storage config.
Optional types were provided in places but were not always correct. Add mypy checking and fix those that fail(ed).