Commit ed9648dc authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Merge branch...

Merge branch '29-fix-adm_register_pfs_storage-adm_remove_pfs_storage-and-adm_update_pfs_storage' into 'main'

Resolve "Fix ADM_register_pfs_storage, ADM_remove_pfs_storage and ADM_update_pfs_storage"

Closes #29

See merge request !27
parents 212ccfb4 e78969e1
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -76,6 +76,14 @@ rpc_registration_cb(scord::network::rpc_client* client) {
                 ADM_deploy_adhoc_storage_in_t, ADM_deploy_adhoc_storage_out_t,
                 NULL, true);

    REGISTER_RPC(client, "ADM_register_pfs_storage",
                 ADM_register_pfs_storage_in_t, ADM_register_pfs_storage_out_t,
                 NULL, true);
    REGISTER_RPC(client, "ADM_update_pfs_storage", ADM_update_pfs_storage_in_t,
                 ADM_update_pfs_storage_out_t, NULL, true);
    REGISTER_RPC(client, "ADM_remove_pfs_storage", ADM_remove_pfs_storage_in_t,
                 ADM_remove_pfs_storage_out_t, NULL, true);

    REGISTER_RPC(client, "ADM_input", ADM_input_in_t, ADM_input_out_t, NULL,
                 true);

+11 −5
Original line number Diff line number Diff line
@@ -54,6 +54,14 @@ rpc_registration_cb(scord::network::rpc_client* client) {
                 ADM_deploy_adhoc_storage_in_t, ADM_deploy_adhoc_storage_out_t,
                 NULL, true);

    REGISTER_RPC(client, "ADM_register_pfs_storage",
                 ADM_register_pfs_storage_in_t, ADM_register_pfs_storage_out_t,
                 NULL, true);
    REGISTER_RPC(client, "ADM_update_pfs_storage", ADM_update_pfs_storage_in_t,
                 ADM_update_pfs_storage_out_t, NULL, true);
    REGISTER_RPC(client, "ADM_remove_pfs_storage", ADM_remove_pfs_storage_in_t,
                 ADM_remove_pfs_storage_out_t, NULL, true);

    REGISTER_RPC(client, "ADM_input", ADM_input_in_t, ADM_input_out_t, NULL,
                 true);

@@ -213,8 +221,7 @@ update_job(const server& srv, const job& job, const job_requirements& reqs) {

    if(out.retval < 0) {
        const auto retval = static_cast<admire::error_code>(out.retval);
        LOGGER_ERROR("RPC (ADM_{}) <= {{retval: {}}}", __FUNCTION__,
                     retval);
        LOGGER_ERROR("RPC (ADM_{}) <= {{retval: {}}}", __FUNCTION__, retval);
        return retval;
    }

@@ -240,8 +247,7 @@ remove_job(const server& srv, const job& job) {

    if(out.retval < 0) {
        const auto retval = static_cast<admire::error_code>(out.retval);
        LOGGER_ERROR("RPC (ADM_{}) <= {{retval: {}}}", __FUNCTION__,
                     retval);        
        LOGGER_ERROR("RPC (ADM_{}) <= {{retval: {}}}", __FUNCTION__, retval);
        return retval;
    }

+11 −0
Original line number Diff line number Diff line
@@ -185,6 +185,17 @@ main(int argc, char* argv[]) {
                         ADM_deploy_adhoc_storage_out_t,
                         ADM_deploy_adhoc_storage, true);

            REGISTER_RPC(ctx, "ADM_register_pfs_storage",
                         ADM_register_pfs_storage_in_t,
                         ADM_register_pfs_storage_out_t,
                         ADM_register_pfs_storage, true);
            REGISTER_RPC(
                    ctx, "ADM_update_pfs_storage", ADM_update_pfs_storage_in_t,
                    ADM_update_pfs_storage_out_t, ADM_update_pfs_storage, true);
            REGISTER_RPC(
                    ctx, "ADM_remove_pfs_storage", ADM_remove_pfs_storage_in_t,
                    ADM_remove_pfs_storage_out_t, ADM_remove_pfs_storage, true);

            REGISTER_RPC(ctx, "ADM_input", ADM_input_in_t, ADM_input_out_t,
                         ADM_input, true);