Revision 6c1f8a66 ncclient/operations/lock.py
b/ncclient/operations/lock.py | ||
---|---|---|
15 | 15 |
'Locking-related NETCONF operations' |
16 | 16 |
|
17 | 17 |
from rpc import RPC |
18 |
from ncclient.content.common import qualify as _ |
|
18 |
|
|
19 | 19 |
|
20 | 20 |
class Lock(RPC): |
21 | 21 |
|
... | ... | |
29 | 29 |
def request(self, target='running', reply_event=None): |
30 | 30 |
self.spec['children'][0]['text'] = target |
31 | 31 |
self._do_request(self.spec, reply_event) |
32 |
|
|
33 |
class Unock(RPC): |
|
34 |
|
|
35 |
def __init__(self): |
|
36 |
RPC.__init__(self) |
|
37 |
self.spec = { |
|
38 |
'tag': 'unlock', |
|
39 |
'children': [ { 'tag': 'target', 'text': None } ] |
|
40 |
} |
|
41 |
|
|
42 |
def request(self, target='running', reply_event=None): |
|
43 |
self.spec['children'][0]['text'] = target |
|
44 |
self._do_request(self.spec, reply_event) |
Also available in: Unified diff