[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[libvirt] [test-API PATCH 3/7] domainAPI: Add wrapper method to work with domain's console connections
- From: Peter Krempa <pkrempa redhat com>
- To: libvir-list redhat com
- Cc: Peter Krempa <pkrempa redhat com>
- Subject: [libvirt] [test-API PATCH 3/7] domainAPI: Add wrapper method to work with domain's console connections
- Date: Wed, 21 Mar 2012 13:46:34 +0100
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]