X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/638b21d2071c77f39da2f322156f05f75bf91517..0bac7d0f735ac8ba47a46e1db4f6d7a7164fe0f2:/src/surf/virtual_machine.cpp diff --git a/src/surf/virtual_machine.cpp b/src/surf/virtual_machine.cpp index 8b5946ecb6..eaac5bb22c 100644 --- a/src/surf/virtual_machine.cpp +++ b/src/surf/virtual_machine.cpp @@ -38,8 +38,7 @@ VirtualMachine::VirtualMachine(Model *model, const char *name, xbt_dict_t props, : Host(model, name, props, NULL, netElm, cpu) { VMModel::ws_vms.push_back(*this); - - xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, this); + simgrid::Host::get_host(name)->set_facet(SURF_HOST_LEVEL, this); } /* @@ -61,9 +60,9 @@ void VirtualMachine::setState(e_surf_resource_state_t state){ * A surf level object will be useless in the upper layer. Returning the * dict_elm of the host. **/ -surf_resource_t VirtualMachine::getPm() +sg_host_t VirtualMachine::getPm() { - return xbt_lib_get_elm_or_null(host_lib, p_subWs->getName()); + return simgrid::Host::find_host(p_subWs->getName()); } /**********