On Fri, Feb 20, 2015 at 01:16:24PM +0100, Michal Privoznik wrote: > On 20.02.2015 12:39, Ján Tomko wrote: > > Doucment that not all attributes are used for matching. > > > > https://bugzilla.redhat.com/show_bug.cgi?id=872028 > > --- > > src/libvirt-domain.c | 5 +++++ > > tools/virsh.pod | 4 +++- > > 2 files changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c > > index 492e90a..a95c096 100644 > > --- a/src/libvirt-domain.c > > +++ b/src/libvirt-domain.c > > @@ -8341,6 +8341,11 @@ virDomainDetachDevice(virDomainPtr domain, const char *xml) > > * into S4 state (also known as hibernation) unless you also modify the > > * persistent domain definition. > > * > > + * Note that not all attributes from the XML definition are checked. > > + * For example, if the mac address and the pci address specified in the XML > > + * match an existing interface, but source and interface type do not, > > + * the existing interface will be detached. > > + * > > I don't think we want to advertise this. Users are required to pass full > device XML. If we use only a part of that information to find the > device, it's our internal implementation. Not a green light for users to > pass minimized XMLs. > Same applies for (partly) inconsistent XMLs (inconsistent to domain > XML). If we now teach users it's okay to pass XML that differs to its > domain counterpart, we are stuck with it forever. I'd await plenty of > bug reports that we broke somebody's flow just because he was passing > altered XML and we suddenly needed to change the set of attributes that > are checked. > > NACK, sorry. Agreed, this docs change will limit our ability to change our impl later if we need to. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list