def _add_host(self, host, addr=None, labels=None): s = orchestrator.HostSpec(hostname=host, addr=addr, labels=labels) completion = self.add_host(s) self._orchestrator_wait([completion]) orchestrator.raise_if_exception(completion) return HandleCommandResult(stdout=completion.result_str())
def get_hosts(self): # type: () -> List[orchestrator.HostSpec] return [ orchestrator.HostSpec(n) for n in self.rook_cluster.get_node_names() ]
def get_hosts(self): if self._inventory: return [orchestrator.HostSpec(i.name, i.addr, i.labels) for i in self._inventory] return [orchestrator.HostSpec('localhost')]