Skip to content

Commit

Permalink
Fix LibVirtSlave example and add connection argument description to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rutsky committed Mar 18, 2013
1 parent 867d954 commit 0b44dfa
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions master/docs/manual/cfg-buildslaves.rst
Expand Up @@ -435,20 +435,23 @@ set the username to ``minion1``, the password to ``sekrit``. The base image is c
and a copy of it will be made for the duration of the VM's life. That copy will be thrown
away every time a build is complete. ::

from buildbot.libvirtbuildslave import LibVirtBuildSlave
c['slaves'] = [LibVirtBuildSlave('minion1', 'sekrit',
'/home/buildbot/images/minion1', '/home/buildbot/images/base_image')]
from buildbot.libvirtbuildslave import LibVirtSlave, Connection
c['slaves'] = [LibVirtSlave('minion1', 'sekrit', Connection("qemu:///session"),
'/home/buildbot/images/minion1', '/home/buildbot/images/base_image')]

You can use virt-manager to define ``minion1`` with the correct hardware. If you don't, buildbot
won't be able to find a VM to start.

:class:`LibVirtBuildSlave` accepts the following arguments:
:class:`LibVirtSlave` accepts the following arguments:

``name``
Both a buildbot username and the name of the virtual machine
Both a buildbot username and the name of the virtual machine.

``password``
A password for the buildbot to login to the master with
A password for the buildbot to login to the master with.

``connection``
:class:`Connection` instance wrapping connection to libvirt.

``hd_image``
The path to a libvirt disk image, normally in qcow2 format when using KVM.
Expand Down

0 comments on commit 0b44dfa

Please sign in to comment.