Commit 92278242 authored by Ramon Nou's avatar Ramon Nou
Browse files

Reverted ADM_storage public interface

parent 7578bb06
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ main(int argc, char* argv[]) {
    }

    // We can now request the deployment to the server
    if((ret = ADM_deploy_adhoc_storage(server, adhoc_storage->s_id)) !=
    if((ret = ADM_deploy_adhoc_storage(server, adhoc_storage)) !=
       ADM_SUCCESS) {
        fprintf(stderr, "ADM_deploy_adhoc_storage() failed: %s\n",
                ADM_strerror(ret));
+5 −13
Original line number Diff line number Diff line
@@ -62,24 +62,16 @@ main(int argc, char* argv[]) {
                   "ADM_register_adhoc_storage() remote procedure completed "
                   "successfully\n");

        admire::deploy_adhoc_storage(server, adhoc_storage.id());
        admire::deploy_adhoc_storage(server, adhoc_storage);

    } catch(const std::exception& e) {
        fmt::print(stderr, "FATAL: ADM_register_adhoc_storage() failed: {}\n",
        fmt::print(
                stderr,
                "FATAL: ADM_register_adhoc_storage() or ADM_deploy_adhoc_storage() failed: {}\n",
                e.what());
        exit(EXIT_FAILURE);
    }

    ADM_return_t ret = ADM_SUCCESS;


    if(ret != ADM_SUCCESS) {
        fmt::print(stdout,
                   "ADM_deploy_adhoc_storage() remote procedure not completed "
                   "successfully\n");
        exit(EXIT_FAILURE);
    }

    fmt::print(stdout, "ADM_deploy_adhoc_storage() remote procedure completed "
                       "successfully\n");
}
+2 −2
Original line number Diff line number Diff line
@@ -284,9 +284,9 @@ remove_adhoc_storage(const server& srv, const adhoc_storage& adhoc_storage) {
}

void
deploy_adhoc_storage(const server& srv, const uint64_t adhoc_id) {
deploy_adhoc_storage(const server& srv, const adhoc_storage& adhoc_storage) {
   
    const auto ec = detail::deploy_adhoc_storage(srv, adhoc_id);
    const auto ec = detail::deploy_adhoc_storage(srv, adhoc_storage);

    if(!ec) {
        throw std::runtime_error(fmt::format(
+3 −2
Original line number Diff line number Diff line
@@ -147,12 +147,13 @@ ADM_remove_adhoc_storage(ADM_server_t server, ADM_storage_t adhoc_storage);
 * Initiate the deployment of an adhoc storage system instance.
 *
 * @param[in] server The server to which the request is directed
 * @param[in] adhoc_id An ADM_STORAGE referring to the adhoc storage
 * @param[in] job An ADM_JOB identifying the originating job.
 * @param[in] adhoc_storage An ADM_STORAGE referring to the adhoc storage
 * instance of interest.
 * @return Returns ADM_SUCCESS if the remote procedure has completed
 */
ADM_return_t
ADM_deploy_adhoc_storage(ADM_server_t server, u_int64_t adhoc_id);
ADM_deploy_adhoc_storage(ADM_server_t server, ADM_storage_t adhoc_storage);

/**
 * Register a PFS storage tier.
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ void
remove_adhoc_storage(const server& srv, const adhoc_storage& adhoc_storage);

void
deploy_adhoc_storage(const server& srv, uint64_t adhoc_id);
deploy_adhoc_storage(const server& srv, const adhoc_storage& adhoc_storage);

ADM_return_t
register_pfs_storage(const server& srv, ADM_pfs_context_t ctx,
Loading