Re: [PATCHv2 5/9] conf: split <disk> schema into more pieces

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

 



On 04/15/2014 03:43 PM, Jiri Denemark wrote:
> On Mon, Apr 14, 2014 at 16:54:16 -0600, Eric Blake wrote:
>> Disk snapshots use a subset of <disk> sources (no directory or
>> pool support yet, and while domain disks support a startupPolicy,
>> it doesn't make sense for snapshots).  This patch lets the two
>> RelaxNG grammars share a bit more code, as well as factoring
>> things into pieces that will be easier to move to a common file
>> for sharing with storage volumes.  It relies on the ability
>> to override definitions as part of an include, set up in the
>> previous patch.
>>
>> The diff is a bit hard to read, because it mixes reindentation
>> with refactoring; 'git diff -b --patience' may help.
>>

>>
>> +  <define name='disksnapshotsource'>
>> +    <choice>
>> +      <ref name='diskSourceFile'/>
>> +      <ref name='diskSourceBlock'/>
>> +      <ref name='diskSourceNetwork'/>
>> +    </choice>
>> +  </define>
> 
> This would allow <ref name='devSeclabel'/> in
> /domainsnapshot/disks/disk/source even though it was not allowed before.

Indeed, but that is intentional - it SHOULD be possible to specify the
label that libvirt applies to the new element of a backing chain.  But
I'm fine splitting the work to add seclabel support in snapshots as a
later commit.

> For example, the attached XML would be considered valid after this
> patch. And I see the follow-up patches add more stuff that is allowed in
> domain snapshot XML however there's no code that would actually use the
> new stuff, is it?

Not yet, so saving the RNG changes until the code changes are also in
place is fine.

> I think we should take the changes in domaincommon.rng
> while leaving domainsnapshot.rng alone. You started playing with making
> some stuff usable only in domain XML and another stuff only in
> domain snapshot XML but unfortunately there's a lot of other elements
> that would need similar treatment. Making both XMLs reuse the same
> source schema is a great idea but it's going to be a time-consuming task
> and the possibility for the result to become even less readable than two
> distinct definitions is very high.
> 
> ACK to the domaincommon.rng part.

Thanks for picking up on this and committing the uncontroversial parts
while I was offline last week.  Now I get to review your series, and
rebase my remaining work on top of the additional progress.  :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]