1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
From 8efce5db7796c88bb5541c81e5c7fbfecfce4441 Mon Sep 17 00:00:00 2001
From: Alexandr Ilenko <AIlenko@IBS.RU>
Date: Tue, 6 Sep 2022 14:24:54 +0300
Subject: [PATCH] Add: http, ftp, nfs protocols
---
redfish-core/lib/virtual_media.hpp | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 17971dc0..65d53b6b 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -285,6 +285,9 @@ enum class TransferProtocol
{
https,
smb,
+ http,
+ ftp,
+ nfs,
invalid
};
@@ -304,6 +307,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;
@@ -334,6 +349,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
|