use of cz.metacentrum.perun.audit.events.FacilityManagerEvents.HostRemovedFromFacility in project perun by CESNET.
the class FacilitiesManagerBlImpl method removeHost.
@Override
public void removeHost(PerunSession sess, Host host, Facility facility) throws HostAlreadyRemovedException {
try {
perunBl.getAttributesManagerBl().removeAllAttributes(sess, host);
} catch (WrongAttributeValueException e) {
throw new InternalErrorException(e);
}
facilitiesManagerImpl.removeHost(sess, host);
getPerunBl().getAuditer().log(sess, new HostRemovedFromFacility(host, facility));
}
use of cz.metacentrum.perun.audit.events.FacilityManagerEvents.HostRemovedFromFacility in project perun by CESNET.
the class FacilitiesManagerBlImpl method removeHosts.
@Override
public void removeHosts(PerunSession sess, List<Host> hosts, Facility facility) throws HostAlreadyRemovedException {
for (Host host : hosts) {
// Remove hosts attributes
try {
getPerunBl().getAttributesManagerBl().removeAllAttributes(sess, host);
} catch (WrongAttributeValueException e) {
throw new InternalErrorException(e);
}
getFacilitiesManagerImpl().removeHost(sess, host);
getPerunBl().getAuditer().log(sess, new HostRemovedFromFacility(host, facility));
}
}
Aggregations