Fix usage of std::variant

The .get() member interface is mapbox specific and will not work when we
transition to std::variant.

Change-Id: Ia2b580339af0ef08f4e43503b774988a30062645
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/snmp_util.cpp b/snmp_util.cpp
index 25342ea..b5cea81 100644
--- a/snmp_util.cpp
+++ b/snmp_util.cpp
@@ -13,6 +13,7 @@
 namespace phosphor
 {
 
+namespace variant_ns = sdbusplus::message::variant_ns;
 using namespace phosphor::logging;
 using namespace sdbusplus::xyz::openbmc_project::Common::Error;
 
@@ -102,8 +103,9 @@
         {
             auto& intfMap = objIter.second;
             auto& snmpClientProps = intfMap.at(clientIntf);
-            auto& address = snmpClientProps.at("Address").get<std::string>();
-            auto& port = snmpClientProps.at("Port").get<uint16_t>();
+            auto& address =
+                variant_ns::get<std::string>(snmpClientProps.at("Address"));
+            auto& port = variant_ns::get<uint16_t>(snmpClientProps.at("Port"));
             auto ipaddress = phosphor::network::resolveAddress(address);
             auto mgr = std::move(ipaddress);
             if (port > 0)