Ejemplo n.º 1
0
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
Ejemplo n.º 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
Ejemplo n.º 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