Skip to content

Commit 6ddbf69

Browse files
wltuspinler
authored andcommitted
Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE
Fix the code to support new sdbusplus error without SDBUSPP_REMOVE_DEPRECATED_NAMESPACE. Change-Id: I12713ec1757d3835e1acf07c7abf409ff97615e1 Signed-off-by: Willy Tu <[email protected]>
1 parent 5fb575a commit 6ddbf69

20 files changed

+73
-65
lines changed

callouts/callout_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ int main(int argc, char** argv)
1616
return -1;
1717
}
1818

19-
using namespace example::xyz::openbmc_project::Example::Elog;
19+
using namespace example::xyz::openbmc_project::example::elog;
2020
try
2121
{
2222
elog<TestCallout>(TestCallout::DEV_ADDR(0xDEADEAD),

elog_block.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ namespace logging
1414
{
1515

1616
using BlockIface = sdbusplus::server::object_t<
17-
sdbusplus::xyz::openbmc_project::Logging::server::ErrorBlocksTransition,
18-
sdbusplus::xyz::openbmc_project::Association::server::Definitions>;
17+
sdbusplus::server::xyz::openbmc_project::logging::ErrorBlocksTransition,
18+
sdbusplus::server::xyz::openbmc_project::association::Definitions>;
1919

2020
using AssociationList =
2121
std::vector<std::tuple<std::string, std::string, std::string>>;

elog_entry.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ void Entry::delete_()
2323
bool Entry::resolved(bool value)
2424
{
2525
auto current =
26-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved();
26+
sdbusplus::server::xyz::openbmc_project::logging::Entry::resolved();
2727
if (value != current)
2828
{
2929
value ? associations({}) : associations(assocs);
3030
current =
31-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved(
31+
sdbusplus::server::xyz::openbmc_project::logging::Entry::resolved(
3232
value);
3333

3434
uint64_t ms = std::chrono::duration_cast<std::chrono::milliseconds>(
@@ -45,11 +45,11 @@ bool Entry::resolved(bool value)
4545
std::string Entry::eventId(std::string value)
4646
{
4747
auto current =
48-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::eventId();
48+
sdbusplus::server::xyz::openbmc_project::logging::Entry::eventId();
4949
if (value != current)
5050
{
5151
current =
52-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::eventId(
52+
sdbusplus::server::xyz::openbmc_project::logging::Entry::eventId(
5353
value);
5454
serialize(*this);
5555
}
@@ -60,11 +60,11 @@ std::string Entry::eventId(std::string value)
6060
std::string Entry::resolution(std::string value)
6161
{
6262
auto current =
63-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolution();
63+
sdbusplus::server::xyz::openbmc_project::logging::Entry::resolution();
6464
if (value != current)
6565
{
6666
current =
67-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolution(
67+
sdbusplus::server::xyz::openbmc_project::logging::Entry::resolution(
6868
value);
6969
serialize(*this);
7070
}

elog_entry.hpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ namespace logging
1717
{
1818

1919
using EntryIfaces = sdbusplus::server::object_t<
20-
sdbusplus::xyz::openbmc_project::Logging::server::Entry,
21-
sdbusplus::xyz::openbmc_project::Object::server::Delete,
22-
sdbusplus::xyz::openbmc_project::Association::server::Definitions,
23-
sdbusplus::xyz::openbmc_project::Software::server::Version,
24-
sdbusplus::xyz::openbmc_project::Common::server::FilePath>;
20+
sdbusplus::server::xyz::openbmc_project::logging::Entry,
21+
sdbusplus::server::xyz::openbmc_project::object::Delete,
22+
sdbusplus::server::xyz::openbmc_project::association::Definitions,
23+
sdbusplus::server::xyz::openbmc_project::software::Version,
24+
sdbusplus::server::xyz::openbmc_project::common::FilePath>;
2525

2626
using AssociationList =
2727
std::vector<std::tuple<std::string, std::string, std::string>>;
@@ -79,7 +79,7 @@ class Entry : public EntryIfaces
7979
associations(std::move(objects), true);
8080
// Store a copy of associations in case we need to recreate
8181
assocs = associations();
82-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved(false,
82+
sdbusplus::server::xyz::openbmc_project::logging::Entry::resolved(false,
8383
true);
8484

8585
version(fwVersion, true);
@@ -113,23 +113,23 @@ class Entry : public EntryIfaces
113113
*/
114114
bool resolved(bool value) override;
115115

116-
using sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved;
116+
using sdbusplus::server::xyz::openbmc_project::logging::Entry::resolved;
117117

118118
/** @brief Update eventId string of the error.
119119
* @param[in] value - The eventID
120120
* @returns New property value
121121
*/
122122
std::string eventId(std::string value) override;
123123

124-
using sdbusplus::xyz::openbmc_project::Logging::server::Entry::eventId;
124+
using sdbusplus::server::xyz::openbmc_project::logging::Entry::eventId;
125125

126126
/** @brief Update resolution string of the error.
127127
* @param[in] value - The resolution
128128
* @returns New property value
129129
*/
130130
std::string resolution(std::string value) override;
131131

132-
using sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolution;
132+
using sdbusplus::server::xyz::openbmc_project::logging::Entry::resolution;
133133

134134
/** @brief Delete this d-bus object.
135135
*/

elog_meta.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace associations
1414
#if defined PROCESS_META
1515

1616
template <>
17-
void build<xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH>(
17+
void build<xyz::openbmc_project::common::callout::Device::CALLOUT_DEVICE_PATH>(
1818
const std::string& match, const std::vector<std::string>& data,
1919
AssociationList& list)
2020
{
@@ -40,7 +40,7 @@ void build<xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH>(
4040

4141
template <>
4242
void build<
43-
xyz::openbmc_project::Common::Callout::Inventory::CALLOUT_INVENTORY_PATH>(
43+
xyz::openbmc_project::common::callout::Inventory::CALLOUT_INVENTORY_PATH>(
4444
const std::string& match, const std::vector<std::string>& data,
4545
AssociationList& list)
4646
{

elog_meta.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void build(const std::string& match, const std::vector<std::string>& data,
7979

8080
// Example template specialization - we don't want to do anything
8181
// for this metadata.
82-
using namespace example::xyz::openbmc_project::Example::Elog;
82+
using namespace example::xyz::openbmc_project::example::elog;
8383
template <>
8484
inline void
8585
build<TestErrorTwo::DEV_ID>(const std::string& /*match*/,
@@ -89,7 +89,7 @@ inline void
8989

9090
template <>
9191
inline void
92-
build<example::xyz::openbmc_project::Example::Device::Callout::
92+
build<example::xyz::openbmc_project::example::device::Callout::
9393
CALLOUT_DEVICE_PATH_TEST>(const std::string& match,
9494
const std::vector<std::string>& data,
9595
AssociationList& list)
@@ -122,13 +122,13 @@ inline void
122122
#if defined PROCESS_META
123123

124124
template <>
125-
void build<xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH>(
125+
void build<xyz::openbmc_project::common::callout::Device::CALLOUT_DEVICE_PATH>(
126126
const std::string& match, const std::vector<std::string>& data,
127127
AssociationList& list);
128128

129129
template <>
130130
void build<
131-
xyz::openbmc_project::Common::Callout::Inventory::CALLOUT_INVENTORY_PATH>(
131+
xyz::openbmc_project::common::callout::Inventory::CALLOUT_INVENTORY_PATH>(
132132
const std::string& match, const std::vector<std::string>& data,
133133
AssociationList& list);
134134

elog_serialize.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void save(Archive& a, const Entry& e, const std::uint32_t /*version*/)
4545
template <class Archive>
4646
void load(Archive& a, Entry& e, const std::uint32_t version)
4747
{
48-
using namespace sdbusplus::xyz::openbmc_project::Logging::server;
48+
using namespace sdbusplus::server::xyz::openbmc_project::logging;
4949

5050
uint32_t id{};
5151
Entry::Level severity{};
@@ -92,11 +92,11 @@ void load(Archive& a, Entry& e, const std::uint32_t version)
9292
e.timestamp(timestamp, true);
9393
e.message(message, true);
9494
e.additionalData(additionalData, true);
95-
e.sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved(
95+
e.sdbusplus::server::xyz::openbmc_project::logging::Entry::resolved(
9696
resolved, true);
9797
e.associations(associations, true);
9898
e.version(fwVersion, true);
99-
e.purpose(sdbusplus::xyz::openbmc_project::Software::server::Version::
99+
e.purpose(sdbusplus::server::xyz::openbmc_project::software::Version::
100100
VersionPurpose::BMC,
101101
true);
102102
e.updateTimestamp(updateTimestamp, true);

extensions/openpower-pels/data_interface.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ constexpr auto invPowerSupply =
106106
"xyz.openbmc_project.Inventory.Item.PowerSupply";
107107
} // namespace interface
108108

109-
using namespace sdbusplus::xyz::openbmc_project::State::Boot::server;
110-
using namespace sdbusplus::xyz::openbmc_project::State::server;
109+
using namespace sdbusplus::server::xyz::openbmc_project::state::boot;
110+
using namespace sdbusplus::server::xyz::openbmc_project::state;
111111
namespace match_rules = sdbusplus::bus::match::rules;
112112

113113
const DBusInterfaceList hotplugInterfaces{interface::invFan,

extensions/openpower-pels/manager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace rg = openpower::pels::message;
4646

4747
namespace common_error = sdbusplus::xyz::openbmc_project::Common::Error;
4848

49-
using Create = sdbusplus::xyz::openbmc_project::Logging::server::Create;
49+
using Create = sdbusplus::server::xyz::openbmc_project::logging::Create;
5050

5151
namespace additional_data
5252
{
@@ -632,7 +632,7 @@ std::tuple<uint32_t, uint32_t> Manager::createPELWithFFDCFiles(
632632
std::string message, Entry::Level severity,
633633
std::map<std::string, std::string> additionalData,
634634
std::vector<std::tuple<
635-
sdbusplus::xyz::openbmc_project::Logging::server::Create::FFDCFormat,
635+
sdbusplus::server::xyz::openbmc_project::logging::Create::FFDCFormat,
636636
uint8_t, uint8_t, sdbusplus::message::unix_fd>>
637637
fFDC)
638638
{

extensions/openpower-pels/manager.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ class Manager : public PELInterface
551551
*/
552552
std::map<std::string,
553553
std::unique_ptr<
554-
sdbusplus::org::open_power::Logging::PEL::server::Entry>>
554+
sdbusplus::server::org::open_power::logging::pel::Entry>>
555555
_pelEntries;
556556

557557
/**

extensions/openpower-pels/pel_entry.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ namespace common_error = sdbusplus::xyz::openbmc_project::Common::Error;
1111

1212
bool PELEntry::managementSystemAck(bool value)
1313
{
14-
auto current = sdbusplus::org::open_power::Logging::PEL::server::Entry::
14+
auto current = sdbusplus::server::org::open_power::logging::pel::Entry::
1515
managementSystemAck();
1616
if (value != current)
1717
{
18-
current = sdbusplus::org::open_power::Logging::PEL::server::Entry::
18+
current = sdbusplus::server::org::open_power::logging::pel::Entry::
1919
managementSystemAck(value);
2020

2121
Repository::LogID id{Repository::LogID::Obmc(getMyId())};

extensions/openpower-pels/pel_entry.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace openpower
66
namespace pels
77
{
88

9-
using PELEntryIface = sdbusplus::org::open_power::Logging::PEL::server::Entry;
9+
using PELEntryIface = sdbusplus::server::org::open_power::logging::pel::Entry;
1010
using PropertiesVariant = PELEntryIface::PropertiesVariant;
1111

1212
class PELEntry : public PELEntryIface

extensions/openpower-pels/phal_service_actions.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace phal
1313
{
1414

1515
using EntrySeverity =
16-
sdbusplus::xyz::openbmc_project::HardwareIsolation::server::Entry::Type;
16+
sdbusplus::server::xyz::openbmc_project::hardware_isolation::Entry::Type;
1717

1818
/**
1919
* @brief Helper function to create service actions in the PEL

lib/elog.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace logging
1010
{
1111
namespace details
1212
{
13-
using namespace sdbusplus::xyz::openbmc_project::Logging::server;
13+
using namespace sdbusplus::server::xyz::openbmc_project::logging;
1414

1515
auto _prepareMsg(const char* funcName)
1616
{

lib/include/phosphor-logging/elog.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace phosphor
1313
namespace logging
1414
{
1515

16-
using namespace sdbusplus::xyz::openbmc_project::Logging::server;
16+
using namespace sdbusplus::server::xyz::openbmc_project::logging;
1717

1818
/**
1919
* @brief Structure used by callers to indicate they want to use the last value

log_manager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void Manager::onEntryResolve(sdbusplus::message_t& msg)
335335

336336
void Manager::checkAndQuiesceHost()
337337
{
338-
using Host = sdbusplus::xyz::openbmc_project::State::server::Host;
338+
using Host = sdbusplus::server::xyz::openbmc_project::state::Host;
339339

340340
// First check host state
341341
std::variant<Host::HostState> property;

log_manager.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ namespace logging
2020
extern const std::map<std::string, std::vector<std::string>> g_errMetaMap;
2121
extern const std::map<std::string, level> g_errLevelMap;
2222

23-
using CreateIface = sdbusplus::xyz::openbmc_project::Logging::server::Create;
23+
using CreateIface = sdbusplus::server::xyz::openbmc_project::logging::Create;
2424
using DeleteAllIface =
25-
sdbusplus::xyz::openbmc_project::Collection::server::DeleteAll;
25+
sdbusplus::server::xyz::openbmc_project::collection::DeleteAll;
2626

2727
namespace details
2828
{
2929
template <typename... T>
3030
using ServerObject = typename sdbusplus::server::object_t<T...>;
3131

3232
using ManagerIface =
33-
sdbusplus::xyz::openbmc_project::Logging::Internal::server::Manager;
33+
sdbusplus::server::xyz::openbmc_project::logging::internal::Manager;
3434

3535
} // namespace details
3636

@@ -184,7 +184,7 @@ class Manager : public details::ServerObject<details::ManagerIface>
184184
*/
185185
void create(
186186
const std::string& message,
187-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level severity,
187+
sdbusplus::server::xyz::openbmc_project::logging::Entry::Level severity,
188188
const std::map<std::string, std::string>& additionalData);
189189

190190
/** @brief Creates an event log, and accepts FFDC files
@@ -203,7 +203,7 @@ class Manager : public details::ServerObject<details::ManagerIface>
203203
*/
204204
void createWithFFDC(
205205
const std::string& message,
206-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level severity,
206+
sdbusplus::server::xyz::openbmc_project::logging::Entry::Level severity,
207207
const std::map<std::string, std::string>& additionalData,
208208
const FFDCEntries& ffdc);
209209

@@ -381,7 +381,7 @@ class Manager : public details::ServerObject<DeleteAllIface, CreateIface>
381381
*/
382382
void create(
383383
std::string message,
384-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level severity,
384+
sdbusplus::server::xyz::openbmc_project::logging::Entry::Level severity,
385385
std::map<std::string, std::string> additionalData) override
386386
{
387387
manager.create(message, severity, additionalData);
@@ -399,7 +399,7 @@ class Manager : public details::ServerObject<DeleteAllIface, CreateIface>
399399
*/
400400
void createWithFFDCFiles(
401401
std::string message,
402-
sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level severity,
402+
sdbusplus::server::xyz::openbmc_project::logging::Entry::Level severity,
403403
std::map<std::string, std::string> additionalData,
404404
std::vector<std::tuple<CreateIface::FFDCFormat, uint8_t, uint8_t,
405405
sdbusplus::message::unix_fd>>

0 commit comments

Comments
 (0)