summaryrefslogtreecommitdiff
path: root/redfish-core/lib/ethernet.hpp
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2020-05-13 19:24:20 +0300
committerPatrick Williams <patrick@stwcx.xyz>2020-05-14 06:15:18 +0300
commit8d78b7a9f5fbca338a5867d5dd4fa83890d79bc7 (patch)
tree77e2703f7fbb6a5f5db4001fc0d02d9802557bde /redfish-core/lib/ethernet.hpp
parent156d6b00a9dc06ac9f618ecd8d5fc6b1b49d5be4 (diff)
downloadbmcweb-8d78b7a9f5fbca338a5867d5dd4fa83890d79bc7.tar.xz
sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I86e11299512704fa1df1e5f6517ea25cc6eced8f
Diffstat (limited to 'redfish-core/lib/ethernet.hpp')
-rw-r--r--redfish-core/lib/ethernet.hpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 702136a09a..ae050acb14 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -290,8 +290,7 @@ inline bool extractEthernetInterfaceData(const std::string &ethiface_id,
else if (propertyPair.first == "Nameservers")
{
const std::vector<std::string> *nameservers =
- sdbusplus::message::variant_ns::get_if<
- std::vector<std::string>>(
+ std::get_if<std::vector<std::string>>(
&propertyPair.second);
if (nameservers != nullptr)
{
@@ -301,8 +300,7 @@ inline bool extractEthernetInterfaceData(const std::string &ethiface_id,
else if (propertyPair.first == "StaticNameServers")
{
const std::vector<std::string> *staticNameServers =
- sdbusplus::message::variant_ns::get_if<
- std::vector<std::string>>(
+ std::get_if<std::vector<std::string>>(
&propertyPair.second);
if (staticNameServers != nullptr)
{
@@ -322,8 +320,7 @@ inline bool extractEthernetInterfaceData(const std::string &ethiface_id,
else if (propertyPair.first == "DomainName")
{
const std::vector<std::string> *domainNames =
- sdbusplus::message::variant_ns::get_if<
- std::vector<std::string>>(
+ std::get_if<std::vector<std::string>>(
&propertyPair.second);
if (domainNames != nullptr)
{
@@ -391,8 +388,7 @@ inline bool extractEthernetInterfaceData(const std::string &ethiface_id,
if (propertyPair.first == "HostName")
{
const std::string *hostname =
- sdbusplus::message::variant_ns::get_if<std::string>(
- &propertyPair.second);
+ std::get_if<std::string>(&propertyPair.second);
if (hostname != nullptr)
{
ethData.hostname = *hostname;
@@ -401,8 +397,7 @@ inline bool extractEthernetInterfaceData(const std::string &ethiface_id,
else if (propertyPair.first == "DefaultGateway")
{
const std::string *defaultGateway =
- sdbusplus::message::variant_ns::get_if<std::string>(
- &propertyPair.second);
+ std::get_if<std::string>(&propertyPair.second);
if (defaultGateway != nullptr)
{
ethData.default_gateway = *defaultGateway;
@@ -411,8 +406,7 @@ inline bool extractEthernetInterfaceData(const std::string &ethiface_id,
else if (propertyPair.first == "DefaultGateway6")
{
const std::string *defaultGateway6 =
- sdbusplus::message::variant_ns::get_if<std::string>(
- &propertyPair.second);
+ std::get_if<std::string>(&propertyPair.second);
if (defaultGateway6 != nullptr)
{
ethData.ipv6_default_gateway = *defaultGateway6;