1Ravada::Front(3)      User Contributed Perl Documentation     Ravada::Front(3)
2
3
4

NAME

6       Ravada::Front - Web Frontend library for Ravada
7
8   BUILD
9       Internal constructor
10
11   list_bases
12       Returns a list of the base domains as a listref
13
14           my $bases = $rvd_front->list_bases();
15
16   list_machines_user
17       Returns a list of machines available to the user
18
19       If the user has ever clone the base, it shows this information. It show
20       the base data if not.
21
22       Arguments: user
23
24       Returns: listref of machines
25
26       sub search_clone_data {
27           my $self = shift;
28           my %args = @_;
29           my $query = "SELECT * FROM domains WHERE "
30               .(join(" AND ", map { "$_ = ? " } sort keys %args));
31
32           my $sth = $CONNECTOR->dbh->prepare($query);
33           $sth->execute( map { $args{$_} } sort keys %args );
34           my $row = $sth->fetchrow_hashref;
35           return ( $row or {});
36
37       }
38
39   list_domains
40       Returns a list of the domains as a listref
41
42           my $bases = $rvd_front->list_domains();
43
44   list_clones Returns a list of the domains that are clones as a listref
45             my $clones = $rvd_front->list_clones();
46
47   domain_info
48       Returns information of a domain
49
50           my $info = $rvd_front->domain_info( id => $id);
51           my $info = $rvd_front->domain_info( name => $name);
52
53   domain_exists
54       Returns true if the domain name exists
55
56           if ($rvd->domain_exists('domain_name')) {
57               ...
58           }
59
60   list_vm_types
61       Returns a reference to a list of Virtual Machine Managers known by the
62       system
63
64   list_iso_images
65       Returns a reference to a list of the ISO images known by the system
66
67   iso_file
68       Returns a reference to a list of the ISOs known by the system
69
70   list_lxc_templates
71       Returns a reference to a list of the LXC templates known by the system
72
73   list_users
74       Returns a reference to a list of the users
75
76   create_domain
77       Request the creation of a new domain or virtual machine
78
79           # TODO: document the args here
80           my $req = $rvd_front->create_domain( ... );
81
82   wait_request
83       Waits for a request for some seconds.
84
85       Arguments
86
87       ·   request
88
89       ·   timeout (optional defaults to $Ravada::Front::TIMEOUT
90
91       Returns: the request
92
93   ping_backend
94       Checks if the backend is alive.
95
96       Return true if alive, false otherwise.
97
98   open_vm
99       Connects to a Virtual Machine Manager ( or VMM ( or VM )).  Returns a
100       read-only connection to the VM.
101
102         my $vm = $front->open_vm('KVM');
103
104   search_vm
105       Calls to open_vm
106
107   search_clone
108       Search for a clone of a domain owned by an user.
109
110           my $domain_clone = $rvd_front->(id_base => $domain_base->id , id_owner => $user->id);
111
112       arguments
113
114       id_base : The id of the base domain
115       id_user
116
117       Returns the domain
118
119   search_domain
120       Searches a domain by name
121
122           my $domain = $rvd_front->search_domain($name);
123
124       Returns a Ravada::Domain object
125
126   list_requests
127       Returns a list of ruquests : ( id , domain_name, status, error )
128
129   search_domain_by_id
130         my $domain = $ravada->search_domain_by_id($id);
131
132   start_domain
133       Request to start a domain.
134
135       arguments
136
137       user => $user : a Ravada::Auth::SQL user
138       name => $name : the domain name
139       remote_ip => $remote_ip: a Ravada::Auth::SQL user
140
141       Returns an object: Ravada::Request.
142
143           my $req = $rvd_front->start_domain(
144                      user => $user
145                     ,name => 'mydomain'
146               , remote_ip => '192.168.1.1');
147
148   list_bases_anonymous
149       List the available bases for anonymous user in a remote IP
150
151           my $list = $rvd_front->list_bases_anonymous($remote_ip);
152
153   disconnect_vm
154       Disconnects all the conneted VMs
155
156   version
157       Returns the version of the main module
158
159
160
161perl v5.28.1                      2019-04-12                  Ravada::Front(3)
Impressum