1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
# -*- coding: utf-8 -*-
"""Minimal libvirt XML definition of entities to be used in the test suite.
"""
minimal_domain_xml = '''
<domain type="test">
<name>foo</name>
<memory>1024</memory>
<os>
<type>hvm</type>
</os>
</domain>
'''
minimal_interface_xml = '''
<interface type='ethernet' name='test-iface'>
<start mode='onboot'/>
<mac address='11:22:33:44:55:66'/>
<mtu size='1492'/>
<protocol family='ipv4'>
<ip address='192.168.15.5' prefix='24'/>
<route gateway='192.168.15.1'/>
</protocol>
</interface>
'''
minimal_network_xml = '''
<network>
<name>bar</name>
<uuid>004b96e12d78c30f5aa5f03c87d21e69</uuid>
<bridge name='brdefault'/>
<forward dev='eth0'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.128' end='192.168.122.253'/>
</dhcp>
</ip>
</network>
'''
minimal_node_device_xml = '''
<device>
<name>scsi_host22</name>
<parent>@parent@</parent>
<capability type='scsi_host'>
<host>22</host>
<unique_id>22</unique_id>
<capability type='fc_host'>
<wwnn>2000000098765432</wwnn>
<wwpn>1000000098765432</wwpn>
<fabric_wwn>2000000098769876</fabric_wwn>
</capability>
</capability>
</device>
'''
minimal_snapshot_xml = '''
<domainsnapshot>
<name>my_snapshot</name>
</domainsnapshot>
'''
minimal_storage_pool_xml = '''
<pool type='dir'>
<name>foo</name>
<uuid>35bb2ad9-388a-cdfe-461a-b8907f6e53fe</uuid>
<target>
<path>/foo</path>
</target>
</pool>
'''
minimal_storage_vol_xml = '''
<volume>
<name>sparse.img</name>
<capacity unit="G">2</capacity>
<target>
<path>/var/lib/virt/images/sparse.img</path>
</target>
</volume>
'''
|