From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web12.14830.1658885892276894525 for ; Tue, 26 Jul 2022 18:38:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=DH1l5BnJ; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0207a15765=nickle.wang@hpe.com) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26R1HJ4N012106; Wed, 27 Jul 2022 01:38:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pps0720; bh=2tYfq3f+KBZ6o7TZKoaXNgYzMnNeuOqz/CB4RHrbDuk=; b=DH1l5BnJxNJhKEqFwr4IBFklOdcftiYAPpQtQcNNnnXuym6HDzCq8xjntkTPE1519ZQO TcPHvSpnTJkcQLXmr2sODVUV7lJylhU+luFWRHS9ocJ/Jl3PIgoW7E1Rax+SUTNLZPZT 2DqzKmgIg22bSdfuqSxM9VPwxuDn4SxUrd/LlFk96S5WvXw+SmZHi5zxtqlY6fGIUnXe 1+xP1GgpGY94BRGf+DnTdmXpMEsXVy9DGRvhpXPO/w4HjOf6PEkgAekqt4Z2G7wm4qLt u5LNEMC25di4m6E0kGxM0jqk62gJVM8HpyU/Cfxx8F88csEtqS4L+yn2sL1n2wtVYP93 9Q== Received: from p1lg14880.it.hpe.com (p1lg14880.it.hpe.com [16.230.97.201]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3hjng32kp9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Jul 2022 01:38:10 +0000 Received: from p1lg14885.dc01.its.hpecorp.net (unknown [10.119.18.236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by p1lg14880.it.hpe.com (Postfix) with ESMTPS id 3698D8001A2; Wed, 27 Jul 2022 01:38:09 +0000 (UTC) Received: from WAFM3XJD5N.asiapacific.hpqcorp.net (unknown [16.231.227.36]) by p1lg14885.dc01.its.hpecorp.net (Postfix) with ESMTP id EB142804D10; Wed, 27 Jul 2022 01:38:07 +0000 (UTC) From: "Nickle Wang" To: devel@edk2.groups.io Cc: Abner Chang , Yang Atom , Nick Ramirez Subject: [edk2-staging][PATCH v3 03/15] edk2-staging/RedfishClientPkg: Update Redfish Resource Config Protocol Date: Wed, 27 Jul 2022 09:37:50 +0800 Message-Id: <20220727013802.247-4-nickle.wang@hpe.com> X-Mailer: git-send-email 2.32.0.windows.2 In-Reply-To: <20220727013802.247-1-nickle.wang@hpe.com> References: <20220727013802.247-1-nickle.wang@hpe.com> MIME-Version: 1.0 X-Proofpoint-GUID: zjiQyXsMMECzTPFWNS5xVh-6Y9Jd4Fi5 X-Proofpoint-ORIG-GUID: zjiQyXsMMECzTPFWNS5xVh-6Y9Jd4Fi5 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-26_07,2022-07-26_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 phishscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207270002 Content-Transfer-Encoding: 8bit Update Redfish resource config protocol to support Identify action in order to identify remote resource and see if this is resource belongs to current owner or not. Use unicode string instead of ASCII string for all interfaces to align with HTTP interface. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Yang Atom Cc: Nick Ramirez --- .../EdkIIRedfishResourceConfigProtocol.h | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h index d6c41dda52..574c82c442 100644 --- a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h +++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h @@ -1,7 +1,7 @@ /** @file This file defines the EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL interface. - (C) Copyright 2021 Hewlett Packard Enterprise Development LP
+ (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -29,7 +29,7 @@ typedef EFI_STATUS (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_PROVISIONING) ( IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, - IN CHAR8 *Uri, + IN EFI_STRING Uri, IN BOOLEAN HttpPostMode ); @@ -47,7 +47,7 @@ typedef EFI_STATUS (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME) ( IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, - IN CHAR8 *Uri + IN EFI_STRING Uri ); @@ -65,7 +65,7 @@ typedef EFI_STATUS (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE) ( IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, - IN CHAR8 *Uri + IN EFI_STRING Uri ); @@ -83,7 +83,25 @@ typedef EFI_STATUS (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK) ( IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, - IN CHAR8 *Uri + IN EFI_STRING Uri + ); + +/** + Identify resource on given URI. + + @param[in] This Pointer to EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance. + @param[in] Uri The target URI to consume. + + @retval EFI_SUCCESS This is target resource which we want to handle. + @retval EFI_UNSUPPORTED This is not the target resource. + @retval Others Some error happened. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_IDENTIFY) ( + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, + IN EFI_STRING Uri ); // @@ -121,6 +139,7 @@ struct _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL { EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME Consume; EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE Update; EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK Check; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_IDENTIFY Identify; EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_GET_INFO GetInfo; }; -- 2.32.0.windows.2