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

Re: [Libguestfs] [PATCH] v2v: -i libvirtxml: ignore <listen type='none'> (RHBZ#1378022)



On Wed, Sep 21, 2016 at 02:33:23PM +0200, Pino Toscano wrote:
> When reading a libvirt XML which has:
> 
>   <graphics ...>
>     <listen type='none'/>
>   </graphics>
> 
> then just ignore it, as it is (roughly) the same as no <listen> child
> elements at all.  This avoids a warning about an unknown listen type.

I looked at this and don't think it is the same -- see my
patch.

Rich.

>  v2v/input_libvirtxml.ml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml
> index 33e878e..1540798 100644
> --- a/v2v/input_libvirtxml.ml
> +++ b/v2v/input_libvirtxml.ml
> @@ -101,6 +101,7 @@ let parse_libvirt_xml ?conn xml =
>            (* Use only the first <listen> configuration. *)
>            match xpath_string "listen[1]/@type" with
>            | None -> LNone
> +          | Some "none" -> LNone
>            | Some "address" ->
>              (match xpath_string "listen[1]/@address" with
>              | None -> LNone
> -- 
> 2.7.4
> 
> _______________________________________________
> Libguestfs mailing list
> Libguestfs redhat com
> https://www.redhat.com/mailman/listinfo/libguestfs

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v


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