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/transporthandler.cpp b/transporthandler.cpp
index 59d933a..d0768ac 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
@@ -36,7 +36,6 @@
 using namespace sdbusplus::xyz::openbmc_project::Common::Error;
 
 namespace fs = std::filesystem;
-namespace variant_ns = sdbusplus::message::variant_ns;
 
 void register_netfn_transport_functions() __attribute__((constructor));
 
@@ -88,7 +87,7 @@
                             ipmi::network::IP_INTERFACE);
 
                         ipaddress =
-                            variant_ns::get<std::string>(properties["Address"]);
+                            std::get<std::string>(properties["Address"]);
                     }
                     // ignore the exception, as it is a valid condition that
                     // the system is not configured with any IP.
@@ -162,7 +161,7 @@
                         bus, ipmi::network::SERVICE, networkInterfacePath,
                         ipmi::network::ETHERNET_INTERFACE, "DHCPEnabled");
 
-                    auto dhcpEnabled = variant_ns::get<bool>(variant);
+                    auto dhcpEnabled = std::get<bool>(variant);
                     // As per IPMI spec 2=>DHCP, 1=STATIC
                     auto ipsrc = dhcpEnabled ? ipmi::network::IPOrigin::DHCP
                                              : ipmi::network::IPOrigin::STATIC;
@@ -192,8 +191,8 @@
                             bus, ipObjectInfo.second, ipObjectInfo.first,
                             ipmi::network::IP_INTERFACE);
 
-                        auto prefix = variant_ns::get<uint8_t>(
-                            properties["PrefixLength"]);
+                        auto prefix =
+                            std::get<uint8_t>(properties["PrefixLength"]);
                         mask = ipmi::network::MASK_32_BIT;
                         mask = htonl(mask << (ipmi::network::BITS_32 - prefix));
                     }
@@ -230,7 +229,7 @@
                             bus, systemObject.second, systemObject.first,
                             ipmi::network::SYSTEMCONFIG_INTERFACE);
 
-                        gateway = variant_ns::get<std::string>(
+                        gateway = std::get<std::string>(
                             systemProperties["DefaultGateway"]);
                     }
                     // ignore the exception, as it is a valid condition that
@@ -263,7 +262,7 @@
                         bus, macObjectInfo.second, macObjectInfo.first,
                         ipmi::network::MAC_INTERFACE, "MACAddress");
 
-                    macAddress = variant_ns::get<std::string>(variant);
+                    macAddress = std::get<std::string>(variant);
                 }
                 else if (channelConf->lan_set_in_progress == SET_IN_PROGRESS)
                 {
@@ -799,7 +798,7 @@
             }
 
             // get the configured mode on the system.
-            auto enableDHCP = variant_ns::get<bool>(ipmi::getDbusProperty(
+            auto enableDHCP = std::get<bool>(ipmi::getDbusProperty(
                 bus, ipmi::network::SERVICE, networkInterfacePath,
                 ipmi::network::ETHERNET_INTERFACE, "DHCPEnabled"));
 
@@ -843,14 +842,13 @@
                         bus, ipObject.second, ipObject.first,
                         ipmi::network::IP_INTERFACE);
 
-                    ipaddress = channelConf->ipaddr.empty()
-                                    ? variant_ns::get<std::string>(
-                                          properties["Address"])
-                                    : channelConf->ipaddr;
+                    ipaddress =
+                        channelConf->ipaddr.empty()
+                            ? std::get<std::string>(properties["Address"])
+                            : channelConf->ipaddr;
 
                     prefix = channelConf->netmask.empty()
-                                 ? variant_ns::get<uint8_t>(
-                                       properties["PrefixLength"])
+                                 ? std::get<uint8_t>(properties["PrefixLength"])
                                  : ipmi::network::toPrefix(
                                        AF_INET, channelConf->netmask);
                 }
@@ -867,7 +865,7 @@
                     ipmi::network::SYSTEMCONFIG_INTERFACE);
 
                 gateway = channelConf->gateway.empty()
-                              ? variant_ns::get<std::string>(
+                              ? std::get<std::string>(
                                     systemProperties["DefaultGateway"])
                               : channelConf->gateway;
             }