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

Implment `ADM_terminate_adhoc_storage` RPC

- Rename `ADM_tear_down_adhoc_storage` RPC and related functions to
  `ADM_terminate_adhoc_storage`.
- scord-ctl: The new implementation for the RPC handler makes use of the
  new configuration files to construct the command line for termination.
parent 9f4134ac
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ RPC_NAMES = {
    'ADM_register_job', 'ADM_update_job', 'ADM_remove_job',
    'ADM_register_adhoc_storage', 'ADM_update_adhoc_storage',
    'ADM_remove_adhoc_storage', 'ADM_deploy_adhoc_storage',
    'ADM_tear_down_adhoc_storage',
    'ADM_terminate_adhoc_storage',
    'ADM_register_pfs_storage', 'ADM_update_pfs_storage',
    'ADM_remove_pfs_storage',
    'ADM_transfer_datasets', 'ADM_get_transfer_priority',
+5 −5
Original line number Diff line number Diff line
@@ -102,9 +102,9 @@ main(int argc, char* argv[]) {
    }

    // 2. Register the adhoc storage
    if(ADM_register_adhoc_storage(
               server, adhoc_name, ADM_ADHOC_STORAGE_DATACLAY, adhoc_ctx,
               adhoc_resources, &adhoc_storage) != ADM_SUCCESS) {
    if(ADM_register_adhoc_storage(server, adhoc_name, ADM_ADHOC_STORAGE_GEKKOFS,
                                  adhoc_ctx, adhoc_resources,
                                  &adhoc_storage) != ADM_SUCCESS) {
        fprintf(stderr, "ADM_register_adhoc_storage() failed: %s\n",
                ADM_strerror(ret));
        goto cleanup;
@@ -133,9 +133,9 @@ main(int argc, char* argv[]) {
    }

    // We can noe request the tear down of the adhoc storage
    if((ret = ADM_tear_down_adhoc_storage(server, adhoc_storage)) !=
    if((ret = ADM_terminate_adhoc_storage(server, adhoc_storage)) !=
       ADM_SUCCESS) {
        fprintf(stderr, "ADM_tear_down_adhoc_storage() failed: %s\n",
        fprintf(stderr, "ADM_terminate_adhoc_storage() failed: %s\n",
                ADM_strerror(ret));
        goto cleanup;
    }
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ list(APPEND c_examples_with_controller
  ADM_register_job ADM_update_job ADM_remove_job
  # adhoc storage
  ADM_register_adhoc_storage ADM_update_adhoc_storage ADM_remove_adhoc_storage
  ADM_deploy_adhoc_storage ADM_tear_down_adhoc_storage
  ADM_deploy_adhoc_storage ADM_terminate_adhoc_storage
  # transfers
  ADM_transfer_datasets ADM_get_transfer_priority ADM_set_transfer_priority
  ADM_cancel_transfer ADM_get_pending_transfers
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ main(int argc, char* argv[]) {

    try {
        const auto adhoc_storage = scord::register_adhoc_storage(
                server, name, scord::adhoc_storage::type::dataclay,
                server, name, scord::adhoc_storage::type::gekkofs,
                adhoc_storage_ctx, adhoc_resources);

        fmt::print(stdout,
@@ -66,7 +66,7 @@ main(int argc, char* argv[]) {

        scord::deploy_adhoc_storage(server, adhoc_storage);

        scord::tear_down_adhoc_storage(server, adhoc_storage);
        scord::terminate_adhoc_storage(server, adhoc_storage);

    } catch(const std::exception& e) {
        fmt::print(stderr,
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ list(APPEND cxx_examples_with_controller
  ADM_register_job ADM_update_job ADM_remove_job
  # adhoc storage
  ADM_register_adhoc_storage ADM_update_adhoc_storage ADM_remove_adhoc_storage
  ADM_deploy_adhoc_storage ADM_tear_down_adhoc_storage
  ADM_deploy_adhoc_storage ADM_terminate_adhoc_storage
  # transfers
  ADM_transfer_datasets ADM_get_transfer_priority ADM_set_transfer_priority
  ADM_cancel_transfer ADM_get_pending_transfers
Loading