diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index aab116e..972512b 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -829,56 +829,62 @@
 
     if (auth.basicAuth)
     {
-#ifndef BMCWEB_ENABLE_BASIC_AUTHENTICATION
-        messages::actionNotSupported(
-            asyncResp->res,
-            "Setting BasicAuth when basic-auth feature is disabled");
-        return;
-#endif
+        if constexpr (!BMCWEB_BASIC_AUTH)
+        {
+            messages::actionNotSupported(
+                asyncResp->res,
+                "Setting BasicAuth when basic-auth feature is disabled");
+            return;
+        }
+
         authMethodsConfig.basic = *auth.basicAuth;
     }
 
     if (auth.cookie)
     {
-#ifndef BMCWEB_ENABLE_COOKIE_AUTHENTICATION
-        messages::actionNotSupported(
-            asyncResp->res,
-            "Setting Cookie when cookie-auth feature is disabled");
-        return;
-#endif
+        if constexpr (!BMCWEB_COOKIE_AUTH)
+        {
+            messages::actionNotSupported(
+                asyncResp->res,
+                "Setting Cookie when cookie-auth feature is disabled");
+            return;
+        }
         authMethodsConfig.cookie = *auth.cookie;
     }
 
     if (auth.sessionToken)
     {
-#ifndef BMCWEB_ENABLE_SESSION_AUTHENTICATION
-        messages::actionNotSupported(
-            asyncResp->res,
-            "Setting SessionToken when session-auth feature is disabled");
-        return;
-#endif
+        if constexpr (!BMCWEB_SESSION_AUTH)
+        {
+            messages::actionNotSupported(
+                asyncResp->res,
+                "Setting SessionToken when session-auth feature is disabled");
+            return;
+        }
         authMethodsConfig.sessionToken = *auth.sessionToken;
     }
 
     if (auth.xToken)
     {
-#ifndef BMCWEB_ENABLE_XTOKEN_AUTHENTICATION
-        messages::actionNotSupported(
-            asyncResp->res,
-            "Setting XToken when xtoken-auth feature is disabled");
-        return;
-#endif
+        if constexpr (!BMCWEB_XTOKEN_AUTH)
+        {
+            messages::actionNotSupported(
+                asyncResp->res,
+                "Setting XToken when xtoken-auth feature is disabled");
+            return;
+        }
         authMethodsConfig.xtoken = *auth.xToken;
     }
 
     if (auth.tls)
     {
-#ifndef BMCWEB_ENABLE_MUTUAL_TLS_AUTHENTICATION
-        messages::actionNotSupported(
-            asyncResp->res,
-            "Setting TLS when mutual-tls-auth feature is disabled");
-        return;
-#endif
+        if constexpr (!BMCWEB_MUTUAL_TLS_AUTH)
+        {
+            messages::actionNotSupported(
+                asyncResp->res,
+                "Setting TLS when mutual-tls-auth feature is disabled");
+            return;
+        }
         authMethodsConfig.tls = *auth.tls;
     }
 
@@ -1705,11 +1711,13 @@
         boost::beast::http::field::link,
         "</redfish/v1/JsonSchemas/ManagerAccount/ManagerAccount.json>; rel=describedby");
 
-#ifdef BMCWEB_INSECURE_DISABLE_AUTHENTICATION
-    // If authentication is disabled, there are no user accounts
-    messages::resourceNotFound(asyncResp->res, "ManagerAccount", accountName);
-    return;
-#endif // BMCWEB_INSECURE_DISABLE_AUTHENTICATION
+    if constexpr (BMCWEB_INSECURE_DISABLE_AUTH)
+    {
+        // If authentication is disabled, there are no user accounts
+        messages::resourceNotFound(asyncResp->res, "ManagerAccount",
+                                   accountName);
+        return;
+    }
 
     if (req.session == nullptr)
     {
@@ -1882,12 +1890,12 @@
         return;
     }
 
