
This proposes a "mixed" parsing type that interprets the IEC-ish "i" units as power-of-two and the SI-style "non-i" units as power-of-ten. This is a round-about way of saying it is basically making it the same as the way GNU parted interprets such strings [1]. While I'd be the first to admit it's a bit ugly, I think it could serve a role for people who have to interpret such strings for compatability reasons. In particuarly within diskimage-builder, we've accepted these strings for partition creation (being modeled on parted) and I'd certainly like to not have our own unit parser if we can help it. [1] https://www.gnu.org/software/parted/manual/html_node/unit.html Change-Id: I772bcb6651484d68afabd1965e5db033439c6257
Team and repository tags
oslo.utils
The oslo.utils library provides support for common utility type functions, such as encoding, exception handling, string manipulation, and time handling.
- Free software: Apache license
- Documentation: https://docs.openstack.org/oslo.utils/latest/
- Source: https://git.openstack.org/cgit/openstack/oslo.utils
- Bugs: https://bugs.launchpad.net/oslo.utils
Description
Languages
Python
100%