svn keywords
[plcapi.git] / PLC / Methods / GetPeerName.py
1 # $Id$
2 # $URL$
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter
5 from PLC.Auth import Auth
6
7 from PLC.Peers import Peer, Peers
8
9 class GetPeerName (Method):
10     """
11     Returns this peer's name, as defined in the config as PLC_NAME
12     """
13
14     roles = ['admin', 'peer', 'node']
15
16     accepts = [Auth()]
17
18     returns = Peer.fields['peername']
19
20     def call (self, auth):
21         return self.api.config.PLC_NAME