-#ifdef BMCWEB_INSECURE_DISABLE_AUTHENTICATION
-    // If authentication is disabled, there are no user accounts
-    messages::resourceNotFound(asyncResp->res, "ManagerAccount", username);
-    return;
-
-#endif // BMCWEB_INSECURE_DISABLE_AUTHENTICATION
+    if constexpr (BMCWEB_INSECURE_DISABLE_AUTH)
+    {
+        // If authentication is disabled, there are no user accounts
+        messages::resourceNotFound(asyncResp->res, "ManagerAccount", username);
+        return;
+    }
     sdbusplus::message::object_path tempObjPath(rootUserDbusPath);
     tempObjPath /= username;
     const std::string userPath(tempObjPath);
@@ -1916,12 +1924,12 @@
     {
         return;
     }
-#ifdef BMCWEB_INSECURE_DISABLE_AUTHENTICATION
-    // If authentication is disabled, there are no user accounts
-    messages::resourceNotFound(asyncResp->res, "ManagerAccount", username);
-    return;
-
-#endif // BMCWEB_INSECURE_DISABLE_AUTHENTICATION
+    if constexpr (BMCWEB_INSECURE_DISABLE_AUTH)
+    {
+        // If authentication is disabled, there are no user accounts
+        messages::resourceNotFound(asyncResp->res, "ManagerAccount", username);
+        return;
+    }
     std::optional<std::string> newUserName;
     std::optional<std::string> password;
     std::optional<bool> enabled;
diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
index 025f436..477c15e 100644
--- a/redfish-core/lib/bios.hpp
+++ b/redfish-core/lib/bios.hpp
@@ -19,7 +19,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -70,7 +70,7 @@
         return;
     }
 
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index 9ee10b5..19728a4 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -402,23 +402,28 @@
 
     asyncResp->res.jsonValue["Name"] = chassisId;
     asyncResp->res.jsonValue["Id"] = chassisId;
-#ifdef BMCWEB_ALLOW_DEPRECATED_POWER_THERMAL
-    asyncResp->res.jsonValue["Thermal"]["@odata.id"] =
-        boost::urls::format("/redfish/v1/Chassis/{}/Thermal", chassisId);
-    // Power object
-    asyncResp->res.jsonValue["Power"]["@odata.id"] =
-        boost::urls::format("/redfish/v1/Chassis/{}/Power", chassisId);
-#endif
-#ifdef BMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM
-    asyncResp->res.jsonValue["ThermalSubsystem"]["@odata.id"] =
-        boost::urls::format("/redfish/v1/Chassis/{}/ThermalSubsystem",
-                            chassisId);
-    asyncResp->res.jsonValue["PowerSubsystem"]["@odata.id"] =
-        boost::urls::format("/redfish/v1/Chassis/{}/PowerSubsystem", chassisId);
-    asyncResp->res.jsonValue["EnvironmentMetrics"]["@odata.id"] =
-        boost::urls::format("/redfish/v1/Chassis/{}/EnvironmentMetrics",
-                            chassisId);
-#endif
+
+    if constexpr (BMCWEB_REDFISH_ALLOW_DEPRECATED_POWER_THERMAL)
+    {
+        asyncResp->res.jsonValue["Thermal"]["@odata.id"] =
+            boost::urls::format("/redfish/v1/Chassis/{}/Thermal", chassisId);
+        // Power object
+        asyncResp->res.jsonValue["Power"]["@odata.id"] =
+            boost::urls::format("/redfish/v1/Chassis/{}/Power", chassisId);
+    }
+
+    if constexpr (BMCWEB_REDFISH_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM)
+    {
+        asyncResp->res.jsonValue["ThermalSubsystem"]["@odata.id"] =
+            boost::urls::format("/redfish/v1/Chassis/{}/ThermalSubsystem",
+                                chassisId);
+        asyncResp->res.jsonValue["PowerSubsystem"]["@odata.id"] =
+            boost::urls::format("/redfish/v1/Chassis/{}/PowerSubsystem",
+                                chassisId);
+        asyncResp->res.jsonValue["EnvironmentMetrics"]["@odata.id"] =
+            boost::urls::format("/redfish/v1/Chassis/{}/EnvironmentMetrics",
+                                chassisId);
+    }
     // SensorCollection
     asyncResp->res.jsonValue["Sensors"]["@odata.id"] =
         boost::urls::format("/redfish/v1/Chassis/{}/Sensors", chassisId);
