Search in sources :

Example 16 with ProjectParam

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

the class OpenStackSynchronizationTask method createProject.

/**
 * Creates a CoprHD Project for given Tenant.
 * Sends internal POST API call to InternalTenantsService in order to create Project.
 *
 * @param tenantOrgId ID of the Project owner.
 * @param tenant OpenStack Tenant.
 *
 * @return URI of newly created Project.
 */
public URI createProject(URI tenantOrgId, KeystoneTenant tenant) {
    ProjectParam projectParam = new ProjectParam(tenant.getName() + CinderConstants.PROJECT_NAME_SUFFIX);
    ProjectElement projectResp = _internalTenantServiceClient.createProject(tenantOrgId, projectParam);
    return projectResp.getId();
}
Also used : ProjectParam(com.emc.storageos.model.project.ProjectParam) ProjectElement(com.emc.storageos.model.project.ProjectElement)

Aggregations

ProjectParam (com.emc.storageos.model.project.ProjectParam)16 ProjectElement (com.emc.storageos.model.project.ProjectElement)8 ClientResponse (com.sun.jersey.api.client.ClientResponse)7 TenantOrgRestRep (com.emc.storageos.model.tenant.TenantOrgRestRep)4 Test (org.junit.Test)3 ACLAssignmentChanges (com.emc.storageos.model.auth.ACLAssignmentChanges)2 ACLEntry (com.emc.storageos.model.auth.ACLEntry)2 RoleAssignmentChanges (com.emc.storageos.model.auth.RoleAssignmentChanges)2 RoleAssignmentEntry (com.emc.storageos.model.auth.RoleAssignmentEntry)2 ProjectUpdateParam (com.emc.storageos.model.project.ProjectUpdateParam)2 TenantCreateParam (com.emc.storageos.model.tenant.TenantCreateParam)2 TenantResponse (com.emc.storageos.model.tenant.TenantResponse)2 UserInfo (com.emc.storageos.model.user.UserInfo)2 VirtualArrayList (com.emc.storageos.model.varray.VirtualArrayList)2 URI (java.net.URI)2 ArrayList (java.util.ArrayList)2 ContainmentPrefixConstraint (com.emc.storageos.db.client.constraint.ContainmentPrefixConstraint)1 PrefixConstraint (com.emc.storageos.db.client.constraint.PrefixConstraint)1 URIQueryResultList (com.emc.storageos.db.client.constraint.URIQueryResultList)1 NamedURI (com.emc.storageos.db.client.model.NamedURI)1