aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/contexts/standalone/model.py
diff options
context:
space:
mode:
authorJan Malanik <janx.malanik@intel.com>2017-11-21 08:35:28 -0800
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2017-12-15 10:05:39 +0000
commit9604ddc38a98ae566dcb04a07b9be2f7f5a94967 (patch)
treeb5c8f1f4dcd2d365b958c273d8031fc16879fa3a /yardstick/benchmark/contexts/standalone/model.py
parent6cfec77db6b95af5b31b741d513955ee3dfa3bb2 (diff)
'libvirt' guest console in Standalone model
Add support for 'libvirt' guest console in Standalone model. Change-Id: I660e641339658d8abe4f040bec96e9d0041402c6 Signed-off-by: Jan Malanik <janx.malanik@intel.com>
Diffstat (limited to 'yardstick/benchmark/contexts/standalone/model.py')
-rw-r--r--yardstick/benchmark/contexts/standalone/model.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py
index a8943c3f6..ea8eb5d09 100644
--- a/yardstick/benchmark/contexts/standalone/model.py
+++ b/yardstick/benchmark/contexts/standalone/model.py
@@ -35,7 +35,7 @@ LOG = logging.getLogger(__name__)
VM_TEMPLATE = """
<domain type="kvm">
- <name>{vm_name}</name>
+ <name>{vm_name}</name>
<uuid>{random_uuid}</uuid>
<memory unit="MB">{memory}</memory>
<currentMemory unit="MB">{memory}</currentMemory>
@@ -79,7 +79,13 @@ VM_TEMPLATE = """
<source bridge="br-int" />
<model type='virtio'/>
</interface>
- </devices>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ </devices>
</domain>
"""
WAIT_FOR_BOOT = 30
@@ -284,7 +290,8 @@ class StandaloneContextHelper(object):
super(StandaloneContextHelper, self).__init__()
@staticmethod
- def install_req_libs(connection, extra_pkgs=[]):
+ def install_req_libs(connection, extra_pkgs=None):
+ extra_pkgs = extra_pkgs or []
pkgs = ["qemu-kvm", "libvirt-bin", "bridge-utils", "numactl", "fping"]
pkgs.extend(extra_pkgs)
cmd_template = "dpkg-query -W --showformat='${Status}\\n' \"%s\"|grep 'ok installed'"