Refactor D-Bus object
- The intent behind this commit is to refactor D-Bus, and abstract
the bus, getService, getProperty and other methods into the utils
file, and other file operations D-Bus only need to include
uitls.hpp.
- We can also continue to add other general methods such as
setPropery, getSubTree in the utils file in the future.
- Also, removed redundant files(occ_finder.hpp and occ_finder.cpp).
Tested: built openpower-occ-control successfully and worked.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I53e61e30a76173c154a9f47fc122936468abbc4b
diff --git a/test/error_files_tests.cpp b/test/error_files_tests.cpp
index 532818a..c412e63 100644
--- a/test/error_files_tests.cpp
+++ b/test/error_files_tests.cpp
@@ -24,9 +24,8 @@
{
public:
ErrorFiles() :
- bus(sdbusplus::bus::new_default()), rc(sd_event_default(&event)),
- pEvent(event), manager(bus, pEvent),
- status(bus, pEvent, "/dummy1", manager)
+ rc(sd_event_default(&event)), pEvent(event), manager(pEvent),
+ status(pEvent, "/dummy1", manager)
{
EXPECT_GE(rc, 0);
event = nullptr;
@@ -73,7 +72,6 @@
fs::remove_all(occPath);
}
- sdbusplus::bus::bus bus;
sd_event* event;
int rc;
open_power::occ::EventPtr pEvent;