From 5fdbe66dd303f1072b0c04d7f40b9af61ab69d85 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 18 Oct 2023 15:39:22 +0200 Subject: [PATCH] config corrected for example storage plugin --- plugins/example-storage-plugin/config.json5 | 1 + plugins/zenoh-plugin-storage-manager/config.json5 | 13 +++---------- .../config_influxdb_local.json5 | 7 ------- .../config_influxdb_remote.json5 | 7 ------- plugins/zenoh-plugin-storage-manager/src/lib.rs | 5 ++--- 5 files changed, 6 insertions(+), 27 deletions(-) create mode 100644 plugins/example-storage-plugin/config.json5 delete mode 100644 plugins/zenoh-plugin-storage-manager/config_influxdb_local.json5 delete mode 100644 plugins/zenoh-plugin-storage-manager/config_influxdb_remote.json5 diff --git a/plugins/example-storage-plugin/config.json5 b/plugins/example-storage-plugin/config.json5 new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/plugins/example-storage-plugin/config.json5 @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins/zenoh-plugin-storage-manager/config.json5 b/plugins/zenoh-plugin-storage-manager/config.json5 index 204fa27e9..712cc2a51 100644 --- a/plugins/zenoh-plugin-storage-manager/config.json5 +++ b/plugins/zenoh-plugin-storage-manager/config.json5 @@ -1,16 +1,9 @@ { "volumes": { - "example" : { - "__path__": "./plugins/example-storage-plugin/target/debug/libexample_storage_plugin.dylib", + "example": { + "__path__": "target/debug/libzenoh_backend_example.so", + "__config__": "../../plugins/example-storage-plugin/config.json5" } - //"influxdb_local": { - // "__path__": "../zenoh-backend-influxdb/target/debug/libzenoh_backend_influxdb.dylib", - // "__config__": "config_influxdb_local.json5" - //}, - //"influxdb_remote": { - // "__path__": "../zenoh-backend-influxdb/target/debug/libzenoh_backend_influxdb.dylib", - // "__config__": "config_influxdb_remote.json5" - //} }, "storages": {} } \ No newline at end of file diff --git a/plugins/zenoh-plugin-storage-manager/config_influxdb_local.json5 b/plugins/zenoh-plugin-storage-manager/config_influxdb_local.json5 deleted file mode 100644 index b627f9eb8..000000000 --- a/plugins/zenoh-plugin-storage-manager/config_influxdb_local.json5 +++ /dev/null @@ -1,7 +0,0 @@ -{ - url: "https://localhost:8086", - private: { - username: "user1", - password: "pw1", - }, -} \ No newline at end of file diff --git a/plugins/zenoh-plugin-storage-manager/config_influxdb_remote.json5 b/plugins/zenoh-plugin-storage-manager/config_influxdb_remote.json5 deleted file mode 100644 index b034b4c77..000000000 --- a/plugins/zenoh-plugin-storage-manager/config_influxdb_remote.json5 +++ /dev/null @@ -1,7 +0,0 @@ -{ - url: "https://myinfluxdb.example", - private: { - username: "user1", - password: "pw1", - }, -} \ No newline at end of file diff --git a/plugins/zenoh-plugin-storage-manager/src/lib.rs b/plugins/zenoh-plugin-storage-manager/src/lib.rs index 54eb78f95..613eae97d 100644 --- a/plugins/zenoh-plugin-storage-manager/src/lib.rs +++ b/plugins/zenoh-plugin-storage-manager/src/lib.rs @@ -170,13 +170,12 @@ impl StorageRuntimeInner { for path in paths { unsafe { if let Ok((lib, path)) = LibLoader::load_file(path) { - self.loaded_backend_from_lib( + return self.loaded_backend_from_lib( &volume_id, config.clone(), lib, path, - )?; - break; + ); } } }