Ravada::Request - Requests library for Ravada
Request a command to the ravada backend
Internal object builder, do not call
Opens the information of a previous request by id
my $req = Ravada::Request->open($id);
my $req = Ravada::Request->create_domain( name => 'bla' , id_iso => 1 );
my $req = Ravada::Request->remove_domain( name => 'bla' , uid => $user->id );
Requests to start a domain
my $req = Ravada::Request->start_domain( name => 'name', uid => $user->id );
Requests to pause a domain
my $req = Ravada::Request->pause_domain( name => 'name', uid => $user->id );
Requests to pause a domain
my $req = Ravada::Request->resume_domain( name => 'name', uid => $user->id );
Requests to stop a domain now !
my $req = Ravada::Request->shutdown_domain( name => 'name' , uid => $user->id );
Requests to stop a domain
my $req = Ravada::Request->shutdown_domain( name => 'name' , uid => $user->id ); my $req = Ravada::Request->shutdown_domain( name => 'name' , uid => $user->id ,timeout => $timeout );
Returns a new request for preparing a domain base
my $req = Ravada::Request->prepare_base( $name );
Returns a new request for making a base regular domain. It marks it as 'non base' and removes the files.
It must have not clones. All clones must be removed before calling this method.
my $req = Ravada::Request->remove_base( $name );
Returns wether the backend is alive or not
Returns the domdisplay of a domain
Arguments:
* domain name
Returns or sets the status of a request
$req->status('done'); my $status = $req->status();
Returns the result of the request if any my $result = $req->result;
Returns the requested command
Returns the requested command
my $command = $req->command;
Returns the arguments of a request or the value of one argument field
my $args = $request->args(); print $args->{name}; print $request->args('name');
Returns if an argument is defined
Request the screenshot of a domain.
Arguments:
- optional filename , defaults to "storage_path/$id_domain.png"
Returns a Ravada::Request;
Request to open iptables for a remote client
Request to rename a domain
Sets a driver to a domain
$domain->set_driver( id_domain => $domain->id ,uid => $USER->id ,id_driver => $driver->id );
Hybernates a domain.
Ravada::Request->hybernate( id_domain => $domain->id ,uid => $user->id );
Downloads a file. Actually used only to download iso images for KVM domains.