Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
NetZoneImpl: rework seal
[simgrid.git] / src / surf / sg_platf.cpp
index fe17a3cd88699f93514e0456c6c58e3f369d7b93..867b0d29c45bba67b7b98bee5ef88268f5dc9f6f 100644 (file)
@@ -331,7 +331,8 @@ void sg_platf_new_cabinet(const simgrid::kernel::routing::CabinetCreationArgs* c
 
 simgrid::kernel::resource::DiskImpl* sg_platf_new_disk(const simgrid::kernel::routing::DiskCreationArgs* disk)
 {
-  simgrid::kernel::resource::DiskImpl* pimpl = surf_disk_model->create_disk(disk->id, disk->read_bw, disk->write_bw);
+  simgrid::kernel::resource::DiskImpl* pimpl =
+      routing_get_current()->create_disk(disk->id, disk->read_bw, disk->write_bw)->get_impl();
 
   if (disk->properties) {
     pimpl->set_properties(*disk->properties);
@@ -515,8 +516,9 @@ simgrid::kernel::routing::NetZoneImpl* sg_platf_new_Zone_begin(const simgrid::ke
   simgrid::kernel::routing::NetZoneImpl* new_zone = nullptr;
   simgrid::kernel::resource::NetworkModel* netmodel =
       current_routing == nullptr ? static_cast<simgrid::kernel::resource::NetworkModel*>(
-                                       models_by_type[simgrid::kernel::resource::Model::Type::NETWORK][0])
-                                 : current_routing->network_model_;
+                                       simgrid::kernel::EngineImpl::get_instance()->get_default_model(
+                                           simgrid::kernel::resource::Model::Type::NETWORK))
+                                 : current_routing->get_network_model();
 
   if (strcasecmp(zone->routing.c_str(), "Cluster") == 0) {
     new_zone = new simgrid::kernel::routing::ClusterZone(current_routing, zone->id, netmodel);