Loading examples/ADM_set_qos_constraints_push.cpp→examples/ADM_set_qos_constraints.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ main(int argc, char* argv[]) { fmt::print(stderr, "ERROR: no location provided\n"); fmt::print( stderr, "Usage: ADM_set_qos_constraints_push <REMOTE_IP> <SCOPE> <QOS_CLASS> <ELEMENT_ID> <CLASS_VALUE>\n"); "Usage: ADM_set_qos_constraints <REMOTE_IP> <SCOPE> <QOS_CLASS> <ELEMENT_ID> <CLASS_VALUE>\n"); exit(EXIT_FAILURE); } Loading @@ -20,9 +20,9 @@ main(int argc, char* argv[]) { fmt::print( stdout, "Calling ADM_set_qos_constraints_push remote procedure on {} with scope {}, QoS class {}, element id {} and class value {} ...\n", "Calling ADM_set_qos_constraints remote procedure on {} with scope {}, QoS class {}, element id {} and class value {} ...\n", argv[1], argv[2], argv[3], argv[4], argv[5]); ADM_set_qos_constraints_push_in_t in; ADM_set_qos_constraints_in_t in; in.scope = argv[2]; in.qos_class = argv[3]; try { Loading @@ -33,19 +33,19 @@ main(int argc, char* argv[]) { } in.class_value = argv[4]; ADM_set_qos_constraints_push_out_t out; ADM_set_qos_constraints_out_t out; endp.call("ADM_set_qos_constraints_push", &in, &out); endp.call("ADM_set_qos_constraints", &in, &out); if(out.ret < 0) { fmt::print( stdout, "ADM_set_qos_constraints_push remote procedure not completed successfully\n"); "ADM_set_qos_constraints remote procedure not completed successfully\n"); exit(EXIT_FAILURE); } else { fmt::print( stdout, "ADM_set_qos_constraints_push remote procedure completed successfully\n"); "ADM_set_qos_constraints remote procedure completed successfully\n"); } } examples/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ list(APPEND examples ADM_in_situ_ops ADM_in_transit_ops ADM_transfer_dataset ADM_set_dataset_information ADM_set_io_resources ADM_get_transfer_priority ADM_set_transfer_priority ADM_cancel_transfer ADM_get_pending_transfers ADM_set_qos_constraints_push ADM_define_data_operation ADM_connect_data_operation ADM_set_qos_constraints ADM_define_data_operation ADM_connect_data_operation ADM_finalize_data_operation ADM_link_transfer_to_data_operation ADM_get_statistics) foreach (example IN LISTS examples) Loading src/network/engine.hpp +3 −4 Original line number Diff line number Diff line Loading @@ -193,10 +193,9 @@ struct engine { true); REGISTER_RPC(m_context->m_mid, m_context->m_rpc_names, "ADM_set_qos_constraints_push", ADM_set_qos_constraints_push_in_t, ADM_set_qos_constraints_push_out_t, ADM_set_qos_constraints_push, true); "ADM_set_qos_constraints", ADM_set_qos_constraints_in_t, ADM_set_qos_constraints_out_t, ADM_set_qos_constraints, true); REGISTER_RPC(m_context->m_mid, m_context->m_rpc_names, "ADM_set_qos_constraints_pull", Loading src/network/rpcs.cpp +11 −13 Original line number Diff line number Diff line Loading @@ -959,11 +959,11 @@ DEFINE_MARGO_RPC_HANDLER(ADM_get_pending_transfers) * successfully or not. */ static void ADM_set_qos_constraints_push(hg_handle_t h) { ADM_set_qos_constraints(hg_handle_t h) { hg_return_t ret; ADM_set_qos_constraints_push_in_t in; ADM_set_qos_constraints_push_out_t out; ADM_set_qos_constraints_in_t in; ADM_set_qos_constraints_out_t out; margo_instance_id mid = margo_hg_handle_get_instance(h); Loading @@ -976,28 +976,26 @@ ADM_set_qos_constraints_push(hg_handle_t h) { out.status = -1; if(in.scope == nullptr) { LOGGER_ERROR("ADM_set_qos_constraints_push(): invalid scope (nullptr)"); LOGGER_ERROR("ADM_set_qos_constraints(): invalid scope (nullptr)"); } else if(in.qos_class == nullptr) { LOGGER_ERROR( "ADM_set_qos_constraints_push(): invalid qos_class (nullptr)"); LOGGER_ERROR("ADM_set_qos_constraints(): invalid qos_class (nullptr)"); } else if(in.element_id < 0) { LOGGER_ERROR( "ADM_set_qos_constraints_push(): invalid element_id (< 0)"); LOGGER_ERROR("ADM_set_qos_constraints(): invalid element_id (< 0)"); } else if(in.class_value == nullptr) { LOGGER_ERROR( "ADM_set_qos_constraints_push(): invalid class_value (nullptr)"); "ADM_set_qos_constraints(): invalid class_value (nullptr)"); } else { LOGGER_INFO("ADM_set_qos_constraints_push({}, {}, {}, {})", in.scope, LOGGER_INFO("ADM_set_qos_constraints({}, {}, {}, {})", in.scope, in.qos_class, in.element_id, in.class_value); if((scp == "dataset") || (scp == "node") || (scp == "job")) { LOGGER_INFO( "ADM_set_qos_constraints_push scope value is acceptable ({})", "ADM_set_qos_constraints scope value is acceptable ({})", in.scope); out.ret = 0; out.status = 0; } else { LOGGER_ERROR( "ADM_set_qos_constraints_push scope value is not valid. Please use: dataset, node or job"); "ADM_set_qos_constraints scope value is not valid. Please use: dataset, node or job"); } } Loading @@ -1012,7 +1010,7 @@ ADM_set_qos_constraints_push(hg_handle_t h) { assert(ret == HG_SUCCESS); } DEFINE_MARGO_RPC_HANDLER(ADM_set_qos_constraints_push) DEFINE_MARGO_RPC_HANDLER(ADM_set_qos_constraints) /** * Returns a list of QoS constraints defined for an element identified for id. Loading src/network/rpcs.hpp +4 −5 Original line number Diff line number Diff line Loading @@ -212,17 +212,17 @@ MERCURY_GEN_PROC(ADM_get_pending_transfers_out_t, DECLARE_MARGO_RPC_HANDLER(ADM_get_pending_transfers); /// ADM_set_qos_constraints_push /// ADM_set_qos_constraints MERCURY_GEN_PROC( ADM_set_qos_constraints_push_in_t, ADM_set_qos_constraints_in_t, ((hg_const_string_t) (scope))((hg_const_string_t) (qos_class))( (int32_t) (element_id))((hg_const_string_t) (class_value))) MERCURY_GEN_PROC(ADM_set_qos_constraints_push_out_t, MERCURY_GEN_PROC(ADM_set_qos_constraints_out_t, ((int32_t) (ret))((int32_t) (status))) DECLARE_MARGO_RPC_HANDLER(ADM_set_qos_constraints_push); DECLARE_MARGO_RPC_HANDLER(ADM_set_qos_constraints); /// ADM_set_qos_constraints_pull Loading Loading @@ -291,7 +291,6 @@ MERCURY_GEN_PROC(ADM_get_statistics_out_t, DECLARE_MARGO_RPC_HANDLER(ADM_get_statistics); //} // namespace scord::network::rpc #endif // SCORD_NETWORK_RPCS_HPP Loading
examples/ADM_set_qos_constraints_push.cpp→examples/ADM_set_qos_constraints.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ main(int argc, char* argv[]) { fmt::print(stderr, "ERROR: no location provided\n"); fmt::print( stderr, "Usage: ADM_set_qos_constraints_push <REMOTE_IP> <SCOPE> <QOS_CLASS> <ELEMENT_ID> <CLASS_VALUE>\n"); "Usage: ADM_set_qos_constraints <REMOTE_IP> <SCOPE> <QOS_CLASS> <ELEMENT_ID> <CLASS_VALUE>\n"); exit(EXIT_FAILURE); } Loading @@ -20,9 +20,9 @@ main(int argc, char* argv[]) { fmt::print( stdout, "Calling ADM_set_qos_constraints_push remote procedure on {} with scope {}, QoS class {}, element id {} and class value {} ...\n", "Calling ADM_set_qos_constraints remote procedure on {} with scope {}, QoS class {}, element id {} and class value {} ...\n", argv[1], argv[2], argv[3], argv[4], argv[5]); ADM_set_qos_constraints_push_in_t in; ADM_set_qos_constraints_in_t in; in.scope = argv[2]; in.qos_class = argv[3]; try { Loading @@ -33,19 +33,19 @@ main(int argc, char* argv[]) { } in.class_value = argv[4]; ADM_set_qos_constraints_push_out_t out; ADM_set_qos_constraints_out_t out; endp.call("ADM_set_qos_constraints_push", &in, &out); endp.call("ADM_set_qos_constraints", &in, &out); if(out.ret < 0) { fmt::print( stdout, "ADM_set_qos_constraints_push remote procedure not completed successfully\n"); "ADM_set_qos_constraints remote procedure not completed successfully\n"); exit(EXIT_FAILURE); } else { fmt::print( stdout, "ADM_set_qos_constraints_push remote procedure completed successfully\n"); "ADM_set_qos_constraints remote procedure completed successfully\n"); } }
examples/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ list(APPEND examples ADM_in_situ_ops ADM_in_transit_ops ADM_transfer_dataset ADM_set_dataset_information ADM_set_io_resources ADM_get_transfer_priority ADM_set_transfer_priority ADM_cancel_transfer ADM_get_pending_transfers ADM_set_qos_constraints_push ADM_define_data_operation ADM_connect_data_operation ADM_set_qos_constraints ADM_define_data_operation ADM_connect_data_operation ADM_finalize_data_operation ADM_link_transfer_to_data_operation ADM_get_statistics) foreach (example IN LISTS examples) Loading
src/network/engine.hpp +3 −4 Original line number Diff line number Diff line Loading @@ -193,10 +193,9 @@ struct engine { true); REGISTER_RPC(m_context->m_mid, m_context->m_rpc_names, "ADM_set_qos_constraints_push", ADM_set_qos_constraints_push_in_t, ADM_set_qos_constraints_push_out_t, ADM_set_qos_constraints_push, true); "ADM_set_qos_constraints", ADM_set_qos_constraints_in_t, ADM_set_qos_constraints_out_t, ADM_set_qos_constraints, true); REGISTER_RPC(m_context->m_mid, m_context->m_rpc_names, "ADM_set_qos_constraints_pull", Loading
src/network/rpcs.cpp +11 −13 Original line number Diff line number Diff line Loading @@ -959,11 +959,11 @@ DEFINE_MARGO_RPC_HANDLER(ADM_get_pending_transfers) * successfully or not. */ static void ADM_set_qos_constraints_push(hg_handle_t h) { ADM_set_qos_constraints(hg_handle_t h) { hg_return_t ret; ADM_set_qos_constraints_push_in_t in; ADM_set_qos_constraints_push_out_t out; ADM_set_qos_constraints_in_t in; ADM_set_qos_constraints_out_t out; margo_instance_id mid = margo_hg_handle_get_instance(h); Loading @@ -976,28 +976,26 @@ ADM_set_qos_constraints_push(hg_handle_t h) { out.status = -1; if(in.scope == nullptr) { LOGGER_ERROR("ADM_set_qos_constraints_push(): invalid scope (nullptr)"); LOGGER_ERROR("ADM_set_qos_constraints(): invalid scope (nullptr)"); } else if(in.qos_class == nullptr) { LOGGER_ERROR( "ADM_set_qos_constraints_push(): invalid qos_class (nullptr)"); LOGGER_ERROR("ADM_set_qos_constraints(): invalid qos_class (nullptr)"); } else if(in.element_id < 0) { LOGGER_ERROR( "ADM_set_qos_constraints_push(): invalid element_id (< 0)"); LOGGER_ERROR("ADM_set_qos_constraints(): invalid element_id (< 0)"); } else if(in.class_value == nullptr) { LOGGER_ERROR( "ADM_set_qos_constraints_push(): invalid class_value (nullptr)"); "ADM_set_qos_constraints(): invalid class_value (nullptr)"); } else { LOGGER_INFO("ADM_set_qos_constraints_push({}, {}, {}, {})", in.scope, LOGGER_INFO("ADM_set_qos_constraints({}, {}, {}, {})", in.scope, in.qos_class, in.element_id, in.class_value); if((scp == "dataset") || (scp == "node") || (scp == "job")) { LOGGER_INFO( "ADM_set_qos_constraints_push scope value is acceptable ({})", "ADM_set_qos_constraints scope value is acceptable ({})", in.scope); out.ret = 0; out.status = 0; } else { LOGGER_ERROR( "ADM_set_qos_constraints_push scope value is not valid. Please use: dataset, node or job"); "ADM_set_qos_constraints scope value is not valid. Please use: dataset, node or job"); } } Loading @@ -1012,7 +1010,7 @@ ADM_set_qos_constraints_push(hg_handle_t h) { assert(ret == HG_SUCCESS); } DEFINE_MARGO_RPC_HANDLER(ADM_set_qos_constraints_push) DEFINE_MARGO_RPC_HANDLER(ADM_set_qos_constraints) /** * Returns a list of QoS constraints defined for an element identified for id. Loading
src/network/rpcs.hpp +4 −5 Original line number Diff line number Diff line Loading @@ -212,17 +212,17 @@ MERCURY_GEN_PROC(ADM_get_pending_transfers_out_t, DECLARE_MARGO_RPC_HANDLER(ADM_get_pending_transfers); /// ADM_set_qos_constraints_push /// ADM_set_qos_constraints MERCURY_GEN_PROC( ADM_set_qos_constraints_push_in_t, ADM_set_qos_constraints_in_t, ((hg_const_string_t) (scope))((hg_const_string_t) (qos_class))( (int32_t) (element_id))((hg_const_string_t) (class_value))) MERCURY_GEN_PROC(ADM_set_qos_constraints_push_out_t, MERCURY_GEN_PROC(ADM_set_qos_constraints_out_t, ((int32_t) (ret))((int32_t) (status))) DECLARE_MARGO_RPC_HANDLER(ADM_set_qos_constraints_push); DECLARE_MARGO_RPC_HANDLER(ADM_set_qos_constraints); /// ADM_set_qos_constraints_pull Loading Loading @@ -291,7 +291,6 @@ MERCURY_GEN_PROC(ADM_get_statistics_out_t, DECLARE_MARGO_RPC_HANDLER(ADM_get_statistics); //} // namespace scord::network::rpc #endif // SCORD_NETWORK_RPCS_HPP