|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.virtualization.libvirt.jna.LibVirtObject
org.glassfish.virtualization.libvirt.jna.Connect
public class Connect
Reprensents a low level connection to a libvirt library.
| Field Summary |
|---|
| Fields inherited from class org.glassfish.virtualization.libvirt.jna.LibVirtObject |
|---|
libvirt |
| Constructor Summary | |
|---|---|
Connect(String uri)
This function should be called first to get a connection to the Hypervisor and xen store |
|
| Method Summary | |
|---|---|
Domain |
domainDefineXML(String xmlDesc)
Defines a domain, but does not start it. |
Domain |
domainLookupByID(int id)
Try to find a domain based on the hypervisor ID number Note that this won't work for inactive domains which have an ID of -1, in that case a lookup based on the Name or UUId need to be done instead. |
Domain |
domainLookupByName(String name)
Looks up a domain based on its name. |
String[] |
listDefinedDomains()
Lists the names of the defined but inactive domains |
int[] |
listDomains()
Lists the active domains. |
String[] |
listStoragePools()
Provides the list of names of active storage pools. |
int |
numOfDefinedDomains()
Provides the number of non active domains. |
int |
numOfDomains()
Provides the number of active domains. |
int |
numOfStoragePools()
Provides the number of active storage pools |
StoragePool |
storagePoolCreateXML(String xmlDesc,
int flags)
Create a new storage based on its XML description. |
StoragePool |
storagePoolLookupByName(String name)
Fetch a storage pool based on its unique name |
| Methods inherited from class org.glassfish.virtualization.libvirt.jna.LibVirtObject |
|---|
checkForError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Connect(String uri)
throws VirtException
uri - URI of the hypervisor
VirtException - uf the connection cannot be established.| Method Detail |
|---|
public int numOfDomains()
throws VirtException
VirtException - if an error occurs
public int[] listDomains()
throws VirtException
VirtException - if an error occurs
public int numOfDefinedDomains()
throws VirtException
VirtException - if an error occurs
public String[] listDefinedDomains()
throws VirtException
VirtException - if an error occurs
public Domain domainLookupByID(int id)
throws VirtException
id - the hypervisor id
VirtException - if an error occurs
public Domain domainLookupByName(String name)
throws VirtException
name - the name of the domain
VirtException - if an error occurs
public int numOfStoragePools()
throws VirtException
VirtException - if an error occurs
public String[] listStoragePools()
throws VirtException
VirtException - if an error occurs
public StoragePool storagePoolLookupByName(String name)
throws VirtException
name - name of pool to fetch
StoragePool object, or NULL if no matching pool is found
VirtException - if an error occurs
public StoragePool storagePoolCreateXML(String xmlDesc,
int flags)
throws VirtException
xmlDesc - XML description for new poolflags - future flags, use 0 for now
StoragePool object, or NULL if creation failed
VirtException - if an error occurs
public Domain domainDefineXML(String xmlDesc)
throws VirtException
xmlDesc - the XML description for the domain, preferably in UTF-8
VirtException - if an error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||