提交 a5617102 编写于 作者: R Rudá Moura 提交者: Ruda Moura

avocado.utils.remote: Log when module is disabled.

Log message if remote or virt module is off.
Signed-off-by: NRuda Moura <rmoura@redhat.com>
上级 b4f83e70
...@@ -17,12 +17,16 @@ Module to provide remote operations. ...@@ -17,12 +17,16 @@ Module to provide remote operations.
""" """
import getpass import getpass
import logging
log = logging.getLogger('avocado.test')
try: try:
import fabric.api import fabric.api
import fabric.operations import fabric.operations
except ImportError: except ImportError:
remote_capable = False remote_capable = False
log.info('Remote module is disabled: could not import fabric')
else: else:
remote_capable = True remote_capable = True
......
...@@ -16,10 +16,15 @@ ...@@ -16,10 +16,15 @@
Module to provide classes for Virtual Machines. Module to provide classes for Virtual Machines.
""" """
import logging
log = logging.getLogger('avocado.test')
try: try:
import libvirt import libvirt
except ImportError: except ImportError:
virt_capable = False virt_capable = False
log.info('Virt module is disabled: could not import libvirt')
else: else:
virt_capable = True virt_capable = True
...@@ -28,6 +33,7 @@ from avocado.utils import remote ...@@ -28,6 +33,7 @@ from avocado.utils import remote
if remote.remote_capable is False: if remote.remote_capable is False:
virt_capable = False virt_capable = False
log.info('Virt module is disabled: remote module is disabled')
class Hypervisor(object): class Hypervisor(object):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册