diff --git a/redfish-core/lib/fabric_adapters.hpp b/redfish-core/lib/fabric_adapters.hpp
index 87015dd..46e67d2 100644
--- a/redfish-core/lib/fabric_adapters.hpp
+++ b/redfish-core/lib/fabric_adapters.hpp
@@ -266,7 +266,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -293,7 +293,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems. TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -333,7 +333,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -391,7 +391,7 @@
         return;
     }
 
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems. TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 1e5a34f..1453a4b 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -865,7 +865,7 @@
                           const std::string& entryID,
                           const std::string& dumpType)
 {
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -1276,7 +1276,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -1305,25 +1305,29 @@
         eventLog["@odata.id"] =
             "/redfish/v1/Systems/system/LogServices/EventLog";
         logServiceArray.emplace_back(std::move(eventLog));
-#ifdef BMCWEB_ENABLE_REDFISH_DUMP_LOG
-        nlohmann::json::object_t dumpLog;
-        dumpLog["@odata.id"] = "/redfish/v1/Systems/system/LogServices/Dump";
-        logServiceArray.emplace_back(std::move(dumpLog));
-#endif
+        if constexpr (BMCWEB_REDFISH_DUMP_LOG)
+        {
+            nlohmann::json::object_t dumpLog;
+            dumpLog["@odata.id"] =
+                "/redfish/v1/Systems/system/LogServices/Dump";
+            logServiceArray.emplace_back(std::move(dumpLog));
+        }
 
-#ifdef BMCWEB_ENABLE_REDFISH_CPU_LOG
-        nlohmann::json::object_t crashdump;
-        crashdump["@odata.id"] =
-            "/redfish/v1/Systems/system/LogServices/Crashdump";
-        logServiceArray.emplace_back(std::move(crashdump));
-#endif
+        if constexpr (BMCWEB_REDFISH_DUMP_LOG)
+        {
+            nlohmann::json::object_t crashdump;
+            crashdump["@odata.id"] =
+                "/redfish/v1/Systems/system/LogServices/Crashdump";
+            logServiceArray.emplace_back(std::move(crashdump));
+        }
 
-#ifdef BMCWEB_ENABLE_REDFISH_HOST_LOGGER
-        nlohmann::json::object_t hostlogger;
-        hostlogger["@odata.id"] =
-            "/redfish/v1/Systems/system/LogServices/HostLogger";
-        logServiceArray.emplace_back(std::move(hostlogger));
-#endif
+        if constexpr (BMCWEB_REDFISH_HOST_LOGGER)
+        {
+            nlohmann::json::object_t hostlogger;
+            hostlogger["@odata.id"] =
+                "/redfish/v1/Systems/system/LogServices/HostLogger";
+            logServiceArray.emplace_back(std::move(hostlogger));
+        }
         asyncResp->res.jsonValue["Members@odata.count"] =
             logServiceArray.size();
 
@@ -1556,7 +1560,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -1661,7 +1665,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -1738,7 +1742,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -1935,7 +1939,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -2049,7 +2053,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -2089,7 +2093,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -2229,7 +2233,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -2273,7 +2277,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -2357,7 +2361,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -2435,57 +2439,59 @@
     nlohmann::json& logServiceArray = asyncResp->res.jsonValue["Members"];
     logServiceArray = nlohmann::json::array();
 
-#ifdef BMCWEB_ENABLE_REDFISH_BMC_JOURNAL
-    nlohmann::json::object_t journal;
-    journal["@odata.id"] = "/redfish/v1/Managers/bmc/LogServices/Journal";
-    logServiceArray.emplace_back(std::move(journal));
-#endif
+    if constexpr (BMCWEB_REDFISH_BMC_JOURNAL)
+    {
+        nlohmann::json::object_t journal;
+        journal["@odata.id"] = "/redfish/v1/Managers/bmc/LogServices/Journal";
+        logServiceArray.emplace_back(std::move(journal));
+    }
 
     asyncResp->res.jsonValue["Members@odata.count"] = logServiceArray.size();
 
-#ifdef BMCWEB_ENABLE_REDFISH_DUMP_LOG
-    constexpr std::array<std::string_view, 1> interfaces = {
-        "xyz.openbmc_project.Collection.DeleteAll"};
-    dbus::utility::getSubTreePaths(
-        "/xyz/openbmc_project/dump", 0, interfaces,
-        [asyncResp](
-            const boost::system::error_code& ec,
-            const dbus::utility::MapperGetSubTreePathsResponse& subTreePaths) {
-        if (ec)
-        {
-            BMCWEB_LOG_ERROR(
-                "handleBMCLogServicesCollectionGet respHandler got error {}",
-                ec);
-            // Assume that getting an error simply means there are no dump
-            // LogServices. Return without adding any error response.
-            return;
-        }
-
-        nlohmann::json& logServiceArrayLocal =
-            asyncResp->res.jsonValue["Members"];
-
-        for (const std::string& path : subTreePaths)
-        {
-            if (path == "/xyz/openbmc_project/dump/bmc")
+    if constexpr (BMCWEB_REDFISH_DUMP_LOG)
+    {
+        constexpr std::array<std::string_view, 1> interfaces = {
+            "xyz.openbmc_project.Collection.DeleteAll"};
+        dbus::utility::getSubTreePaths(
+            "/xyz/openbmc_project/dump", 0, interfaces,
+            [asyncResp](const boost::system::error_code& ec,
+                        const dbus::utility::MapperGetSubTreePathsResponse&
+                            subTreePaths) {
+            if (ec)
             {
-                nlohmann::json::object_t member;
-                member["@odata.id"] =
-                    "/redfish/v1/Managers/bmc/LogServices/Dump";
-                logServiceArrayLocal.emplace_back(std::move(member));
+                BMCWEB_LOG_ERROR(
+                    "handleBMCLogServicesCollectionGet respHandler got error {}",
+                    ec);
+                // Assume that getting an error simply means there are no dump
+                // LogServices. Return without adding any error response.
+                return;
             }
-            else if (path == "/xyz/openbmc_project/dump/faultlog")
-            {
-                nlohmann::json::object_t member;
-                member["@odata.id"] =
-                    "/redfish/v1/Managers/bmc/LogServices/FaultLog";
-                logServiceArrayLocal.emplace_back(std::move(member));
-            }
-        }
 
-        asyncResp->res.jsonValue["Members@odata.count"] =
-            logServiceArrayLocal.size();
-    });
-#endif
+            nlohmann::json& logServiceArrayLocal =
+                asyncResp->res.jsonValue["Members"];
+
+            for (const std::string& path : subTreePaths)
+            {
+                if (path == "/xyz/openbmc_project/dump/bmc")
+                {
+                    nlohmann::json::object_t member;
+                    member["@odata.id"] =
+                        "/redfish/v1/Managers/bmc/LogServices/Dump";
+                    logServiceArrayLocal.emplace_back(std::move(member));
+                }
+                else if (path == "/xyz/openbmc_project/dump/faultlog")
+                {
+                    nlohmann::json::object_t member;
+                    member["@odata.id"] =
+                        "/redfish/v1/Managers/bmc/LogServices/FaultLog";
+                    logServiceArrayLocal.emplace_back(std::move(member));
+                }
+            }
+
+            asyncResp->res.jsonValue["Members@odata.count"] =
+                logServiceArrayLocal.size();
+        });
+    }
 }
 
 inline void requestRoutesBMCLogServiceCollection(App& app)
