diff --git a/examples/c/ADM_cancel_transfer.c b/examples/c/ADM_cancel_transfer.c index 26dc84d537db74db5aa64eef806a4c4f6c40565b..9d215cce8009645f2e8218147933850ff090eb10 100644 --- a/examples/c/ADM_cancel_transfer.c +++ b/examples/c/ADM_cancel_transfer.c @@ -71,8 +71,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, "ADM_register_adhoc_storage() remote procedure not " diff --git a/examples/c/ADM_connect_data_operation.c b/examples/c/ADM_connect_data_operation.c index aeb1978879921122c618c043fe77c52f196caab6..bcdbaa122723cc683ec8243ba14020d377f37e69 100644 --- a/examples/c/ADM_connect_data_operation.c +++ b/examples/c/ADM_connect_data_operation.c @@ -67,8 +67,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_define_data_operation.c b/examples/c/ADM_define_data_operation.c index d451429380887b157edbb6f4cdbcab8b3fab5b3f..c23257fe8e24170604cc140055686222fb78b0de 100644 --- a/examples/c/ADM_define_data_operation.c +++ b/examples/c/ADM_define_data_operation.c @@ -72,8 +72,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_deploy_adhoc_storage.c b/examples/c/ADM_deploy_adhoc_storage.c index 52b37bee3f6557150b2ece893ad03c493768ba69..810043ce4551cbfab107513aba1c131dd1235ea1 100644 --- a/examples/c/ADM_deploy_adhoc_storage.c +++ b/examples/c/ADM_deploy_adhoc_storage.c @@ -63,8 +63,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_finalize_data_operation.c b/examples/c/ADM_finalize_data_operation.c index d84fdeaf18d0ef67513ce3adbbc8ab6992d4ae6e..a8d653cf0bd48b7ce30873730e8cfae6ce95a0d8 100644 --- a/examples/c/ADM_finalize_data_operation.c +++ b/examples/c/ADM_finalize_data_operation.c @@ -68,8 +68,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_get_pending_transfers.c b/examples/c/ADM_get_pending_transfers.c index 907a17780ada44fb9a71514f012a5a033b724cf6..e7d2f0d46c86f6f913cde99d782f03d2439d51c8 100644 --- a/examples/c/ADM_get_pending_transfers.c +++ b/examples/c/ADM_get_pending_transfers.c @@ -71,8 +71,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_get_qos_constraints.c b/examples/c/ADM_get_qos_constraints.c index 93ec70aa19285c471dbfc6e233f5ad261156af6f..f167aa1627759a8512b3ebdfd048bb504b9b5bfe 100644 --- a/examples/c/ADM_get_qos_constraints.c +++ b/examples/c/ADM_get_qos_constraints.c @@ -67,8 +67,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_get_statistics.c b/examples/c/ADM_get_statistics.c index 080dedb7bc7faa99e3e520c34c6d3ff8504f18b2..78ce2ee2f21a69187201dfac7b47f04ec7e50b7f 100644 --- a/examples/c/ADM_get_statistics.c +++ b/examples/c/ADM_get_statistics.c @@ -67,8 +67,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_get_transfer_priority.c b/examples/c/ADM_get_transfer_priority.c index 211c693a1deb4b78951ebb64843fd59f198952d4..e3c639420d28688996392252fb33b16459fc492e 100644 --- a/examples/c/ADM_get_transfer_priority.c +++ b/examples/c/ADM_get_transfer_priority.c @@ -71,8 +71,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_link_transfer_to_data_operation.c b/examples/c/ADM_link_transfer_to_data_operation.c index 18a353bc6434ffcb839aaa10422551169de7225a..7aec6040ef44d4450125e167ca656be83b641e48 100644 --- a/examples/c/ADM_link_transfer_to_data_operation.c +++ b/examples/c/ADM_link_transfer_to_data_operation.c @@ -68,8 +68,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_register_adhoc_storage.c b/examples/c/ADM_register_adhoc_storage.c index 144f0a71bc207ec7d17344e88c4af25f24d57018..be126cceb88efd837fd39664fd194a8f6625d070 100644 --- a/examples/c/ADM_register_adhoc_storage.c +++ b/examples/c/ADM_register_adhoc_storage.c @@ -63,8 +63,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_register_job.c b/examples/c/ADM_register_job.c index 75a8fd4af2947e1120916f3c40f6691a28f66f4d..482607d147a27198e4f82ada823fd80e91aa769c 100644 --- a/examples/c/ADM_register_job.c +++ b/examples/c/ADM_register_job.c @@ -71,8 +71,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_remove_adhoc_storage.c b/examples/c/ADM_remove_adhoc_storage.c index f35f6accce3724ecc72fa246117c8b2144765aa7..1818f55559925d6e3a18200b447defdc3f529df7 100644 --- a/examples/c/ADM_remove_adhoc_storage.c +++ b/examples/c/ADM_remove_adhoc_storage.c @@ -63,8 +63,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_remove_job.c b/examples/c/ADM_remove_job.c index 299c85d52eca2c51bff20ee44e935bd689b3fced..dd0dabcc3bb30f426f746a92c9f3be28198e4f83 100644 --- a/examples/c/ADM_remove_job.c +++ b/examples/c/ADM_remove_job.c @@ -71,8 +71,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_set_dataset_information.c b/examples/c/ADM_set_dataset_information.c index fa4a10425df3475a3732061aa7287f369c449ead..34c9a5ab80a79b5dd75b660bf15cbe30dd7a7fdb 100644 --- a/examples/c/ADM_set_dataset_information.c +++ b/examples/c/ADM_set_dataset_information.c @@ -68,8 +68,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_set_io_resources.c b/examples/c/ADM_set_io_resources.c index 0be040a1fe52835786857c37f8fa12c00bd245ae..2fd90e6fd571aa05cc10d33145d345b485e01bff 100644 --- a/examples/c/ADM_set_io_resources.c +++ b/examples/c/ADM_set_io_resources.c @@ -67,8 +67,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_set_qos_constraints.c b/examples/c/ADM_set_qos_constraints.c index aa665752142306285b322dbd0d091c996e0217c7..58fdb024c3936265ac953b886adc781b98545cdd 100644 --- a/examples/c/ADM_set_qos_constraints.c +++ b/examples/c/ADM_set_qos_constraints.c @@ -71,8 +71,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_set_transfer_priority.c b/examples/c/ADM_set_transfer_priority.c index 22067d1f6ca5154ddc4d71b79fdb258973d96fb2..eee815a63a8e6722cb569ed3fa3915d150bb53d5 100644 --- a/examples/c/ADM_set_transfer_priority.c +++ b/examples/c/ADM_set_transfer_priority.c @@ -71,8 +71,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_transfer_datasets.c b/examples/c/ADM_transfer_datasets.c index 9af2580940ef6ecaf7f6a06188c12726f2b6e8cf..19464da5ffe2134621732f90b35652ce7d3f3a46 100644 --- a/examples/c/ADM_transfer_datasets.c +++ b/examples/c/ADM_transfer_datasets.c @@ -74,8 +74,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_update_adhoc_storage.c b/examples/c/ADM_update_adhoc_storage.c index ee3b96d7a08a275a116401b9924fda74dd4e2d7f..7cb64a291e1b1be2793e0a6f394102e8b85575f4 100644 --- a/examples/c/ADM_update_adhoc_storage.c +++ b/examples/c/ADM_update_adhoc_storage.c @@ -63,8 +63,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/c/ADM_update_job.c b/examples/c/ADM_update_job.c index 639727bdf71540065c6d1257d5e1fcc807d72e39..7ee5e5a82442eaba6c32773a4653bba292c06ea8 100644 --- a/examples/c/ADM_update_job.c +++ b/examples/c/ADM_update_job.c @@ -71,8 +71,8 @@ main(int argc, char* argv[]) { const char* name = "adhoc_storage_42"; ADM_storage_t adhoc_storage; - ADM_return_t ret = - ADM_register_adhoc_storage(server, name, ctx, &adhoc_storage); + ADM_return_t ret = ADM_register_adhoc_storage( + server, name, ADM_STORAGE_GEKKOFS, ctx, &adhoc_storage); if(ret != ADM_SUCCESS) { fprintf(stdout, diff --git a/examples/cxx/ADM_register_adhoc_storage.cpp b/examples/cxx/ADM_register_adhoc_storage.cpp index 3029d619edbbf8f0ba00e56ca2a3d006486faf3b..f877d7f234fb2f8580a9268dc13757078f9b86d2 100644 --- a/examples/cxx/ADM_register_adhoc_storage.cpp +++ b/examples/cxx/ADM_register_adhoc_storage.cpp @@ -54,8 +54,9 @@ main(int argc, char* argv[]) { admire::adhoc_storage::resources{adhoc_nodes}, 100, false}; try { - const auto adhoc_storage = - admire::register_adhoc_storage(server, name, adhoc_storage_ctx); + const auto adhoc_storage = admire::register_adhoc_storage( + server, name, admire::storage::type::gekkofs, + adhoc_storage_ctx); fmt::print(stdout, "ADM_register_adhoc_storage() remote procedure completed " diff --git a/examples/cxx/ADM_register_job.cpp b/examples/cxx/ADM_register_job.cpp index d757c39e988e9e65b0c4e676acd7ae4235694320..05f07f5e0816d04c3cca859ba4fc4e3f216aaca4 100644 --- a/examples/cxx/ADM_register_job.cpp +++ b/examples/cxx/ADM_register_job.cpp @@ -55,8 +55,9 @@ main(int argc, char* argv[]) { try { - const auto adhoc_storage = - admire::register_adhoc_storage(server, name, adhoc_storage_ctx); + const auto adhoc_storage = admire::register_adhoc_storage( + server, name, admire::storage::type::gekkofs, + adhoc_storage_ctx); admire::job_requirements reqs(inputs, outputs, adhoc_storage); diff --git a/examples/cxx/ADM_transfer_datasets.cpp b/examples/cxx/ADM_transfer_datasets.cpp index ff19f803c1017c5ea897d7b588790303e79323d6..e74ed3509cd889bf9c578893f3d516af7d81af03 100644 --- a/examples/cxx/ADM_transfer_datasets.cpp +++ b/examples/cxx/ADM_transfer_datasets.cpp @@ -62,8 +62,9 @@ main(int argc, char* argv[]) { admire::adhoc_storage::resources{adhoc_nodes}, 100, false}; try { - const auto adhoc_storage = - admire::register_adhoc_storage(server, name, adhoc_storage_ctx); + const auto adhoc_storage = admire::register_adhoc_storage( + server, name, admire::storage::type::gekkofs, + adhoc_storage_ctx); admire::job_requirements reqs(inputs, outputs, adhoc_storage); diff --git a/examples/cxx/ADM_update_job.cpp b/examples/cxx/ADM_update_job.cpp index 7df3a8c489739923f681067ab00f55152c632abe..b08f50e17b45796ed91a5c6139199e9d8c0b94b9 100644 --- a/examples/cxx/ADM_update_job.cpp +++ b/examples/cxx/ADM_update_job.cpp @@ -48,7 +48,7 @@ main(int argc, char* argv[]) { const auto outputs = prepare_datasets("output-dataset-{}", NOUTPUTS); const auto gkfs_storage = admire::register_adhoc_storage( - server, "foobar", + server, "foobar", admire::storage::type::gekkofs, admire::adhoc_storage::ctx{ admire::adhoc_storage::execution_mode::separate_new, admire::adhoc_storage::access_type::read_write, diff --git a/src/common/net/proto/rpc_types.c b/src/common/net/proto/rpc_types.c index 6bcbca113f2c7ef4360080e5255ed7e9425570ad..c2df5d57e38b5d90c6b901ebcd8a0179c59df473 100644 --- a/src/common/net/proto/rpc_types.c +++ b/src/common/net/proto/rpc_types.c @@ -24,6 +24,8 @@ #include "rpc_types.h" +hg_return_t (*hg_proc_ADM_storage_type_t)(hg_proc_t, + void*) = hg_proc_hg_uint32_t; hg_return_t (*hg_proc_ADM_qos_scope_t)(hg_proc_t, void*) = hg_proc_hg_uint32_t; hg_return_t (*hg_proc_ADM_qos_class_t)(hg_proc_t, void*) = hg_proc_hg_uint32_t; diff --git a/src/common/net/proto/rpc_types.h b/src/common/net/proto/rpc_types.h index 4caa3fc879f11fa4ab6a6d90457152a58260380d..2f7e536a8bddbf29a3b7631bc348f6501274b1cb 100644 --- a/src/common/net/proto/rpc_types.h +++ b/src/common/net/proto/rpc_types.h @@ -179,6 +179,8 @@ MERCURY_GEN_STRUCT_PROC( ); // clang-format on +extern hg_return_t (*hg_proc_ADM_storage_type_t)(hg_proc_t, void*); + typedef struct adm_storage { const char* s_name; ADM_storage_type_t s_type; @@ -330,6 +332,7 @@ MERCURY_GEN_PROC( MERCURY_GEN_PROC( ADM_register_adhoc_storage_in_t, ((hg_const_string_t) (name)) + ((ADM_storage_type_t) (type)) ((ADM_adhoc_context_t) (ctx)) ); diff --git a/src/lib/admire.cpp b/src/lib/admire.cpp index e3c5dc88d2157c498578865c40012c04278b7b24..71efcccc2425c02605ce43bd70e56804447c8d20 100644 --- a/src/lib/admire.cpp +++ b/src/lib/admire.cpp @@ -235,9 +235,10 @@ remove_job(const server& srv, const job& job) { admire::adhoc_storage register_adhoc_storage(const server& srv, const std::string& name, + enum adhoc_storage::type type, const adhoc_storage::ctx& ctx) { - const auto rv = detail::register_adhoc_storage(srv, name, ctx); + const auto rv = detail::register_adhoc_storage(srv, name, type, ctx); if(!rv) { throw std::runtime_error( diff --git a/src/lib/admire.h b/src/lib/admire.h index a74337a5504bdacc81abf9b632d1d433ff3471f7..3ebb14fd4c8d7f924524df1eb07c8dc8e9aa0513 100644 --- a/src/lib/admire.h +++ b/src/lib/admire.h @@ -90,6 +90,7 @@ ADM_remove_job(ADM_server_t server, ADM_job_t job); * * @param[in] server The server to which the request is directed * @param[in] name The desired name for the adhoc storage system. + * @param[in] type The desired type for the adhoc storage system. * @param[in] ctx The EXECUTION_CONTEXT for the adhoc storage system. * @param[out] adhoc_storage An ADM_STORAGE referring to the newly-created * adhoc storage instance. @@ -98,7 +99,7 @@ ADM_remove_job(ADM_server_t server, ADM_job_t job); */ ADM_return_t ADM_register_adhoc_storage(ADM_server_t server, const char* name, - ADM_adhoc_context_t ctx, + ADM_storage_type_t type, ADM_adhoc_context_t ctx, ADM_storage_t* adhoc_storage); /** diff --git a/src/lib/admire.hpp b/src/lib/admire.hpp index a26848b19f8ea761c54305fef165760d3f6ba5d3..d3e2722467aa78f97837f31c621cdf9f8069b730 100644 --- a/src/lib/admire.hpp +++ b/src/lib/admire.hpp @@ -60,6 +60,7 @@ remove_job(const server& srv, const job& job); admire::adhoc_storage register_adhoc_storage(const server& srv, const std::string& name, + enum adhoc_storage::type type, const adhoc_storage::ctx& ctx); ADM_return_t diff --git a/src/lib/c_wrapper.cpp b/src/lib/c_wrapper.cpp index 9100970cffd272e04c9333e9dd7c308c3a6bf6fd..0bd3e7f605fe5f6f0ed1606db66952f9549fe901 100644 --- a/src/lib/c_wrapper.cpp +++ b/src/lib/c_wrapper.cpp @@ -82,14 +82,14 @@ ADM_remove_job(ADM_server_t server, ADM_job_t job) { ADM_return_t ADM_register_adhoc_storage(ADM_server_t server, const char* name, - ADM_adhoc_context_t ctx, + ADM_storage_type_t type, ADM_adhoc_context_t ctx, ADM_storage_t* adhoc_storage) { const admire::server srv{server}; + const auto cxx_type = static_cast(type); const auto rv = admire::detail::register_adhoc_storage( - srv, name, admire::adhoc_storage::ctx{ctx}); - + srv, name, cxx_type, admire::adhoc_storage::ctx{ctx}); if(!rv) { return rv.error(); diff --git a/src/lib/detail/impl.cpp b/src/lib/detail/impl.cpp index 96a637f39e4bafaa9ddc511915458a02078269eb..770db97ffa4a00f218ab3935d2697bd6e43c5180 100644 --- a/src/lib/detail/impl.cpp +++ b/src/lib/detail/impl.cpp @@ -316,6 +316,7 @@ remove_job(const server& srv, const job& job) { tl::expected register_adhoc_storage(const server& srv, const std::string& name, + enum adhoc_storage::type type, const adhoc_storage::ctx& ctx) { scord::network::rpc_client rpc_client{srv.protocol(), rpc_registration_cb}; @@ -324,14 +325,15 @@ register_adhoc_storage(const server& srv, const std::string& name, auto endp = rpc_client.lookup(srv.address()); LOGGER_INFO("rpc id: {} name: {} from: {} => " - "body: {{name: {}, adhoc_ctx: {}}}", + "body: {{name: {}, type: {}, adhoc_ctx: {}}}", rpc_id, std::quoted("ADM_"s + __FUNCTION__), - std::quoted(rpc_client.self_address()), name, ctx); + std::quoted(rpc_client.self_address()), name, type, ctx); const auto rpc_name = name.c_str(); + const auto rpc_type = static_cast(type); const auto rpc_ctx = api::convert(ctx); - ADM_register_adhoc_storage_in_t in{rpc_name, rpc_ctx.get()}; + ADM_register_adhoc_storage_in_t in{rpc_name, rpc_type, rpc_ctx.get()}; ADM_register_adhoc_storage_out_t out; const auto rpc = endp.call("ADM_register_adhoc_storage", &in, &out); @@ -345,8 +347,7 @@ register_adhoc_storage(const server& srv, const std::string& name, return tl::make_unexpected(retval); } - auto rpc_adhoc_storage = admire::adhoc_storage{ - admire::storage::type::gekkofs, name, out.id, ctx}; + auto rpc_adhoc_storage = admire::adhoc_storage{type, name, out.id, ctx}; LOGGER_INFO("rpc id: {} name: {} from: {} <= " "body: {{retval: {}, id: {}}} [op_id: {}]", diff --git a/src/lib/detail/impl.hpp b/src/lib/detail/impl.hpp index 4580914f173dac1afcf9b242438a09b0900be466..4c7092945ae38be3146337bc8fa7555db4246406 100644 --- a/src/lib/detail/impl.hpp +++ b/src/lib/detail/impl.hpp @@ -54,6 +54,7 @@ transfer_datasets(const server& srv, const job& job, tl::expected register_adhoc_storage(const server& srv, const std::string& name, + enum adhoc_storage::type type, const adhoc_storage::ctx& ctx); } // namespace admire::detail diff --git a/src/scord/rpc_handlers.cpp b/src/scord/rpc_handlers.cpp index 1a672de9e5c9cd3ff71ce44ec43d32015560137c..2c65181fa922b7ebb44682f16046f214ab93c98b 100644 --- a/src/scord/rpc_handlers.cpp +++ b/src/scord/rpc_handlers.cpp @@ -236,16 +236,16 @@ ADM_register_adhoc_storage(hg_handle_t h) { assert(ret == HG_SUCCESS); const std::string name(in.name); + const auto type = static_cast(in.type); const admire::adhoc_storage::ctx ctx(in.ctx); const auto rpc_id = remote_procedure::new_id(); LOGGER_INFO("rpc id: {} name: {} from: {} => " - "body: {{name: {}, adhoc_ctx: {}}}", + "body: {{name: {}, type: {}, adhoc_ctx: {}}}", rpc_id, std::quoted(__FUNCTION__), std::quoted(get_address(h)), - name, ctx); + name, type, ctx); - const auto adhoc_storage = adhoc_storage_manager::create( - admire::adhoc_storage::type::gekkofs, name, ctx); + const auto adhoc_storage = adhoc_storage_manager::create(type, name, ctx); admire::error_code rv = ADM_SUCCESS;