Search in sources :

Example 26 with CloudIdentity

use of org.onap.so.db.catalog.beans.CloudIdentity in project so by onap.

the class AuthenticationMethodTest method testCoreUsernamePasswordAuth.

@Test
public void testCoreUsernamePasswordAuth() {
    CloudIdentity ci = new CloudIdentity();
    ci.setIdentityAuthenticationType(AuthenticationType.USERNAME_PASSWORD);
    ci.setMsoPass("FD205490A48D48475607C36B9AD902BF");
    ci.setMsoId("someuser");
    Authentication auth = authenticationMethodFactory.getAuthenticationFor(ci);
    assertTrue(UsernamePassword.class.equals(auth.getClass()));
}
Also used : RackspaceAuthentication(org.onap.so.cloud.authentication.models.RackspaceAuthentication) Authentication(com.woorea.openstack.keystone.model.Authentication) CloudIdentity(org.onap.so.db.catalog.beans.CloudIdentity) UsernamePassword(com.woorea.openstack.keystone.model.authentication.UsernamePassword) Test(org.junit.Test)

Aggregations

CloudIdentity (org.onap.so.db.catalog.beans.CloudIdentity)26 Test (org.junit.Test)13 CloudSite (org.onap.so.db.catalog.beans.CloudSite)12 Authentication (com.woorea.openstack.keystone.model.Authentication)8 RackspaceAuthentication (org.onap.so.cloud.authentication.models.RackspaceAuthentication)6 OpenStackConnectException (com.woorea.openstack.base.client.OpenStackConnectException)4 OpenStackResponseException (com.woorea.openstack.base.client.OpenStackResponseException)4 UsernamePassword (com.woorea.openstack.keystone.model.authentication.UsernamePassword)4 MsoAdapterException (org.onap.so.openstack.exceptions.MsoAdapterException)4 MsoCloudSiteNotFound (org.onap.so.openstack.exceptions.MsoCloudSiteNotFound)4 Keystone (com.woorea.openstack.keystone.Keystone)3 Access (com.woorea.openstack.keystone.model.Access)3 MsoException (org.onap.so.openstack.exceptions.MsoException)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 Identity (com.woorea.openstack.keystone.v3.model.Authentication.Identity)2 Password (com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password)2 User (com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password.User)2 Domain (com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password.User.Domain)2 Scope (com.woorea.openstack.keystone.v3.model.Authentication.Scope)2 Project (com.woorea.openstack.keystone.v3.model.Authentication.Scope.Project)2