use of com.emc.storageos.volumecontroller.impl.monitoring.RecordableEventManager 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);
}
}
use of com.emc.storageos.volumecontroller.impl.monitoring.RecordableEventManager in project coprhd-controller by CoprHD.
the class BlockSnapshotTaskCompleter method recordBourneBlockSnapshotEvent.
/**
* @param dbClient
* @param evtType
* @param status
* @param desc
* @throws Exception
*/
public void recordBourneBlockSnapshotEvent(DbClient dbClient, URI snapUri, String evtType, Operation.Status status, String desc) throws Exception {
RecordableEventManager eventManager = new RecordableEventManager();
eventManager.setDbClient(dbClient);
BlockSnapshot snapObj = dbClient.queryObject(BlockSnapshot.class, snapUri);
RecordableBourneEvent event = ControllerUtils.convertToRecordableBourneEvent(snapObj, evtType, desc, "", dbClient, ControllerUtils.BLOCK_EVENT_SERVICE, RecordType.Event.name(), ControllerUtils.BLOCK_EVENT_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.RecordableEventManager in project coprhd-controller by CoprHD.
the class ExportTaskCompleter method recordBlockExportEvent.
/**
* @param dbClient
* @param evtType
* @param status
* @param desc
* @throws Exception
*/
public void recordBlockExportEvent(DbClient dbClient, URI uri, String evtType, Operation.Status status, String desc) throws Exception {
RecordableEventManager eventManager = new RecordableEventManager();
eventManager.setDbClient(dbClient);
ExportGroup exportGroup = dbClient.queryObject(ExportGroup.class, uri);
RecordableBourneEvent event = ControllerUtils.convertToRecordableBourneEvent(exportGroup, evtType, desc, "", dbClient, ControllerUtils.BLOCK_EVENT_SERVICE, RecordType.Event.name(), ControllerUtils.BLOCK_EVENT_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.RecordableEventManager in project coprhd-controller by CoprHD.
the class SRDFTaskCompleter method recordBourneSRDFEvent.
/**
* @param dbClient
* @param evtType
* @param status
* @param desc
* @throws Exception
*/
public void recordBourneSRDFEvent(DbClient dbClient, URI volumeUri, String evtType, Operation.Status status, String desc) throws Exception {
RecordableEventManager eventManager = new RecordableEventManager();
eventManager.setDbClient(dbClient);
Volume volObj = dbClient.queryObject(Volume.class, volumeUri);
RecordableBourneEvent event = ControllerUtils.convertToRecordableBourneEvent(volObj, evtType, desc, "", dbClient, ControllerUtils.BLOCK_EVENT_SERVICE, RecordType.Event.name(), ControllerUtils.BLOCK_EVENT_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.RecordableEventManager in project coprhd-controller by CoprHD.
the class VolumeTaskCompleter method recordBourneVolumeEvent.
/**
* Generate and Record a Bourne volume specific event
*
* @param dbClient
* @param id
* @param evtType
* @param status
* @param desc
* @throws Exception
*/
public static void recordBourneVolumeEvent(DbClient dbClient, URI id, String evtType, Operation.Status status, String desc) throws Exception {
RecordableEventManager eventManager = new RecordableEventManager();
eventManager.setDbClient(dbClient);
Volume volumeObj = dbClient.queryObject(Volume.class, id);
RecordableBourneEvent event = ControllerUtils.convertToRecordableBourneEvent(volumeObj, evtType, desc, "", dbClient, ControllerUtils.BLOCK_EVENT_SERVICE, RecordType.Event.name(), ControllerUtils.BLOCK_EVENT_SOURCE);
try {
eventManager.recordEvents(event);
_logger.info("Bourne {} event recorded for Volume {}", evtType, id);
} catch (Exception ex) {
_logger.error("Failed to record event. Event description: {}. Error: ", evtType, ex);
}
}
Aggregations