Commits

John Carr  committed 9b111f8

Allow Domain class to be specified by Connection class

This allows subclasses of Connection to use a subclass of Domain
without any fuss.

  • Participants
  • Parent commits 939303c

Comments (0)

Files changed (1)

File master/buildbot/libvirtbuildslave.py

     I am a wrapper around a libvirt Connection object.
     """
 
+    DomainClass = Domain
+
     def __init__(self, uri):
         self.uri = uri
         self.connection = libvirt.open(uri)
         """ I lookup an existing prefined domain """
         d = queue.executeInThread(self.connection.lookupByName, name)
         def _(res):
-            return Domain(self, res)
+            return self.DomainClass(self, res)
         d.addCallback(_)
         return d
 
         """ I take libvirt XML and start a new VM """
         d = queue.executeInThread(self.connection.createXML, xml, 0)
         def _(res):
-            return Domain(self, res)
+            return self.DomainClass(self, res)
         d.addCallback(_)
         return d