Reviewed-by: Igor Kulchytskyy <ig...@ami.com>

Regards,
Igor

-----Original Message-----
From: abner.ch...@amd.com <abner.ch...@amd.com>
Sent: Sunday, February 25, 2024 11:55 PM
To: devel@edk2.groups.io
Cc: Nickle Wang <nick...@nvidia.com>; Igor Kulchytskyy <ig...@ami.com>; Mike 
Maslenkin <mike.maslen...@gmail.com>
Subject: [EXTERNAL] [edk2-redfish-client][PATCH] edk2-Redfish-client: Clarify 
HTTP method used for provisioning


**CAUTION: The e-mail below is from an external source. Please exercise caution 
before opening attachments, clicking links, or following guidance.**

From: Abner Chang <abner.ch...@amd.com>

Clarify the HTTP method that is used to provision BIOS
managed Redfish resource.

Signed-off-by: Abner Chang <abner.ch...@amd.com>
Cc: Nickle Wang <nick...@nvidia.com>
Cc: Igor Kulchytskyy <ig...@ami.com>
Cc: Mike Maslenkin <mike.maslen...@gmail.com>
---
 RedfishClientPkg/Readme.md                    | 35 ++++++++++++-------
 .../Media/redfish-call-flow-provisioning.svg  |  2 +-
 .../Media/redfish-synchronization-design.svg  |  4 +--
 3 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/RedfishClientPkg/Readme.md b/RedfishClientPkg/Readme.md
index 82cb9c8c99..1789dff6f8 100644
--- a/RedfishClientPkg/Readme.md
+++ b/RedfishClientPkg/Readme.md
@@ -310,21 +310,32 @@ job.

 Several interfaces defined in EDKII Redfish Resource Config Protocol work 
together to support Redfish synchronization:
 - Identify()
-  - This function is used to check if the given Redfish resource is the one 
the feature driver wants to manage. A platform
-    library `RedfishResourceIdentifyLib` is introduced for platform to 
implement its own policy to identify Redfish resource.
+  - This function is used to check if the given Redfish resource is the one 
the feature driver
+    wants to manage. A platform library `RedfishResourceIdentifyLib` is 
introduced for
+    platform to implement its own policy to identify Redfish resource.
 - Check()
-  - This function is used to check the attribute status on Redfish service. If 
all attributes the feature driver manages
-    are presented in Redfish service, feature driver must provision them 
already. Otherwise, Provisioning() will be called
-    to perform resource provisioning job.
+  - This function is used to check the attribute status on Redfish service. If 
all attributes
+    the feature driver manages are presented in Redfish service, feature 
driver must provision
+    them already. Otherwise, Provisioning() will be called to perform resource 
provisioning
+    job.
 - Provisioning()
