[libvirt] [PATCH] Add support for Vendor and Model in Storage Pool XML

Eric Blake eblake at redhat.com
Mon Aug 9 20:09:51 UTC 2010


On 08/09/2010 01:32 PM, Patrick Dignan wrote:
> Somehow the git-send-email patch didn't make it to the mailing list,
> though my reply to it did...I've attached the patch here, hopefully this
> one doesn't get flattened.

Much nicer.

> 
> I decided to allow vendor and product to be set independently of each
> other in order to allow greater flexibility at the possible expense of
> namespace clashes.


> +  <define name='sourceinfovendor'>
> +    <optional>
> +      <element name='vendor'>
> +        <attribute name='name'>
> +          <text/>
> +        </attribute>
> +      </element>
> +    </optional>
> +    <optional>
> +      <element name='product'>
> +        <attribute name='name'>
> +          <text/>
> +        </attribute>
> +      </element>
> +    </optional>
> +  </define>

So, the sourceinfovendor definition can be completely empty; yet...

> @@ -272,6 +289,9 @@
>              <value>ocfs2</value>
>            </choice>
>          </attribute>
> +        <optional>
> +          <ref name='sourceinfovendor'/>
> +        </optional>

...we always mark it as optional.  Do we need the <optional> at all the
callers, if the <ref> itself can be empty?  I don't know enough about
.rng format to answer this question definitively.

>       <ref name='sourceinfodev'/>
>        <ref name='sourcefmtfs'/>
> +      <optional>
> +          <ref name='sourceinfovendor'/>

Spacing is weird here - only need to indent by +2, not +4, for
consistency with the rest of the file.

But the rest of the patch looked sane to me.  I'll wait for someone with
more .rng experience to chime in, though.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100809/8104d4dd/attachment-0001.sig>


More information about the libvir-list mailing list