34a00342582839440119474de9ed14175183e6fb
[plcapi.git] / PLC / Methods / GetLeaseGranularity.py
1 # $Id$
2 # $URL$
3 from PLC.Method import Method
4 from PLC.Auth import Auth
5 from PLC.Faults import *
6 from PLC.Parameter import Parameter
7
8 class GetLeaseGranularity(Method):
9     """
10     Returns the granularity in seconds for the reservation system
11     """
12
13     roles = ['admin', 'pi', 'user', 'tech', 'node', 'anonymous']
14
15     accepts = [
16         Auth(),
17         ]
18
19     # for now only return /etc/myplc-release verbatim
20     returns = Parameter (int, "the granularity in seconds for the reservation system")
21
22     def call(self, auth):
23
24         return self.api.config.PLC_RESERVATION_GRANULARITY