~allenap/maas/xxx-a-thon

« back to all changes in this revision

Viewing changes to src/provisioningserver/drivers/service/tgt.py

  • Committer: Gavin Panella
  • Date: 2016-03-22 21:14:34 UTC
  • mfrom: (4657.1.157 maas)
  • Revision ID: gavin.panella@canonical.com-20160322211434-xzuovio86zvzo2js
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2015 Canonical Ltd.  This software is licensed under the
2
 
# GNU Affero General Public License version 3 (see the file LICENSE).
3
 
 
4
 
"""Service class for the monitored tgt service."""
5
 
 
6
 
__all__ = [
7
 
    "TGTService",
8
 
    ]
9
 
 
10
 
from provisioningserver.drivers.service import (
11
 
    Service,
12
 
    SERVICE_STATE,
13
 
)
14
 
 
15
 
 
16
 
class TGTService(Service):
17
 
    """Monitored tgt service."""
18
 
 
19
 
    name = "tgt"
20
 
    service_name = "tgt"
21
 
 
22
 
    def get_expected_state(self):
23
 
        """Return a the expected state for the tgt service.
24
 
 
25
 
        The tgt service should always be on. No condition exists where it
26
 
        should be off.
27
 
        """
28
 
        return SERVICE_STATE.ON