Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
06ce3dcf
Commit
06ce3dcf
authored
Apr 06, 2017
by
Francesc Guasch
Browse files
[#85] returns if a domain is hibernated
parent
b35f3ed9
Changes
3
Show whitespace changes
Inline
Side-by-side
lib/Ravada/Domain.pm
View file @
06ce3dcf
...
...
@@ -34,6 +34,7 @@ requires 'remove';
requires
'
display
';
requires
'
is_active
';
requires
'
is_hibernated
';
requires
'
is_paused
';
requires
'
start
';
requires
'
shutdown
';
...
...
lib/Ravada/Domain/KVM.pm
View file @
06ce3dcf
...
...
@@ -568,6 +568,17 @@ sub resume {
}
=head2 is_hibernated
Returns if the domain has a managed saved state.
=cut
sub
is_hibernated
{
my
$self
=
shift
;
return
$self
->
domain
->
has_managed_save_image
;
}
=head2 is_paused
Returns if the domain is paused
...
...
lib/Ravada/Domain/Void.pm
View file @
06ce3dcf
...
...
@@ -87,6 +87,8 @@ sub remove {
$self
->
remove_disks
();
}
sub
is_hibernated
{
return
0
}
sub
is_paused
{
my
$self
=
shift
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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