コード例 #1
0
def with_host(m: CephadmOrchestrator, name, refresh_hosts=True):
    # type: (CephadmOrchestrator, str) -> None
    wait(m, m.add_host(HostSpec(hostname=name)))
    if refresh_hosts:
        CephadmServe(m)._refresh_hosts_and_daemons()
    yield
    wait(m, m.remove_host(name))
コード例 #2
0
ファイル: fixtures.py プロジェクト: rhcs-dashboard/ceph
def with_host(m: CephadmOrchestrator, name, addr='1::4', refresh_hosts=True):
    # type: (CephadmOrchestrator, str) -> None
    with mock.patch("cephadm.utils.resolve_ip", return_value=addr):
        wait(m, m.add_host(HostSpec(hostname=name)))
        if refresh_hosts:
            CephadmServe(m)._refresh_hosts_and_daemons()
            receive_agent_metadata(m, name)
        yield
        wait(m, m.remove_host(name))
コード例 #3
0
ファイル: fixtures.py プロジェクト: niliushall/ceph
def with_host(m: CephadmOrchestrator, name):
    # type: (CephadmOrchestrator, str) -> None
    wait(m, m.add_host(HostSpec(hostname=name)))
    yield
    wait(m, m.remove_host(name))