Ravada::Front(3)

πŸ“¦
version 2.4.1 Β· 2 versions
, in fedora 43

πŸ’– 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 domain
  • id_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 : a Ravada::Auth::SQL user
  • name => $name : the domain name
  • remote_ip => $remote_ip: a Ravada::Auth::SQL user

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, LDAP or SSO
  • 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, LDAP or SSO

πŸ”₯ 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