self._ctx = ctx
self.mon_manager = ceph_manager.CephManager(self.admin_remote, ctx=ctx, logger=log.getChild('ceph_manager'))
+ def set_config_opt(self, section, opt, val):
+ self.mon_manager.raw_cluster_cmd('config', 'set', section, opt, val)
+
+ def rm_config_opt(self, section, opt):
+ self.mon_manager.raw_cluster_cmd('config', 'rm', section)
+
def get_config(self, key, service_type=None):
"""
Get config from mon by default, or a specific service if caller asks for it
dirname = 'somedirectory'
self.run_cephfs_shell_cmd(['mkdir', dirname])
- # TODO: Once cephfs-shell can pickup its config variables from
- # ceph.conf, set colors Never there and get rid of the same in
- # following comamnd.
output = self.mount_a.client_remote.run(args=['cephfs-shell', '-c',
- self.mount_a.config_path, 'set colors Never, ls'],
+ self.mount_a.config_path, 'ls'],
stdout=StringIO()).stdout.getvalue().strip()
if sys_version_info.major >= 3:
def admin_remote(self):
return LocalRemote()
+ def set_config_opt(self, section, opt, val):
+ self.mon_manager.raw_cluster_cmd('config', 'set', section, opt, val)
+
+ def rm_config_opt(self, section, opt):
+ self.mon_manager.raw_cluster_cmd('config', 'rm', section, opt)
+
def get_config(self, key, service_type=None):
if service_type is None:
service_type = 'mon'