]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
script/gen_static_command_descriptions: add mock for rados python binding 35791/head
authorKefu Chai <kchai@redhat.com>
Fri, 26 Jun 2020 09:48:42 +0000 (17:48 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 26 Jun 2020 09:48:57 +0000 (17:48 +0800)
commita0194ef92fa61214324d2c2bbe76e088bc2610e4
treec65076f03fa41d2263dcb82b90e0f2b0104a81a3
parent16473d4124385edc3085cec8eb06abdae3dd4d64
script/gen_static_command_descriptions: add mock for rados python binding

to address issue like

Traceback (most recent call last):
  File "/home/jenkins-build/build/workspace/ceph-pr-docs/doc/scripts/../../src/script/gen_static_command_descriptions.py", line 168, in <module>
    print(json.dumps(gen_commands_dicts(), indent=2, sort_keys=True))
  File "/home/jenkins-build/build/workspace/ceph-pr-docs/doc/scripts/../../src/script/gen_static_command_descriptions.py", line 163, in gen_commands_dicts
    comms = from_mon_commands_h() + from_mgr_modules()
  File "/home/jenkins-build/build/workspace/ceph-pr-docs/doc/scripts/../../src/script/gen_static_command_descriptions.py", line 85, in from_mgr_modules
    comms = sum([list_mgr_module(name) for name in names], [])
  File "/home/jenkins-build/build/workspace/ceph-pr-docs/doc/scripts/../../src/script/gen_static_command_descriptions.py", line 85, in <listcomp>
    comms = sum([list_mgr_module(name) for name in names], [])
  File "/home/jenkins-build/build/workspace/ceph-pr-docs/doc/scripts/../../src/script/gen_static_command_descriptions.py", line 65, in list_mgr_module
    mgr_mod = __import__(m_name, globals(), locals(), [], 0)
  File "/home/jenkins-build/build/workspace/ceph-pr-docs/src/pybind/mgr/volumes/__init__.py", line 2, in <module>
    from .module import Module
  File "/home/jenkins-build/build/workspace/ceph-pr-docs/src/pybind/mgr/volumes/module.py", line 8, in <module>
    from .fs.nfs import NFSCluster, FSExport
  File "/home/jenkins-build/build/workspace/ceph-pr-docs/src/pybind/mgr/volumes/fs/nfs.py", line 6, in <module>
    from rados import TimedOut
ImportError: cannot import name 'TimedOut'

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/script/gen_static_command_descriptions.py