change tags path for packaging

This commit is contained in:
garnier-quentin 2022-08-16 09:20:32 +02:00
parent 7753ac3738
commit 93bf6153af
7 changed files with 20 additions and 20 deletions

View File

@ -18,11 +18,11 @@
# limitations under the License. # limitations under the License.
# #
package centreon::class::cisTags; package centreon::vmware::cisTags;
use strict; use strict;
use warnings; use warnings;
use centreon::class::http::http; use centreon::vmware::http::http;
use JSON::XS; use JSON::XS;
# https://developer.vmware.com/apis/vsphere-automation/v7.0U2/cis/ # https://developer.vmware.com/apis/vsphere-automation/v7.0U2/cis/
@ -91,7 +91,7 @@ sub configuration {
$self->{curl_opts} = $curl_opts; $self->{curl_opts} = $curl_opts;
} }
$self->{http} = centreon::class::http::http->new(logger => $options{logger}); $self->{http} = centreon::vmware::http::http->new(logger => $options{logger});
$self->{is_error} = 0; $self->{is_error} = 0;
return 0; return 0;
} }

View File

@ -25,7 +25,7 @@ use base qw(centreon::vmware::cmdbase);
use strict; use strict;
use warnings; use warnings;
use centreon::vmware::common; use centreon::vmware::common;
use centreon::class::cisTags; use centreon::vmware::cisTags;
sub new { sub new {
my ($class, %options) = @_; my ($class, %options) = @_;
@ -92,7 +92,7 @@ sub run {
} }
if (defined($self->{tags})) { if (defined($self->{tags})) {
my $cisTags = centreon::class::cisTags->new(); my $cisTags = centreon::vmware::cisTags->new();
$cisTags->configuration( $cisTags->configuration(
url => $self->{connector}->{config_vsphere_url}, url => $self->{connector}->{config_vsphere_url},
username => $self->{connector}->{config_vsphere_user}, username => $self->{connector}->{config_vsphere_user},

View File

@ -18,13 +18,13 @@
# limitations under the License. # limitations under the License.
# #
package centreon::class::http::backend::curl; package centreon::vmware::http::backend::curl;
use strict; use strict;
use warnings; use warnings;
use URI; use URI;
use Net::Curl::Easy; use Net::Curl::Easy;
use centreon::class::http::backend::curlconstants; use centreon::vmware::http::backend::curlconstants;
sub new { sub new {
my ($class, %options) = @_; my ($class, %options) = @_;
@ -39,7 +39,7 @@ sub new {
sub check_options { sub check_options {
my ($self, %options) = @_; my ($self, %options) = @_;
$self->{constant_cb} = \&centreon::class::http::backend::curlconstants::get_constant_value; $self->{constant_cb} = \&centreon::vmware::http::backend::curlconstants::get_constant_value;
if (!defined($options{request}->{curl_opt})) { if (!defined($options{request}->{curl_opt})) {
$options{request}->{curl_opt} = []; $options{request}->{curl_opt} = [];

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package centreon::class::http::backend::curlconstants; package centreon::vmware::http::backend::curlconstants;
use strict; use strict;
use warnings; use warnings;

View File

@ -18,11 +18,11 @@
# limitations under the License. # limitations under the License.
# #
package centreon::class::http::backend::lwp; package centreon::vmware::http::backend::lwp;
use strict; use strict;
use warnings; use warnings;
use centreon::class::http::backend::useragent; use centreon::vmware::http::backend::useragent;
use URI; use URI;
use IO::Socket::SSL; use IO::Socket::SSL;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package centreon::class::http::backend::useragent; package centreon::vmware::http::backend::useragent;
use strict; use strict;
use warnings; use warnings;
@ -30,7 +30,7 @@ sub new {
bless $self, $class; bless $self, $class;
$self = LWP::UserAgent::new(@_); $self = LWP::UserAgent::new(@_);
$self->agent('centreon::class::http::backend::useragent'); $self->agent('centreon::vmware::http::backend::useragent');
$self->{credentials} = $options{credentials} if defined($options{credentials}); $self->{credentials} = $options{credentials} if defined($options{credentials});
$self->{username} = $options{username} if defined($options{username}); $self->{username} = $options{username} if defined($options{username});

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package centreon::class::http::http; package centreon::vmware::http::http;
use strict; use strict;
use warnings; use warnings;
@ -86,17 +86,17 @@ sub check_options {
if (!defined($self->{backend_lwp}) && !defined($self->{backend_curl})) { if (!defined($self->{backend_lwp}) && !defined($self->{backend_curl})) {
if ($options{request}->{http_backend} eq 'lwp' && $self->mymodule_load( if ($options{request}->{http_backend} eq 'lwp' && $self->mymodule_load(
logger => $options{logger}, module => 'centreon::class::http::backend::lwp', logger => $options{logger}, module => 'centreon::vmware::http::backend::lwp',
error_msg => "Cannot load module 'centreon::class::http::backend::lwp'." error_msg => "Cannot load module 'centreon::vmware::http::backend::lwp'."
) == 0) { ) == 0) {
$self->{backend_lwp} = centreon::class::http::backend::lwp->new(%options, logger => $self->{logger}); $self->{backend_lwp} = centreon::vmware::http::backend::lwp->new(%options, logger => $self->{logger});
} }
if ($options{request}->{http_backend} eq 'curl' && $self->mymodule_load( if ($options{request}->{http_backend} eq 'curl' && $self->mymodule_load(
logger => $options{logger}, module => 'centreon::class::http::backend::curl', logger => $options{logger}, module => 'centreon::vmware::http::backend::curl',
error_msg => "Cannot load module 'centreon::class::http::backend::curl'." error_msg => "Cannot load module 'centreon::vmware::http::backend::curl'."
) == 0) { ) == 0) {
$self->{backend_curl} = centreon::class::http::backend::curl->new(%options, logger => $self->{logger}); $self->{backend_curl} = centreon::vmware::http::backend::curl->new(%options, logger => $self->{logger});
} }
} }