From: Joshua Schmid Date: Tue, 12 May 2020 08:24:37 +0000 (+0200) Subject: mgr/test_orchestrator: placementspec->host matching adaption X-Git-Tag: v16.1.0~2165^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=646ff0f749a2c7bd7ffb1356bb6cec674f7c2c57;p=ceph.git mgr/test_orchestrator: placementspec->host matching adaption Signed-off-by: Joshua Schmid --- diff --git a/src/pybind/mgr/test_orchestrator/module.py b/src/pybind/mgr/test_orchestrator/module.py index 32fef723244..7b464290ac4 100644 --- a/src/pybind/mgr/test_orchestrator/module.py +++ b/src/pybind/mgr/test_orchestrator/module.py @@ -259,7 +259,7 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator): # type: (List[orchestrator.HostSpec]) -> None drive_group.validate() if drive_group.placement.host_pattern: - if not drive_group.placement.pattern_matches_hosts([h.hostname for h in all_hosts]): + if not drive_group.placement.filter_matching_hosts(self.get_hosts): raise orchestrator.OrchestratorValidationError('failed to match') return self.get_hosts().then(run).then( on_complete=orchestrator.ProgressReference( @@ -271,11 +271,12 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator): def apply_drivegroups(self, specs): # type: (List[DriveGroupSpec]) -> TestCompletion drive_group = specs[0] + def run(all_hosts): # type: (List[orchestrator.HostSpec]) -> None drive_group.validate() if drive_group.placement.host_pattern: - if not drive_group.placement.pattern_matches_hosts([h.hostname for h in all_hosts]): + if not drive_group.placement.filter_matching_hosts(self.get_hosts): raise orchestrator.OrchestratorValidationError('failed to match') return self.get_hosts().then(run).then( on_complete=orchestrator.ProgressReference(