Lines Matching defs:prefix
201 std::string_view prefix)
223 BMCWEB_LOG_DEBUG("Skipping JsonSchemas URI prefix fixing");
236 // Add prefix to segment after the collection
249 // to return so we don't apply a prefix to top level collections such
259 std::string collectionItem(prefix);
283 inline void addPrefixToItem(nlohmann::json& item, std::string_view prefix)
294 addPrefixToStringItem(*strValue, prefix);
300 std::string_view prefix)
316 addPrefixToStringItem(location, prefix);
329 std::string_view prefix)
353 addPrefixToStringItem(header, prefix);
359 // Search the json for all URIs and add the supplied prefix if the URI is for
361 inline void addPrefixes(nlohmann::json& json, std::string_view prefix)
371 addPrefixToItem(item.second, prefix);
379 addPrefixToHeadersInResp(item.second, prefix);
384 addPrefixes(item.second, prefix);
393 addPrefixes(item, prefix);
482 std::string prefix;
542 prefix = *propVal;
543 BMCWEB_LOG_DEBUG("Using Name property {} as prefix",
544 prefix);
558 BMCWEB_LOG_ERROR("Satellite config {} missing Host", prefix);
564 BMCWEB_LOG_ERROR("Satellite config {} missing Port", prefix);
570 BMCWEB_LOG_ERROR("Satellite config {} missing AuthType", prefix);
575 auto result = satelliteInfo.insert_or_assign(prefix, std::move(url));
585 BMCWEB_LOG_DEBUG("{}{} at {}://{}", resultString, prefix,
670 // Determine if the resource ID begins with a known prefix
677 BMCWEB_LOG_DEBUG("\"{}\" is a known prefix", satellite.first);
679 // Remove the known prefix from the request's URI and
687 // We didn't recognize the prefix and need to return a 404
770 // must contain an aggregation prefix
784 // prefix.
788 const std::string& prefix,
791 const auto& sat = satelliteInfo.find(prefix);
795 // earlier check to make sure the prefix exists
796 BMCWEB_LOG_ERROR("Unrecognized satellite prefix \"{}\"", prefix);
800 // We need to strip the prefix from the request's path
803 size_t pos = path.find(prefix + "_");
807 BMCWEB_LOG_ERROR("Error removing prefix \"{}_\" from request URI",
808 prefix);
812 path.erase(pos, prefix.size() + 1);
815 std::bind_front(processResponse, prefix, asyncResp);
827 prepareAggregationHeaders(thisReq.fields(), prefix);
919 const std::string& prefix) const
926 // Add authentication if credentials exist for this prefix
927 auto it = aggregationSources.find(prefix);
955 for (const auto& [prefix, source] : aggregationSources)
957 satelliteInfo.emplace(prefix, source.url);
998 std::string_view prefix,
1011 // We want to attempt prefix fixing regardless of response code
1027 addPrefixes(jsonVal, prefix);
1029 BMCWEB_LOG_DEBUG("Added prefix to parsed satellite response");
1042 addAggregatedHeaders(asyncResp->res, resp, prefix);
1048 const std::string& prefix,
1064 prefix);
1094 // Now we need to add the prefix to the URIs contained in the
1096 addPrefixes(jsonVal, prefix);
1098 BMCWEB_LOG_DEBUG("Added prefix to parsed satellite response");
1139 prefix);
1164 prefix);
1180 const std::string& prefix,
1196 prefix);
1264 *strValue, prefix);
1309 prefix);
1367 // might contain an aggregation prefix
1372 // Extract the prefix from the request's URI, retrieve the
1389 // We didn't recognize the prefix or it's a collection with a
1420 // Check if the given URL segment matches with any satellite prefix
1421 // Assumes the given segment starts with <prefix>_
1436 return false; // No underscore, can't be a satellite prefix
1439 // Extract the prefix
1440 std::string prefix = urlSegment.substr(0, underscorePos);
1442 // Check if this prefix exists
1443 return aggregationSources.contains(prefix);