summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2021-06-04 00:55:44 +0300
committerEd Tanous <ed@tanous.net>2021-06-09 20:15:10 +0300
commitb8983957a045878b0776411990be9059ed7f74c0 (patch)
treeec300784f358444816dbd5200f9bf5ce58cdb64c /redfish-core
parentfaa34ccff8ab4f2f6d8b848a9a229efe09e5fca2 (diff)
downloadbmcweb-b8983957a045878b0776411990be9059ed7f74c0.tar.xz
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
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/include/redfish.hpp2
-rw-r--r--redfish-core/lib/hypervisor_system.hpp9
2 files changed, 8 insertions, 3 deletions
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
index e755c8143b..6dff5fddbe 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -198,7 +198,7 @@ class RedfishService
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 4c85b62a5b..db6c0c2d7a 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 @@ inline void requestRoutesHypervisorSystems(App& app)
std::variant<std::string>{std::move(command)});
});
}
-} // namespace redfish
+} // namespace redfish::hypervisor