3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.Auth import SessionAuth
6 from PLC.Sessions import Session, Sessions
8 class DeleteSession(Method):
10 Invalidates the current session.
12 Returns 1 if successful.
15 roles = ['admin', 'pi', 'user', 'tech', 'node']
16 accepts = [SessionAuth()]
17 returns = Parameter(int, '1 if successful')
21 assert auth.has_key('session')
23 sessions = Sessions(self.api, [auth['session']])
25 raise PLCAPIError, "No such session"