Here are the commands that I ran against the API on lucuma:
ubuntu@lucuma:~$ sudo maas-region shell Python 3.5.2 (default, Jul 5 2016, 12:43:10) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from provisioningserver.drivers.hardware.ucsm import power_state_ucsm >>> uuid = '5c60b934-a0e3-4b94-b964-438230e89dca' >>> url = 'http://192.168.224.92/' >>> username = 'ubuntu' >>> password = '1Nsecure!' >>> power_state_ucsm(url, username, password, uuid) power_control: b'<lsPower dn="org-root/ls-B200M3_SND/power" state="up"/> ' 'on'
I edited the call to power_state_ucsm to print out the XML that it was getting back from the API.
Here are the commands that I ran against the API on lucuma:
ubuntu@lucuma:~$ sudo maas-region shell sole) ver.drivers. hardware. ucsm import power_state_ucsm a0e3-4b94- b964-438230e89d ca' 192.168. 224.92/ ' ucsm(url, username, password, uuid) root/ls- B200M3_ SND/power" state="up"/> '
Python 3.5.2 (default, Jul 5 2016, 12:43:10)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveCon
>>> from provisioningser
>>> uuid = '5c60b934-
>>> url = 'http://
>>> username = 'ubuntu'
>>> password = '1Nsecure!'
>>> power_state_
power_control: b'<lsPower dn="org-
'on'
I edited the call to power_state_ucsm to print out the XML that it was getting back from the API.