void preChange(PrimaryStorageVO vo, PrimaryStorageStateEvent evt) throws PrimaryStorageException {
PrimaryStorageState next = AbstractPrimaryStorage.getNextState(vo.getState(), evt);
PrimaryStorageInventory inv = PrimaryStorageInventory.valueOf(vo);
for (PrimaryStorageChangeStateExtensionPoint extp : changeExts) {
try {
extp.preChangePrimaryStorageState(inv, evt, next);
} catch (PrimaryStorageException pe) {
logger.debug(String.format("%s refused to change primary storage[uuid:%s] state from %s to %s because %s",
extp.getClass().getCanonicalName(), vo.getUuid(), vo.getState(), next, pe.getMessage()), pe);
throw pe;
} catch (Exception e) {
logger.warn("Exception happened when calling preChangePrimaryStorageState of PrimaryStorageChangeStateExtensionPoint", e);
}
}
}