示例#1
0
文件: orch.py 项目: ml8mr/aquarium
def get_hosts() -> List[HostModel]:
    orch = Orchestrator()
    orch_hosts = orch.host_ls()
    hosts: List[HostModel] = []
    for h in orch_hosts:
        hosts.append(HostModel(hostname=h.hostname, address=h.addr))
    return hosts
示例#2
0
文件: orch.py 项目: tserong/aquarium
def get_hosts(request: Request, _=Depends(jwt_auth_scheme)) -> List[HostModel]:
    orch = Orchestrator(request.app.state.gstate.ceph_mgr)
    orch_hosts = orch.host_ls()
    hosts: List[HostModel] = []
    for h in orch_hosts:
        hosts.append(HostModel(hostname=h.hostname, address=h.addr))
    return hosts
示例#3
0
def get_hosts() -> HostsReplyModel:
    orch = Orchestrator()
    orch_hosts = orch.host_ls()
    hosts: HostsReplyModel = HostsReplyModel(hosts=[])
    for h in orch_hosts:
        hosts.hosts.append(HostModel(hostname=h.hostname, address=h.addr))

    return hosts