Search in sources :

Example 1 with Tenant

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

the class SyncManager method getProviderTenantId.

/**
 * Makes call to Bourne to get tenant provider Uri
 *
 * @return tenant provider Uri
 * @throws SOSFailure
 *             if call to Bourne fails
 */
private String getProviderTenantId() throws SOSFailure {
    final String methodName = "getProviderTenantId(): ";
    log.trace(methodName + "Entry");
    String rootTenantUri = null;
    final String ROOT_TENANT_URI = "/tenant";
    try {
        Tenant tenant = _client.queryObject(ROOT_TENANT_URI, Tenant.class);
        rootTenantUri = tenant.getId();
    } 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 returing tenant uri[" + rootTenantUri + "]");
    return rootTenantUri;
}
Also used : Tenant(com.emc.storageos.vasa.data.internal.Tenant) UniformInterfaceException(com.sun.jersey.api.client.UniformInterfaceException) SOSFailure(com.emc.storageos.vasa.fault.SOSFailure) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException)

Aggregations

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