Revision 0b7d3b31 ncclient/operations/session.py
b/ncclient/operations/session.py | ||
---|---|---|
18 | 18 |
|
19 | 19 |
class CloseSession(RPC): |
20 | 20 |
|
21 |
# TESTED |
|
22 |
|
|
21 | 23 |
"*<close-session>* RPC. The connection to NETCONF server is also closed." |
22 | 24 |
|
23 | 25 |
SPEC = { 'tag': 'close-session' } |
... | ... | |
26 | 28 |
self.session.close() |
27 | 29 |
|
28 | 30 |
def request(self): |
31 |
":seealso: :ref:`return`" |
|
29 | 32 |
return self._request(CloseSession.SPEC) |
30 | 33 |
|
31 | 34 |
|
... | ... | |
39 | 42 |
} |
40 | 43 |
|
41 | 44 |
def request(self, session_id): |
45 |
""" |
|
46 |
:arg session_id: *session-id* of NETCONF session to kill |
|
47 |
:type session_id: `string` |
|
48 |
|
|
49 |
:seealso: :ref:`return` |
|
50 |
""" |
|
42 | 51 |
spec = KillSession.SPEC.copy() |
43 |
if not isinstance(session_id, basestring): # just making sure...
|
|
52 |
if not isinstance(session_id, basestring): # make sure
|
|
44 | 53 |
session_id = str(session_id) |
45 | 54 |
spec['subtree'].append({ |
46 | 55 |
'tag': 'session-id', |
Also available in: Unified diff