Package com.vmware.spbm.connection
Interface Connection
-
- All Known Implementing Classes:
BasicConnection
public interface ConnectionThis simple object shows how to set up a SPBM connection. It is intended as a utility class for use by Samples that will need to connect before they can do anything useful. This is a light weight POJO that should be very easy to make portable.- See Also:
ConnectedServiceBase
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Connectionconnect()Establishes the authenticated connection to the various servicesConnectiondisconnect()Disconnects all the servicesjava.lang.StringgetPassword()Returns the password used for this connectioncom.vmware.pbm.PbmPortTypegetPbmPort()Returns thePbmPortTypeinstance for the SPBM servicecom.vmware.pbm.PbmServicegetPbmService()Returns thePbmServiceinstance for the SPBM servicecom.vmware.pbm.PbmServiceInstanceContentgetPbmServiceContent()Returns thePbmServiceInstanceContentinstance for the SPBM servicecom.vmware.vim25.ManagedObjectReferencegetPbmServiceInstanceReference()Returns theManagedObjectReferencefor the ServiceInstance for the SPBM Servicejava.net.URLgetSpbmURL()Returns the SPBM Service URLjava.net.URLgetSsoURL()Returns the vCenter Single Sign-On STS service URLjava.lang.StringgetUsername()Returns the username used for this connectioncom.vmware.vim25.UserSessiongetUserSession()Returns theUserSessioninstance associated with the current connectionjava.net.URLgetVcURL()Returns the vSphere web services URLcom.vmware.vim25.VimPortTypegetVimPort()Returns theVimPortTypeinstance for the vsphere servicecom.vmware.vim25.VimServicegetVimService()Returns theVimServiceinstance for the vsphere servicecom.vmware.vim25.ServiceContentgetVimServiceContent()Returns theServiceContentinstance for the vsphere servicecom.vmware.vim25.ManagedObjectReferencegetVimServiceInstanceReference()Returns theManagedObjectReferencefor the ServiceInstance for the vsphere servicebooleanisConnected()Returns if an authenticated connection to the vCenter Server is establishedvoidsetIgnoreCert(java.lang.Boolean ignorecert)DEV ONLY option to ignore the SSL certificate check.voidsetPassword(java.lang.String password)Password for the user to be used to acquire SAML token from the STS Service for accessing vCenter ServervoidsetSpbmUrl(java.lang.String spbmurl)SPBM Service URL e.g.voidsetSsoUrl(java.lang.String ssourl)vCenter Single Sign-On STS service URLvoidsetUsername(java.lang.String username)Username to be used to acquire SAML token from the STS Service for accessing vCenter ServervoidsetVcUrl(java.lang.String vcurl)vSphere web services URL e.g https://\<vcenter>/sdk
-
-
-
Method Detail
-
connect
@Before Connection connect()
Establishes the authenticated connection to the various services- Returns:
-
disconnect
@After Connection disconnect()
Disconnects all the services- Returns:
-
getPassword
java.lang.String getPassword()
Returns the password used for this connection- Returns:
-
getPbmPort
com.vmware.pbm.PbmPortType getPbmPort()
Returns thePbmPortTypeinstance for the SPBM service- Returns:
-
getPbmService
com.vmware.pbm.PbmService getPbmService()
Returns thePbmServiceinstance for the SPBM service- Returns:
-
getPbmServiceContent
com.vmware.pbm.PbmServiceInstanceContent getPbmServiceContent()
Returns thePbmServiceInstanceContentinstance for the SPBM service- Returns:
-
getPbmServiceInstanceReference
com.vmware.vim25.ManagedObjectReference getPbmServiceInstanceReference()
Returns theManagedObjectReferencefor the ServiceInstance for the SPBM Service- Returns:
-
getSpbmURL
java.net.URL getSpbmURL()
Returns the SPBM Service URL- Returns:
-
getSsoURL
java.net.URL getSsoURL()
Returns the vCenter Single Sign-On STS service URL- Returns:
-
getUsername
java.lang.String getUsername()
Returns the username used for this connection- Returns:
-
getUserSession
com.vmware.vim25.UserSession getUserSession()
Returns theUserSessioninstance associated with the current connection- Returns:
-
getVcURL
java.net.URL getVcURL()
Returns the vSphere web services URL- Returns:
-
getVimPort
com.vmware.vim25.VimPortType getVimPort()
Returns theVimPortTypeinstance for the vsphere service- Returns:
-
getVimService
com.vmware.vim25.VimService getVimService()
Returns theVimServiceinstance for the vsphere service- Returns:
-
getVimServiceContent
com.vmware.vim25.ServiceContent getVimServiceContent()
Returns theServiceContentinstance for the vsphere service- Returns:
-
getVimServiceInstanceReference
com.vmware.vim25.ManagedObjectReference getVimServiceInstanceReference()
Returns theManagedObjectReferencefor the ServiceInstance for the vsphere service- Returns:
-
isConnected
boolean isConnected()
Returns if an authenticated connection to the vCenter Server is established- Returns:
-
setIgnoreCert
@Option(name="ignorecert", systemProperty="ssl.trustAll.enabled", description="Ignore the SSL certificate check", parameter=false, required=false) void setIgnoreCert(java.lang.Boolean ignorecert)DEV ONLY option to ignore the SSL certificate check. DO NOT USE THIS OPTION FOR PRODUCTION CODE- Parameters:
ignorecert-
-
setPassword
@Option(name="password", systemProperty="connection.password", description="password on remote system") void setPassword(java.lang.String password)Password for the user to be used to acquire SAML token from the STS Service for accessing vCenter Server- Parameters:
password-
-
setSpbmUrl
@Option(name="spbmurl", systemProperty="spbmService.url", description="full url to the SPBM service on vCenter", required=false) void setSpbmUrl(java.lang.String spbmurl)SPBM Service URL e.g. https://\<vcenter>/pbm- Parameters:
spbmurl-
-
setSsoUrl
@Option(name="ssourl", systemProperty="sso.url", description="full url to the STS service", required=false) void setSsoUrl(java.lang.String ssourl)vCenter Single Sign-On STS service URL- Parameters:
ssourl-
-
setUsername
@Option(name="username", systemProperty="connection.username", description="username on remote system") void setUsername(java.lang.String username)Username to be used to acquire SAML token from the STS Service for accessing vCenter Server- Parameters:
username-
-
setVcUrl
@Option(name="vcurl", systemProperty="vimService.url", description="full url to the vSphere WS SDK service on vCenter") void setVcUrl(java.lang.String vcurl)vSphere web services URL e.g https://\<vcenter>/sdk- Parameters:
vcurl-
-
-