- 
                Notifications
    
You must be signed in to change notification settings  - Fork 12
 
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This is about to improve Redfish performance. This task focus on "7.3 Query parameters" in Redfish specification.
The idea is to use "$expand" to query Redfish collection at once and reduce the network communication between host and BMC. To do this, we have two tasks:
- Create RedfishFeaturesSupportedLib to check the protocol support capability by reading the attribute "ProtocolFeaturesSupported" defined in computer system schema.
 - Enhance EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL. We don't have protocol revision filed defined EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL in the firs place. For backward compatibility, we have to create new protocol and fix this problem:
 
struct _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2 {
  UINT32                                                                                                Revision;
  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2_PROVISIONING    Provisioning;
  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2_CONSUME         Consume;
  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2_UPDATE          Update;
  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2_CHECK           Check;
  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2_IDENTIFY        Identify;
  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2_GET_INFO        GetInfo;
}And adding new parameter (JsonContext) to Provisioning, Consume, Update, Check and Identify so that collection driver uses "$expand" to get all instances and pass instance to non-collection driver. This is optional parameter and non-collection driver can check this parameter to see if non-collection driver has to download the context on its own or not.
/**
  Provising redfish resource by given URI.
  @param[in]   This                Pointer to EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance.
  @param[in]   Uri                 Target URI to create resource.
  @param[in]   HttpPostMode        TRUE if resource does not exist, HTTP POST method is used.
                                   FALSE if the resource exist but some of properties are missing,
                                   HTTP PUT method is used.
  @retval EFI_SUCCESS              Value is returned successfully.
  @retval Others                   Some error happened.
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2_PROVISIONING)(
  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2  *This,
  IN     EFI_STRING                              Uri,
  IN     CHAR8                                   *JsonContext OPTIONAL,
  IN     BOOLEAN                                 HttpPostMode
  );
/**
  Consume resource from given URI.
  @param[in]   This                Pointer to EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance.
  @param[in]   Uri                 The target URI to consume.
  @retval EFI_SUCCESS              Value is returned successfully.
  @retval Others                   Some error happened.
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2_CONSUME)(
  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2  *This,
  IN     EFI_STRING                              Uri,
  IN     CHAR8                                   *JsonContext OPTIONAL
  );
/**
  Update resource to given URI.
  @param[in]   This                Pointer to EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance.
  @param[in]   Uri                 The target URI to consume.
  @retval EFI_SUCCESS              Value is returned successfully.
  @retval Others                   Some error happened.
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2_UPDATE)(
  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2  *This,
  IN     EFI_STRING                              Uri,
  IN     CHAR8                                   *JsonContext OPTIONAL
  );
/**
  Check 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              Value is returned successfully.
  @retval Others                   Some error happened.
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2_CHECK)(
  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2  *This,
  IN     EFI_STRING                              Uri,
  IN     CHAR8                                   *JsonContext OPTIONAL
  );
/**
  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_PROTOCOL2_IDENTIFY)(
  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL2  *This,
  IN     EFI_STRING                              Uri,
  IN     CHAR8                                   *JsonContext OPTIONAL
  );Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request