Skip to content
Open
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
30 changes: 19 additions & 11 deletions redfish-core/lib/rde.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,14 @@ inline nlohmann::json handleDeferredBindings(const std::string& bejJsonInput,
bejJson = std::regex_replace(bejJson, std::regex(R"(%I(\d+))"), "$1");
BMCWEB_LOG_DEBUG("RDE: BEJ JSON String Output: {}", bejJson);

return nlohmann::json::parse(bejJson);
nlohmann::json jsonPayload;
if(!bejJson.empty())
{
jsonPayload = nlohmann::json::parse(bejJson);
return jsonPayload;
}
else
return jsonPayload;
}
/**
* @brief Process the TaskUpdated signal for an RDE Operation Task.
Expand Down Expand Up @@ -1232,24 +1239,25 @@ inline void requestRoutesRDEService(crow::App& app)
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& systemId, const std::string& deviceId,
const std::string& vendorPath) {
std::string baseUri = "/redfish/v1/Systems/" + systemId +
"/NetworkAdapters/" + deviceId;
std::string baseUri = "/redfish/v1/Systems/" + systemId +
"/NetworkAdapters/" + deviceId;

handleRDEServicePath(app, req, asyncResp, systemId, deviceId,
vendorPath, redfish::networkSchemaName, baseUri);
});
handleRDEServicePath(app, req, asyncResp, systemId, deviceId,
vendorPath, redfish::networkSchemaName,
baseUri);
});

BMCWEB_ROUTE(app, "/redfish/v1/Systems/<str>/NetworkAdapters/<str>")
.privileges(redfish::privileges::getProcessor)
.methods(boost::beast::http::verb::get)(
[&app](const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& systemId, const std::string& deviceId) {
std::string baseUri = "/redfish/v1/Systems/" + systemId +
"/NetworkAdapters/" + deviceId;
handleRDEServiceRoot(app, req, asyncResp, systemId, deviceId,
redfish::networkSchemaName, baseUri);
});
std::string baseUri = "/redfish/v1/Systems/" + systemId +
"/NetworkAdapters/" + deviceId;
handleRDEServiceRoot(app, req, asyncResp, systemId, deviceId,
redfish::networkSchemaName, baseUri);
});
}

} // namespace redfish