parameters: (self)
return_statement: return 0, json.dumps(self.get_report_locked('device'), indent=4, sort_keys=True), ''
docstring: Show a sample device report
docstring_summary: Show a sample device report
docstring_tokens: Show a sample device report
function: def show_device(self) -> Tuple[int, str, str]:
          '''
          Show a sample device report
          '''
          if not self.enabled:
              # if telemetry is off, no report is being sent, hence nothing to show
              msg = 'Telemetry is off. Please consider opting-in with `ceph telemetry on`.\n' \
                    'Preview sample device reports with `ceph telemetry preview-device`.'
              return 0, msg, ''
  
          if not self.channel_device:
              # if device channel is off, device report is not being sent, hence nothing to show
              msg = 'device channel is off. Please enable with `ceph telemetry enable channel device`.\n' \
                    'Preview sample device reports with `ceph telemetry preview-device`.'
              return 0, msg, ''
  
          return 0, json.dumps(self.get_report_locked('device'), indent=4, sort_keys=True), ''
function_tokens: def show_device ( self ) -> Tuple [ int , str , str ] : if not self . enabled : # if telemetry is off, no report is being sent, hence nothing to show msg = 'Telemetry is off. Please consider opting-in with `ceph telemetry on`.\n' 'Preview sample device reports with `ceph telemetry preview-device`.' return 0 , msg , '' if not self . channel_device : # if device channel is off, device report is not being sent, hence nothing to show msg = 'device channel is off. Please enable with `ceph telemetry enable channel device`.\n' 'Preview sample device reports with `ceph telemetry preview-device`.' return 0 , msg , '' return 0 , json . dumps ( self . get_report_locked ( 'device' ) , indent = 4 , sort_keys = True ) , ''