Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #117 from centreon/MON-13004-add-discovery-tags2
Browse files Browse the repository at this point in the history
change tags path for packaging
  • Loading branch information
garnier-quentin authored Aug 16, 2022
2 parents 7c292d8 + 0551e0e commit 4c20e20
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions centreon/class/cisTags.pm → centreon/vmware/cisTags.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
# limitations under the License.
#

package centreon::class::cisTags;
package centreon::vmware::cisTags;

use strict;
use warnings;
use centreon::class::http::http;
use centreon::vmware::http::http;
use JSON::XS;

# https://developer.vmware.com/apis/vsphere-automation/v7.0U2/cis/
Expand Down Expand Up @@ -91,7 +91,7 @@ sub configuration {
$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;
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions centreon/vmware/cmddiscovery.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use base qw(centreon::vmware::cmdbase);
use strict;
use warnings;
use centreon::vmware::common;
use centreon::class::cisTags;
use centreon::vmware::cisTags;

sub new {
my ($class, %options) = @_;
Expand Down Expand Up @@ -92,7 +92,7 @@ sub run {
}

if (defined($self->{tags})) {
my $cisTags = centreon::class::cisTags->new();
my $cisTags = centreon::vmware::cisTags->new();
$cisTags->configuration(
url => $self->{connector}->{config_vsphere_url},
username => $self->{connector}->{config_vsphere_user},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
# limitations under the License.
#

package centreon::class::http::backend::curl;
package centreon::vmware::http::backend::curl;

use strict;
use warnings;
use URI;
use Net::Curl::Easy;
use centreon::class::http::backend::curlconstants;
use centreon::vmware::http::backend::curlconstants;

sub new {
my ($class, %options) = @_;
Expand All @@ -39,7 +39,7 @@ sub new {
sub check_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})) {
$options{request}->{curl_opt} = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# limitations under the License.
#

package centreon::class::http::backend::curlconstants;
package centreon::vmware::http::backend::curlconstants;

use strict;
use warnings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
# limitations under the License.
#

package centreon::class::http::backend::lwp;
package centreon::vmware::http::backend::lwp;

use strict;
use warnings;
use centreon::class::http::backend::useragent;
use centreon::vmware::http::backend::useragent;
use URI;
use IO::Socket::SSL;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# limitations under the License.
#

package centreon::class::http::backend::useragent;
package centreon::vmware::http::backend::useragent;

use strict;
use warnings;
Expand All @@ -30,7 +30,7 @@ sub new {
bless $self, $class;

$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->{username} = $options{username} if defined($options{username});
Expand Down
14 changes: 7 additions & 7 deletions centreon/class/http/http.pm → centreon/vmware/http/http.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# limitations under the License.
#

package centreon::class::http::http;
package centreon::vmware::http::http;

use strict;
use warnings;
Expand Down Expand Up @@ -86,17 +86,17 @@ sub check_options {

if (!defined($self->{backend_lwp}) && !defined($self->{backend_curl})) {
if ($options{request}->{http_backend} eq 'lwp' && $self->mymodule_load(
logger => $options{logger}, module => 'centreon::class::http::backend::lwp',
error_msg => "Cannot load module 'centreon::class::http::backend::lwp'."
logger => $options{logger}, module => 'centreon::vmware::http::backend::lwp',
error_msg => "Cannot load module 'centreon::vmware::http::backend::lwp'."
) == 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(
logger => $options{logger}, module => 'centreon::class::http::backend::curl',
error_msg => "Cannot load module 'centreon::class::http::backend::curl'."
logger => $options{logger}, module => 'centreon::vmware::http::backend::curl',
error_msg => "Cannot load module 'centreon::vmware::http::backend::curl'."
) == 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});
}
}

Expand Down

0 comments on commit 4c20e20

Please sign in to comment.