[libvirt] [PATCHv2 1/9] docs: hvsupport: Add support for deprecating hypervisor implementations
Andrea Bolognani
abologna at redhat.com
Mon Jun 17 14:46:56 UTC 2019
On Mon, 2019-06-17 at 14:55 +0200, Peter Krempa wrote:
[...]
> foreach my $drv (keys %{$groups{"virHypervisorDriver"}->{drivers}}) {
> - my $openVersStr = $groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"connectOpen"};
> + my $openVersStr = $groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"connectOpen"}->{"vers"};
You should be able to use "{vers}" here, like almost everywhere else.
[...]
> foreach my $drv (keys %{$groups{"virHypervisorDriver"}->{drivers}}) {
> - my $createVersStr = $groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"domainCreateXML"};
> + my $createVersStr = $groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"domainCreateXML"}->{"vers"};
Same here.
[...]
> +in. If a hypervisor deprecated the implementations the version when it
> +was removed is highlighted as <span class="deprecatedhv">this</span>.
s/hypervisor/driver/
s/implementations/API,/
s/highlighted as/highlighted like/
[...]
> foreach my $drv (sort {$a cmp $b } keys %{$groups{$grp}->{drivers}}) {
> + print "<td>";
> + #print $groups{$grp}->{drivers}->{$drv}->{$field};
Clearly a leftover from development :)
> if (exists $groups{$grp}->{drivers}->{$drv}->{$field}) {
> - print "<td>", $groups{$grp}->{drivers}->{$drv}->{$field}, "</td>\n";
> - } else {
> - print "<td></td>\n";
> + if ($groups{$grp}->{drivers}->{$drv}->{$field}->{vers}) {
> + print $groups{$grp}->{drivers}->{$drv}->{$field}->{vers};
> + }
> + if ($groups{$grp}->{drivers}->{$drv}->{$field}->{depre}) {
> + print " - <span class=\"deprecatedhv\">", $groups{$grp}->{drivers}->{$drv}->{$field}->{depre}, "</span>";
> + }
I wonder if these two checks should use "if (exists ...)" like the
one above? It seems to work, though.
Based on the fact that the new script does what it says on the tin
and the diff looks reasonable, with the above addressed
Reviewed-by: Andrea Bolognani <abologna at redhat.com>
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list