Move the hypervisor endpoints into a namespace
The /redfish/v1/systems/hypervisor endpoints seem to have copy/pasted a
lot of code from ethernet.hpp, including all the function naming. This
is causing naming conflicts as part of removing the Node class. For the
moment, just put these methods into the redfish::hypervisor namespace,
along with a comment, so we can at least get code that builds. At some
point in the future we can deduplicate the duplicated code, and give the
unique things unique method names so we don't have collisions and this
can be undone.
Tested:
Ran redfish service validator on 42a9e0ee96ef1928732ffd8d567ad656a4f41887
No change in behavior, one failure on Manager UUID that appears
unrelated.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I0d715ed3bf04a86a93eb7842804319568083f86d
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
index e755c81..6dff5fd 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -198,7 +198,7 @@
requestRoutesEventDestination(app);
requestRoutesSubmitTestEvent(app);
- requestRoutesHypervisorSystems(app);
+ hypervisor::requestRoutesHypervisorSystems(app);
requestRoutesTelemetryService(app);
requestRoutesMetricReportDefinitionCollection(app);
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index 4c85b62..db6c0c2 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -12,7 +12,12 @@
#include <utility>
#include <variant>
-namespace redfish
+// TODO(ed) requestRoutesHypervisorSystems seems to have copy-pasted a
+// lot of code, and has a number of methods that have name conflicts with the
+// normal ethernet internfaces in ethernet.hpp. For the moment, we'll put
+// hypervisor in a namespace to isolate it, but these methods eventually need
+// deduplicated
+namespace redfish::hypervisor
{
/**
@@ -1103,4 +1108,4 @@
std::variant<std::string>{std::move(command)});
});
}
-} // namespace redfish
+} // namespace redfish::hypervisor