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', type='ogr', sequential=True)
        self.parent = parent


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


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

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