Commit 6e04068d authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Merge tag '0.4.3' into develop

Fixed Fedora download
parents a8fc0902 dcbc1ca5
......@@ -3,7 +3,7 @@ package Ravada;
use warnings;
use strict;
our $VERSION = '0.5.0';
our $VERSION = '0.4.3';
use Carp qw(carp croak);
use Data::Dumper;
......@@ -315,7 +315,7 @@ sub _update_isos {
,arch => 'amd64'
,xml => 'xenial64-amd64.xml'
,xml_volume => 'xenial64-volume.xml'
,sha256_url => 'http://fedora.mirrors.ovh.net/linux/releases/28/Workstation/x86_64/iso/Fedora-Workstation-28-.*-x86_64-CHECKSUM'
,sha256_url => '$url/Fedora-Workstation-28-.*-x86_64-CHECKSUM'
,min_disk_size => '10'
}
,kubuntu_64 => {
......@@ -519,11 +519,39 @@ sub _update_isos {
,min_disk_size => '0'
}
);
$self->_scheduled_fedora_releases(\%data);
$self->_update_table($table, $field, \%data);
}
sub _scheduled_fedora_releases($self,$data) {
my @now = localtime(time);
my $year = $now[5]+1900;
my $month = $now[4]+1;
my $release = 27;
for my $y ( 2018 .. $year ) {
for my $m ( 5, 11 ) {
return if $y == $year && $m>$month;
$release++;
my $name = "fedora_".$release;
next if exists $data->{$name};
$data->{$name} = {
name => 'Fedora '.$release
,description => "RedHat Fedora $release Workstation 64 bits"
,url => 'http://ftp.halifax.rwth-aachen.de/fedora/linux/releases/'.$release
.'/Workstation/x86_64/iso/Fedora-Workstation-netinst-x86_64-'.$release
.'-.*\.iso'
,arch => 'amd64'
,xml => 'xenial64-amd64.xml'
,xml_volume => 'xenial64-volume.xml'
,sha256_url => '$url/Fedora-Workstation-'.$release.'-.*-x86_64-CHECKSUM'
,min_disk_size => 10 + $release-27
};
}
}
}
sub _update_domain_drivers_types($self) {
my $data = {
......
......@@ -59,7 +59,7 @@ sub test_remove_corrupt_clone {
my $vm = shift;
my $base = create_domain($vm);
$base->add_volume_swap();
$base->add_volume_swap( size => 1024 * 1024 );
my $clone = $base->clone(
name => new_domain_name
,user => user_admin
......@@ -141,6 +141,7 @@ sub test_new_domain_iso {
, active => $active
, id_owner => $USER->id , iso_file => $iso->{device}
, vm => $BACKEND
, disk => 1024 * 1024
);
};
is($@,'') or return;
......
......@@ -220,7 +220,7 @@ sub _create_2_clones_same_port($vm, $node, $base, $ip_local, $ip_remote) {
$clone_local->start(user => user_admin, remote_ip => $ip_local);
$clone_remote->start(user => user_admin, remote_ip => $ip_remote);
for (1 .. 10 ) {
for (1 .. 100 ) {
my ($port_local) = $clone_local->display(user_admin) =~ m{://.*:(\d+)};
my ($port_remote) = $clone_remote->display(user_admin) =~ m{://.*:(\d+)};
......
......@@ -67,7 +67,7 @@ sub test_list_bridges($vm) {
is($req->status,'done');
is($req->error,'');
my @exp_bridges = _expected_bridges($vm);
my @exp_bridges = sort(_expected_bridges($vm));
is($req->output,encode_json(\@exp_bridges));
my $bridges = rvd_front->list_network_interfaces(
......@@ -79,19 +79,17 @@ sub test_list_bridges($vm) {
SKIP: {
skip("No system bridges found",1) if !scalar @exp_bridges;
like($req->output, qr/\["\w+"]/);
like($req->output, qr/\["[\w\d]+".*\]/);
}
}
sub _expected_bridges($vm) {
my $brctl = `which brctl`;
chomp $brctl;
return if !$brctl;
return undef if !$brctl;
my @exp_bridges = grep { defined $_ && $_ ne 'bridge' }
map { /(^\w+)\s*/; $1 }
split /\n/,`brctl show`;
@exp_bridges = _remove_qemu_bridges($vm, \@exp_bridges);
return @exp_bridges;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment