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
3fd7c54b
Commit
3fd7c54b
authored
Jun 22, 2016
by
Francesc Guasch
Browse files
allow choose the backend when creating a new domain
parent
94ed359e
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
3fd7c54b
...
...
@@ -32,6 +32,8 @@ our $FILE_CONFIG = "/etc/ravada.conf";
our
$CONNECTOR
;
our
$CONFIG
=
{};
our
$DEBUG
;
_connect_dbh
();
...
...
@@ -159,7 +161,15 @@ Creates a new domain based on an ISO image or another domain.
sub
create_domain
{
my
$self
=
shift
;
return
$self
->
vm
->
[
0
]
->
create_domain
(
@
_
);
my
%args
=
@_
;
my
$backend
=
$args
{
backend
};
delete
$args
{
backend
};
my
$vm
=
$self
->
vm
->
[
0
];
$vm
=
$self
->
search_backend
(
$backend
)
if
$backend
;
return
$vm
->
create_domain
(
@
_
);
}
=head2 remove_domain
...
...
@@ -381,10 +391,9 @@ sub process_requests {
my
$sth
=
$CONNECTOR
->
dbh
->
prepare
("
SELECT id FROM requests WHERE status='requested'
");
$sth
->
execute
;
while
(
my
(
$id
)
=
$sth
->
fetchrow
)
{
warn
"
Processing request
$id
";
my
$req
=
Ravada::
Request
->
open
(
$id
);
$self
->
_execute
(
$req
);
warn
$req
->
status
();
warn
$req
->
status
()
if
$DEBUG
;
}
$sth
->
finish
;
}
...
...
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