Search in sources :

Example 81 with VPlexApiClient

use of com.emc.storageos.vplex.api.VPlexApiClient in project coprhd-controller by CoprHD.

the class VPlexControllerUtils method getVPlexAPIClient.

/**
 * Get the HTTP client for making requests to the passed VPlex management server.
 *
 * @param vplexApiFactory A reference to the VPlex API factory.
 * @param vplexMnmgtSvr A VPlex management server.
 * @param dbClient A reference to a DB client.
 *
 * @return A reference to the VPlex API HTTP client.
 * @throws URISyntaxException
 */
public static VPlexApiClient getVPlexAPIClient(VPlexApiFactory vplexApiFactory, StorageProvider vplexMnmgtSvr, DbClient dbClient) throws URISyntaxException {
    URI vplexEndpointURI = new URI("https", null, vplexMnmgtSvr.getIPAddress(), vplexMnmgtSvr.getPortNumber(), "/", null, null);
    VPlexApiClient client = vplexApiFactory.getClient(vplexEndpointURI, vplexMnmgtSvr.getUserName(), vplexMnmgtSvr.getPassword());
    return client;
}
Also used : VPlexApiClient(com.emc.storageos.vplex.api.VPlexApiClient) URI(java.net.URI)

Aggregations

VPlexApiClient (com.emc.storageos.vplex.api.VPlexApiClient)81 VPlexApiException (com.emc.storageos.vplex.api.VPlexApiException)57 URISyntaxException (java.net.URISyntaxException)57 ControllerException (com.emc.storageos.volumecontroller.ControllerException)55 WorkflowException (com.emc.storageos.workflow.WorkflowException)55 InternalException (com.emc.storageos.svcs.errorhandling.resources.InternalException)54 StorageSystem (com.emc.storageos.db.client.model.StorageSystem)52 DeviceControllerException (com.emc.storageos.exceptions.DeviceControllerException)52 InternalServerErrorException (com.emc.storageos.svcs.errorhandling.resources.InternalServerErrorException)52 DatabaseException (com.emc.storageos.db.exceptions.DatabaseException)48 IOException (java.io.IOException)47 URI (java.net.URI)41 ServiceError (com.emc.storageos.svcs.errorhandling.model.ServiceError)40 Volume (com.emc.storageos.db.client.model.Volume)34 ArrayList (java.util.ArrayList)34 NamedURI (com.emc.storageos.db.client.model.NamedURI)26 HashMap (java.util.HashMap)18 ExportMask (com.emc.storageos.db.client.model.ExportMask)16 VPlexStorageViewInfo (com.emc.storageos.vplex.api.VPlexStorageViewInfo)16 VPlexVirtualVolumeInfo (com.emc.storageos.vplex.api.VPlexVirtualVolumeInfo)16