From: Sage Weil Date: Thu, 25 Jul 2019 15:46:55 +0000 (-0500) Subject: mgr/telemetry: move contact info to an 'ident' channel X-Git-Tag: v12.2.13~15^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e64a0da3b789013fe13a1d0983c663c5dd3e1c35;p=ceph.git mgr/telemetry: move contact info to an 'ident' channel Signed-off-by: Sage Weil (cherry picked from commit 35c273c9c3ebd00fbac8e1a9fd281333a24c5fe7) Conflicts: src/pybind/mgr/telemetry/module.py Due to lack of 'crash' and 'devicehealth' modules, and a bit on how we keep options (self.config[] vs class attributes) --- diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index 35cf6a603fa..5df9c6dc909 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -16,7 +16,7 @@ from collections import defaultdict from mgr_module import MgrModule -ALL_CHANNELS = ['basic'] +ALL_CHANNELS = ['basic', 'ident'] class Module(MgrModule): config = dict() @@ -71,6 +71,12 @@ class Module(MgrModule): 'default': True, 'description': 'Share basic cluster information (size, version)', }, + { + 'name': 'channel_ident', + 'type': 'bool', + 'default': False, + 'description': 'Share a user-provided description and/or contact email for the cluster', + } ] COMMANDS = [ @@ -241,11 +247,11 @@ class Module(MgrModule): 'channels_available': ALL_CHANNELS, } - if self.str_to_bool(self.config['leaderboard']): - report['leaderboard'] = True - - for option in ['description', 'contact', 'organization']: - report[option] = self.config.get(option, None) + if 'ident' in channels: + if self.config['leaderboard']: + report['leaderboard'] = True + for option in ['description', 'contact', 'organization']: + report[option] = self.config.get(option, None) if 'basic' in channels: mon_map = self.get('mon_map')