Search in sources :

Example 6 with VirtualPoolList

use of com.emc.storageos.model.vpool.VirtualPoolList in project coprhd-controller by CoprHD.

the class ObjectVirtualPools method listByVDC.

/**
 * Lists all virtual pools in a virtual data center
 * <p>
 * API Call: <tt>GET /object/vpools</tt>
 *
 * @return the list of virtual pool references in a virtual data center
 */
public List<NamedRelatedVirtualPoolRep> listByVDC(String shortVdcId) {
    UriBuilder builder = client.uriBuilder(baseUrl);
    builder.queryParam(SearchConstants.VDC_ID_PARAM, shortVdcId);
    VirtualPoolList response = client.getURI(VirtualPoolList.class, builder.build());
    return ResourceUtils.defaultList(response.getVirtualPool());
}
Also used : VirtualPoolList(com.emc.storageos.model.vpool.VirtualPoolList) UriBuilder(javax.ws.rs.core.UriBuilder)

Example 7 with VirtualPoolList

use of com.emc.storageos.model.vpool.VirtualPoolList in project coprhd-controller by CoprHD.

the class ObjectVirtualPools method listByTenant.

/**
 * Lists all virtual pools of specific tenant
 * <p>
 * API Call: <tt>GET /object/vpools</tt>
 *
 * @return the list of virtual pool references of specific tenant
 */
public List<NamedRelatedVirtualPoolRep> listByTenant(URI tenantId) {
    UriBuilder builder = client.uriBuilder(baseUrl);
    builder.queryParam(SearchConstants.TENANT_ID_PARAM, tenantId);
    VirtualPoolList response = client.getURI(VirtualPoolList.class, builder.build());
    return ResourceUtils.defaultList(response.getVirtualPool());
}
Also used : VirtualPoolList(com.emc.storageos.model.vpool.VirtualPoolList) UriBuilder(javax.ws.rs.core.UriBuilder)

Example 8 with VirtualPoolList

use of com.emc.storageos.model.vpool.VirtualPoolList in project coprhd-controller by CoprHD.

the class BlockVirtualPools method listByVirtualArrayAndTenant.

public List<NamedRelatedVirtualPoolRep> listByVirtualArrayAndTenant(URI varrayId, URI tenantId) {
    UriBuilder builder = client.uriBuilder(String.format(ID_URL_FORMAT, VARRAY_URL) + "/vpools");
    builder.queryParam(SearchConstants.TENANT_ID_PARAM, tenantId);
    VirtualPoolList response = client.getURI(VirtualPoolList.class, builder.build(varrayId));
    return defaultList(response.getVirtualPool());
}
Also used : VirtualPoolList(com.emc.storageos.model.vpool.VirtualPoolList) UriBuilder(javax.ws.rs.core.UriBuilder)

Example 9 with VirtualPoolList

use of com.emc.storageos.model.vpool.VirtualPoolList in project coprhd-controller by CoprHD.

the class FileVirtualPools method listByVDC.

/**
 * Lists all virtual pools in a virtual data center
 * <p>
 * API Call: <tt>GET /file/vpools</tt>
 *
 * @return the list of virtual pool references in a virtual data center
 */
public List<NamedRelatedVirtualPoolRep> listByVDC(String shortVdcId) {
    UriBuilder builder = client.uriBuilder(baseUrl);
    builder.queryParam(SearchConstants.VDC_ID_PARAM, shortVdcId);
    VirtualPoolList response = client.getURI(VirtualPoolList.class, builder.build());
    return ResourceUtils.defaultList(response.getVirtualPool());
}
Also used : VirtualPoolList(com.emc.storageos.model.vpool.VirtualPoolList) UriBuilder(javax.ws.rs.core.UriBuilder)

Example 10 with VirtualPoolList

use of com.emc.storageos.model.vpool.VirtualPoolList in project coprhd-controller by CoprHD.

the class ObjectVirtualPools method listByVirtualArrayAndTenant.

public List<NamedRelatedVirtualPoolRep> listByVirtualArrayAndTenant(URI varrayId, URI tenantId) {
    UriBuilder builder = client.uriBuilder(String.format(ID_URL_FORMAT, VARRAY_URL) + "/vpools");
    builder.queryParam(SearchConstants.TENANT_ID_PARAM, tenantId);
    VirtualPoolList response = client.getURI(VirtualPoolList.class, builder.build(varrayId));
    return defaultList(response.getVirtualPool());
}
Also used : VirtualPoolList(com.emc.storageos.model.vpool.VirtualPoolList) UriBuilder(javax.ws.rs.core.UriBuilder)

Aggregations

VirtualPoolList (com.emc.storageos.model.vpool.VirtualPoolList)13 UriBuilder (javax.ws.rs.core.UriBuilder)9 URIQueryResultList (com.emc.storageos.db.client.constraint.URIQueryResultList)3 VirtualPool (com.emc.storageos.db.client.model.VirtualPool)3 URI (java.net.URI)3 TenantOrg (com.emc.storageos.db.client.model.TenantOrg)2 StorageOSUser (com.emc.storageos.security.authentication.StorageOSUser)2 CheckPermission (com.emc.storageos.security.authorization.CheckPermission)2 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 Produces (javax.ws.rs.Produces)2 StoragePool (com.emc.storageos.db.client.model.StoragePool)1 StringSet (com.emc.storageos.db.client.model.StringSet)1 DatabaseException (com.emc.storageos.db.exceptions.DatabaseException)1 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)1 TagAssignment (com.emc.storageos.model.TagAssignment)1 ACLAssignmentChanges (com.emc.storageos.model.auth.ACLAssignmentChanges)1 ACLAssignments (com.emc.storageos.model.auth.ACLAssignments)1