Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

add in search of 'N/A' #700

Merged
merged 1 commit into from
May 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions csmd/src/inv/ib_and_switch/src/inv_ib_connector_access.cc
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ int INV_IB_CONNECTOR_ACCESS::ExecuteDataCollection(std::string rest_address, std
//Is this a serial number?
if(i == 2){
//is it a bad serial_number?
if(line.find("NA") != std::string::npos){
if( line.find("NA") != std::string::npos ||
line.find("N/A") != std::string::npos ){
//override i value, set to extra case 13
i = 13;
}
Expand Down Expand Up @@ -366,7 +367,7 @@ int INV_IB_CONNECTOR_ACCESS::ExecuteDataCollection(std::string rest_address, std
std::cout << "This report from UFM can be found in '" << ufm_ib_cable_output_filename << "' located at '" << csm_inv_log_dir << "'" << std::endl;

if(NA_serials_count > 0){
std::cerr << "WARNING: " << NA_serials_count << " IB cables found with 'NA' serial numbers and have been removed from CSM inventory collection data." << std::endl;
std::cerr << "WARNING: " << NA_serials_count << " IB cables were discovered, but are missing serial numbers and have been removed from CSM inventory collection data." << std::endl;
std::cerr << "These records copied into '" << ib_cable_errors <<"' located at '" << csm_inv_log_dir << "'" << std::endl;
}

Expand Down