public class Api extends Object implements AutoCloseable
Constructor and Description |
---|
Api(String url,
String sessionid) |
Api(String url,
String sessionid,
boolean noHostVerification) |
Api(String url,
String username,
String password) |
Api(String url,
String username,
String password,
boolean noHostVerification) |
Api(String url,
String username,
String password,
Boolean noHostVerification,
Boolean filter) |
Api(String url,
String username,
String password,
String keyStorePath) |
Api(String url,
String username,
String password,
String sessionid,
Integer port,
Integer requestTimeout,
Boolean persistentAuth,
Boolean noHostVerification,
Boolean filter,
Boolean debug) |
Api(String url,
String username,
String password,
String sessionid,
Integer port,
Integer requestTimeout,
Integer sessionTimeout,
Boolean persistentAuth,
Boolean noHostVerification,
Boolean filter,
Boolean debug) |
Api(String url,
String username,
String password,
String sessionid,
Integer port,
Integer requestTimeout,
Integer sessionTimeout,
Boolean persistentAuth,
String keyStorePath,
String keyStorePassword,
Boolean filter,
Boolean debug) |
Api(String url,
String username,
String password,
String keyStorePath,
String keyStorePassword,
Boolean filter) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this resource, relinquishing any underlying resources.
|
Capabilities |
getCapabilities()
Gets the value of the Capabilities property.
|
Clusters |
getClusters()
Gets the value of the Clusters property.
|
String |
getComment()
Gets the value of the Comment property.
|
DataCenters |
getDataCenters()
Gets the value of the DataCenters property.
|
Disks |
getDisks()
Gets the value of the Disks property.
|
Domains |
getDomains()
Gets the value of the Domains property.
|
Events |
getEvents()
Gets the value of the Events property.
|
Groups |
getGroups()
Gets the value of the Groups property.
|
Hosts |
getHosts()
Gets the value of the Hosts property.
|
Jobs |
getJobs()
Gets the value of the Jobs property.
|
Networks |
getNetworks()
Gets the value of the Networks property.
|
ProductInfo |
getProductInfo()
Gets the value of the ProductInfo property.
|
Roles |
getRoles()
Gets the value of the Roles property.
|
SpecialObjects |
getSpecialObjects()
Gets the value of the SpecialObjects property.
|
StorageConnections |
getStorageConnections()
Gets the value of the StorageConnections property.
|
StorageDomains |
getStorageDomains()
Gets the value of the StorageDomains property.
|
ApiSummary |
getSummary()
Gets the value of the Summary property.
|
Tags |
getTags()
Gets the value of the Tags property.
|
Templates |
getTemplates()
Gets the value of the Templates property.
|
XMLGregorianCalendar |
getTime()
Gets the value of the Time property.
|
Users |
getUsers()
Gets the value of the Users property.
|
VmPools |
getVmPools()
Gets the value of the VmPools property.
|
VMs |
getVMs()
Gets the value of the VMs property.
|
VnicProfiles |
getVnicProfiles()
Gets the value of the VnicProfiles property.
|
boolean |
isDebug() |
boolean |
isFilter() |
boolean |
isPersistentAuth() |
boolean |
isSetSessionid()
oVirt api sessionid to authenticate the user with
(used as SSO solution instead of username+password)
|
void |
setFilter(boolean filter)
Enable/Disable client permissions based filtering (default is False)
|
void |
setPersistentAuth(boolean persistentAuth)
Enable/Disable persistent authentication (default is True)
|
void |
setSessionid(String sessionid) |
void |
shutdown()
When SDK instance is no longer needed, shut down the connection
manager/httpproxy to ensure immediate deallocation of all system
resources.
|
public Api(String url, String username, String password) throws org.apache.http.client.ClientProtocolException, ServerException, IOException, UnsecuredConnectionAttemptError
url
- oVirt api urlusername
- oVirt api usernamepassword
- oVirt api passwordorg.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site using
HTTP protocol has occurred.public Api(String url, String username, String password, String keyStorePath) throws org.apache.http.client.ClientProtocolException, ServerException, IOException, UnsecuredConnectionAttemptError
url
- oVirt api urlusername
- oVirt api usernamepassword
- oVirt api passwordkeyStorePath
- path to CA certificate KeyStoreorg.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site
using HTTP protocol has occurred.public Api(String url, String username, String password, String keyStorePath, String keyStorePassword, Boolean filter) throws org.apache.http.client.ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException
url
- oVirt api urlusername
- oVirt api usernamepassword
- oVirt api passwordkeyStorePath
- path to CA certificate KeyStorekeyStorePassword
- password for the CA certificate KeyStorefilter
- enables filtering based on user's permissionsorg.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site
using HTTP protocol has occurred.public Api(String url, String sessionid) throws org.apache.http.client.ClientProtocolException, ServerException, IOException, UnsecuredConnectionAttemptError
url
- oVirt api urlsessionid
- oVirt api sessionid to authenticate the user with
(used as SSO solution instead of username+password)org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site
using HTTP protocol has occurred.public Api(String url, String username, String password, boolean noHostVerification) throws org.apache.http.client.ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException
url
- oVirt api urlusername
- oVirt api usernamepassword
- oVirt api passwordnoHostVerification
- turns hostname verification offorg.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site
using HTTP protocol has occurred.public Api(String url, String sessionid, boolean noHostVerification) throws org.apache.http.client.ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException
url
- oVirt api urlsessionid
- oVirt api sessionid to authenticate the user with
(used as SSO solution instead of username+password)noHostVerification
- turns hostname verification offorg.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site
using HTTP protocol has occurred.public Api(String url, String username, String password, Boolean noHostVerification, Boolean filter) throws org.apache.http.client.ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException
url
- oVirt api urlusername
- oVirt api usernamepassword
- oVirt api passwordnoHostVerification
- turns hostname verification offfilter
- enables filtering based on user's permissionsorg.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site
using HTTP protocol has occurred.public Api(String url, String username, String password, String sessionid, Integer port, Integer requestTimeout, Boolean persistentAuth, Boolean noHostVerification, Boolean filter, Boolean debug) throws org.apache.http.client.ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException
url
- oVirt api urlusername
- oVirt api usernamepassword
- oVirt api passwordsessionid
- oVirt api sessionid to authenticate the user with
(used as SSO solution instead of username+password)port
- oVirt api portrequestTimeout
- request timeout (preserved for future use)persistentAuth
- disable persistent authentication (will be used auth. per request)noHostVerification
- turns hostname verification offfilter
- enables filtering based on user's permissionsdebug
- enables debug modeorg.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site
using HTTP protocol has occurred.public Api(String url, String username, String password, String sessionid, Integer port, Integer requestTimeout, Integer sessionTimeout, Boolean persistentAuth, Boolean noHostVerification, Boolean filter, Boolean debug) throws org.apache.http.client.ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException
url
- oVirt api urlusername
- oVirt api usernamepassword
- oVirt api passwordsessionid
- oVirt api sessionid to authenticate the user with
(used as SSO solution instead of username+password)port
- oVirt api portrequestTimeout
- request timeout (preserved for future use)sessionTimeout
- authentication session inactivity timeoutpersistentAuth
- disable persistent authentication (will be used auth. per request)noHostVerification
- turns hostname verification offfilter
- enables filtering based on user's permissionsdebug
- enables debug modeorg.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site
using HTTP protocol has occurred.public Api(String url, String username, String password, String sessionid, Integer port, Integer requestTimeout, Integer sessionTimeout, Boolean persistentAuth, String keyStorePath, String keyStorePassword, Boolean filter, Boolean debug) throws org.apache.http.client.ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException
url
- oVirt api urlusername
- oVirt api usernamepassword
- oVirt api passwordsessionid
- oVirt api sessionid to authenticate the user with
(used as SSO solution instead of username+password)port
- oVirt api portrequestTimeout
- request timeout (preserved for future use)sessionTimeout
- authentication session inactivity timeoutpersistentAuth
- disable persistent authentication
(will be used auth. per request)keyStorePath
- path to CA certificate KeyStorekeyStorePassword
- password for the CA certificate KeyStorefilter
- enables filtering based on user's permissionsdebug
- enables debug modeorg.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured
site using HTTP protocol has occurred.public void setFilter(boolean filter)
filter
- public void setPersistentAuth(boolean persistentAuth)
persistentAuth
- public boolean isPersistentAuth()
public boolean isFilter()
public boolean isDebug()
public void setSessionid(String sessionid)
sessionid
- oVirt api sessionid to authenticate the user with
(used as SSO solution instead of username+password)public boolean isSetSessionid()
public void shutdown()
public void close() throws Exception
close
in interface AutoCloseable
Exception
public Templates getTemplates()
Templates
public VnicProfiles getVnicProfiles()
VnicProfiles
public DataCenters getDataCenters()
DataCenters
public StorageConnections getStorageConnections()
StorageConnections
public StorageDomains getStorageDomains()
StorageDomains
public Capabilities getCapabilities()
Capabilities
public XMLGregorianCalendar getTime() throws org.apache.http.client.ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException
XMLGregorianCalendar
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site using HTTP protocol has occurred.public SpecialObjects getSpecialObjects()
SpecialObjects
public ProductInfo getProductInfo()
ProductInfo
public ApiSummary getSummary() throws org.apache.http.client.ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException
ApiSummary
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site using HTTP protocol has occurred.public String getComment() throws org.apache.http.client.ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException
String
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.UnsecuredConnectionAttemptError
- Signals that attempt of connecting to SSL secured site using HTTP protocol has occurred.Copyright ? 2010 Red Hat, Inc - released under the Apache License Version 2.0