mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Use XMLBuilder for Storage object handling
Simplify the API a bunch while we are at it, add tests, etc.
This commit is contained in:
15
tests/xmlparse-xml/pool-dir-vol-out.xml
Normal file
15
tests/xmlparse-xml/pool-dir-vol-out.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<volume>
|
||||
<name>pool-dir-vol</name>
|
||||
<capacity>2000</capacity>
|
||||
<allocation>1000</allocation>
|
||||
<target>
|
||||
<format type="qcow2"/>
|
||||
<permissions>
|
||||
<mode>0744</mode>
|
||||
<owner>10000</owner>
|
||||
<group>10000</group>
|
||||
<label>foo.label</label>
|
||||
</permissions>
|
||||
<path>/foo/bar</path>
|
||||
</target>
|
||||
</volume>
|
||||
15
tests/xmlparse-xml/pool-fs-out.xml
Normal file
15
tests/xmlparse-xml/pool-fs-out.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<pool type="dir">
|
||||
<name>foo-new</name>
|
||||
<uuid>10211510-2115-1021-1510-211510211999</uuid>
|
||||
<capacity unit="bytes">200000</capacity>
|
||||
<allocation unit="bytes">150000</allocation>
|
||||
<available unit="bytes">50000</available>
|
||||
<source>
|
||||
<format type="ext3"/>
|
||||
<device path="/dev/foo/bar"/>
|
||||
<name>fooname</name>
|
||||
</source>
|
||||
<target>
|
||||
<path>/mnt/my/foo</path>
|
||||
</target>
|
||||
</pool>
|
||||
14
tests/xmlparse-xml/pool-fs.xml
Normal file
14
tests/xmlparse-xml/pool-fs.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<pool type="fs">
|
||||
<name>pool-fs</name>
|
||||
<uuid>10211510-2115-1021-1510-211510211510</uuid>
|
||||
<capacity unit='bytes'>984373075968</capacity>
|
||||
<allocation unit='bytes'>756681687040</allocation>
|
||||
<available unit='bytes'>227691388928</available>
|
||||
<source>
|
||||
<format type="auto"/>
|
||||
<device path="/some/source/path"/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/some/target/path</path>
|
||||
</target>
|
||||
</pool>
|
||||
14
tests/xmlparse-xml/pool-iscsi-out.xml
Normal file
14
tests/xmlparse-xml/pool-iscsi-out.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<pool type="iscsi">
|
||||
<name>pool-iscsi</name>
|
||||
<uuid>10511599-1151-0510-5115-991151051051</uuid>
|
||||
<source>
|
||||
<host name="my.host"/>
|
||||
<device path="/some/source/path"/>
|
||||
<initiator>
|
||||
<iqn name="my.iqn"/>
|
||||
</initiator>
|
||||
</source>
|
||||
<target>
|
||||
<path>/some/target/path</path>
|
||||
</target>
|
||||
</pool>
|
||||
Reference in New Issue
Block a user