Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
9c241457
Commit
9c241457
authored
Nov 03, 2017
by
Francesc Guasch
Browse files
[#443] type KVM domains and its drivers too
parent
b042510b
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
9c241457
...
...
@@ -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
'
}
};
...
...
lib/Ravada/Domain.pm
View file @
9c241457
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment