1 # Copyright 2007, Red Hat, Inc
2 # James Bowes <jbowes@redhat.com>
4 # This software may be freely redistributed under the terms of the GNU
5 # general public license.
7 # You should have received a copy of the GNU General Public License
8 # along with this program; if not, write to the Free Software
9 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
14 class Reboot(func_module
.FuncModule
):
18 description
= "Reboots a machine."
20 def reboot(self
, when
='now', message
=''):
21 return sub_process
.call(["/sbin/shutdown", '-r', when
, message
])