update service: remove tftp simple update flow

Remove the flow for tftp simple update as this is an insecure method and
there is no active user for this.

Redfish service validator passing:
```
Elapsed time: 0:04:33
metadataNamespaces: 3727
pass: 5184
passAction: 16
passGet: 213
passRedfishUri: 205
skipNoSchema: 3
skipOptional: 3535
unvalidated: 1
warnDeprecated: 5
warningPresent: 6
```

Change-Id: I466dcb09be4ee806451abe91ab86d8b3b001a333
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/config/meson.build b/config/meson.build
index 63e7acb..9ce62cb 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -16,7 +16,6 @@
     'insecure-enable-redfish-query',
     'insecure-ignore-content-type',
     'insecure-push-style-notification',
-    'insecure-tftp-update',
     'kvm',
     'meta-tls-common-name-parsing',
     'mutual-tls-auth',
diff --git a/meson.options b/meson.options
index f1adf15..01810f5 100644
--- a/meson.options
+++ b/meson.options
@@ -351,14 +351,6 @@
 )
 
 option(
-    'insecure-tftp-update',
-    type: 'feature',
-    value: 'disabled',
-    description: '''Enable TFTP based firmware update transactions through
-                    Redfish UpdateService.   SimpleUpdate.''',
-)
-
-option(
     'insecure-ignore-content-type',
     type: 'feature',
     value: 'disabled',
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 533d146..fbea2e3 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -574,61 +574,6 @@
                                           url.buffer());
 }
 
-inline void doTftpUpdate(const crow::Request& req,
-                         const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
-                         const boost::urls::url_view_base& url)
-{
-    if (!BMCWEB_INSECURE_TFTP_UPDATE)
-    {
-        messages::actionParameterNotSupported(asyncResp->res, "ImageURI",
-                                              url.buffer());
-        return;
-    }
-
-    std::string path(url.encoded_path());
-    if (path.size() < 2)
-    {
-        messages::actionParameterNotSupported(asyncResp->res, "ImageURI",
-                                              url.buffer());
-        return;
-    }
-    // TFTP expects a path without a /
-    path.erase(0, 1);
-    std::string host(url.encoded_host_and_port());
-    BMCWEB_LOG_DEBUG("Server: {} File: {}", host, path);
-
-    // Setup callback for when new software detected
-    // Give TFTP 10 minutes to complete
-    monitorForSoftwareAvailable(
-        asyncResp, req,
-        "/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate", 600);
-
-    // TFTP can take up to 10 minutes depending on image size and
-    // connection speed. Return to caller as soon as the TFTP operation
-    // has been started. The callback above will ensure the activate
-    // is started once the download has completed
-    redfish::messages::success(asyncResp->res);
-
-    // Call TFTP service
-    crow::connections::systemBus->async_method_call(
-        [](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            // messages::internalError(asyncResp->res);
-            cleanUp();
-            BMCWEB_LOG_DEBUG("error_code = {}", ec);
-            BMCWEB_LOG_DEBUG("error msg = {}", ec.message());
-        }
-        else
-        {
-            BMCWEB_LOG_DEBUG("Call to DownloaViaTFTP Success");
-        }
-    },
-        "xyz.openbmc_project.Software.Download",
-        "/xyz/openbmc_project/software", "xyz.openbmc_project.Common.TFTP",
-        "DownloadViaTFTP", path, host);
-}
-
 inline void handleUpdateServiceSimpleUpdateAction(
     crow::App& app, const crow::Request& req,
     const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
@@ -662,11 +607,7 @@
     {
         return;
     }
-    if (url->scheme() == "tftp")
-    {
-        doTftpUpdate(req, asyncResp, *url);
-    }
-    else if (url->scheme() == "https")
+    if (url->scheme() == "https")
     {
         doHttpsUpdate(asyncResp, *url);
     }