Revision ebf2bbc6 ncclient/operations/session.py
b/ncclient/operations/session.py | ||
---|---|---|
14 | 14 |
|
15 | 15 |
'Session-related NETCONF operations' |
16 | 16 |
|
17 |
from ncclient.rpc import RPC
|
|
17 |
from rpc import RPC |
|
18 | 18 |
|
19 | 19 |
class CloseSession(RPC): |
20 | 20 |
# tested: no |
... | ... | |
22 | 22 |
|
23 | 23 |
SPEC = { 'tag': 'close-session' } |
24 | 24 |
|
25 |
def _delivery_hook(self): |
|
26 |
if self.reply.ok: |
|
27 |
self.session.expect_close() |
|
25 |
def _delivery_hook(self) |
|
28 | 26 |
self.session.close() |
29 | 27 |
|
30 | 28 |
|
31 | 29 |
class KillSession(RPC): |
32 | 30 |
# tested: no |
31 |
# combed: yes |
|
33 | 32 |
|
34 | 33 |
SPEC = { |
35 | 34 |
'tag': 'kill-session', |
... | ... | |
45 | 44 |
'text': session_id |
46 | 45 |
}) |
47 | 46 |
return self._request(spec) |
47 |
|
Also available in: Unified diff