Reviewed-By: Paulo Vital <pvital(a)linux.vnet.ibm.com>
On Tue, 2016-09-20 at 23:01 -0300, Aline Manera wrote:
The API POST /storagepools/*pool*/storagevolumes requires the disk
size
in bytes and GB is used on UI. So do the proper convertion to bytes
before sending the request to server.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_storage_add.main.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/kimchi.guest_storage_add.main.js
b/ui/js/src/kimchi.guest_storage_add.main.js
index 29fccab..27f8f84 100644
--- a/ui/js/src/kimchi.guest_storage_add.main.js
+++ b/ui/js/src/kimchi.guest_storage_add.main.js
@@ -377,8 +377,8 @@ kimchi.guest_storage_add_main = function() {
vol: settings['vol'],
pool: settings['pool']
};
- var sizeInMB = parseInt(settings['capacity']) *
1024;
- settings['capacity'] = sizeInMB;
+ var sizeInBytes = parseInt(settings['capacity']) *
1024 * 1024 * 1024;
+ settings['capacity'] = sizeInBytes;
//These need to be deleted so they don't get passed
to backend
delete settings['path'];
delete settings['newpool'];