-  - When this function is called, feature driver will provision all attributes 
that it managed to Redfish service. This
-    operation usually create new resource at Redfish service and require 
different operation that specified by Redfish service.
+  - When this function is called, feature driver will provision all attributes 
that it managed
+    to Redfish service. This operation usually creates the new Redfish 
properties at the
+    existing URI in Redfish service. Use HTTP PATCH to provision Redfish 
properties as BIOS
+    may only manage some but not all of the properties of the resource. See 
[Redfish-edk2 
implementation](#Redfish-Service-Implementation-that-Incorporates-with-EDK2-Redfish)
 for
+    the details. HTTP POST is still used for creating a collection member, 
such as the
+    collection member of processor or memory for the Redfish inventory 
management.
+    However, HTTP PUT to overwrite an entire Redfish resource is not used in 
edk2 Redfish
+    implementation as edk2 Redfish implementation has no idea of whether the 
Redfish resource
+    is entirely managed by BIOS or not.
 - Consume()
-  - When there is pending settings in Redfish service, this function is called 
for feature driver to consume pending settings
-    requested by user.
+  - When there is pending settings in Redfish service, this function is called 
for feature
+    driver to consume pending settings requested by user. HTTP GET is the 
method used
+    to retrieve Redfish properties.
 - Update()
-  - When platform configuration is updated, this function is called to update 
configuration changes to Redfish service and
-    Redfish service can show the latest settings on platform.
+  - When platform configuration is updated, this function is called to update 
configuration
+    changes to Redfish service and Redfish service can show the latest 
settings on platform.
+    HTTP PATCH is the method used to update the properties of Redfish resource.

 The EDKII Redfish Resource Addendum Protocol is introduced to provide platform 
addendum data that Redfish service requires.
 This protocol will be called at Provisioning() and Update() functions so 
platform can add OEM attribute or any other attribute
@@ -338,7 +349,7 @@ struct _EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL {
 };
 ```

-### Redfish Service Implementation that Incorporates with EDK2 Redfish
+### <a 
name="Redfish-Service-Implementation-that-Incorporates-with-EDK2-Redfish"></a>Redfish
 Service Implementation that Incorporates with EDK2 Redfish
 The idea of Redfish synchronization design is to manage Redfish resource 
directly by platform host
 firmware. To do this, Redfish synchronization functions have to work with 
Redfish service implementation
 in BMC firmware. This is because the mechanism between platform host firmware 
and BMC firmware is not
diff --git 
a/RedfishClientPkg/Documents/Media/redfish-call-flow-provisioning.svg 
b/RedfishClientPkg/Documents/Media/redfish-call-flow-provisioning.svg
index 70556152fe..d1d653b621 100755
--- a/RedfishClientPkg/Documents/Media/redfish-call-flow-provisioning.svg
+++ b/RedfishClientPkg/Documents/Media/redfish-call-flow-provisioning.svg
@@ -25,7 +25,7 @@
     <text font-family="Trebuchet MS,Trebuchet MS_MSFontService,sans-serif" 
font-weight="400" font-size="50" transform="matrix(1 0 0 1 2417.95 1202)">2. 
Follow Bios schema and </text>
     <text font-family="Trebuchet MS,Trebuchet MS_MSFontService,sans-serif" 
font-weight="400" font-size="50" transform="matrix(1 0 0 1 2479.82 
1262)">create attribute list</text>
     <text font-family="Trebuchet MS,Trebuchet MS_MSFontService,sans-serif" 
font-weight="400" font-size="50" transform="matrix(1 0 0 1 2412.63 1795)">4. 
BIOS current settings is ready</text>
-    <text font-family="Trebuchet MS,Trebuchet MS_MSFontService,sans-serif" 
font-weight="400" font-size="50" transform="matrix(1 0 0 1 2474.5 1855)">Issue 
HTTP “PUT” to /redfish/v1/systems/SYS/Bios</text>
+    <text font-family="Trebuchet MS,Trebuchet MS_MSFontService,sans-serif" 
font-weight="400" font-size="50" transform="matrix(1 0 0 1 2474.5 1855)">Issue 
HTTP “PATCH” to /redfish/v1/systems/SYS/Bios</text>
     <path d="M2385 1906.14 3728.02 1906.14 3728.02 1911.86 2385 
1911.86ZM3723.43 1895.25 3750.93 1909 3723.43 1922.75Z" fill="#8C8C8C"/>
     <rect x="342.5" y="1008.5" width="377" height="199" stroke="#CDCDCD" 
stroke-width="4.58333" stroke-linejoin="round" stroke-miterlimit="10" 
fill="#404040"/>
     <text fill="#FFFFFF" font-family="Trebuchet MS,Trebuchet 
MS_MSFontService,sans-serif" font-weight="400" font-size="55" 
transform="matrix(1 0 0 1 391.759 1095)">Chipset/HII </text>
diff --git 
a/RedfishClientPkg/Documents/Media/redfish-synchronization-design.svg 
b/RedfishClientPkg/Documents/Media/redfish-synchronization-design.svg
index 2dd1fb6109..5b95dcea0f 100755
--- a/RedfishClientPkg/Documents/Media/redfish-synchronization-design.svg
+++ b/RedfishClientPkg/Documents/Media/redfish-synchronization-design.svg
@@ -28,10 +28,10 @@
     <path d="M2497.82 1863.5 2497.82 2311.4C2497.82 2312.67 2496.79 2313.7 
2495.53 2313.7L583.418 2313.7 583.418 2309.11 2495.53 2309.11 2493.23 2311.4 
2493.23 1863.5ZM588 2325.15 560.5 2311.4 588 2297.65Z" fill="#008563"/>
     <path d="M2728 1074.17C2728 1059.72 2739.72 1048 2754.17 1048L3410.83 
1048C3425.28 1048 3437 1059.72 3437 1074.17L3437 1178.83C3437 1193.28 3425.28 
1205 3410.83 1205L2754.17 1205C2739.72 1205 2728 1193.28 2728 1178.83Z" 
fill="#0071C5" fill-rule="evenodd" fill-opacity="0.501961"/>
     <text font-family="Calibri,Calibri_MSFontService,sans-serif" 
font-weight="700" font-size="64" transform="matrix(1 0 0 1 2869.23 1148)">HTTP 
</text>
-    <text font-family="Calibri,Calibri_MSFontService,sans-serif" 
font-weight="700" font-size="64" transform="matrix(1 0 0 1 3021.62 
1148)">POST/PUT</text>
+    <text font-family="Calibri,Calibri_MSFontService,sans-serif" 
font-weight="700" font-size="64" transform="matrix(1 0 0 1 3021.62 
1148)">PATCH</text>
     <path d="M3112 2034.33C3112 2015.37 3127.37 2000 3146.33 2000L3786.67 
2000C3805.63 2000 3821 2015.37 3821 2034.33L3821 2171.67C3821 2190.63 3805.63 
2206 3786.67 2206L3146.33 2206C3127.37 2206 3112 2190.63 3112 2171.67Z" 
fill="#0071C5" fill-rule="evenodd" fill-opacity="0.501961"/>
     <text font-family="Arial,Arial_MSFontService,sans-serif" font-weight="400" 
font-size="64" transform="matrix(1 0 0 1 3191.74 2127)">HTTP </text>
-    <text fill="#FF0000" font-family="Arial,Arial_MSFontService,sans-serif" 
font-weight="400" font-size="64" transform="matrix(1 0 0 1 3376.79 
2127)">PATCH/PUT</text>
+    <text fill="#FF0000" font-family="Arial,Arial_MSFontService,sans-serif" 
font-weight="400" font-size="64" transform="matrix(1 0 0 1 3376.79 
2127)">PATCH</text>
     <rect x="1572" y="418" width="896" height="130" fill="#008564"/>
     <text font-family="Calibri,Calibri_MSFontService,sans-serif" 
font-weight="700" font-size="64" transform="matrix(1 0 0 1 1655.98 
505)">RedfishResourceIdentifyLib</text>
     <path d="M0.0452146-1.71815 11.9202-1.40565 23.8145-0.526554 35.5234 
0.919242 46.906 2.80438 57.9272 5.19539 68.5072 8.02728 78.5249 11.2384 87.9266 
14.8322 96.5836 18.7466 104.375 22.923 111.238 27.3016 117.131 31.9661 121.965 
36.7847C122.036 36.8551 122.1 36.9316 122.157 37.0131L125.532 41.8256C125.598 
41.9198 125.655 42.0203 125.701 42.1257L127.826 47.0007C127.885 47.1376 127.927 
47.2817 127.949 47.4294L128.699 52.3669 129.449 57.3044 129.326 56.8757 131.451 
61.7507 131.282 61.4506 134.657 66.2631 134.465 66.0347 139.153 70.7222 144.756 
75.1536 151.363 79.3641 158.938 83.423 167.396 87.2466 176.555 90.7711 186.4 
93.9259 196.82 96.7148 207.677 99.0704 218.967 100.929 231.233 102.16 230.889 
105.58 218.408 104.321 206.948 102.43 195.93 100.035 185.35 97.1991 175.32 
93.9789 165.979 90.3784 157.312 86.452 149.512 82.2609 142.619 77.8464 136.722 
73.1528 132.035 68.4653C131.964 68.3949 131.9 68.3184 131.843 68.2369L128.468 
63.4244C128.402 63.3302 128.345 63.2297 128.299 63.1243L126.174 58.2493C126.115 
58.1124 126.073 57.9683 126.051 57.8206L125.301 52.8831 124.551 47.9456 124.674 
48.3743 122.549 43.4993 122.718 43.7994 119.343 38.9869 119.535 39.2153 114.994 
34.6589 109.387 30.1984 102.75 25.952 95.1664 21.8784 86.6984 18.0428 77.475 
14.5116 67.6178 11.3477 57.1978 8.55461 46.344 6.19562 35.1016 4.33076 23.5605 
2.90155 11.8298 2.03065-0.0452146 1.71815ZM227.312 89.8694 253.937 105.246 
225.66 117.32Z" fill="#008563" transform="matrix(1 0 0 -1 1318.5 588.746)"/>
--
2.37.1.windows.1

-The information contained in this message may be confidential and proprietary 
to American Megatrends (AMI). This communication is intended to be read only by 
the individual or entity to whom it is addressed or by their designee. If the 
reader of this message is not the intended recipient, you are on notice that 
any distribution of this message, in any form, is strictly prohibited. Please 
promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and 
then delete or destroy all copies of the transmission.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116045): https://edk2.groups.io/g/devel/message/116045
Mute This Topic: https://groups.io/mt/104577338/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to