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:
Cole Robinson
2009-10-08 17:26:30 -04:00
parent 39a7be470c
commit e1ea1b2af7
24 changed files with 377 additions and 2 deletions

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>