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