Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move another msg example to the dungeon
[simgrid.git] / teshsuite / s4u / storage_client_server / storage_client_server.cpp
index 3e0169b..1f14a3e 100644 (file)
@@ -4,6 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "simgrid/s4u.hpp"
+#include "src/plugins/file_system/FileSystem.hpp"
 #include <string>
 #include <xbt/string.hpp>
 
@@ -58,7 +59,7 @@ static void hsm_put(const std::string& remote_host, const std::string& src, cons
 static void display_storage_content(simgrid::s4u::Storage* storage)
 {
   XBT_INFO("Print the content of the storage element: %s", storage->getCname());
-  std::map<std::string, sg_size_t>* content = storage->getContent();
+  std::map<std::string, sg_size_t>* content = storage->extension<simgrid::s4u::FileSystemStorageExt>()->getContent();
   if (not content->empty()) {
     for (auto const& entry : *content)
       XBT_INFO("\t%s size: %llu bytes", entry.first.c_str(), entry.second);
@@ -89,7 +90,8 @@ static void get_set_storage_data(const std::string& storage_name)
 
 static void dump_platform_storages()
 {
-  std::map<std::string, simgrid::s4u::Storage*>* storages = simgrid::s4u::allStorages();
+  std::map<std::string, simgrid::s4u::Storage*>* storages = new std::map<std::string, simgrid::s4u::Storage*>;
+  simgrid::s4u::getStorageList(storages);
 
   for (auto const& storage : *storages) {
     XBT_INFO("Storage %s is attached to %s", storage.first.c_str(), storage.second->getHost()->getCname());