From: Joshua Schmid Date: Fri, 13 Mar 2020 13:21:22 +0000 (+0100) Subject: python-common: correctly dictify DriveGroupSpec objects when paths are used X-Git-Tag: v15.2.0~50^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cddff0a39ef8be923c89ef113dbe34391dfe04f5;p=ceph-ci.git python-common: correctly dictify DriveGroupSpec objects when paths are used Signed-off-by: Joshua Schmid --- diff --git a/src/python-common/ceph/deployment/drive_group.py b/src/python-common/ceph/deployment/drive_group.py index 6fe625f9365..4be240e257c 100644 --- a/src/python-common/ceph/deployment/drive_group.py +++ b/src/python-common/ceph/deployment/drive_group.py @@ -87,7 +87,11 @@ class DeviceSelection(object): return cls(**device_spec) def to_json(self): - return self.__dict__.copy() + # type: () -> Dict[str, Any] + c = self.__dict__.copy() + if self.paths: + c['paths'] = [p.path for p in self.paths] + return c def __repr__(self): keys = [