summaryrefslogtreecommitdiffstats
path: root/vstf/vstf/agent/env/basic/vm_xml_help.py
diff options
context:
space:
mode:
authorYiting.Li <liyiting@huawei.com>2015-12-22 17:11:12 -0800
committerYiting.Li <liyiting@huawei.com>2015-12-22 17:11:12 -0800
commit8f1101df131a4d3e03b377738507d88b745831c0 (patch)
tree73f140474fcec2a77c85a453f6946957ca0742d1 /vstf/vstf/agent/env/basic/vm_xml_help.py
parent1a24ebbda3f95600c0e7d5ed8661317a8ff7e265 (diff)
Upload the contribution of vstf as bottleneck network framework.
End to End Performance test JIRA:BOTTLENECK-29 Change-Id: Ib2c553c8b60d6cda9e7a7b52b737c9139f706ebd Signed-off-by: Yiting.Li <liyiting@huawei.com>
Diffstat (limited to 'vstf/vstf/agent/env/basic/vm_xml_help.py')
-rwxr-xr-xvstf/vstf/agent/env/basic/vm_xml_help.py81
1 files changed, 81 insertions, 0 deletions
diff --git a/vstf/vstf/agent/env/basic/vm_xml_help.py b/vstf/vstf/agent/env/basic/vm_xml_help.py
new file mode 100755
index 00000000..d3116259
--- /dev/null
+++ b/vstf/vstf/agent/env/basic/vm_xml_help.py
@@ -0,0 +1,81 @@
+"""
+Created on 2015-7-2
+
+@author: y00228926
+"""
+xml_head = '''
+<domain type='kvm'>
+ <name>VM_NAME</name>
+ <memory unit='KiB'>VM_MEMORY</memory>
+ <currentMemory unit='KiB'>VM_MEMORY</currentMemory>
+ <!--numatune>
+ <memory mode='strict' nodeset='0'/>
+ </numatune-->
+ <vcpu placement='static'>CPU_NUM</vcpu>
+ <cpu mode='host-passthrough'>
+ </cpu>
+ <os>
+ <type arch='x86_64' >hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>'''
+xml_disk = '''
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='IMAGE_TYPE' cache='none' io='native'/>
+ <source file='IMAGE_PATH'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>'''
+
+xml_ctrl_br = '''
+<interface type='bridge'>
+ <mac address='CTRL_MAC'/>
+ <source bridge='CTRL_BR'/>
+ <model type='CTRL_MODEL'/>
+</interface>
+'''
+xml_ovs = '''
+ <interface type='bridge'>
+ <mac address='TAP_MAC'/>
+ <source bridge='BR_NAME'/>
+ <virtualport type='BR_TYPE'>
+ </virtualport>
+ <model type='virtio'/>
+ <driver name='vhost' queues='4'/>
+ <target dev='TAP_NAME'/>
+ </interface>'''
+xml_br = '''
+ <interface type='bridge'>
+ <mac address='TAP_MAC'/>
+ <source bridge='BR_NAME'/>
+ <model type='virtio'/>
+ <target dev='TAP_NAME'/>
+ </interface>'''
+
+xml_pci = '''
+ <hostdev mode='subsystem' type='pci' managed='yes'>
+ <driver name='kvm'/>
+ <source>
+ <address domain='0x0000' bus='0xBUS' slot='0xSLOT' function='0xFUNCTION' />
+ </source>
+ </hostdev>'''
+xml_9p = '''
+ <filesystem type='mount' accessmode='passthrough'>
+ <source dir='9P_PATH'/>
+ <target dir='9pfs'/>
+ </filesystem>'''
+xml_tail = '''
+ <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
+ <listen type='address' address='0.0.0.0'/>
+ </graphics>
+ </devices>
+</domain>'''
+