>>What do you think? Yes, sure.
This could help as we can add some other spice options later (usb redirect,...). ----- Mail original ----- De: "Dietmar Maurer" <[email protected]> À: "Alexandre Derumier" <[email protected]>, [email protected] Envoyé: Lundi 24 Juin 2013 10:41:34 Objet: RE: [pve-devel] [PATCH 2/2] rest : handle application/x-spice-configuration response format > + } elsif ($format eq 'spiceconfig') { > + $ct = 'application/x-spice-configuration;charset=UTF-8'; > + if ($data && ref($data) && ref($data->{data})) { > + $raw = "[virt-viewer]\n"; > + $raw .= "title=$data->{data}->{title}\n" if $data->{data}->{title}; > + $raw .= "type=$data->{data}->{type}\n" if $data->{data}->{type}; > + $raw .= "host=$data->{data}->{host}\n" if $data->{data}->{host}; > + $raw .= "port=$data->{data}->{port}\n" if $data->{data}->{port}; > + $raw .= "password=$data->{data}->{password}\n" if $data->{data}- > >{password}; > + $raw .= "proxy=$data->{data}->{proxy}\n" if $data->{data}->{proxy}; Maybe we can use a simply loop here? something like: foreach my $key (keys %{$data->{data}}) { $raw .= "$key=$data->{data}->{$key}\n"; } What do you think? _______________________________________________ pve-devel mailing list [email protected] http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
