]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
python-common: only validate host_pattern if present
authorJoshua Schmid <jschmid@suse.de>
Thu, 30 Apr 2020 13:05:31 +0000 (15:05 +0200)
committerJoshua Schmid <jschmid@suse.de>
Thu, 28 May 2020 08:10:41 +0000 (10:10 +0200)
Signed-off-by: Joshua Schmid <jschmid@suse.de>
src/python-common/ceph/deployment/drive_group.py

index 0b5b489de98d0820da8c90d25ca9645c349a25dc..43ae10546ea41a3a940cb1cbf66623c473a2415c 100644 (file)
@@ -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]