Ravada::Front(3)
π Ravada::Front π
okay bestie, so this is the Ravada::Front page from the User Contributed Perl Documentation β it's the web frontend library for Ravada, and yes she's serving method-after-method realness. no cap, it's a long one, but we're getting through every single bit together π«Ά
β¨ NAME β¨
Ravada::Front β the Web Frontend library for Ravada, fr fr π
π BUILD π
Internal constructor. that's it, that's the vibe β it's internal, don't come for her π
π¦ list_bases π¦
Hands you back a list of the base domains, as a listref, iconic behavior:
my $bases = $rvd_front->list_bases();
πΈ list_machines_user πΈ
Returns a list of machines available to the user.
If the user has ever cloned the base, she shows that info. If not, she shows the base data instead. either way she's showing up πββοΈ
- Arguments: user
- Returns: listref of machines
sub search_clone_data {
my $self = shift;
my %args = @_;
my $query = "SELECT * FROM domains WHERE "
.(join(" AND ", map { "$_ = ? " } sort keys %args));
my $sth = $CONNECTOR->dbh->prepare($query);
$sth->execute( map { $args{$_} } sort keys %args );
my $row = $sth->fetchrow_hashref;
return ( $row or {});
}
π§ list_domains π§
Returns a list of the domains as a listref:
my $bases = $rvd_front->list_domains();
π filter_base_without_clones π
Filters the list of domains and drops all machines that are unacessible (yes, that's literally how it's spelled, we don't fix, we preserve π) and bases with 0 machines accessible.
β list_clones β
Returns a list of the domains that are clones, as a listref:
my $clones = $rvd_front->list_clones();
π domain_info π
Returns information of a domain. you can look her up by id or by name, dealer's choice:
my $info = $rvd_front->domain_info( id => $id);
my $info = $rvd_front->domain_info( name => $name);
π domain_exists π
Returns true if the domain name exists:
if ($rvd->domain_exists('domain_name')) {
...
}
π« node_exists π«
Returns true if the node name exists:
if ($rvd->node('node_name')) {
...
}
π list_vm_types π
Returns a reference to a list of Virtual Machine Managers known by the system. she knows them all, she's got connections β¨
π₯ list_vms π₯
Returns a list of Virtual Managers.
πΈ list_nodes_by_id πΈ
Returns a list of Nodes by id.
π¦ list_iso_images π¦
Returns a reference to a list of the ISO images known by the system.
π iso_file π
Returns a reference to a list of the ISOs known by the system.
π list_lxc_templates π
Returns a reference to a list of the LXC templates known by the system.
β list_users β
Returns a reference to a list of the users.
π list_bases_network π
Returns a reference to a list to all the bases in a network:
my $list = $rvd_front->list_bases_network($id_network);
π§ create_domain π§
Request the creation of a new domain or virtual machine:
# TODO: document the args here
my $req = $rvd_front->create_domain( ... );
ngl the args are literally a TODO in the source, so we're not making stuff up, periodt π
π wait_request π
Waits for a request for some seconds. patience is a virtue bestie β³
Arguments:
- request
- timeout (optional defaults to
$Ravada::Front::TIMEOUT)
Returns: the request
π ping_backend π
Checks if the backend is alive.
Return true if alive, false otherwise. vibe check on the backend fr fr π«Ά
π« open_vm π«
Connects to a Virtual Machine Manager ( or VMM ( or VM ))). Returns a read-only connection to the VM:
my $vm = $front->open_vm('KVM');
π search_vm π
Calls to open_vm. she's not doing extra, she's just forwarding the call πββοΈ
π₯ search_clone π₯
Search for a clone of a domain owned by an user:
my $domain_clone = $rvd_front->(id_base => $domain_base->id , id_owner => $user->id);
arguments:
id_base: The id of the base domainid_user
Returns: the domain
πΈ search_domain πΈ
Searches a domain by name:
my $domain = $rvd_front->search_domain($name);
Returns: a Ravada::Domain object
π¦ list_requests π¦
Returns a list of requests : ( id , domain_name, status, error )
π search_domain_by_id π
my $domain = $ravada->search_domain_by_id($id);
π start_domain π
Request to start a domain. wake her up, she's got main character energy π
arguments:
user => $user: aRavada::Auth::SQLusername => $name: the domain nameremote_ip => $remote_ip: aRavada::Auth::SQLuser
Returns: an object: Ravada::Request.
my $req = $rvd_front->start_domain(
user => $user
,name => 'mydomain'
, remote_ip => '192.168.1.1');
π list_bases_anonymous π
List the available bases for anonymous user in a remote IP:
my $list = $rvd_front->list_bases_anonymous($remote_ip);
β disconnect_vm β
Disconnects all the conneted VMs (spelling preserved, we stan π). bye bye connections π
π§ enable_node π§
Enables, disables or delete a node:
$rvd->enable_node($id_node, $value);
Returns true if the node is enabled, false otherwise.
π remove_node π
Remove new node from the table VMs.
π add_node π
Inserts a new node in the table VMs.
π« list_network_interfaces π«
Request to list the network interfaces. Returns a reference to the list:
my $interfaces = $rvd_front->list_network_interfaces(
vm_type => 'KVM'
,type => 'bridge'
,user => $user
)
π settings_global π
Returns the list of global settings as a hash.
π₯ setting π₯
Sets or gets a global setting parameter:
$rvd_front->('debug')
Settings are defined and stored in the table settings in the database.
πΈ feature πΈ
Returns if a feature is available:
if ($rvd_front->$feature('ldap')) {
....
π¦ update_settings_global π¦
Updates the global settings.
π is_in_maintenance π
Returns wether the service is in maintenance mode (again: spelling as-is, bestie π).
π update_host_device π
Update the host device information, then it requests a list of the current available devices:
$rvd_front->update_host_device( field => 'value' );
π list_machine_types π
Returns a reference to a list of the architectures and its machine types.
β list_cpu_models β
Returns a reference to a list of the CPU models.
π§ list_storage_pools π§
Returns a reference to a list of the storage pools.
π list_networks π
List the virtual networks for a Virtual Machine Manager.
- Arguments: id vm , id user
- Returns: list ref of networks
π list_users_share π
Returns a list of users to share. sharing is caring π«Ά
π« upload_users π«
Upload a list of users to the database.
Arguments:
- string with users and passwords in each line
- type: it can be
SQL,LDAPorSSO - create: optionally create the entries in LDAP
π upload_users_json π
Upload a list of users to the database.
Arguments:
- string with users and passwords in each line
- type: it can be
SQL,LDAPorSSO
π₯ create_bundle π₯
Creates a new bundle.
Arguments: name
πΈ bundle_private_network πΈ
Sets the bundle network to private.
Arguments : id_bundle, value ( defaults 1 )
π¦ bundle_isolated π¦
Sets the bundle network isolated.
Arguments : id_bundle, value ( defaults 1 )
π add_to_bundle π
Adds a domain to a bundle.
Arguments : id_bundle, id_domain
π upload_group_members π
Upload a list of users to be added to a group.
Arguments:
- string with users
- exclusive: remove all other users not uploaded here
π version π
Returns the version of the main module. she knows who she is π
and that's a wrap, bestie!! π this whole thing is documented under perl v5.42.0, dated 2025-09-20, and it's the Ravada::Front(3) page in the User Contributed Perl Documentation. slay, go build something gorgeous with her πβ¨π¦ππ
π¦ where this page comes from
- fedora 43: ravada 2.4.1-1.fc43 Β· AGPL-3.0-only AND Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms