sdbus++: use non-deprecated namespaces

The sdbusplus repository has deprecated some namespaces and they are
currently only enabled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE
guard.  Switch to the new namespace names.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9f67e74a02616d8ea2241c18758308f2b669672d
diff --git a/bmc_state_manager.cpp b/bmc_state_manager.cpp
index e418879..5071d89 100644
--- a/bmc_state_manager.cpp
+++ b/bmc_state_manager.cpp
@@ -25,7 +25,7 @@
 PHOSPHOR_LOG2_USING;
 
 // When you see server:: you know we're referencing our base class
-namespace server = sdbusplus::xyz::openbmc_project::State::server;
+namespace server = sdbusplus::server::xyz::openbmc_project::state;
 
 using namespace phosphor::logging;
 using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
@@ -310,7 +310,7 @@
         const std::string errorMsg = "xyz.openbmc_project.State.PinholeReset";
         phosphor::state::manager::utils::createError(
             this->bus, errorMsg,
-            sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level::
+            sdbusplus::server::xyz::openbmc_project::logging::Entry::Level::
                 Notice);
         return;
     }
diff --git a/bmc_state_manager.hpp b/bmc_state_manager.hpp
index a52d184..e832451 100644
--- a/bmc_state_manager.hpp
+++ b/bmc_state_manager.hpp
@@ -15,7 +15,7 @@
 {
 
 using BMCInherit = sdbusplus::server::object_t<
-    sdbusplus::xyz::openbmc_project::State::server::BMC>;
+    sdbusplus::server::xyz::openbmc_project::state::BMC>;
 namespace sdbusRule = sdbusplus::bus::match::rules;
 
 /** @class BMC
diff --git a/chassis_check_power_status.cpp b/chassis_check_power_status.cpp
index 1045369..c26951a 100644
--- a/chassis_check_power_status.cpp
+++ b/chassis_check_power_status.cpp
@@ -58,7 +58,7 @@
             "xyz.openbmc_project.State.ChassisPowerBad";
         phosphor::state::manager::utils::createError(
             bus, errorMsg,
-            sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level::
+            sdbusplus::server::xyz::openbmc_project::logging::Entry::Level::
                 Critical);
         return -1;
     }
diff --git a/chassis_state_manager.cpp b/chassis_state_manager.cpp
index aa5d178..3818210 100644
--- a/chassis_state_manager.cpp
+++ b/chassis_state_manager.cpp
@@ -32,9 +32,9 @@
 PHOSPHOR_LOG2_USING;
 
 // When you see server:: you know we're referencing our base class
-namespace server = sdbusplus::xyz::openbmc_project::State::server;
+namespace server = sdbusplus::server::xyz::openbmc_project::state;
 namespace decoratorServer =
-    sdbusplus::xyz::openbmc_project::State::Decorator::server;
+    sdbusplus::server::xyz::openbmc_project::state::decorator;
 
 using namespace phosphor::logging;
 using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
diff --git a/chassis_state_manager.hpp b/chassis_state_manager.hpp
index 6edaa7d..3f44c1e 100644
--- a/chassis_state_manager.hpp
+++ b/chassis_state_manager.hpp
@@ -23,8 +23,8 @@
 {
 
 using ChassisInherit = sdbusplus::server::object_t<
-    sdbusplus::xyz::openbmc_project::State::server::Chassis,
-    sdbusplus::xyz::openbmc_project::State::server::PowerOnHours>;
+    sdbusplus::server::xyz::openbmc_project::state::Chassis,
+    sdbusplus::server::xyz::openbmc_project::state::PowerOnHours>;
 namespace sdbusRule = sdbusplus::bus::match::rules;
 namespace fs = std::filesystem;
 
diff --git a/discover_system_state.cpp b/discover_system_state.cpp
index baa8ff2..789e876 100644
--- a/discover_system_state.cpp
+++ b/discover_system_state.cpp
@@ -33,7 +33,7 @@
 
 using namespace phosphor::logging;
 using namespace sdbusplus::xyz::openbmc_project::Common::Error;
-using namespace sdbusplus::xyz::openbmc_project::Control::Power::server;
+using namespace sdbusplus::server::xyz::openbmc_project::control::power;
 
 } // namespace manager
 } // namespace state
@@ -71,7 +71,7 @@
     HostObjects settings(bus, hostId);
 
     using namespace phosphor::state::manager;
-    namespace server = sdbusplus::xyz::openbmc_project::State::server;
+    namespace server = sdbusplus::server::xyz::openbmc_project::state;
 
     // This application is only run if chassis power is off
 
diff --git a/host_check.cpp b/host_check.cpp
index ced4ba3..ec0f3f4 100644
--- a/host_check.cpp
+++ b/host_check.cpp
@@ -28,7 +28,7 @@
 PHOSPHOR_LOG2_USING;
 
 using namespace std::literals;
-using namespace sdbusplus::xyz::openbmc_project::Condition::server;
+using namespace sdbusplus::server::xyz::openbmc_project::condition;
 
 // Required strings for sending the msg to check on host
 constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper";
@@ -137,7 +137,7 @@
     try
     {
         using PowerState =
-            sdbusplus::xyz::openbmc_project::State::server::Chassis::PowerState;
+            sdbusplus::server::xyz::openbmc_project::state::Chassis::PowerState;
         auto method = bus.new_method_call(svcname.c_str(), objpath.c_str(),
                                           PROPERTY_INTERFACE, "Get");
         method.append(CHASSIS_STATE_INTF, CHASSIS_STATE_POWER_PROP);
diff --git a/host_condition_gpio/host_condition.hpp b/host_condition_gpio/host_condition.hpp
index 35d8313..4a8e200 100644
--- a/host_condition_gpio/host_condition.hpp
+++ b/host_condition_gpio/host_condition.hpp
@@ -12,7 +12,7 @@
 {
 
 using HostIntf = sdbusplus::server::object_t<
-    sdbusplus::xyz::openbmc_project::Condition::server::HostFirmware>;
+    sdbusplus::server::xyz::openbmc_project::condition::HostFirmware>;
 
 class Host : public HostIntf
 {
diff --git a/host_reset_recovery.cpp b/host_reset_recovery.cpp
index fe94f72..9579f30 100644
--- a/host_reset_recovery.cpp
+++ b/host_reset_recovery.cpp
@@ -88,11 +88,10 @@
             "xyz.openbmc_project.State.Error.HostNotRunning";
         auto method = bus.new_method_call(LOGGING_SVC, LOGGING_PATH,
                                           LOGGING_CREATE_INTF, "Create");
-        auto level =
-            sdbusplus::xyz::openbmc_project::Logging::server::convertForMessage(
-                sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level::
-                    Error);
-        method.append(errorMessage, level, additionalData);
+        method.append(errorMessage,
+                      sdbusplus::server::xyz::openbmc_project::logging::Entry::
+                          Level::Error,
+                      additionalData);
         auto resp = bus.call(method);
     }
     catch (const sdbusplus::exception_t& e)
diff --git a/host_state_manager.cpp b/host_state_manager.cpp
index 8890b56..dd631dc 100644
--- a/host_state_manager.cpp
+++ b/host_state_manager.cpp
@@ -41,11 +41,11 @@
 PHOSPHOR_LOG2_USING;
 
 // When you see server:: or reboot:: you know we're referencing our base class
-namespace server = sdbusplus::xyz::openbmc_project::State::server;
-namespace reboot = sdbusplus::xyz::openbmc_project::Control::Boot::server;
-namespace bootprogress = sdbusplus::xyz::openbmc_project::State::Boot::server;
+namespace server = sdbusplus::server::xyz::openbmc_project::state;
+namespace reboot = sdbusplus::server::xyz::openbmc_project::control::boot;
+namespace bootprogress = sdbusplus::server::xyz::openbmc_project::state::boot;
 namespace osstatus =
-    sdbusplus::xyz::openbmc_project::State::OperatingSystem::server;
+    sdbusplus::server::xyz::openbmc_project::state::operating_system;
 using namespace phosphor::logging;
 namespace fs = std::filesystem;
 using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
diff --git a/host_state_manager.hpp b/host_state_manager.hpp
index fc80da8..c8fb24f 100644
--- a/host_state_manager.hpp
+++ b/host_state_manager.hpp
@@ -25,10 +25,10 @@
 {
 
 using HostInherit = sdbusplus::server::object_t<
-    sdbusplus::xyz::openbmc_project::State::server::Host,
-    sdbusplus::xyz::openbmc_project::State::Boot::server::Progress,
-    sdbusplus::xyz::openbmc_project::Control::Boot::server::RebootAttempts,
-    sdbusplus::xyz::openbmc_project::State::OperatingSystem::server::Status>;
+    sdbusplus::server::xyz::openbmc_project::state::Host,
+    sdbusplus::server::xyz::openbmc_project::state::boot::Progress,
+    sdbusplus::server::xyz::openbmc_project::control::boot::RebootAttempts,
+    sdbusplus::server::xyz::openbmc_project::state::operating_system::Status>;
 
 PHOSPHOR_LOG2_USING;
 
@@ -79,7 +79,7 @@
         determineInitialState();
 
         // Sets auto-reboot attempts to max-allowed
-        attemptsLeft(sdbusplus::xyz::openbmc_project::Control::Boot::server::
+        attemptsLeft(sdbusplus::server::xyz::openbmc_project::control::boot::
                          RebootAttempts::retryAttempts());
 
         // We deferred this until we could get our property correct
@@ -111,16 +111,16 @@
      */
     uint32_t retryAttempts(uint32_t value) override
     {
-        if (sdbusplus::xyz::openbmc_project::Control::Boot::server::
+        if (sdbusplus::server::xyz::openbmc_project::control::boot::
                 RebootAttempts::attemptsLeft() != value)
         {
             info("Automatic reboot retry attempts set to: {VALUE} ", "VALUE",
                  value);
-            sdbusplus::xyz::openbmc_project::Control::Boot::server::
+            sdbusplus::server::xyz::openbmc_project::control::boot::
                 RebootAttempts::attemptsLeft(value);
         }
 
-        return (sdbusplus::xyz::openbmc_project::Control::Boot::server::
+        return (sdbusplus::server::xyz::openbmc_project::control::boot::
                     RebootAttempts::retryAttempts(value));
     }
 
@@ -147,7 +147,7 @@
         auto retryAttempts = sdbusplus::xyz::openbmc_project::Control::Boot::
             server::RebootAttempts::retryAttempts();
         return (
-            sdbusplus::xyz::openbmc_project::Control::Boot::server::
+            sdbusplus::server::xyz::openbmc_project::control::boot::
                 RebootAttempts::attemptsLeft(std::min(value, retryAttempts)));
     }
 
@@ -241,7 +241,7 @@
     {
         // version is not used currently
         (void)(version);
-        archive(sdbusplus::xyz::openbmc_project::Control::Boot::server::
+        archive(sdbusplus::server::xyz::openbmc_project::control::boot::
                     RebootAttempts::retryAttempts(),
                 convertForMessage(sdbusplus::xyz::openbmc_project::State::
                                       server::Host::requestedHostTransition()),
@@ -280,14 +280,14 @@
         auto reqTran = Host::convertTransitionFromString(reqTranState);
         // When restoring, set the requested state with persistent value
         // but don't call the override which would execute it
-        sdbusplus::xyz::openbmc_project::State::server::Host::
+        sdbusplus::server::xyz::openbmc_project::state::Host::
             requestedHostTransition(reqTran);
-        sdbusplus::xyz::openbmc_project::State::Boot::server::Progress::
+        sdbusplus::server::xyz::openbmc_project::state::boot::Progress::
             bootProgress(Host::convertProgressStagesFromString(bootProgress));
-        sdbusplus::xyz::openbmc_project::State::OperatingSystem::server::
+        sdbusplus::server::xyz::openbmc_project::state::operating_system::
             Status::operatingSystemState(
                 Host::convertOSStatusFromString(osState));
-        sdbusplus::xyz::openbmc_project::Control::Boot::server::RebootAttempts::
+        sdbusplus::server::xyz::openbmc_project::control::boot::RebootAttempts::
             retryAttempts(retryAttempts);
     }
 
diff --git a/hypervisor_state_manager.cpp b/hypervisor_state_manager.cpp
index dbad524..c0a9752 100644
--- a/hypervisor_state_manager.cpp
+++ b/hypervisor_state_manager.cpp
@@ -22,7 +22,7 @@
 PHOSPHOR_LOG2_USING;
 
 // When you see server:: you know we're referencing our base class
-namespace server = sdbusplus::xyz::openbmc_project::State::server;
+namespace server = sdbusplus::server::xyz::openbmc_project::state;
 using namespace phosphor::logging;
 
 server::Host::Transition Hypervisor::requestedHostTransition(Transition value)
diff --git a/hypervisor_state_manager.hpp b/hypervisor_state_manager.hpp
index b1552d3..bfffc59 100644
--- a/hypervisor_state_manager.hpp
+++ b/hypervisor_state_manager.hpp
@@ -15,9 +15,9 @@
 {
 
 using HypervisorInherit = sdbusplus::server::object_t<
-    sdbusplus::xyz::openbmc_project::State::server::Host>;
+    sdbusplus::server::xyz::openbmc_project::state::Host>;
 
-namespace server = sdbusplus::xyz::openbmc_project::State::server;
+namespace server = sdbusplus::server::xyz::openbmc_project::state;
 namespace sdbusRule = sdbusplus::bus::match::rules;
 
 /** @class Host
diff --git a/scheduled_host_transition.cpp b/scheduled_host_transition.cpp
index f7c04a0..e2361d9 100644
--- a/scheduled_host_transition.cpp
+++ b/scheduled_host_transition.cpp
@@ -39,8 +39,8 @@
 using InvalidTimeError =
     sdbusplus::xyz::openbmc_project::ScheduledTime::Error::InvalidTime;
 using HostTransition =
-    sdbusplus::xyz::openbmc_project::State::server::ScheduledHostTransition;
-using HostState = sdbusplus::xyz::openbmc_project::State::server::Host;
+    sdbusplus::server::xyz::openbmc_project::state::ScheduledHostTransition;
+using HostState = sdbusplus::server::xyz::openbmc_project::state::Host;
 
 constexpr auto PROPERTY_TRANSITION = "RequestedHostTransition";
 constexpr auto PROPERTY_RESTART_CAUSE = "RestartCause";
diff --git a/scheduled_host_transition.hpp b/scheduled_host_transition.hpp
index dbf38f7..9b7c53f 100644
--- a/scheduled_host_transition.hpp
+++ b/scheduled_host_transition.hpp
@@ -18,9 +18,9 @@
 {
 
 using Transition =
-    sdbusplus::xyz::openbmc_project::State::server::Host::Transition;
+    sdbusplus::server::xyz::openbmc_project::state::Host::Transition;
 using ScheduledHostTransitionInherit = sdbusplus::server::object_t<
-    sdbusplus::xyz::openbmc_project::State::server::ScheduledHostTransition>;
+    sdbusplus::server::xyz::openbmc_project::state::ScheduledHostTransition>;
 
 /** @class ScheduledHostTransition
  *  @brief Scheduled host transition implementation.
diff --git a/secure_boot_check.cpp b/secure_boot_check.cpp
index b9ad361..c5f6dd8 100644
--- a/secure_boot_check.cpp
+++ b/secure_boot_check.cpp
@@ -54,7 +54,7 @@
         auto bus = sdbusplus::bus::new_default();
         phosphor::state::manager::utils::createError(
             bus, "xyz.openbmc_project.State.Error.TpmMeasurementFail",
-            sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level::
+            sdbusplus::server::xyz::openbmc_project::logging::Entry::Level::
                 Error,
             additionalData);
     }
@@ -182,7 +182,7 @@
             auto bus = sdbusplus::bus::new_default();
             phosphor::state::manager::utils::createError(
                 bus, "xyz.openbmc_project.State.Error.SecurityCheckFail",
-                sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level::
+                sdbusplus::server::xyz::openbmc_project::logging::Entry::Level::
                     Warning,
                 additionalData);
         }
diff --git a/test/hypervisor_state.cpp b/test/hypervisor_state.cpp
index b423f2e..a3ac540 100644
--- a/test/hypervisor_state.cpp
+++ b/test/hypervisor_state.cpp
@@ -6,7 +6,7 @@
 
 #include <gtest/gtest.h>
 
-namespace server = sdbusplus::xyz::openbmc_project::State::server;
+namespace server = sdbusplus::server::xyz::openbmc_project::state;
 
 TEST(updateCurrentHostState, BasicPaths)
 {
diff --git a/test/test_scheduled_host_transition.cpp b/test/test_scheduled_host_transition.cpp
index 76b625a..74d43aa 100644
--- a/test/test_scheduled_host_transition.cpp
+++ b/test/test_scheduled_host_transition.cpp
@@ -19,7 +19,7 @@
 using InvalidTimeError =
     sdbusplus::xyz::openbmc_project::ScheduledTime::Error::InvalidTime;
 using HostTransition =
-    sdbusplus::xyz::openbmc_project::State::server::ScheduledHostTransition;
+    sdbusplus::server::xyz::openbmc_project::state::ScheduledHostTransition;
 
 class TestScheduledHostTransition : public testing::Test
 {
diff --git a/utils.cpp b/utils.cpp
index 5af63c0..cad8ffd 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -166,7 +166,7 @@
 
 void createError(
     sdbusplus::bus_t& bus, const std::string& errorMsg,
-    sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level errLevel,
+    sdbusplus::server::xyz::openbmc_project::logging::Entry::Level errLevel,
     std::map<std::string, std::string> additionalData)
 {
     try
diff --git a/utils.hpp b/utils.hpp
index dd229d6..fa65c31 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -73,7 +73,7 @@
  */
 void createError(
     sdbusplus::bus_t& bus, const std::string& errorMsg,
-    sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level errLevel,
+    sdbusplus::server::xyz::openbmc_project::logging::Entry::Level errLevel,
     std::map<std::string, std::string> additionalData = {});
 
 /** @brief Call phosphor-dump-manager to create BMC user dump