move variant to std namespace

sdbusplus::message::variant_ns has been std for a while now. This moves
ipmid away from sdbusplus::message::variant_ns to directly use
std::variant.

Tested-by: built, compiles, and runs the same as before.

Change-Id: I8caa945f31c926c2721319f001b9d7f83fd3f1b7
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp
index 3fb19b2..6be7d9a 100644
--- a/user_channel/channel_mgmt.cpp
+++ b/user_channel/channel_mgmt.cpp
@@ -34,7 +34,6 @@
 namespace ipmi
 {
 
-namespace variant_ns = sdbusplus::message::variant_ns;
 using namespace phosphor::logging;
 
 static constexpr const char* channelAccessDefaultFilename =
@@ -204,7 +203,7 @@
         if (prop.first == privilegePropertyString)
         {
             propName = privilegePropertyString;
-            intfPrivStr = variant_ns::get<std::string>(prop.second);
+            intfPrivStr = std::get<std::string>(prop.second);
             break;
         }
     }
@@ -1309,9 +1308,9 @@
                                             channelData[chNum].chName.c_str()));
                     continue;
                 }
-                intfPrivStr = variant_ns::get<std::string>(variant);
+                intfPrivStr = std::get<std::string>(variant);
             }
-            catch (const variant_ns::bad_variant_access& e)
+            catch (const std::bad_variant_access& e)
             {
                 log<level::DEBUG>(
                     "exception: Network interface does not exist");
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index f0cd7ad..6f4a79f 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -103,8 +103,6 @@
     "priv-custom"    // PRIVILEGE_OEM - 5
 };
 
-namespace variant_ns = sdbusplus::message::variant_ns;
-
 using namespace phosphor::logging;
 using Json = nlohmann::json;
 
@@ -376,17 +374,17 @@
             std::string member = prop.first;
             if (member == userPrivProperty)
             {
-                priv = variant_ns::get<std::string>(prop.second);
+                priv = std::get<std::string>(prop.second);
                 userEvent = UserUpdateEvent::userPrivUpdated;
             }
             else if (member == userGrpProperty)
             {
-                groups = variant_ns::get<std::vector<std::string>>(prop.second);
+                groups = std::get<std::vector<std::string>>(prop.second);
                 userEvent = UserUpdateEvent::userGrpUpdated;
             }
             else if (member == userEnabledProperty)
             {
-                enabled = variant_ns::get<bool>(prop.second);
+                enabled = std::get<bool>(prop.second);
                 userEvent = UserUpdateEvent::userStateUpdated;
             }
             // Process based on event type.
@@ -1252,13 +1250,11 @@
         auto key = t.first;
         if (key == allPrivProperty)
         {
-            availablePrivileges =
-                variant_ns::get<std::vector<std::string>>(t.second);
+            availablePrivileges = std::get<std::vector<std::string>>(t.second);
         }
         else if (key == allGrpProperty)
         {
-            availableGroups =
-                variant_ns::get<std::vector<std::string>>(t.second);
+            availableGroups = std::get<std::vector<std::string>>(t.second);
         }
     }
     // TODO: Implement Supported Privilege & Groups verification logic
@@ -1285,15 +1281,15 @@
         std::string key = t.first;
         if (key == userPrivProperty)
         {
-            usrPriv = variant_ns::get<std::string>(t.second);
+            usrPriv = std::get<std::string>(t.second);
         }
         else if (key == userGrpProperty)
         {
-            usrGrps = variant_ns::get<std::vector<std::string>>(t.second);
+            usrGrps = std::get<std::vector<std::string>>(t.second);
         }
         else if (key == userEnabledProperty)
         {
-            usrEnabled = variant_ns::get<bool>(t.second);
+            usrEnabled = std::get<bool>(t.second);
         }
     }
     return;