Accept shortened units for compatibility with kubernetes conventions.
This commit is contained in:
parent
00d8d7ec1c
commit
46d55f3645
1 changed files with 1 additions and 0 deletions
|
|
@ -63,6 +63,7 @@ class Configuration implements Dto {
|
||||||
scale = BigInteger.valueOf(1024);
|
scale = BigInteger.valueOf(1024);
|
||||||
for (var unit : List.of("KiB", "MiB", "GiB", "TiB", "PiB", "EiB")) {
|
for (var unit : List.of("KiB", "MiB", "GiB", "TiB", "PiB", "EiB")) {
|
||||||
unitMap.put(unit, factor);
|
unitMap.put(unit, factor);
|
||||||
|
unitMap.put(unit.substring(0, 2), factor);
|
||||||
factor = factor.multiply(scale);
|
factor = factor.multiply(scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue