org.glassfish.virtualization.libvirt
Class LibVirtLocalMachine
java.lang.Object
org.glassfish.virtualization.runtime.AbstractMachine
org.glassfish.virtualization.libvirt.LibVirtLocalMachine
- All Implemented Interfaces:
- org.glassfish.hk2.PostConstruct, Machine
public class LibVirtLocalMachine
- extends AbstractMachine
- implements org.jvnet.hk2.component.PostConstruct
Abstraction for this machine, assumptions are being made that this java process runs with
with the same user's credentials that libvirt is expecting to manage the virtualization environment
of this machine.
- Author:
- Jerome Dochez
| Nested classes/interfaces inherited from interface org.glassfish.virtualization.spi.Machine |
Machine.State |
| Methods inherited from class org.glassfish.virtualization.runtime.AbstractMachine |
absolutize, createCustomizationFile, execute, getConfig, getIpAddress, getName, getServerPool, getState, getUser, getUserHome, getVMTemplateFor, install, isUp, prepare, prepareCustDirectory, prepareCustomization, setState, toString |
LibVirtLocalMachine
protected LibVirtLocalMachine(LibVirtServerPool group,
MachineConfig config)
from
public static LibVirtLocalMachine from(org.glassfish.hk2.inject.Injector injector,
LibVirtServerPool group,
MachineConfig config)
postConstruct
public void postConstruct()
- Specified by:
postConstruct in interface org.glassfish.hk2.PostConstruct- Overrides:
postConstruct in class AbstractMachine
addStoragePool
public org.glassfish.virtualization.libvirt.LibVirtStoragePool addStoragePool(String name,
long capacity)
throws VirtException
- Specified by:
addStoragePool in interface Machine
- Throws:
VirtException
description
public String description()
getVMs
public Collection<? extends VirtualMachine> getVMs()
throws VirtException
- Specified by:
getVMs in interface Machine
- Throws:
VirtException
getStoragePools
public Map<String,? extends StoragePool> getStoragePools()
throws VirtException
- Specified by:
getStoragePools in interface Machine
- Throws:
VirtException
byName
public VirtualMachine byName(String name)
throws VirtException
- Specified by:
byName in interface Machine
- Throws:
VirtException
sleep
public void sleep()
throws IOException,
InterruptedException
- Specified by:
sleep in interface Machine- Overrides:
sleep in class AbstractMachine
- Throws:
IOException
InterruptedException
connection
protected Connect connection()
throws VirtException
- Throws:
VirtException
create
public PhasedFuture<AllocationPhase,VirtualMachine> create(TemplateInstance template,
VirtualCluster cluster,
EventSource<AllocationPhase> source)
throws VirtException,
IOException
- Specified by:
create in interface Machine
- Throws:
VirtException
IOException
Copyright © 2012. All Rights Reserved.