[node-patches] Change in ovirt-node[master]: Show 0 free space in confirmation page if fill checkbox is set

rbarry at redhat.com rbarry at redhat.com
Tue Oct 13 21:32:16 UTC 2015


Ryan Barry has uploaded a new change for review.

Change subject: Show 0 free space in confirmation page if fill checkbox is set
......................................................................

Show 0 free space in confirmation page if fill checkbox is set

Leave the actual value as whatever the free space is calculated
as, so users see a friendly/useful number if they switch back, but
sub it out in the confirmation page if fill is checked.

Change-Id: Iba6a994db395720c4792e702b09a2573ed50501c
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1270448
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/installer/core/confirmation_page.py
M src/ovirt/node/installer/core/storage_vol_page.py
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/03/47303/1

diff --git a/src/ovirt/node/installer/core/confirmation_page.py b/src/ovirt/node/installer/core/confirmation_page.py
index de56bc0..25f67e1 100644
--- a/src/ovirt/node/installer/core/confirmation_page.py
+++ b/src/ovirt/node/installer/core/confirmation_page.py
@@ -127,6 +127,7 @@
          re.match(r'storage.*?size$', k) and not _model[k].endswith(" MB")]
 
         if "storage.fill_data" in _model:
+            _model["storage.free_space"] = "0"
             del _model["storage.fill_data"]
         _model["installation.devices"].sort()
 
diff --git a/src/ovirt/node/installer/core/storage_vol_page.py b/src/ovirt/node/installer/core/storage_vol_page.py
index b26d26e..39b19a4 100755
--- a/src/ovirt/node/installer/core/storage_vol_page.py
+++ b/src/ovirt/node/installer/core/storage_vol_page.py
@@ -183,7 +183,8 @@
                     "storage.config_size": "5",
                     "storage.logging_size": "2048",
                     "storage.data_size": "0",
-                    "storage.install_drive": self.__get_install_drive()
+                    "storage.install_drive": self.__get_install_drive(),
+                    "storage.fill_data": True
                     }
         from ovirtnode.storage import Storage
         stor = Storage()
@@ -196,7 +197,8 @@
                  "storage.data_size": "%s" % "0",
                  "storage.free_space": "0 MB",
                  "storage.drive_size": "%s MB" % self._drive_size,
-                 "storage.install_drive": self.__get_install_drive()
+                 "storage.install_drive": self.__get_install_drive(),
+                 "storage.fill_data": True
                  }
         return sizes
 


-- 
To view, visit https://gerrit.ovirt.org/47303
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba6a994db395720c4792e702b09a2573ed50501c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list