use of com.emc.storageos.volumecontroller.impl.monitoring.RecordableBourneEvent 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.RecordableBourneEvent 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.RecordableBourneEvent 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.RecordableBourneEvent 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);
}
}
use of com.emc.storageos.volumecontroller.impl.monitoring.RecordableBourneEvent in project coprhd-controller by CoprHD.
the class StoragePoolProcessor method recordBourneStoragePoolEvent.
/**
* Record storage pool alert/event
*
* @param storagePoolEventType
* @param pool
* @param description
* @param eventType
*/
private static void recordBourneStoragePoolEvent(RecordableEventManager.EventType storagePoolEventType, StoragePool pool, String description, RecordType eventType, DbClient dbClient, RecordableEventManager eventManager) {
RecordableBourneEvent event = ControllerUtils.convertToRecordableBourneEvent(pool, storagePoolEventType.toString(), description, "", dbClient, ControllerUtils.BLOCK_EVENT_SERVICE, eventType.toString(), ControllerUtils.BLOCK_EVENT_SOURCE);
try {
eventManager.recordEvents(event);
_logger.info("ViPR {} event recorded. Description: {}", event.getType(), event.getDescription());
} catch (Exception ex) {
_logger.error(String.format("Failed to record event %s. Event description: %s.", event.getType(), event.getDescription()), ex);
}
}
Aggregations