]>
git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/cephfs/test_cephfs_shell.py
2 from StringIO
import StringIO
3 from tasks
.cephfs
.cephfs_test_case
import CephFSTestCase
4 from tasks
.cephfs
.fuse_mount
import FuseMount
5 from teuthology
.exceptions
import CommandFailedError
7 log
= logging
.getLogger(__name__
)
10 class TestCephFSShell(CephFSTestCase
):
15 CephFSTestCase
.setUp(self
)
16 self
.py_version
= self
.ctx
.config
.get('overrides', {}).get('python', 'python')
17 log
.info("using python version: {}".format(self
.py_version
))
19 def _cephfs_shell(self
, cmd
, opts
=None):
20 args
= ["cephfs-shell", "-c", self
.mount_a
.config_path
]
23 args
.extend(("--", cmd
))
24 log
.info("Running command: {}".format(" ".join(args
)))
25 status
= self
.mount_a
.client_remote
.run(args
=args
, stdout
=StringIO())
26 return status
.stdout
.getvalue().strip()
30 Test that help outputs commands.
33 o
= self
._cephfs
_shell
("help")
35 log
.info("output:\n{}".format(o
))