X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3ad41a910feecc815ecd91d5cfceaa740068d7b4..dd42c73652d8f04b6bebd216edc087f584301aa7:/src/surf/HostImpl.cpp diff --git a/src/surf/HostImpl.cpp b/src/surf/HostImpl.cpp index f1a1b1ed4d..c5817fedad 100644 --- a/src/surf/HostImpl.cpp +++ b/src/surf/HostImpl.cpp @@ -159,6 +159,23 @@ std::vector HostImpl::get_disks() return disks; } +void HostImpl::add_disk(s4u::Disk* disk) +{ + disks_.push_back(disk->get_impl()); +} + +void HostImpl::remove_disk(const std::string& disk_name) +{ + auto position = disks_.begin(); + for (auto const& d : disks_) { + if (d->get_name() == disk_name) { + disks_.erase(position); + break; + } + position++; + } +} + std::vector HostImpl::get_attached_storages() { std::vector storages;