Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Be compliant with flexml v1.67. This permits to don't have same generated variable...
[simgrid.git] / src / surf / surf_routing.c
index 3acd4b1..1f1591e 100644 (file)
@@ -34,6 +34,10 @@ int NS3_ASR_LEVEL;              //host node for ns3
 
 static xbt_dict_t random_value = NULL;
 
+xbt_lib_t storage_lib;
+int ROUTING_STORAGE_LEVEL;      //Routing level
+int SURF_STORAGE_LEVEL;         //Surf level
+
 /* Global vars */
 routing_global_t global_routing = NULL;
 AS_t current_routing = NULL;
@@ -328,7 +332,7 @@ void routing_AS_begin(const char *AS_id, const char *wanted_routing_type)
     for (cpt = 0; routing_models[cpt].name; cpt++)
       fprintf(stderr, "   %s: %s\n", routing_models[cpt].name,
               routing_models[cpt].desc);
-    xbt_die(NULL);
+    xbt_die("dying");
   }
 
   /* make a new routing component */
@@ -712,6 +716,22 @@ void routing_model_create(size_t size_of_links, void *loopback)
 /* ************************************************************************** */
 /* ************************* GENERIC PARSE FUNCTIONS ************************ */
 
+static void routing_parse_storage(sg_platf_storage_cbarg_t storage)
+{
+  XBT_INFO("ROUTING Create a storage name '%s' with type_id '%s'",storage->id,storage->type_id);
+}
+static void routing_parse_mstorage(sg_platf_mstorage_cbarg_t mstorage)
+{
+  XBT_INFO("ROUTING Mount a storage name '%s' with type_id '%s'",mstorage->name, mstorage->type_id);
+}
+static void routing_parse_storage_type(sg_platf_storage_type_cbarg_t storage_type)
+{
+  XBT_INFO("ROUTING Create a storage type_id '%s' with model '%s'",storage_type->id,storage_type->model);
+}
+static void routing_parse_mount(sg_platf_mount_cbarg_t mount)
+{
+  XBT_INFO("ROUTING Mount '%s' on '%s'",mount->id, mount->name);
+}
 
 static void routing_parse_cluster(sg_platf_cluster_cbarg_t cluster)
 {
@@ -1132,6 +1152,11 @@ void routing_register_callbacks()
   sg_platf_peer_add_cb(routing_parse_peer);
   sg_platf_postparse_add_cb(routing_parse_postparse);
 
+  sg_platf_storage_add_cb(routing_parse_storage);
+  sg_platf_mstorage_add_cb(routing_parse_mstorage);
+  sg_platf_storage_type_add_cb(routing_parse_storage_type);
+  sg_platf_mount_add_cb(routing_parse_mount);
+
 #ifdef HAVE_TRACING
   instr_routing_define_callbacks();
 #endif