|
|
@ -49,12 +49,14 @@ sub get_server_screenshot |
|
|
|
{ |
|
|
|
{ |
|
|
|
my $parameters = shift; |
|
|
|
my $parameters = shift; |
|
|
|
my $server_uuid = $parameters->{server_uuid}; |
|
|
|
my $server_uuid = $parameters->{server_uuid}; |
|
|
|
my ($resize_x, $resize_y) = split(/x/ , $parameters->{resize_args}); |
|
|
|
my $resize_args = defined $parameters->{resize_args} ? $parameters->{resize_args} : ''; |
|
|
|
|
|
|
|
|
|
|
|
my $shell_call = "virsh --quiet screenshot --domain ".$server_uuid." --file /dev/stdout"; |
|
|
|
my $shell_call = "virsh --quiet screenshot --domain ".$server_uuid." --file /dev/stdout"; |
|
|
|
|
|
|
|
|
|
|
|
if ($resize_x =~ /^\d+$/ && $resize_y =~ /^\d+$/) |
|
|
|
if ($resize_args =~ /^\d+x\d+$/) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
my ($resize_x, $resize_y) = split(/x/ , $resize_args); |
|
|
|
|
|
|
|
|
|
|
|
$shell_call .= " | pamscale -quiet -xyfit ".$resize_x." ".$resize_y; |
|
|
|
$shell_call .= " | pamscale -quiet -xyfit ".$resize_x." ".$resize_y; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|