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