parameters: (self, osd: "OSD")
docstring: Zaps all devices that are associated with an OSD
docstring_summary: Zaps all devices that are associated with an OSD
docstring_tokens: Zaps all devices that are associated with an OSD
function: def zap_osd(self, osd: "OSD") -> str:
          "Zaps all devices that are associated with an OSD"
          if osd.hostname is not None:
              out, err, code = self.mgr.wait_async(CephadmServe(self.mgr)._run_cephadm(
                  osd.hostname, 'osd', 'ceph-volume',
                  ['--', 'lvm', 'zap', '--destroy', '--osd-id', str(osd.osd_id)],
                  error_ok=True))
              self.mgr.cache.invalidate_host_devices(osd.hostname)
              if code:
                  raise OrchestratorError('Zap failed: %s' % '\n'.join(out + err))
              return '\n'.join(out + err)
          raise OrchestratorError(f"Failed to zap OSD {osd.osd_id} because host was unknown")
function_tokens: def zap_osd ( self , osd : "OSD" ) -> str : if osd . hostname is not None : out , err , code = self . mgr . wait_async ( CephadmServe ( self . mgr ) . _run_cephadm ( osd . hostname , 'osd' , 'ceph-volume' , [ '--' , 'lvm' , 'zap' , '--destroy' , '--osd-id' , str ( osd . osd_id ) ] , error_ok = True ) ) self . mgr . cache . invalidate_host_devices ( osd . hostname ) if code : raise OrchestratorError ( 'Zap failed: %s' % '\n' . join ( out + err ) ) return '\n' . join ( out + err ) raise OrchestratorError ( f"Failed to zap OSD {osd.osd_id} because host was unknown" )