From: Sage Weil Date: Fri, 28 Feb 2020 16:17:50 +0000 (-0600) Subject: mgr/orch: PlacementSpec: do not combine all_hosts with anything else X-Git-Tag: v15.1.1~170^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=71d8d06f820ea1447718bf76909a56bff5d990f7;p=ceph.git mgr/orch: PlacementSpec: do not combine all_hosts with anything else Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/orchestrator/_interface.py b/src/pybind/mgr/orchestrator/_interface.py index 9b9fb4df25435..7adee48d7fe1b 100644 --- a/src/pybind/mgr/orchestrator/_interface.py +++ b/src/pybind/mgr/orchestrator/_interface.py @@ -1228,6 +1228,8 @@ class PlacementSpec(object): """ def __init__(self, label=None, hosts=None, count=None, all_hosts=False): # type: (Optional[str], Optional[List], Optional[int], bool) -> None + if all_hosts and (count or hosts or label): + raise OrchestratorValidationError('cannot combine all:true and count|hosts|label') self.label = label self.hosts = [] # type: List[HostPlacementSpec] if hosts: