+static void check_disk_attachment()
+{
+ xbt_lib_cursor_t cursor;
+ char *key;
+ void **data;
+ RoutingEdgePtr host_elm;
+ xbt_lib_foreach(storage_lib, cursor, key, data) {
+ if(xbt_lib_get_level(xbt_lib_get_elm_or_null(storage_lib, key), SURF_STORAGE_LEVEL) != NULL) {
+ StoragePtr storage = static_cast<StoragePtr>(xbt_lib_get_level(xbt_lib_get_elm_or_null(storage_lib, key), SURF_STORAGE_LEVEL));
+ host_elm = sg_routing_edge_by_name_or_null(storage->p_attach);
+ if(!host_elm)
+ surf_parse_error("Enable to attach storage %s: host %s doesn't exist.", storage->getName(), storage->p_attach);
+ }
+ }
+}
+