Merge "Change PTL informatin in INFO"
[bottlenecks.git] / testsuites / vstf / vstf_scripts / vstf / agent / env / basic / vm_xml_help.py
1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 xml_head = '''
11 <domain type='kvm'>
12   <name>VM_NAME</name>
13   <memory unit='KiB'>VM_MEMORY</memory>
14   <currentMemory unit='KiB'>VM_MEMORY</currentMemory>
15   <!--numatune>
16        <memory mode='strict' nodeset='0'/>
17   </numatune-->
18   <vcpu placement='static'>CPU_NUM</vcpu>
19   <cpu mode='host-passthrough'>
20   </cpu>
21   <os>
22     <type arch='x86_64' >hvm</type>
23     <boot dev='hd'/>
24   </os>
25   <features>
26     <acpi/>
27     <apic/>
28     <pae/>
29   </features>
30   <on_poweroff>destroy</on_poweroff>
31   <on_reboot>restart</on_reboot>
32   <on_crash>restart</on_crash>
33   <devices>
34     <emulator>/usr/bin/qemu-system-x86_64</emulator>'''
35 xml_disk = '''
36     <disk type='file' device='disk'>
37       <driver name='qemu' type='IMAGE_TYPE' cache='none' io='native'/>
38       <source file='IMAGE_PATH'/>
39       <target dev='vda' bus='virtio'/>
40     </disk>'''
41
42 xml_ctrl_br = '''
43 <interface type='bridge'>
44   <mac address='CTRL_MAC'/>
45   <source bridge='CTRL_BR'/>
46   <model type='CTRL_MODEL'/>
47 </interface>
48 '''
49 xml_ovs = '''
50     <interface type='bridge'>
51       <mac address='TAP_MAC'/>
52       <source bridge='BR_NAME'/>
53       <virtualport type='BR_TYPE'>
54       </virtualport>
55       <model type='virtio'/>
56       <driver name='vhost' queues='4'/>
57       <target dev='TAP_NAME'/>
58     </interface>'''
59 xml_br = '''
60     <interface type='bridge'>
61       <mac address='TAP_MAC'/>
62       <source bridge='BR_NAME'/>
63       <model type='virtio'/>
64       <target dev='TAP_NAME'/>
65     </interface>'''
66
67 xml_pci = '''
68     <hostdev mode='subsystem' type='pci' managed='yes'>
69       <driver name='kvm'/>
70       <source>
71         <address domain='0x0000' bus='0xBUS' slot='0xSLOT' function='0xFUNCTION' />
72       </source>
73     </hostdev>'''
74 xml_9p = '''
75     <filesystem type='mount' accessmode='passthrough'>
76       <source dir='9P_PATH'/>
77       <target dir='9pfs'/>
78     </filesystem>'''
79 xml_tail = '''
80     <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
81       <listen type='address' address='0.0.0.0'/>
82     </graphics>
83   </devices>
84 </domain>'''