This patch adds a wrapper that enables work with consoles in the
test-API.
---
lib/domainAPI.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/lib/domainAPI.py b/lib/domainAPI.py
index 91f2ba3..bc0069b 100644
--- a/lib/domainAPI.py
+++ b/lib/domainAPI.py
@@ -878,6 +878,15 @@ class DomainAPI(object):
code = e.get_error_code()
raise exception.LibvirtAPI(message, code)
+ def openConsole(self, domname, device, stream, flags = 0):
+ try:
+ dom_obj = self.get_domain_by_name(domname)
+ st_obj = stream.getStream()
+ return dom_obj.openConsole(device, st_obj, flags)
+ except libvirt.libvirtError, e:
+ message = e.get_error_message()
+ code = e.get_error_code()
+ raise exception.LibvirtAPI(message, code)
# DomainState
VIR_DOMAIN_NOSTATE = 0
--
1.7.3.4