[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] storage: inconsistent in 'format' scheme between document and implementation



On Thu, May 21, 2009 at 03:57:28PM +0900, Ryota Ozaki wrote:
> Hi,
> 
> I've found a problem that a 'format' element in storage-{pool,vol} XML
> doesn't behave as described in the document.
> 
> The document says that a format of {pool,vol} is specified as the value of
> a format element, like:
> 
> 	<target>
>           <path>/var/lib/virt/images/sparse.img</path>
>           <format>qcow2</format>
>           <permissions>
> 
> However, the implementation doesn't follow this:
> 
>     if (options->formatFromString) {
>         char *format = virXPathString(conn,
> "string(/volume/target/format/@type)", ctxt);
[...]
> The implementation assumes that a format of {pool,vol} is specified as
> the attribute of a format element, like:
> 
> 	<target>
>           <path>/var/lib/virt/images/sparse.img</path>
>           <format type='qcow2' />
>           <permissions>
> 
> Thus, we need to fix either the document or the implementation.
> (I guess the implementation is correct, right?)
> 

  Right, moreover the schemas docs/schemas/storagepool.rng makes it
  clear too it's a type attribute:

...
  <define name='sourcefmtfs'>
    <optional>
      <element name='format'>
        <attribute name='type'>
          <choice>
            <value>auto</value>
            <value>ext2</value>
...

 I have updated the doc to clear this,

   thanks !

Daniel


-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]