add few comments

This commit is contained in:
Shini31 2015-07-24 15:27:20 +02:00
parent 66f2467332
commit bc9abd0e5b
3 changed files with 19 additions and 16 deletions

View File

@ -158,6 +158,7 @@ sub run {
$new_datas->{last_timestamp} = time();
my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
# First execution
if (!defined($old_timestamp)) {
$self->{output}->output_add(severity => 'OK',
short_msg => "Buffer creation...");

View File

@ -177,6 +177,7 @@ sub run {
if (defined($self->{option_results}->{id}) || defined($self->{option_results}->{name})) {
while ( my ($keys,$values) = each(%{$webcontent->{State}})) {
# Why not set a variable that contains the state?
if ($values eq 'true') {
$result = $keys;
$containername = $webcontent->{Name};
@ -200,6 +201,7 @@ sub run {
$containername = $val->{Names}->[0];
$containername =~ s/^\///;
# Thanks to Docker API for the paused state...
if (($val->{Status} =~ m/^Up/) && ($val->{Status} =~ m/^(?:(?!Paused).)*$/)) {
$result = 'Running';
$nbrunning++;

View File

@ -187,7 +187,7 @@ __END__
=head1 MODE
Check Container's image viability
Check Container's image viability with a registry
=over 8