parameters: (self, mon)
docstring: Kill the monitor by either power cycling (if the config says so),
          or by doing a stop.
docstring_summary: Kill the monitor by either power cycling (if the config says so),
          or by doing a stop.
docstring_tokens: Kill the monitor by either power cycling ( if the config says so ) or by doing a stop .
function: def kill_mon(self, mon):
          """
          Kill the monitor by either power cycling (if the config says so),
          or by doing a stop.
          """
          if self.config.get('powercycle'):
              remote = self.find_remote('mon', mon)
              self.log('kill_mon on mon.{m} doing powercycle of {s}'.
                       format(m=mon, s=remote.name))
              self._assert_ipmi(remote)
              remote.console.power_off()
          else:
              self.ctx.daemons.get_daemon('mon', mon, self.cluster).stop()
function_tokens: def kill_mon ( self , mon ) : if self . config . get ( 'powercycle' ) : remote = self . find_remote ( 'mon' , mon ) self . log ( 'kill_mon on mon.{m} doing powercycle of {s}' . format ( m = mon , s = remote . name ) ) self . _assert_ipmi ( remote ) remote . console . power_off ( ) else : self . ctx . daemons . get_daemon ( 'mon' , mon , self . cluster ) . stop ( )