@@ -3004,7 +3010,7 @@
         return;
     }
 
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3040,7 +3046,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3242,7 +3248,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3300,7 +3306,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3417,7 +3423,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3493,7 +3499,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3527,7 +3533,7 @@
         // Do not call getRedfishRoute here since the crashdump file is not a
         // Redfish resource.
 
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3633,7 +3639,7 @@
             return;
         }
 
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3769,7 +3775,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3823,7 +3829,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3875,7 +3881,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -4236,7 +4242,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -4287,7 +4293,7 @@
             asyncResp->res.result(boost::beast::http::status::bad_request);
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -4373,7 +4379,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 592bbd8..e6f42be 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -1945,7 +1945,7 @@
         asyncResp->res.jsonValue["EthernetInterfaces"]["@odata.id"] =
             "/redfish/v1/Managers/bmc/EthernetInterfaces";
 
-        if constexpr (bmcwebNbdProxy)
+        if constexpr (BMCWEB_VM_NBDPROXY)
         {
             asyncResp->res.jsonValue["VirtualMedia"]["@odata.id"] =
                 "/redfish/v1/Managers/bmc/VirtualMedia";
@@ -1998,15 +1998,18 @@
         asyncResp->res.jsonValue["SerialConsole"]["MaxConcurrentSessions"] = 15;
         asyncResp->res.jsonValue["SerialConsole"]["ConnectTypesSupported"] =
             nlohmann::json::array_t({"IPMI", "SSH"});
-#ifdef BMCWEB_ENABLE_KVM
-        // Fill in GraphicalConsole info
-        asyncResp->res.jsonValue["GraphicalConsole"]["ServiceEnabled"] = true;
-        asyncResp->res.jsonValue["GraphicalConsole"]["MaxConcurrentSessions"] =
-            4;
-        asyncResp->res.jsonValue["GraphicalConsole"]["ConnectTypesSupported"] =
-            nlohmann::json::array_t({"KVMIP"});
-#endif // BMCWEB_ENABLE_KVM
-        if constexpr (!bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_KVM)
+        {
+            // Fill in GraphicalConsole info
+            asyncResp->res.jsonValue["GraphicalConsole"]["ServiceEnabled"] =
+                true;
+            asyncResp->res
+                .jsonValue["GraphicalConsole"]["MaxConcurrentSessions"] = 4;
+            asyncResp->res
+                .jsonValue["GraphicalConsole"]["ConnectTypesSupported"] =
+                nlohmann::json::array_t({"KVMIP"});
+        }
+        if constexpr (!BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             asyncResp->res.jsonValue["Links"]["ManagerForServers@odata.count"] =
                 1;
@@ -2031,10 +2034,11 @@
         managerDiagnosticData["@odata.id"] =
             "/redfish/v1/Managers/bmc/ManagerDiagnosticData";
 
-#ifdef BMCWEB_ENABLE_REDFISH_OEM_MANAGER_FAN_DATA
-        auto pids = std::make_shared<GetPIDValues>(asyncResp);
-        pids->run();
-#endif
+        if constexpr (BMCWEB_REDFISH_OEM_MANAGER_FAN_DATA)
+        {
+            auto pids = std::make_shared<GetPIDValues>(asyncResp);
+            pids->run();
+        }
 
         getMainChassisId(asyncResp,
                          [](const std::string& chassisId,
@@ -2217,36 +2221,39 @@
         if (pidControllers || fanControllers || fanZones ||
             stepwiseControllers || profile)
         {
-#ifdef BMCWEB_ENABLE_REDFISH_OEM_MANAGER_FAN_DATA
-            std::vector<
-                std::pair<std::string, std::optional<nlohmann::json::object_t>>>
-                configuration;
-            if (pidControllers)
+            if constexpr (BMCWEB_REDFISH_OEM_MANAGER_FAN_DATA)
             {
-                configuration.emplace_back("PidControllers",
-                                           std::move(pidControllers));
+                std::vector<std::pair<std::string,
+                                      std::optional<nlohmann::json::object_t>>>
+                    configuration;
+                if (pidControllers)
+                {
+                    configuration.emplace_back("PidControllers",
+                                               std::move(pidControllers));
+                }
+                if (fanControllers)
+                {
+                    configuration.emplace_back("FanControllers",
+                                               std::move(fanControllers));
+                }
+                if (fanZones)
+                {
+                    configuration.emplace_back("FanZones", std::move(fanZones));
+                }
+                if (stepwiseControllers)
+                {
+                    configuration.emplace_back("StepwiseControllers",
+                                               std::move(stepwiseControllers));
+                }
+                auto pid = std::make_shared<SetPIDValues>(
+                    asyncResp, std::move(configuration), profile);
+                pid->run();
             }
-            if (fanControllers)
+            else
             {
-                configuration.emplace_back("FanControllers",
-                                           std::move(fanControllers));
+                messages::propertyUnknown(asyncResp->res, "Oem");
+                return;
             }
-            if (fanZones)
-            {
-                configuration.emplace_back("FanZones", std::move(fanZones));
-            }
-            if (stepwiseControllers)
-            {
-                configuration.emplace_back("StepwiseControllers",
-                                           std::move(stepwiseControllers));
-            }
-            auto pid = std::make_shared<SetPIDValues>(
-                asyncResp, std::move(configuration), profile);
-            pid->run();
-#else
-            messages::propertyUnknown(asyncResp->res, "Oem");
-            return;
-#endif
         }
 
         if (activeSoftwareImageOdataId)
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index 2882da0..49d1962 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -778,7 +778,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -822,7 +822,7 @@
             return;
         }
 
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 223522b..af78cc8 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -108,7 +108,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -566,7 +566,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -639,7 +639,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -790,7 +790,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index ff17ebd..481c2a5 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -1105,7 +1105,7 @@
             return;
         }
 
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -1184,7 +1184,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -1263,7 +1263,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -1318,7 +1318,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -1356,7 +1356,7 @@
         {
             return;
         }
-        if constexpr (bmcwebEnableMultiHost)
+        if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
         {
             // Option currently returns no systems.  TBD
             messages::resourceNotFound(asyncResp->res, "ComputerSystem",
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 75eaa7c..9068888 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -64,21 +64,30 @@
     "/xyz/openbmc_project/sensors/power"
 });
 
-constexpr auto sensorPaths = std::to_array<std::string_view>({
-    "/xyz/openbmc_project/sensors/power",
-    "/xyz/openbmc_project/sensors/current",
-    "/xyz/openbmc_project/sensors/airflow",
-    "/xyz/openbmc_project/sensors/humidity",
-#ifdef BMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM
-    "/xyz/openbmc_project/sensors/voltage",
-    "/xyz/openbmc_project/sensors/fan_tach",
-    "/xyz/openbmc_project/sensors/temperature",
-    "/xyz/openbmc_project/sensors/fan_pwm",
-    "/xyz/openbmc_project/sensors/altitude",
-    "/xyz/openbmc_project/sensors/energy",
-#endif
-    "/xyz/openbmc_project/sensors/utilization"
-});
+constexpr auto getSensorPaths(){
+    if constexpr(BMCWEB_REDFISH_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM){
+    return std::to_array<std::string_view>({
+        "/xyz/openbmc_project/sensors/power",
+        "/xyz/openbmc_project/sensors/current",
+        "/xyz/openbmc_project/sensors/airflow",
+        "/xyz/openbmc_project/sensors/humidity",
+        "/xyz/openbmc_project/sensors/voltage",
+        "/xyz/openbmc_project/sensors/fan_tach",
+        "/xyz/openbmc_project/sensors/temperature",
+        "/xyz/openbmc_project/sensors/fan_pwm",
+        "/xyz/openbmc_project/sensors/altitude",
+        "/xyz/openbmc_project/sensors/energy",
+        "/xyz/openbmc_project/sensors/utilization"});
+    } else {
+      return  std::to_array<std::string_view>({"/xyz/openbmc_project/sensors/power",
+        "/xyz/openbmc_project/sensors/current",
+        "/xyz/openbmc_project/sensors/airflow",
+        "/xyz/openbmc_project/sensors/humidity",
+        "/xyz/openbmc_project/sensors/utilization"});
+}
+}
+
+constexpr auto sensorPaths = getSensorPaths();
 
 constexpr auto thermalPaths = std::to_array<std::string_view>({
     "/xyz/openbmc_project/sensors/fan_tach",
diff --git a/redfish-core/lib/service_root.hpp b/redfish-core/lib/service_root.hpp
index 6ae16c3..2fc3515 100644
--- a/redfish-core/lib/service_root.hpp
+++ b/redfish-core/lib/service_root.hpp
@@ -62,10 +62,11 @@
         "/redfish/v1/SessionService/Sessions";
     asyncResp->res.jsonValue["AccountService"]["@odata.id"] =
         "/redfish/v1/AccountService";
-#ifdef BMCWEB_ENABLE_REDFISH_AGGREGATION
-    asyncResp->res.jsonValue["AggregationService"]["@odata.id"] =
-        "/redfish/v1/AggregationService";
-#endif
+    if constexpr (BMCWEB_REDFISH_AGGREGATION)
+    {
+        asyncResp->res.jsonValue["AggregationService"]["@odata.id"] =
+            "/redfish/v1/AggregationService";
+    }
     asyncResp->res.jsonValue["Chassis"]["@odata.id"] = "/redfish/v1/Chassis";
     asyncResp->res.jsonValue["JsonSchemas"]["@odata.id"] =
         "/redfish/v1/JsonSchemas";
@@ -95,16 +96,18 @@
     protocolFeatures["ExcerptQuery"] = false;
 
     protocolFeatures["ExpandQuery"]["ExpandAll"] =
-        bmcwebInsecureEnableQueryParams;
+        BMCWEB_INSECURE_ENABLE_REDFISH_QUERY;
     // This is the maximum level defined in ServiceRoot.v1_13_0.json
-    if (bmcwebInsecureEnableQueryParams)
+    if constexpr (BMCWEB_INSECURE_ENABLE_REDFISH_QUERY)
     {
         protocolFeatures["ExpandQuery"]["MaxLevels"] = 6;
     }
-    protocolFeatures["ExpandQuery"]["Levels"] = bmcwebInsecureEnableQueryParams;
-    protocolFeatures["ExpandQuery"]["Links"] = bmcwebInsecureEnableQueryParams;
+    protocolFeatures["ExpandQuery"]["Levels"] =
+        BMCWEB_INSECURE_ENABLE_REDFISH_QUERY;
+    protocolFeatures["ExpandQuery"]["Links"] =
+        BMCWEB_INSECURE_ENABLE_REDFISH_QUERY;
     protocolFeatures["ExpandQuery"]["NoLinks"] =
-        bmcwebInsecureEnableQueryParams;
+        BMCWEB_INSECURE_ENABLE_REDFISH_QUERY;
     protocolFeatures["FilterQuery"] = false;
     protocolFeatures["OnlyMemberQuery"] = true;
     protocolFeatures["SelectQuery"] = true;
diff --git a/redfish-core/lib/storage.hpp b/redfish-core/lib/storage.hpp
index 9438144..c6141df 100644
--- a/redfish-core/lib/storage.hpp
+++ b/redfish-core/lib/storage.hpp
@@ -193,7 +193,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -690,7 +690,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 5765af8..e12db49 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -1926,15 +1926,16 @@
         "PowerRestorePolicy", powerRestorePolicy);
 }
 
-#ifdef BMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE
 /**
  * @brief Retrieves provisioning status
  *
- * @param[in] asyncResp     Shared pointer for completing asynchronous calls.
+ * @param[in] asyncResp     Shared pointer for completing asynchronous
+ * calls.
  *
  * @return None.
  */
-inline void getProvisioningStatus(std::shared_ptr<bmcweb::AsyncResp> asyncResp)
+inline void
+    getProvisioningStatus(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     BMCWEB_LOG_DEBUG("Get OEM information.");
     sdbusplus::asio::getAllProperties(
@@ -1976,9 +1977,9 @@
             return;
         }
 
-        if (*provState == true)
+        if (*provState)
         {
-            if (*lockState == true)
+            if (*lockState)
             {
                 oemPFR["ProvisioningStatus"] = "ProvisionedAndLocked";
             }
@@ -1993,7 +1994,6 @@
         }
     });
 }
