# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from clientjob.model import Job
from main.model import Computer, OrganizativeUnit
from decorators import pi18n

class ShutdownJob(Job):
    def __init__(self, parent=None):
        Job.__init__(self, request='shutdown', args=[], type='ogr', sequential=True)
        self.parent = parent


class RestartJob(Job):
    def __init__(self, parent=None):
        Job.__init__(self, request='reboot', args=[], type='ogr', sequential=True)
        self.parent = parent


class BootJob(Job):
    def __init__(self, computer, parent=None):
        Job.__init__(self, request='poweron',
            args=[computer.get_pretty_mac()], type='ogr', sequential=True)
        self.parent = parent
        self.computer = computer

    def send(self):
        Job.send(self, self.computer.get_repo())
