Revision 9667bcb2 ncclient/operations/flowmon.py
b/ncclient/operations/flowmon.py | ||
---|---|---|
14 | 14 |
|
15 | 15 |
'Power-control operations' |
16 | 16 |
|
17 |
from ncclient import xml_
|
|
17 |
from ncclient.xml_ import *
|
|
18 | 18 |
|
19 | 19 |
from rpc import RPC |
20 | 20 |
|
21 |
PC_URN = "urn:liberouter:params:xml:ns:netconf:power-control:1.0" |
|
22 |
|
|
21 | 23 |
class PoweroffMachine(RPC): |
22 | 24 |
|
23 | 25 |
"*poweroff-machine* RPC (flowmon)" |
24 | 26 |
|
25 |
DEPENDS = [':power-control:1.0']
|
|
26 |
|
|
27 |
SPEC = {'tag': xml_.qualify('poweroff-machine',
|
|
28 |
'urn:liberouter:params:xml:ns:netconf:power-control:1.0')}
|
|
27 |
DEPENDS = ["urn:liberouter:params:netconf:capability:power-control:1.0"]
|
|
28 |
|
|
29 |
def request(self, target):
|
|
30 |
return self._request(new_ele(qualify("poweroff-machine", PC_URN)))
|
|
29 | 31 |
|
30 | 32 |
class RebootMachine(RPC): |
31 | 33 |
|
32 | 34 |
"*reboot-machine* RPC (flowmon)" |
33 | 35 |
|
34 |
DEPENDS = [':power-control:1.0']
|
|
36 |
DEPENDS = ["urn:liberouter:params:netconf:capability:power-control:1.0"]
|
|
35 | 37 |
|
36 |
SPEC = {'tag': xml_.qualify('reboot-machine', |
|
37 |
'urn:liberouter:params:xml:ns:netconf:power-control:1.0')} |
|
38 |
def request(self, target): |
|
39 |
return self._request(new_ele(qualify("reboot-machine", PC_URN))) |
Also available in: Unified diff