Enabling Ethernet Interfaces, and Ethernet Interfaces Collection Schemas
Commit provides Schemas for:
* Single Eth Interface (GET)
* Eth Interface Collection (GET)
Both are using EthernetProvider, which delivers data
available from xyz.openbmc_project.Network
It was tested:
* Regression (no regression in web server behaviour)
* Memory Leaks (no leaks detected via valgrind)
* Compiling multiple arch (x86, ASPEED)
* Service Validator pass all available schemas
Change-Id: Idee321cb294f48b59f7740512bbe416cf10236c0
Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/redfish-core/include/node.hpp b/redfish-core/include/node.hpp
index 0a1564a..b41439a 100644
--- a/redfish-core/include/node.hpp
+++ b/redfish-core/include/node.hpp
@@ -69,7 +69,7 @@
const std::string* route = node->getUrl();
if (route == nullptr) {
CROW_LOG_CRITICAL << "Unable to get url for route";
- return;
+ continue;
}
if (boost::starts_with(*route, *url)) {
std::string subRoute = route->substr(url->size());
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
index 897e27e..9a49738 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -21,6 +21,7 @@
#include "../lib/redfish_sessions.hpp"
#include "../lib/roles.hpp"
#include "../lib/service_root.hpp"
+#include "../lib/ethernet.hpp"
#include "../lib/chassis.hpp"
#include "webserver_common.hpp"
@@ -45,6 +46,8 @@
nodes.emplace_back(std::make_unique<ServiceRoot>(app));
nodes.emplace_back(std::make_unique<NetworkProtocol>(app));
nodes.emplace_back(std::make_unique<SessionService>(app));
+ nodes.emplace_back(std::make_unique<EthernetCollection>(app));
+ nodes.emplace_back(std::make_unique<EthernetInterface>(app));
nodes.emplace_back(std::make_unique<ManagerCollection>(app));
nodes.emplace_back(std::make_unique<ChassisCollection>(app));
nodes.emplace_back(std::make_unique<Chassis>(app));