]> xenbits.xensource.com Git - libvirt.git/commitdiff
Allow root directory in filesystem source dir schema
authorJán Tomko <jtomko@redhat.com>
Thu, 7 Nov 2013 17:14:32 +0000 (18:14 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 7 Nov 2013 17:43:15 +0000 (18:43 +0100)
Use absDirPath instead of absFilePath.

https://bugzilla.redhat.com/show_bug.cgi?id=1028107

docs/schemas/domaincommon.rng
tests/lxcxml2xmldata/lxc-filesystem-ram.xml
tests/lxcxml2xmldata/lxc-filesystem-root.xml [new file with mode: 0644]
tests/lxcxml2xmloutdata/lxc-filesystem-ram.xml
tests/lxcxml2xmltest.c

index 14b6700d691cb6e51ed0f8b1bdfe902062a74672..1f301618379ebc56ef942a69ddf89c865b1307e6 100644 (file)
           <interleave>
             <element name="source">
               <attribute name="dir">
-                <ref name="absFilePath"/>
+                <ref name="absDirPath"/>
               </attribute>
               <empty/>
             </element>
           <interleave>
             <element name="source">
               <attribute name="dir">
-                <ref name="absFilePath"/>
+                <ref name="absDirPath"/>
               </attribute>
               <empty/>
             </element>
index 002fde6ad1539eda326cba0141d41dc2718f650f..58ae3441357198a436fd0b5bb15f72877c34dda7 100644 (file)
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/libexec/libvirt_lxc</emulator>
+    <filesystem type='bind'>
+        <source dir='/'/>
+        <target dir='/'/>
+    </filesystem>
     <filesystem type='ram'>
         <source usage='1048576'/>
         <target dir='/mnt/mississippi'/>
diff --git a/tests/lxcxml2xmldata/lxc-filesystem-root.xml b/tests/lxcxml2xmldata/lxc-filesystem-root.xml
new file mode 100644 (file)
index 0000000..1ce2b32
--- /dev/null
@@ -0,0 +1,25 @@
+<domain type='lxc'>
+  <name>demo</name>
+  <uuid>8369f1ac-7e46-e869-4ca5-759d51478066</uuid>
+  <memory unit='KiB'>500000</memory>
+  <currentMemory unit='KiB'>500000</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64'>exe</type>
+    <init>/bin/sh</init>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/libexec/libvirt_lxc</emulator>
+    <filesystem type='mount' accessmode='passthrough'>
+      <source dir='/'/>
+      <target dir='/'/>
+    </filesystem>
+    <console type='pty'>
+      <target type='lxc' port='0'/>
+    </console>
+  </devices>
+</domain>
index d2369a25d1ca9d8eacc2e0969a3da34838294d0d..93162b36c6ca0e23c2af63d8130757732fc0bd19 100644 (file)
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/libexec/libvirt_lxc</emulator>
+    <filesystem type='bind' accessmode='passthrough'>
+      <source dir='/'/>
+      <target dir='/'/>
+    </filesystem>
     <filesystem type='ram' accessmode='passthrough'>
       <source usage='1048576' units='KiB'/>
       <target dir='/mnt/mississippi'/>
index 1692e4bbaa65741556bf4902ba9b536081d2eb5f..a028e396df219cdcdfb570f773cded12a65d7247 100644 (file)
@@ -137,6 +137,7 @@ mymain(void)
     DO_TEST("hostdev");
     DO_TEST("disk-formats");
     DO_TEST_DIFFERENT("filesystem-ram");
+    DO_TEST("filesystem-root");
 
     virObjectUnref(caps);
     virObjectUnref(xmlopt);