mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: Add XML 2 XML tests for storage pools.
Move existing schema data to an input directory. Add extra files for more thorough XML testing.
This commit is contained in:
18
tests/storagepoolxml2xmlin/pool-dir.xml
Normal file
18
tests/storagepoolxml2xmlin/pool-dir.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<pool type='dir'>
|
||||
<name>virtimages</name>
|
||||
<uuid>70a7eb15-6c34-ee9c-bf57-69e8e5ff3fb2</uuid>
|
||||
<capacity>0</capacity>
|
||||
<allocation>0</allocation>
|
||||
<available>0</available>
|
||||
<source>
|
||||
</source>
|
||||
<target>
|
||||
<path>/var/lib/libvirt/images</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
<label>some_label_t</label>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
22
tests/storagepoolxml2xmlin/pool-disk.xml
Normal file
22
tests/storagepoolxml2xmlin/pool-disk.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<pool type='disk'>
|
||||
<name>sda</name>
|
||||
<uuid>e3509a62-1b4c-e20b-94bd-9168963f9b97</uuid>
|
||||
<capacity>100027630080</capacity>
|
||||
<allocation>100027597824</allocation>
|
||||
<available>0</available>
|
||||
<source>
|
||||
<device path='/dev/sda'>
|
||||
<freeExtent start='370137600' end='567544320'/>
|
||||
<freeExtent start='987033600' end='1044610560'/>
|
||||
</device>
|
||||
<format type='dos'/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/dev</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
19
tests/storagepoolxml2xmlin/pool-fs.xml
Normal file
19
tests/storagepoolxml2xmlin/pool-fs.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<pool type='fs'>
|
||||
<name>images</name>
|
||||
<uuid>7641d5a8-af11-f730-a34e-0a7dfcede71f</uuid>
|
||||
<capacity>0</capacity>
|
||||
<allocation>0</allocation>
|
||||
<available>0</available>
|
||||
<source>
|
||||
<device path='/dev/sda6'/>
|
||||
<format type='ext3'/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/mnt</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
17
tests/storagepoolxml2xmlin/pool-iscsi-auth.xml
Normal file
17
tests/storagepoolxml2xmlin/pool-iscsi-auth.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<pool type='iscsi'>
|
||||
<name>virtimages</name>
|
||||
<uuid>e9392370-2917-565e-692b-d057f46512d6</uuid>
|
||||
<source>
|
||||
<host name="iscsi.example.com"/>
|
||||
<device path="demo-target"/>
|
||||
<auth type='chap' login='foobar' passwd='frobbar'/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/dev/disk/by-path</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
16
tests/storagepoolxml2xmlin/pool-iscsi.xml
Normal file
16
tests/storagepoolxml2xmlin/pool-iscsi.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<pool type='iscsi'>
|
||||
<name>virtimages</name>
|
||||
<uuid>e9392370-2917-565e-692b-d057f46512d6</uuid>
|
||||
<source>
|
||||
<host name="iscsi.example.com"/>
|
||||
<device path="demo-target"/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/dev/disk/by-path</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
20
tests/storagepoolxml2xmlin/pool-logical-create.xml
Normal file
20
tests/storagepoolxml2xmlin/pool-logical-create.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<pool type='logical'>
|
||||
<name>HostVG</name>
|
||||
<uuid>1c13165a-d0f4-3aee-b447-30fb38789091</uuid>
|
||||
<capacity>99891544064</capacity>
|
||||
<allocation>99220455424</allocation>
|
||||
<available>671088640</available>
|
||||
<source>
|
||||
<device path="/dev/sdb1"/>
|
||||
<device path="/dev/sdb2"/>
|
||||
<device path="/dev/sdb3"/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/dev/HostVG</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
19
tests/storagepoolxml2xmlin/pool-logical.xml
Normal file
19
tests/storagepoolxml2xmlin/pool-logical.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<pool type='logical'>
|
||||
<name>HostVG</name>
|
||||
<uuid>1c13165a-d0f4-3aee-b447-30fb38789091</uuid>
|
||||
<capacity>99891544064</capacity>
|
||||
<allocation>99220455424</allocation>
|
||||
<available>671088640</available>
|
||||
<source>
|
||||
<name>HostVG</name>
|
||||
<format type='lvm2'/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/dev/HostVG</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
12
tests/storagepoolxml2xmlin/pool-mpath.xml
Normal file
12
tests/storagepoolxml2xmlin/pool-mpath.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<pool type="mpath">
|
||||
<name>mpath</name>
|
||||
<uuid>e9392370-2917-565e-692b-d057f46512d6</uuid>
|
||||
<target>
|
||||
<path>/dev/mapper</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
20
tests/storagepoolxml2xmlin/pool-netfs.xml
Normal file
20
tests/storagepoolxml2xmlin/pool-netfs.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<pool type='netfs'>
|
||||
<name>nfsimages</name>
|
||||
<uuid>7641d5a8-af11-f730-a34e-0a7dfcede71f</uuid>
|
||||
<capacity>0</capacity>
|
||||
<allocation>0</allocation>
|
||||
<available>0</available>
|
||||
<source>
|
||||
<host name='localhost'/>
|
||||
<dir path='/var/lib/libvirt/images'/>
|
||||
<format type='nfs'/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/mnt</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
15
tests/storagepoolxml2xmlin/pool-scsi.xml
Normal file
15
tests/storagepoolxml2xmlin/pool-scsi.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<pool type="scsi">
|
||||
<name>hba0</name>
|
||||
<uuid>e9392370-2917-565e-692b-d057f46512d6</uuid>
|
||||
<source>
|
||||
<adapter name="host0"/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/dev/disk/by-path</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
Reference in New Issue
Block a user