|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.intel.cosbench.client.keystone.KeystoneClient
public class KeystoneClient
A client for Openstack keystone authentication service.
The client can be used to obtain a valid keystone token in exchange of
correct credentials. According to keystone, there are different ways to
achieve this:
Supply the user name and password to get an authentication token. The token may or may not be scoped, depending on whether the user has a default tenant configured in keystone.
Supply the user name and password along with a tenant info to get a token that will be scoped with the specified tenant. The tenant info can be either it's name or it's id.
Supply an un-scoped keystone token obtained previously with a tenant info in order to get a new token that will be scoped with the specified tenant.
Constructor Summary | |
---|---|
KeystoneClient(org.apache.http.client.HttpClient client,
java.lang.String url,
java.lang.String username,
java.lang.String password,
int timeout)
|
Method Summary | |
---|---|
void |
dispose()
|
AuthHandler |
getHandler()
|
java.lang.String |
getKeystoneTokenId()
Retrieve the keystone token id associated with this client. |
java.lang.String |
getPassword()
|
KeystoneResponse.AccessInfo.ServiceInfo |
getServiceInfo(java.lang.String serviceName)
Retrieve the information regarding a cloud service identified by the given name. |
java.lang.String |
getServiceUrl(java.lang.String serviceName)
Retrieve the public URL of a cloud service identified by the given name. |
java.lang.String |
getTenantId()
|
java.lang.String |
getTenantName()
|
KeystoneResponse.AccessInfo.Token |
getToken()
|
KeystoneResponse.AccessInfo.User |
getUser()
|
java.lang.String |
getUsername()
|
java.lang.String |
getUserToken()
|
boolean |
isAuthenticated()
|
void |
login()
Perform the authentication against a keystone service. |
void |
setHandler(AuthHandler handler)
|
void |
setPassword(java.lang.String password)
|
void |
setTenantId(java.lang.String tenantId)
|
void |
setTenantName(java.lang.String tenantName)
|
void |
setUsername(java.lang.String username)
|
void |
setUserToken(java.lang.String userToken)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeystoneClient(org.apache.http.client.HttpClient client, java.lang.String url, java.lang.String username, java.lang.String password, int timeout)
Method Detail |
---|
public void login()
getKeystoneTokenId()
,
getServiceUrl(String)
public boolean isAuthenticated()
public java.lang.String getUsername()
public void setUsername(java.lang.String username)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public java.lang.String getUserToken()
public void setUserToken(java.lang.String userToken)
public java.lang.String getTenantId()
public void setTenantId(java.lang.String tenantId)
public java.lang.String getTenantName()
public void setTenantName(java.lang.String tenantName)
public AuthHandler getHandler()
public void setHandler(AuthHandler handler)
public java.lang.String getKeystoneTokenId()
null
will be
returned otherwise.
public java.lang.String getServiceUrl(java.lang.String serviceName)
null
will be returned otherwise.
serviceName
- - the name identifying the service
public KeystoneResponse.AccessInfo.ServiceInfo getServiceInfo(java.lang.String serviceName)
null
will be returned otherwise.
serviceName
- - the name identifying the service
public KeystoneResponse.AccessInfo.User getUser()
public KeystoneResponse.AccessInfo.Token getToken()
public void dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |