Search in sources :

Example 1 with StorageSystem

use of com.emc.storageos.vasa.data.internal.StorageSystem in project coprhd-controller by CoprHD.

the class SyncManager method getStorageSystem.

/**
 * Returns Storage system with its details based on given storage system Id
 *
 * @param storageSystemId
 * @return Object of <code>StorageSystem</code>
 * @throws SOSFailure
 *             if call(s) to Bourne fails
 */
public synchronized StorageSystem getStorageSystem(String storageSystemId) throws SOSFailure {
    final String methodName = "getStorageSystem(): ";
    log.trace(methodName + "Entry with storageSystemId[" + storageSystemId + "]");
    final String STORAGE_SYSTEM_DETAIL = "/vdc/storage-systems/%s";
    StorageSystem system = null;
    try {
        system = _client.queryObject(String.format(STORAGE_SYSTEM_DETAIL, storageSystemId), StorageSystem.class);
    } catch (NoSuchAlgorithmException e) {
        log.error(methodName + "NoSuchAlgorithmException occured", e);
        throw new SOSFailure(e);
    } catch (UniformInterfaceException e) {
        log.error(methodName + "UniformInterfaceException occured", e);
        throw new SOSFailure(e);
    }
    log.trace(methodName + "Exit returning: " + system);
    return system;
}
Also used : UniformInterfaceException(com.sun.jersey.api.client.UniformInterfaceException) SOSFailure(com.emc.storageos.vasa.fault.SOSFailure) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) StorageSystem(com.emc.storageos.vasa.data.internal.StorageSystem)

Aggregations

StorageSystem (com.emc.storageos.vasa.data.internal.StorageSystem)1 SOSFailure (com.emc.storageos.vasa.fault.SOSFailure)1 UniformInterfaceException (com.sun.jersey.api.client.UniformInterfaceException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1