Commit 9c241457 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

[#443] type KVM domains and its drivers too

parent b042510b
......@@ -295,32 +295,32 @@ sub _update_domain_drivers_types($self) {
id => 4,
,name => 'image'
,description => 'Graphics Options'
,vm => 'qemu'
,vm => 'KVM'
},
jpeg => {
id => 5,
,name => 'jpeg'
,description => 'Graphics Options'
,vm => 'qemu'
,vm => 'KVM'
},
zlib => {
id => 6,
,name => 'zlib'
,description => 'Graphics Options'
,vm => 'qemu'
,vm => 'KVM'
},
playback => {
id => 7,
,name => 'playback'
,description => 'Graphics Options'
,vm => 'qemu'
,vm => 'KVM'
},
streaming => {
id => 8,
,name => 'streaming'
,description => 'Graphics Options'
,vm => 'qemu'
,vm => 'KVM'
}
};
......
......@@ -1467,14 +1467,16 @@ sub drivers {
_init_connector();
$type = 'KVM' if $type =~ /qemu/;
my $type2 = $type;
$type2 = 'KVM' if $type =~ /qemu/;
$type2 = 'qemu' if $type =~ /KVM;/;
my $query = "SELECT id from domain_drivers_types "
." WHERE vm=?";
." WHERE (vm=? or vm=?)";
$query .= " AND name=?" if $name;
my $sth = $$CONNECTOR->dbh->prepare($query);
my @sql_args = ($type);
my @sql_args = ($type,$type2);
push @sql_args,($name) if $name;
$sth->execute(@sql_args);
......
Markdown is supported
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