From c0e30ddb5dd2e0e96f6b05eb0f393fc99a56cb35 Mon Sep 17 00:00:00 2001 From: Shini31 Date: Mon, 10 Aug 2015 14:56:09 +0200 Subject: [PATCH 1/3] bad class --- cloud/docker/mode/listcontainers.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/docker/mode/listcontainers.pm b/cloud/docker/mode/listcontainers.pm index 5a78fa46a..2505a976f 100644 --- a/cloud/docker/mode/listcontainers.pm +++ b/cloud/docker/mode/listcontainers.pm @@ -49,7 +49,7 @@ sub new { "timeout:s" => { name => 'timeout' }, }); - $self->{http}->set_options(%{$self->{option_results}}); + $self->{http} = centreon::plugins::http->new(output => $self->{output}); return $self; } From ac67c387c1b8c1d2c4789497da1cfbe6f8763d3c Mon Sep 17 00:00:00 2001 From: Shini31 Date: Mon, 10 Aug 2015 15:22:17 +0200 Subject: [PATCH 2/3] add missing call --- cloud/docker/mode/info.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/cloud/docker/mode/info.pm b/cloud/docker/mode/info.pm index 430d031c6..40a164058 100644 --- a/cloud/docker/mode/info.pm +++ b/cloud/docker/mode/info.pm @@ -57,6 +57,7 @@ sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); + $self->{http}->set_options(%{$self->{option_results}}); } sub run { From 0642de9bd69714454af400b4389435611e6ef7c7 Mon Sep 17 00:00:00 2001 From: Shini31 Date: Mon, 10 Aug 2015 15:44:11 +0200 Subject: [PATCH 3/3] fix error with double request --- cloud/docker/mode/image.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/cloud/docker/mode/image.pm b/cloud/docker/mode/image.pm index 5f9e18f1c..5ad1c22fd 100644 --- a/cloud/docker/mode/image.pm +++ b/cloud/docker/mode/image.pm @@ -121,6 +121,7 @@ sub run { $self->{option_results}->{port} = $self->{option_results}->{registry_port}; $self->{option_results}->{proto} = $self->{option_results}->{registry_proto}; $self->{option_results}->{hostname} = $self->{option_results}->{registry_hostname}; + $self->{http}->set_options(%{$self->{option_results}}); $jsoncontent2 = $self->{http}->request();