Revision b660fcda ncclient/manager.py
b/ncclient/manager.py | ||
---|---|---|
35 | 35 |
#: Same as :meth:`connect_ssh` |
36 | 36 |
connect = connect_ssh |
37 | 37 |
|
38 |
OPERATIONS = { |
|
39 |
"get": operations.Get, |
|
40 |
"get_config": operations.GetConfig, |
|
41 |
"edit_config": operations.EditConfig, |
|
42 |
"copy_config": operations.CopyConfig, |
|
43 |
"validate": operations.Validate, |
|
44 |
"commit": operations.Commit, |
|
45 |
"discard_changes": operations.DiscardChanges, |
|
46 |
"delete_config": operations.DeleteConfig, |
|
47 |
"lock": operations.Lock, |
|
48 |
"unlock": operations.Unlock, |
|
49 |
"close_session": operations.CloseSession, |
|
50 |
"kill_session": operations.KillSession, |
|
51 |
"poweroff_machine": operations.PoweroffMachine, |
|
52 |
"reboot_machine": operations.RebootMachine |
|
53 |
} |
|
54 |
|
|
38 | 55 |
class Manager(object): |
39 | 56 |
|
40 | 57 |
"""API for NETCONF operations. |
... | ... | |
56 | 73 |
return False |
57 | 74 |
|
58 | 75 |
def __getattr__(self, name): |
59 |
op = operations.INDEX.get(name, None)
|
|
76 |
op = OPERATIONS.get(name, None)
|
|
60 | 77 |
if op is None: |
61 | 78 |
raise AttributeError |
62 | 79 |
else: |
Also available in: Unified diff