From 7a4b7d1fca4c573dcb4f6c7e8221b72d50ef4682 Mon Sep 17 00:00:00 2001 From: Max Lobur Date: Wed, 10 Feb 2016 12:34:18 +0200 Subject: [PATCH] Add unit-conversion-and-relative-sizing spec Change-Id: I12c6c53f6e83fc4167942165a7015ed095b060e4 --- ...ze-unit-conversion-and-relative-sizing.rst | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 specs/size-unit-conversion-and-relative-sizing.rst diff --git a/specs/size-unit-conversion-and-relative-sizing.rst b/specs/size-unit-conversion-and-relative-sizing.rst new file mode 100644 index 0000000..26c7fa0 --- /dev/null +++ b/specs/size-unit-conversion-and-relative-sizing.rst @@ -0,0 +1,72 @@ +.. + +This work is licensed under a Creative Commons Attribution 3.0 Unported License. +http://creativecommons.org/licenses/by/3.0/legalcode + + +======================================== +Size unit conversion and relative sizing +======================================== + +https://blueprints.launchpad.net/bareon/+spec/size-unit-conversion-and-relative-sizing + +Problem description +=================== + +The only size unit Bareon currently supports is MiB. Users often want to use +both GiB and MiB, as well as relative sizes like 50%, which is impossible. + +Proposed change +=============== + +NOTE: This is a contribution of the feature developed within Cray OpenStack project. +We will try to make a minimum changes to existing code. + +All “size” values are strings containing either an integer number and size +unit (e.g., “100 MiB” or 100MiB”). + +Available measurement units are: + + - ‘MB’, ‘GB’, ‘TB’, ‘PB’, ‘EB’, ‘ZB’, ‘YB’, + - ‘MiB’, ‘GiB’, ‘TiB’, ‘PiB’, ‘EiB’, ‘ZiB’, ‘YiB’ + +Also relative values are supported for partition, pv and lv. +Relative values use the size of the containing device or volume group as a +base. For example, specifying “40%” for a 100MiB disk would result in a +40MiB partition. Obviously, relative sizes cannot be used for disks. + +The user can also specify “remaining” as a size value for a volume in a disk +or in a volume group. When “remaining” is specified, all remaining free space on +the drive after allocations are made for all other volumes will be used for +this volume. + +All the conversion is done in Ironic data driver, before the schema is mapped to +object model. Internally we continue to use MiB everywhere. + +Alternatives +------------ + +None. + +Implementation +============== + +Assignee(s) +----------- + +- max_lobur + +Milestones +---------- + +See blueprint ref above. + +Work Items +---------- + +- rebase on bareon master. + +Dependencies +============ + +None.