|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vmware.vcloud.sdk.VcloudClient
public class VcloudClient
VcloudClient is used in all the helper classes. Once logged in the vcloud client maintains all the session information. This acts as a handle or a root object through which subsequent helper classes can be reached.
| Constructor Summary | |
|---|---|
VcloudClient(String vCloudUrl,
Version version)
Constructing the vcloud client |
|
| Method Summary | |
|---|---|
Boolean |
extendSession()
The default session timeout is 30 mins. |
RecordResult<com.vmware.vcloud.api.rest.schema.QueryResultFileDescriptorRecordType> |
getFileDescriptorRecords()
Returns the list of file descriptor records. |
HashMap<String,com.vmware.vcloud.api.rest.schema.OperatingSystemFamilyInfoType> |
getOperatingSystemFamiliesByName()
Returns a map of supported operating system family infos by the os family name. |
HashMap<String,com.vmware.vcloud.api.rest.schema.OperatingSystemInfoType> |
getOperatingSystemsByName()
Returns a map of supported operating system infos by the os name. |
String |
getOrgName()
Returns the org name of the currently logged in user. |
com.vmware.vcloud.api.rest.schema.ReferenceType |
getOrgRefByName(String orgName)
Returns the organization reference by name. |
Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> |
getOrgRefs()
Returns the organization references. |
HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> |
getOrgRefsByName()
Returns a map of organization references by name. |
QueryService |
getQueryService()
Returns the Vcloud QueryService |
InputStream |
getSchemaDefinition(String schemaFileName)
Returns the specified schema definition file from the server.. |
ReferenceResult |
getServiceRefs()
Returns the list of user service references. |
HashMap<String,com.vmware.vcloud.api.rest.schema.versioning.VersionInfoType> |
getSupportedVersions()
Returns the list of supported api version |
HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> |
getUpdatedOrgList()
If an authenticated client (one that has already logged in) needs to retrieve this org list. |
String |
getUserName()
Returns the user name of the currently logged in user. |
VcloudAdmin |
getVcloudAdmin()
Returns the VcloudAdmin Helper |
VcloudAdminExtension |
getVcloudAdminExtension()
Returns the VcloudAdminExtension Helper |
String |
getVcloudApiURL()
Returns the base vCloud API url |
Version |
getVcloudClientVersion()
This package level method returns the current vcloud client version information. |
String |
getVcloudToken()
Returns the vcloud token |
Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> |
getVdcTemplateRefs()
Returns a Collection of VdcTemplate References |
void |
login(String userName,
String password)
Login to vCloud using the credentials and the version information |
void |
logout()
Logs out the user and invalidates the authentication |
void |
registerScheme(String name,
Integer port,
org.apache.http.conn.ssl.SSLSocketFactory factory)
Register the protocol scheme such as "http" or "https", port and the socket factory to be used to create the java.net.Socket instances for the given protocol |
void |
setConnectionTimeout(int milliseconds)
Sets the timeout in milliseconds which is the timeout for the connection to be established. |
static void |
setLogLevel(Level level)
Change the log levels. |
void |
setMaxConnections(int maxConnections)
The default maxConnectionsPerHost is 2 & maxTotalConnections is 20. |
void |
setProxy(String proxyHost,
int port,
String scheme)
If behind a proxy. |
void |
setProxyCredentials(String username,
String password)
Setting the username and password for the proxy. |
void |
setSocketTimeout(int milliseconds)
Sets the socket timeout in milliseconds which is the timeout for waiting for data. |
void |
setVcloudToken(String vcloudToken)
Sets the vcloud token |
void |
ssoLogin(Element tokenElement,
String orgName)
Login to vCloud Director using SAML Assertion token element from the vSphere SSO/SAML Identity Provider. |
void |
ssoLogin(Element hokToken,
String orgName,
String signature,
String signature_algorithm)
Login to vCloud Director using SAML Assertion token element from the vSphere SSO/SAML Identity Provider. |
void |
ssoLogin(String samlAssertionXML,
String orgName)
Login to vCloud Director using SAML Assertion XML from the vSphere SSO/SAML Identity Provider. |
void |
ssoLogin(String samlAssertionXML,
String orgName,
String signature,
String signature_algorithm)
Login to vCloud Director using SAML Assertion XML from the vSphere SSO/SAML Identity Provider. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VcloudClient(String vCloudUrl,
Version version)
vCloudUrl - vCloud URL. Ex: https://hostnameversion - Version| Method Detail |
|---|
public Version getVcloudClientVersion()
throws VCloudException
Version
VCloudException
public String getVcloudToken()
throws VCloudException
String
VCloudExceptionpublic void setVcloudToken(String vcloudToken)
vcloudToken - public void setConnectionTimeout(int milliseconds)
milliseconds - public void setSocketTimeout(int milliseconds)
milliseconds -
public HashMap<String,com.vmware.vcloud.api.rest.schema.versioning.VersionInfoType> getSupportedVersions()
throws VCloudException
HashMap
VCloudExceptionpublic void setMaxConnections(int maxConnections)
maxConnections -
public void setProxy(String proxyHost,
int port,
String scheme)
proxyHost - vCloud client HTTP proxy hostport - vCloud client HTTP proxy portscheme -
public void setProxyCredentials(String username,
String password)
username - password -
public void login(String userName,
String password)
throws VCloudException
userName - - vCloud userNamepassword - - vCloud user password
VCloudException
public void ssoLogin(Element tokenElement,
String orgName)
throws VCloudException
tokenElement - - Can be Bearer / HOK tokenorgName - - The name of your vCloud Director organization.
VCloudExceptionssoLogin(String, String),
ssoLogin(Element, String, String, String),
ssoLogin(String, String, String, String)
public void ssoLogin(String samlAssertionXML,
String orgName)
throws VCloudException
samlAssertionXML - - SAML Assertion XML from the vSphere SSO/SAML Identity Provider.orgName - - The name of your vCloud Director organization.
VCloudExceptionssoLogin(Element, String),
ssoLogin(Element, String, String, String),
ssoLogin(String, String, String, String)
public void ssoLogin(Element hokToken,
String orgName,
String signature,
String signature_algorithm)
throws VCloudException
hokToken - - HOK [Holder-of-key] tokens provide authentication based on security artifacts
embedded in the token. The token contains the claims to identify the originator
and the delegate. In the vSphere environment, a vCenter Server obtains delegated
tokens on a user's behalf and uses those tokens to perform operations.orgName - - The name of your vCloud Director organization.signature - - Base64 encoded signaure of the token XML generated using client's private keysignature_algorithm - Standard signature algorithm name
VCloudExceptionssoLogin(Element, String),
ssoLogin(String, String),
ssoLogin(String, String, String, String)
public void ssoLogin(String samlAssertionXML,
String orgName,
String signature,
String signature_algorithm)
throws VCloudException
samlAssertionXML - - SAML Assertion XML from the vSphere SSO/SAML Identity Provider.orgName - - The name of your vCloud Director organization.signature - - Base64 encoded signaure of the token XML generated using client's private keysignature_algorithm - Standard signature algorithm name
VCloudExceptionssoLogin(Element, String),
ssoLogin(String, String),
ssoLogin(Element, String, String, String)
public void logout()
throws VCloudException
VCloudException
public HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getOrgRefsByName()
throws VCloudException
HashMap
VCloudException
VCloudException
public HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getUpdatedOrgList()
throws VCloudException
HashMap
VCloudException
public com.vmware.vcloud.api.rest.schema.ReferenceType getOrgRefByName(String orgName)
throws VCloudException
orgName - String
ReferenceType
VCloudException
public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getOrgRefs()
throws VCloudException
Collection
VCloudExceptionpublic String getVcloudApiURL()
public VcloudAdmin getVcloudAdmin()
throws VCloudException
VcloudAdmin
VCloudException
public VcloudAdminExtension getVcloudAdminExtension()
throws VCloudException
VcloudAdminExtension
VCloudExceptionpublic static void setLogLevel(Level level)
level - Level
public void registerScheme(String name,
Integer port,
org.apache.http.conn.ssl.SSLSocketFactory factory)
name - String "http" or "https"port - Integer port numberfactory - SSLSocketFactory SSLSocketFactory can be used to validate the identity of
the HTTPS server against a list of trusted certificates and to authenticate to the
HTTPS server using a private key.public QueryService getQueryService()
QueryServicepublic String getUserName()
Stringpublic String getOrgName()
Stringpublic Boolean extendSession()
Boolean
VCloudException
public HashMap<String,com.vmware.vcloud.api.rest.schema.OperatingSystemFamilyInfoType> getOperatingSystemFamiliesByName()
throws VCloudException
HashMap<String, OperatingSystemFamilyInfoType>
VCloudExceptionOperatingSystemFamilyType
public HashMap<String,com.vmware.vcloud.api.rest.schema.OperatingSystemInfoType> getOperatingSystemsByName()
throws VCloudException
HashMap<String, OperatingSystemInfoType>
VCloudExceptionOperatingSystemType
public ReferenceResult getServiceRefs()
throws VCloudException
ReferenceResult
VCloudException
public RecordResult<com.vmware.vcloud.api.rest.schema.QueryResultFileDescriptorRecordType> getFileDescriptorRecords()
throws VCloudException
RecordResult<QueryResultFileDescriptorRecordType>
VCloudException
public InputStream getSchemaDefinition(String schemaFileName)
throws VCloudException
schemaFileName -
VCloudException
public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getVdcTemplateRefs()
throws VCloudException
Collection
VCloudException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||