]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
python-common/drivegroups: avoid dropping "rotational: 0" from DeviceSelection
authorLukas Stockner <lstockner@genesiscloud.com>
Mon, 25 Jan 2021 23:58:19 +0000 (00:58 +0100)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 29 Jan 2021 12:30:47 +0000 (13:30 +0100)
False is a legitimate value for the rotational setting and should be included in the JSON output, only None should be ignored.

Fixes: http://tracker.ceph.com/issues/49014
Fixes: cd6a488ab2ca036dd4fb36751b938f605e97e1c8
Signed-off-by: Lukas Stockner <lstockner@genesiscloud.com>
(cherry picked from commit c32f6f5448e51d3196f7a2644ea97ecd22a04f92)

src/python-common/ceph/deployment/drive_group.py

index 86c229bed68de09e2a2940e8aefa8e7f5543c545..404ea6ed89dbbd5e192addf8eedf77f4d728ee58 100644 (file)
@@ -98,7 +98,7 @@ class DeviceSelection(object):
             ret['vendor'] = self.vendor
         if self.size:
             ret['size'] = self.size
-        if self.rotational:
+        if self.rotational is not None:
             ret['rotational'] = self.rotational
         if self.limit:
             ret['limit'] = self.limit