From: Joshua Schmid Date: Thu, 30 Apr 2020 13:05:31 +0000 (+0200) Subject: python-common: only validate host_pattern if present X-Git-Tag: v16.1.0~2165^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3b771811859b56bf004f5016fa0fb9173c417865;p=ceph.git python-common: only validate host_pattern if present 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 0b5b489de98..43ae10546ea 100644 --- a/src/python-common/ceph/deployment/drive_group.py +++ b/src/python-common/ceph/deployment/drive_group.py @@ -241,7 +241,8 @@ class DriveGroupSpec(ServiceSpec): # type: () -> None super(DriveGroupSpec, self).validate() - if not isinstance(self.placement.host_pattern, six.string_types): + if not isinstance(self.placement.host_pattern, six.string_types) and \ + self.placement.host_pattern is not None: raise DriveGroupValidationError('host_pattern must be of type string') specs = [self.data_devices, self.db_devices, self.wal_devices, self.journal_devices]