4 from PLC.Method import Method
5 from PLC.Parameter import Parameter, Mixed
6 from PLC.Auth import SessionAuth
7 from PLC.Sessions import Session, Sessions
9 class DeleteSession(Method):
11 Invalidates the current session.
13 Returns 1 if successful.
16 roles = ['admin', 'pi', 'user', 'tech', 'node']
17 accepts = [SessionAuth()]
18 returns = Parameter(int, '1 if successful')
22 assert auth.has_key('session')
24 sessions = Sessions(self.api, [auth['session']])
26 raise PLCAPIError, "No such session"