Comment 9 for bug 1611999

Revision history for this message
Newell Jensen (newell-jensen) wrote : Re: [2.0] MAAS cannot power query with Cisco UCSM power driver

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.