예제 #1
0
파일: test_ceph.py 프로젝트: ml8mr/aquarium
def test_get_osdmap(
    ceph_conf_file_fs: Generator[fake_filesystem.FakeFilesystem, None, None],
    mocker: MockerFixture,
    get_data_contents: Callable[[str, str], str]
):
    mon = Mon()
    mon.call = mocker.MagicMock(
        return_value=json.loads(
            get_data_contents(DATA_DIR, 'mon_osdmap_raw.json'))
    )
    res = mon.get_osdmap()
    assert res.epoch == 4
예제 #2
0
def test_get_osdmap(
    ceph_conf_file_fs: Generator[fake_filesystem.FakeFilesystem, None, None],
    mocker: MockerFixture,
    get_data_contents: Callable[[str, str], str],
):
    from gravel.controllers.orch.ceph import Ceph, Mon

    ceph = Ceph()
    mon = Mon(ceph)
    mon.call = mocker.MagicMock(return_value=json.loads(
        get_data_contents(DATA_DIR, "mon_osdmap_raw.json")))
    res = mon.get_osdmap()
    assert res.epoch == 4
예제 #3
0
# project aquarium's backend
# Copyright (C) 2021 SUSE, LLC.


from gravel.controllers.orch.ceph import Mon


if __name__ == "__main__":
    mon = Mon()
    print(mon.get_osdmap())
    print(mon.get_pools())
    pass