summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Add-http-ftp-nfs-protocols-to-un-filter-them-FT-58-T.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Add-http-ftp-nfs-protocols-to-un-filter-them-FT-58-T.patch')
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Add-http-ftp-nfs-protocols-to-un-filter-them-FT-58-T.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Add-http-ftp-nfs-protocols-to-un-filter-them-FT-58-T.patch b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Add-http-ftp-nfs-protocols-to-un-filter-them-FT-58-T.patch
new file mode 100644
index 0000000000..43951f221e
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Add-http-ftp-nfs-protocols-to-un-filter-them-FT-58-T.patch
@@ -0,0 +1,71 @@
+From c0aa20aa2be501eb6b063a8e48b79d49bd5f230c Mon Sep 17 00:00:00 2001
+From: Alexandr Ilenko <AIlenko@IBS.RU>
+Date: Mon, 6 Jun 2022 06:35:59 +0300
+Subject: [PATCH 2/2] Add: http, ftp, nfs protocols, to un-filter them (FT-58,
+ TZ-5.1.2.3)
+
+---
+ redfish-core/lib/virtual_media.hpp | 33 ++++++++++++++++++++++++++++++
+ 1 file changed, 33 insertions(+)
+
+diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
+index e94e233..1cce8fe 100644
+--- a/redfish-core/lib/virtual_media.hpp
++++ b/redfish-core/lib/virtual_media.hpp
+@@ -296,6 +296,12 @@ enum class TransferProtocol
+ {
+ https,
+ smb,
++ // 5.1.2.3. (ФТ-58) Работа с образами виртуальных носителей на внешних серверах
++ // • Обеспечить настройку через web-интерфейс параметров для загрузки образов виртуальных носителей через USB2 и USB1 и с внешних ресурсов HTTP, FTP, SMB, NFS.
++ http,
++ ftp,
++ nfs,
++ //
+ invalid
+ };
+
+@@ -315,6 +321,18 @@ inline std::optional<TransferProtocol>
+ {
+ return TransferProtocol::https;
+ }
++ if (scheme == "http")
++ {
++ return TransferProtocol::http;
++ }
++ if (scheme == "ftp")
++ {
++ return TransferProtocol::ftp;
++ }
++ if (scheme == "nfs")
++ {
++ return TransferProtocol::nfs;
++ }
+ if (!scheme.empty())
+ {
+ return TransferProtocol::invalid;
+@@ -345,6 +363,21 @@ inline std::optional<TransferProtocol> getTransferProtocolFromParam(
+ return TransferProtocol::https;
+ }
+
++ if (*transferProtocolType == "HTTP")
++ {
++ return TransferProtocol::http;
++ }
++
++ if (*transferProtocolType == "FTP")
++ {
++ return TransferProtocol::ftp;
++ }
++
++ if (*transferProtocolType == "NFS")
++ {
++ return TransferProtocol::nfs;
++ }
++
+ return TransferProtocol::invalid;
+ }
+
+--
+2.35.1
+