summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2009-10-09 14:17:21 -0400
committerCole Robinson <crobinso@redhat.com>2009-10-16 10:52:27 -0400
commitcaf8e91588e3aa9efd899585825affa4a4e09557 (patch)
tree8dcf1b23c12041f50a73ce7b05a6e7c34f3de053 /tests/storagevolxml2xmlout
parenttests: Add network XML to XML tests. (diff)
downloadlibvirt-caf8e91588e3aa9efd899585825affa4a4e09557.tar.gz
libvirt-caf8e91588e3aa9efd899585825affa4a4e09557.tar.bz2
libvirt-caf8e91588e3aa9efd899585825affa4a4e09557.zip
tests: Add storage volume XML 2 XML tests.
Diffstat (limited to 'tests/storagevolxml2xmlout')
-rw-r--r--tests/storagevolxml2xmlout/vol-file-backing.xml27
-rw-r--r--tests/storagevolxml2xmlout/vol-file.xml18
-rw-r--r--tests/storagevolxml2xmlout/vol-logical-backing.xml26
-rw-r--r--tests/storagevolxml2xmlout/vol-logical.xml17
-rw-r--r--tests/storagevolxml2xmlout/vol-partition.xml18
-rw-r--r--tests/storagevolxml2xmlout/vol-qcow2.xml31
6 files changed, 137 insertions, 0 deletions
diff --git a/tests/storagevolxml2xmlout/vol-file-backing.xml b/tests/storagevolxml2xmlout/vol-file-backing.xml
new file mode 100644
index 000000000..2d7b9d03e
--- /dev/null
+++ b/tests/storagevolxml2xmlout/vol-file-backing.xml
@@ -0,0 +1,27 @@
+<volume>
+ <name>sparse.img</name>
+ <key>(null)</key>
+ <source>
+ </source>
+ <capacity>10000000000</capacity>
+ <allocation>0</allocation>
+ <target>
+ <path>/var/lib/libvirt/images/sparse.img</path>
+ <format type='raw'/>
+ <permissions>
+ <mode>00</mode>
+ <owner>744</owner>
+ <group>0</group>
+ </permissions>
+ </target>
+ <backingStore>
+ <path>/var/lib/virt/images/master.img</path>
+ <format type='vmdk'/>
+ <permissions>
+ <mode>0744</mode>
+ <owner>1</owner>
+ <group>1</group>
+ <label>virt_image_t</label>
+ </permissions>
+ </backingStore>
+</volume>
diff --git a/tests/storagevolxml2xmlout/vol-file.xml b/tests/storagevolxml2xmlout/vol-file.xml
new file mode 100644
index 000000000..c4cc91e36
--- /dev/null
+++ b/tests/storagevolxml2xmlout/vol-file.xml
@@ -0,0 +1,18 @@
+<volume>
+ <name>sparse.img</name>
+ <key>(null)</key>
+ <source>
+ </source>
+ <capacity>1099511627776</capacity>
+ <allocation>0</allocation>
+ <target>
+ <path>/var/lib/libvirt/images/sparse.img</path>
+ <format type='raw'/>
+ <permissions>
+ <mode>00</mode>
+ <owner>744</owner>
+ <group>0</group>
+ <label>virt_image_t</label>
+ </permissions>
+ </target>
+</volume>
diff --git a/tests/storagevolxml2xmlout/vol-logical-backing.xml b/tests/storagevolxml2xmlout/vol-logical-backing.xml
new file mode 100644
index 000000000..45b8f3a9f
--- /dev/null
+++ b/tests/storagevolxml2xmlout/vol-logical-backing.xml
@@ -0,0 +1,26 @@
+<volume>
+ <name>Swap</name>
+ <key>(null)</key>
+ <source>
+ </source>
+ <capacity>2080374784</capacity>
+ <allocation>2080374784</allocation>
+ <target>
+ <path>/dev/HostVG/Swap</path>
+ <permissions>
+ <mode>0660</mode>
+ <owner>0</owner>
+ <group>6</group>
+ <label>system_u:object_r:fixed_disk_device_t:s0</label>
+ </permissions>
+ </target>
+ <backingStore>
+ <path>/dev/HostVG/snapshot</path>
+ <permissions>
+ <mode>0744</mode>
+ <owner>1</owner>
+ <group>1</group>
+ <label>virt_image_t</label>
+ </permissions>
+ </backingStore>
+</volume>
diff --git a/tests/storagevolxml2xmlout/vol-logical.xml b/tests/storagevolxml2xmlout/vol-logical.xml
new file mode 100644
index 000000000..570956e1a
--- /dev/null
+++ b/tests/storagevolxml2xmlout/vol-logical.xml
@@ -0,0 +1,17 @@
+<volume>
+ <name>Swap</name>
+ <key>(null)</key>
+ <source>
+ </source>
+ <capacity>2080374784</capacity>
+ <allocation>2080374784</allocation>
+ <target>
+ <path>/dev/HostVG/Swap</path>
+ <permissions>
+ <mode>0660</mode>
+ <owner>0</owner>
+ <group>6</group>
+ <label>system_u:object_r:fixed_disk_device_t:s0</label>
+ </permissions>
+ </target>
+</volume>
diff --git a/tests/storagevolxml2xmlout/vol-partition.xml b/tests/storagevolxml2xmlout/vol-partition.xml
new file mode 100644
index 000000000..c3d861e7f
--- /dev/null
+++ b/tests/storagevolxml2xmlout/vol-partition.xml
@@ -0,0 +1,18 @@
+<volume>
+ <name>sda1</name>
+ <key>(null)</key>
+ <source>
+ </source>
+ <capacity>106896384</capacity>
+ <allocation>106896384</allocation>
+ <target>
+ <path>/dev/sda1</path>
+ <format type='none'/>
+ <permissions>
+ <mode>0660</mode>
+ <owner>0</owner>
+ <group>6</group>
+ <label>system_u:object_r:fixed_disk_device_t:s0</label>
+ </permissions>
+ </target>
+</volume>
diff --git a/tests/storagevolxml2xmlout/vol-qcow2.xml b/tests/storagevolxml2xmlout/vol-qcow2.xml
new file mode 100644
index 000000000..30fea1ecb
--- /dev/null
+++ b/tests/storagevolxml2xmlout/vol-qcow2.xml
@@ -0,0 +1,31 @@
+<volume>
+ <name>OtherDemo.img</name>
+ <key>(null)</key>
+ <source>
+ </source>
+ <capacity>5368709120</capacity>
+ <allocation>294912</allocation>
+ <target>
+ <path>/var/lib/libvirt/images/OtherDemo.img</path>
+ <format type='qcow2'/>
+ <permissions>
+ <mode>0644</mode>
+ <owner>0</owner>
+ <group>0</group>
+ <label>unconfined_u:object_r:virt_image_t:s0</label>
+ </permissions>
+ <encryption format='qcow'>
+ <secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
+ </encryption>
+ </target>
+ <backingStore>
+ <path>/var/lib/libvirt/images/BaseDemo.img</path>
+ <format type='raw'/>
+ <permissions>
+ <mode>0644</mode>
+ <owner>0</owner>
+ <group>0</group>
+ <label>unconfined_u:object_r:virt_image_t:s0</label>
+ </permissions>
+ </backingStore>
+</volume>