-#endif
 
 /**
  * @brief Translate the PowerMode string to enum value
@@ -2773,7 +2773,7 @@
 
     nlohmann::json& ifaceArray = asyncResp->res.jsonValue["Members"];
     ifaceArray = nlohmann::json::array();
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         asyncResp->res.jsonValue["Members@odata.count"] = 0;
         // Option currently returns no systems.  TBD
@@ -2853,7 +2853,7 @@
                                    systemName);
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -2991,7 +2991,7 @@
         return;
     }
 
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3063,14 +3063,15 @@
     getPortStatusAndPath(std::span{protocolToDBusForSystems},
                          std::bind_front(afterPortRequest, asyncResp));
 
-#ifdef BMCWEB_ENABLE_KVM
-    // Fill in GraphicalConsole info
-    asyncResp->res.jsonValue["GraphicalConsole"]["ServiceEnabled"] = true;
-    asyncResp->res.jsonValue["GraphicalConsole"]["MaxConcurrentSessions"] = 4;
-    asyncResp->res.jsonValue["GraphicalConsole"]["ConnectTypesSupported"] =
-        nlohmann::json::array_t({"KVMIP"});
-
-#endif // BMCWEB_ENABLE_KVM
+    if constexpr (BMCWEB_KVM)
+    {
+        // Fill in GraphicalConsole info
+        asyncResp->res.jsonValue["GraphicalConsole"]["ServiceEnabled"] = true;
+        asyncResp->res.jsonValue["GraphicalConsole"]["MaxConcurrentSessions"] =
+            4;
+        asyncResp->res.jsonValue["GraphicalConsole"]["ConnectTypesSupported"] =
+            nlohmann::json::array_t({"KVMIP"});
+    }
 
     getMainChassisId(asyncResp,
                      [](const std::string& chassisId,
@@ -3097,9 +3098,10 @@
     getStopBootOnFault(asyncResp);
     getAutomaticRetryPolicy(asyncResp);
     getLastResetTime(asyncResp);
-#ifdef BMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE
-    getProvisioningStatus(asyncResp);
-#endif
+    if constexpr (BMCWEB_REDFISH_PROVISIONING_FEATURE)
+    {
+        getProvisioningStatus(asyncResp);
+    }
     getTrustedModuleRequiredToBoot(asyncResp);
     getPowerMode(asyncResp);
     getIdlePowerSaver(asyncResp);
@@ -3114,7 +3116,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
@@ -3363,7 +3365,7 @@
     {
         return;
     }
-    if constexpr (bmcwebEnableMultiHost)
+    if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
     {
         // Option currently returns no systems.  TBD
         messages::resourceNotFound(asyncResp->res, "ComputerSystem",
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 0418d26..6895cb4 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -831,7 +831,7 @@
     asyncResp->res.jsonValue["FirmwareInventory"]["@odata.id"] =
         "/redfish/v1/UpdateService/FirmwareInventory";
     // Get the MaxImageSizeBytes
-    asyncResp->res.jsonValue["MaxImageSizeBytes"] = bmcwebHttpReqBodyLimitMb *
+    asyncResp->res.jsonValue["MaxImageSizeBytes"] = BMCWEB_HTTP_BODY_LIMIT *
                                                     1024 * 1024;
 
     // Update Actions object.
@@ -842,9 +842,10 @@
 
     nlohmann::json::array_t allowed;
 
-#ifdef BMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE
-    allowed.emplace_back(update_service::TransferProtocolType::TFTP);
-#endif
+    if constexpr (BMCWEB_INSECURE_PUSH_STYLE_NOTIFICATION)
+    {
+        allowed.emplace_back(update_service::TransferProtocolType::TFTP);
+    }
 
     updateSvcSimpleUpdate["TransferProtocol@Redfish.AllowableValues"] =
         std::move(allowed);
