[Fuego] pdudaemon support for Fuego

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Tue Mar 5 07:34:10 UTC 2019


Hello Tim,

One of the results from the Automated Testing Summit in Scotland was
an agreement on using pdudaemon to control PDUs (Power Distribution Units).

This patch adds such support:
[PATCH] ftc: add a new command to interact with pdudaemon

This is a very short quickstart:

- Prepare pdudaemon (for an ip9258 PDU in this example)

host$ git clone https://github.com/pdudaemon/pdudaemon
[Note] I have made a few changes and sent a pull request, so temporarily you may want to use https://github.com/sangorrin/pdudaemon
host$ cd pdudaemon
host$ vi share/pdudaemon.conf
{
	"daemon": {
		"hostname": "0.0.0.0",
		"port": 16421,
		"dbname": "pdudaemon",
		"logging_level": "DEBUG",
		"listener": "http"
	},
	"pdus": {
		"192.168.11.68": {
			"driver": "ip9258"
		}
	}
}
host$ sudo docker build -t pdudaemon --build-arg HTTP_PROXY=$http_proxy -f Dockerfile.dockerhub .
host$ docker run --rm -it -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e NO_PROXY="$no_proxy" --net="host" pdudaemon:latest

- Check that it works manually

$ curl "http://localhost:16421/power/control/on?hostname=192.168.11.68&port=1"
$ curl "http://localhost:16421/power/control/on?hostname=192.168.11.68&port=1"

- Check that it works from Fuego

$ vi myboard.board
	PDU_HOSTNAME="192.168.11.68"
	PDU_PORT="3"
$ ftc pdu -b myboard.board --command on
$ ftc pdu -b myboard.board --command off

If you have any question about pdudaemon please let me know.

[Note] Please feel free to add this to the wiki.

Thanks,
Daniel


More information about the Fuego mailing list