MCPcopy Create free account
hub / github.com/ceph/ceph / test_multi_target_command

Function test_multi_target_command

src/test/pybind/test_cephfs.py:853–873  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

851 assert(ret == 0 or ret == -38)
852
853def test_multi_target_command():
854 mds_get_command = {'prefix': 'status', 'format': 'json'}
855 inbuf = b''
856 ret, outbl, outs = cephfs.mds_command('*', json.dumps(mds_get_command), inbuf)
857 print(outbl)
858 mds_status = json.loads(outbl)
859 print(mds_status)
860
861 command = {'prefix': u'session ls', 'format': 'json'}
862 mds_spec = "*"
863 inbuf = b''
864
865 ret, outbl, outs = cephfs.mds_command(mds_spec, json.dumps(command), inbuf)
866 # Standby MDSs will return -38
867 assert(ret == 0 or ret == -38)
868 print(outbl)
869 session_map = json.loads(outbl)
870
871 if isinstance(mds_status, list): # if multi target command result
872 for mds_sessions in session_map:
873 assert(list(mds_sessions.keys())[0].startswith('mds.'))
874
875
876class TestUnlinkat:

Callers

nothing calls this directly

Calls 4

printFunction · 0.85
mds_commandMethod · 0.80
listFunction · 0.50
keysMethod · 0.45

Tested by

no test coverage detected