use of com.emc.storageos.volumecontroller.impl.monitoring.RecordableBourneEvent in project coprhd-controller by CoprHD.
the class UnManagedFilesystemService method recordBourneFileSystemEvent.
/**
* Generate and Record a Bourne filesystem specific event
*
* @param dbClient
* @param evtType
* @param status
* @param desc
* @throws Exception
*/
public void recordBourneFileSystemEvent(DbClient dbClient, String evtType, Operation.Status status, String desc, URI id) throws Exception {
RecordableEventManager eventManager = new RecordableEventManager();
eventManager.setDbClient(dbClient);
FileShare fileShareObj = dbClient.queryObject(FileShare.class, id);
RecordableBourneEvent event = ControllerUtils.convertToRecordableBourneEvent(fileShareObj, evtType, desc, "", dbClient, EVENT_SERVICE_TYPE, RecordType.Event.name(), EVENT_SERVICE_SOURCE);
try {
eventManager.recordEvents(event);
_logger.info("ViPR {} event recorded", evtType);
} catch (Exception ex) {
_logger.error("Failed to record event. Event description: {}. Error:", evtType, ex);
}
}
use of com.emc.storageos.volumecontroller.impl.monitoring.RecordableBourneEvent in project coprhd-controller by CoprHD.
the class UnManagedVolumeService method recordBourneVolumeEvent.
/**
* Generate and Record a Bourne volume specific event
*
* @param dbClient
* @param evtType
* @param status
* @param desc
* @throws Exception
*/
public void recordBourneVolumeEvent(DbClient dbClient, String evtType, Operation.Status status, String desc, URI id) throws Exception {
RecordableEventManager eventManager = new RecordableEventManager();
eventManager.setDbClient(dbClient);
BlockObject blockObject = null;
if (URIUtil.isType(id, Volume.class)) {
blockObject = dbClient.queryObject(Volume.class, id);
} else if (URIUtil.isType(id, BlockMirror.class)) {
blockObject = dbClient.queryObject(BlockMirror.class, id);
} else if (URIUtil.isType(id, BlockSnapshot.class)) {
blockObject = dbClient.queryObject(BlockSnapshot.class, id);
}
RecordableBourneEvent event = ControllerUtils.convertToRecordableBourneEvent(blockObject, evtType, desc, "", dbClient, EVENT_SERVICE_TYPE, RecordType.Event.name(), EVENT_SERVICE_SOURCE);
try {
eventManager.recordEvents(event);
_logger.info("Bourne {} event recorded", evtType);
} catch (Exception ex) {
_logger.error("Failed to record event. Event description: {}. Error:", evtType, ex);
}
}
use of com.emc.storageos.volumecontroller.impl.monitoring.RecordableBourneEvent in project coprhd-controller by CoprHD.
the class BlockDeviceController method recordBourneStorageEvent.
private void recordBourneStorageEvent(RecordableEventManager.EventType evtType, StorageSystem storage, String desc) {
RecordableBourneEvent event = ControllerUtils.convertToRecordableBourneEvent(storage, evtType.toString(), desc, "", _dbClient, ControllerUtils.BLOCK_EVENT_SERVICE, RecordType.Event.name(), ControllerUtils.BLOCK_EVENT_SOURCE);
try {
_eventManager.recordEvents(event);
_log.info("Bourne {} event recorded", evtType.name());
} catch (Exception ex) {
_log.error("Failed to record event. Event description: {}. Error: ", evtType.name(), ex);
}
}
use of com.emc.storageos.volumecontroller.impl.monitoring.RecordableBourneEvent in project coprhd-controller by CoprHD.
the class BlockConsistencyGroupTaskCompleter method recordBourneBlockConsistencyGroupEvent.
public void recordBourneBlockConsistencyGroupEvent(DbClient dbClient, URI consistencyGroupURI, RecordableEventManager.EventType evtType, Operation.Status status, String desc) throws Exception {
RecordableEventManager eventManager = new RecordableEventManager();
eventManager.setDbClient(dbClient);
BlockConsistencyGroup consistencyGroup = dbClient.queryObject(BlockConsistencyGroup.class, consistencyGroupURI);
RecordableBourneEvent event = ControllerUtils.convertToRecordableBourneEvent(consistencyGroup, evtType.name(), desc, "", dbClient, ControllerUtils.BLOCK_EVENT_SERVICE, RecordType.Event.name(), ControllerUtils.BLOCK_EVENT_SOURCE);
try {
eventManager.recordEvents(event);
_log.info("Bourne {} event recorded", evtType.name());
} catch (Exception ex) {
_log.error("Failed to record event. Event description: {}. Error: ", evtType.name(), ex);
}
}
use of com.emc.storageos.volumecontroller.impl.monitoring.RecordableBourneEvent in project coprhd-controller by CoprHD.
the class BlockMirrorTaskCompleter method recordBourneBlockMirrorEvent.
public void recordBourneBlockMirrorEvent(DbClient dbClient, URI mirrorUri, String evtType, Operation.Status status, String desc) throws Exception {
RecordableEventManager eventManager = new RecordableEventManager();
eventManager.setDbClient(dbClient);
BlockMirror mirror = dbClient.queryObject(BlockMirror.class, mirrorUri);
RecordableBourneEvent event = ControllerUtils.convertToRecordableBourneEvent(mirror, evtType, desc, "", dbClient, ControllerUtils.BLOCK_EVENT_SERVICE, RecordType.Event.name(), ControllerUtils.BLOCK_EVENT_SOURCE);
try {
eventManager.recordEvents(event);
_log.info("Bourne {} event recorded", evtType);
} catch (Exception ex) {
_log.error("Failed to record event. Event description: {}. Error: ", evtType, ex);
}
}
Aggregations