[node-patches] Change in ovirt-node[master]: installer: Don't overwrite custom sizes

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Feb 27 17:11:10 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: installer: Don't overwrite custom sizes
......................................................................

installer: Don't overwrite custom sizes

Previously the custom sizes given on in the UI were overwritten by the
defaults set in the storage module.
Now the default sizes only used when no custom value is given.

Change-Id: I7d3402d861615cf617236c9bd2ece0bb3f9adfc2
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/installer/storage_vol_page.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/05/12505/1

diff --git a/scripts/tui/src/ovirt/node/installer/storage_vol_page.py b/scripts/tui/src/ovirt/node/installer/storage_vol_page.py
index ae02280..cf4b945 100644
--- a/scripts/tui/src/ovirt/node/installer/storage_vol_page.py
+++ b/scripts/tui/src/ovirt/node/installer/storage_vol_page.py
@@ -37,8 +37,8 @@
     def model(self):
         self._model = {}
         predefined = self.__get_default_sizes()
-        # cfg = config.defaults.Storage() FIXME respect defaults entries
-        self._model.update(predefined)
+        self._model.update({k: v for k, v in predefined.items()
+                            if self._model.get(k, None) not in [None, ""]})
         return self._model
 
     def validators(self):


--
To view, visit http://gerrit.ovirt.org/12505
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d3402d861615cf617236c9bd2ece0bb3f9adfc2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list