Revision d6688264 ncclient/operations/session.py
b/ncclient/operations/session.py | ||
---|---|---|
15 | 15 |
'Session-related NETCONF operations' |
16 | 16 |
|
17 | 17 |
from ncclient.rpc import RPC |
18 |
from copy import deepcopy |
|
19 | 18 |
|
20 |
class CloseSession(RPC): |
|
19 |
class CloseSession(RPC): # x
|
|
21 | 20 |
|
22 | 21 |
'CloseSession is always synchronous' |
23 | 22 |
|
... | ... | |
32 | 31 |
return self._request(CloseSession.SPEC) |
33 | 32 |
|
34 | 33 |
|
35 |
class KillSession(RPC): |
|
34 |
class KillSession(RPC): # x
|
|
36 | 35 |
|
37 | 36 |
SPEC = { |
38 | 37 |
'tag': 'kill-session', |
39 |
'children': [ { 'tag': 'session-id', 'text': None} ]
|
|
38 |
'children': { 'tag': 'session-id', 'text': None}
|
|
40 | 39 |
} |
41 | 40 |
|
42 | 41 |
def request(self, session_id): |
43 | 42 |
if not isinstance(session_id, basestring): # just making sure... |
44 | 43 |
session_id = str(session_id) |
45 |
spec = deepcopy(SPEC)
|
|
44 |
spec = KillSession.SPEC.copy()
|
|
46 | 45 |
spec['children'][0]['text'] = session_id |
47 | 46 |
return self._request(spec) |
Also available in: Unified diff