From b8927e66db909cd2cbd9afe85a705710ec15d014 Mon Sep 17 00:00:00 2001 From: omercier <32134301+omercier@users.noreply.github.com> Date: Fri, 27 Dec 2024 16:53:32 +0100 Subject: [PATCH] fix(sun-mgmt+salesforce): two coding issues that caused perl warnings (#5369) Refs: CTOR-1197 --- src/apps/salesforce/restapi/custom/api.pm | 12 +++++------ .../server/sun/mgmt_cards/mode/showfaults.pm | 14 ++++++------- .../server/sun/mgmt_cards/mode/showfaulty.pm | 20 +++++++++---------- tests/resources/spellcheck/stopwords.txt | 5 +++-- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/apps/salesforce/restapi/custom/api.pm b/src/apps/salesforce/restapi/custom/api.pm index bdf40e0f5a..f423f85008 100644 --- a/src/apps/salesforce/restapi/custom/api.pm +++ b/src/apps/salesforce/restapi/custom/api.pm @@ -112,7 +112,7 @@ sub request_api { $self->{output}->option_exit(); } if ($self->{http}->get_code() != 200) { - $self->{output}->add_option_msg(short_msg => "Connection issue: " . $decoded->{message}); + $self->{output}->add_option_msg(short_msg => "Connection issue: " . defined($decoded->{message}) ? $decoded->{message} : ''); $self->{output}->option_exit(); } @@ -125,11 +125,11 @@ __END__ =head1 NAME -SFDC API boilerplate +Monitor SFDC API boilerplate =head1 SYNOPSIS -Get informations from SFDC API +Get information from SFDC API =head1 REST API OPTIONS @@ -137,15 +137,15 @@ Get informations from SFDC API =item B<--hostname> -Set hostname to query (default: 'api.status.salesforce.com') +Define the hostname to query (default: C) =item B<--timeout> -Set HTTP timeout in seconds (default: '10'). +Define the HTTP timeout in seconds (default: '10'). =item B<--api-version> -API version (default: 'v1'). +Define the API version (default: 'v1'). =back diff --git a/src/hardware/server/sun/mgmt_cards/mode/showfaults.pm b/src/hardware/server/sun/mgmt_cards/mode/showfaults.pm index c34656f399..d9012c853a 100644 --- a/src/hardware/server/sun/mgmt_cards/mode/showfaults.pm +++ b/src/hardware/server/sun/mgmt_cards/mode/showfaults.pm @@ -64,8 +64,8 @@ sub check_options { command => $self->{option_results}->{command_plink} ); - $self->{option_results}->{command} = 'plink' - if (!defined($self->{option_results}->{command}) || $self->{option_results}->{command} eq ''); + $self->{option_results}->{command_plink} = 'plink' + if (!defined($self->{option_results}->{command_plink}) || $self->{option_results}->{command_plink} eq ''); } sub run { @@ -132,25 +132,25 @@ __END__ =head1 MODE -Check Sun 'T1xxx', 'T2xxx' Hardware (through ALOM4v). +Check Sun C, C management cards hardware (using C). =over 8 =item B<--hostname> -Hostname to query. +Define the hostname to query. =item B<--username> -ssh username. +Define the ssh username. =item B<--password> -ssh password. +Define the ssh password. =item B<--command-plink> -Plink command (default: plink). Use to set a path. +Define the C command (default: C). =item B<--timeout> diff --git a/src/hardware/server/sun/mgmt_cards/mode/showfaulty.pm b/src/hardware/server/sun/mgmt_cards/mode/showfaulty.pm index 40f7faf683..e30b95b692 100644 --- a/src/hardware/server/sun/mgmt_cards/mode/showfaulty.pm +++ b/src/hardware/server/sun/mgmt_cards/mode/showfaulty.pm @@ -71,8 +71,8 @@ sub check_options { command => $self->{option_results}->{command_plink} ); - $self->{option_results}->{command} = 'plink' - if (!defined($self->{option_results}->{command}) || $self->{option_results}->{command} eq ''); + $self->{option_results}->{command_plink} = 'plink' + if (!defined($self->{option_results}->{command_plink}) || $self->{option_results}->{command_plink} eq ''); } sub run { @@ -185,29 +185,29 @@ __END__ =head1 MODE -Check Sun 'T3-x', 'T4-x' and 'T5xxx' Hardware (through ILOM). +Check Sun C, C and C management cards hardware (using C). =over 8 =item B<--hostname> -Hostname to query. +Define the hostname to query. =item B<--username> -ssh username. +Define the ssh username. =item B<--password> -ssh password. +Define the ssh password. -=item B<--memory> +=item B<--command-plink> -Returns new errors (retention file is used by the following option). +Define the C command (default: C). -=item B<--command-plink> +=item B<--memory> -Plink command (default: plink). Use to set a path. +Returns new errors (retention file is used by the following option). =item B<--timeout> diff --git a/tests/resources/spellcheck/stopwords.txt b/tests/resources/spellcheck/stopwords.txt index fa29d91d34..08e968088b 100644 --- a/tests/resources/spellcheck/stopwords.txt +++ b/tests/resources/spellcheck/stopwords.txt @@ -49,11 +49,11 @@ hashicorpvault HPE Huawei ifAlias -includeAllDisks ifDesc ifName IMEI in-bcast +includeAllDisks in-crc in-fcserror in-mcast @@ -128,6 +128,7 @@ RRDCached Sansymphony SAS scenarii +SFDC sfp.temperature SkyHigh SNMP @@ -144,8 +145,8 @@ Teldat timeframe TiMOS tmnxSasAlarmInputDescription -total-oper-up total-oper-down +total-oper-up TrendMicro tsdb-version UCD