@@ -10,11 +10,6 @@ import common, kvm_utils
from autotest_lib.client.common_lib import logging_config, logging_manager
-class KvmLoggingConfig(logging_config.LoggingConfig):
- def configure_logging(self, results_dir=None, verbose=False):
- super(KvmLoggingConfig, self).configure_logging(use_console=True,
- verbose=verbose)
-
if __name__ == "__main__":
parser = optparse.OptionParser()
parser.add_option('-i', '--iso', type="string", dest="filename",
@@ -25,7 +20,7 @@ if __name__ == "__main__":
options, args = parser.parse_args()
filename = options.filename
- logging_manager.configure_logging(KvmLoggingConfig())
+ logging_manager.configure_logging(kvm_utils.KvmLoggingConfig())
if not filename:
parser.print_help()
@@ -11,12 +11,6 @@ from autotest_lib.client.common_lib import error
from autotest_lib.client.common_lib import logging_config, logging_manager
-class KvmLoggingConfig(logging_config.LoggingConfig):
- def configure_logging(self, results_dir=None, verbose=False):
- super(KvmLoggingConfig, self).configure_logging(use_console=True,
- verbose=verbose)
-
-
class config:
"""
Parse an input file or string that follows the KVM Test Config File format
@@ -517,7 +511,7 @@ if __name__ == "__main__":
# Here we configure the stand alone program to use the autotest
# logging system.
- logging_manager.configure_logging(KvmLoggingConfig(), verbose=debug)
+ logging_manager.configure_logging(kvm_utils.KvmLoggingConfig(), verbose=debug)
list = config(filename, debug=debug).get_list()
i = 0
for dict in list:
@@ -970,6 +970,16 @@ def get_vendor_from_pci_id(pci_id):
return re.sub(":", " ", commands.getoutput(cmd))
+class KvmLoggingConfig(logging_config.LoggingConfig):
+ """
+ Used with the sole purpose of providing convenient logging setup
+ for the KVM test auxiliary programs.
+ """
+ def configure_logging(self, results_dir=None, verbose=False):
+ super(KvmLoggingConfig, self).configure_logging(use_console=True,
+ verbose=verbose)
+
+
class PciAssignable(object):
"""
Request PCI assignable devices on host. It will check whether to request