Ryan Barry has uploaded a new change for review.

Change subject: Recalculate partition sizes when the selected disk changes
......................................................................

Recalculate partition sizes when the selected disk changes

Don't assume that a valid _model means we want to keep the sizes
already input. If the selected disk changed, reset it and
recalculate.

Change-Id: I799256d4801319af6d48ce9fa7ff24143985798b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1065823
Signed-off-by: Ryan Barry <[email protected]>
---
M src/ovirt/node/installer/core/storage_vol_page.py
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/89/26689/1

diff --git a/src/ovirt/node/installer/core/storage_vol_page.py 
b/src/ovirt/node/installer/core/storage_vol_page.py
index e67af34..868708d 100644
--- a/src/ovirt/node/installer/core/storage_vol_page.py
+++ b/src/ovirt/node/installer/core/storage_vol_page.py
@@ -39,7 +39,8 @@
         return 40
 
     def model(self):
-        if not self._model:
+        if not self._model or self._model["storage.install_drive"] \
+           != self.__get_install_drive():
             self._model = self.__get_default_sizes()
             self._model["storage.data_size"] = "%s" %\
                                                self.__calculate_free_space()
@@ -168,7 +169,8 @@
                  "storage.logging_size": "%s" % stor.LOGGING_SIZE,
                  "storage.data_size": "%s" % "0",
                  "storage.free_space": "0 MB",
-                 "storage.drive_size": "%s MB" % self._drive_size
+                 "storage.drive_size": "%s MB" % self._drive_size,
+                 "storage.install_drive": self.__get_install_drive()
                  }
         return sizes
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I799256d4801319af6d48ce9fa7ff24143985798b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <[email protected]>
_______________________________________________
node-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/node-patches

Reply via email to