Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Sep 29, 2023
1 parent eb11571 commit b896c1d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 33 deletions.
34 changes: 18 additions & 16 deletions lib/api/include/irods/get_resource_info_for_operation.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,25 @@ extern "C" {

/// Get preferred-resource information for the specified operation.
///
/// \param[in] _comm An rcComm_t connection handle to the server.
/// \param[in] _comm An RcComm connection handle to the server.
/// \param[in] _dataObjInp \parblock A DataObjInp describing the data object operation.
/// - \p objPath: The logical path of the target data object.
/// - \p condInput: A list of options that influence the results of the operation.
/// - \p REPL_NUM_KW: The replica number of an existing replica.
/// - \p GET_RESOURCE_INFO_FOR_OPERATION_KW: The operation of interest. The following values are supported:
/// - "CREATE"
/// - "WRITE"
/// - "OPEN"
/// - "UNLINK"
/// - \p GET_RESOURCE_INFO_FOR_OPERATION_KW: The operation of interest. This option is required.
///
/// The following values are supported:
/// - \p "CREATE"
/// - \p "WRITE"
/// - \p "OPEN"
/// - \p "UNLINK"
/// - \p RESC_NAME_KW: Resource name hint. Given the name of a root resource, influences voting to select the
/// appropriate replica.
/// - \p RESC_HIER_STR_KW: Resource hierarchy hint. Given a hierarchy string, specifies the desired replica.
/// - \p REPL_NUM_KW: Replica number hint. Given a replica number, specifies the desired replica.
/// \endparblock
/// \param[out] _out_info \parblock a JSON string with keys "host" and "resource_hierarchy", identifying target server
/// and supplying a resource hierarchy string denoting a specific data object replica for the
/// logical path given as input.
/// \param[out] _out_info \parblock a JSON string with keys \p "host" and \p "resource_hierarchy", identifying target
/// server and supplying a resource hierarchy string denoting a specific data object replica for
/// the logical path given as input.
///
/// On success, \p _out_info will have the following structure:
/// \code{.js}
Expand All @@ -48,17 +50,17 @@ extern "C" {
/// DataObjInp inp;
/// memset(&inp, 0, sizeof(DataObjInp));
///
/// // Set the full logical path to the data object.
/// // The data object in question may or may not exist. It depends on what
/// // the client is attempting to do.
/// // Set the full logical path to the data object of interest.
/// // The data object may or may not exist depending on what the client is
/// // attempting to do.
/// strncpy(inp.objPath, "/tempZone/home/rods/data_object", MAX_NAME_LEN);
///
/// // Set the operation type for resource hierarchy resolution.
/// // Set the operation type for resource hierarchy resolution. This is required.
/// // This influences how voting is carried out.
/// addKeyVal(&inp.condInput, "GET_RESOURCE_INFO_OP_TYPE_KW", "CREATE");
///
/// // The pointer that will point to a heap-allocated buffer holding the JSON
/// // output.
/// // A pointer that will point to a heap-allocated buffer holding the JSON
/// // string if the API call succeeds.
/// char* char_buffer = NULL;
///
/// const int ec = rc_get_resource_info_for_operation(comm, &inp, &char_buffer);
Expand Down
36 changes: 19 additions & 17 deletions server/api/include/irods/rs_get_resource_info_for_operation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ struct RsComm;

/// Get preferred-resource information for the specified operation.
///
/// \param[in] _comm An rsComm_t connection handle to the server.
/// \param[in] _comm An RsComm connection handle to the server.
/// \param[in] _dataObjInp \parblock A DataObjInp describing the data object operation.
/// - \p objPath: The logical path of the target data object.
/// - \p condInput: A list of options that influence the results of the operation.
/// - \p REPL_NUM_KW: The replica number of an existing replica.
/// - \p GET_RESOURCE_INFO_FOR_OPERATION_KW: The operation of interest. The following values are supported:
/// - "CREATE"
/// - "WRITE"
/// - "OPEN"
/// - "UNLINK"
/// - \p GET_RESOURCE_INFO_FOR_OPERATION_KW: The operation of interest. This option is required.
///
/// The following values are supported:
/// - \p "CREATE"
/// - \p "WRITE"
/// - \p "OPEN"
/// - \p "UNLINK"
/// - \p RESC_NAME_KW: Resource name hint. Given the name of a root resource, influences voting to select the
/// appropriate replica.
/// appropriate replica.
/// - \p RESC_HIER_STR_KW: Resource hierarchy hint. Given a hierarchy string, specifies the desired replica.
/// - \p REPL_NUM_KW: Replica number hint. Given a replica number, specifies the desired replica.
/// \endparblock
/// \param[out] _out_info \parblock a JSON string with keys "host" and "resource_hierarchy", identifying target server
/// and supplying a resource hierarchy string denoting a specific data object replica for the
/// logical path given as input.
/// \param[out] _out_info \parblock a JSON string with keys \p "host" and \p "resource_hierarchy", identifying target
/// server and supplying a resource hierarchy string denoting a specific data object replica for
/// the logical path given as input.
///
/// On success, \p _out_info will have the following structure:
/// \code{.js}
Expand All @@ -44,17 +46,17 @@ struct RsComm;
/// DataObjInp inp;
/// memset(&inp, 0, sizeof(DataObjInp));
///
/// // Set the full logical path to the data object.
/// // The data object in question may or may not exist. It depends on what
/// // the client is attempting to do.
/// // Set the full logical path to the data object of interest.
/// // The data object may or may not exist depending on what the client is
/// // attempting to do.
/// strncpy(inp.objPath, "/tempZone/home/rods/data_object", MAX_NAME_LEN);
///
/// // Set the operation type for resource hierarchy resolution.
/// // Set the operation type for resource hierarchy resolution. This is required.
/// // This influences how voting is carried out.
/// addKeyVal(&inp.condInput, "GET_RESOURCE_INFO_OP_TYPE_KW", "CREATE");
///
/// // The pointer that will point to a heap-allocated buffer holding the JSON
/// // output.
/// // A pointer that will point to a heap-allocated buffer holding the JSON
/// // string if the API call succeeds.
/// char* char_buffer = NULL;
///
/// const int ec = rs_get_resource_info_for_operation(comm, &inp, &char_buffer);
Expand Down

0 comments on commit b896c1d

Please sign in to comment.