public class Machine extends AbstractPhysicalMachine
MachineDto
. This resource allows you to manage physical
machines in the cloud infrastructure.
http://community.abiquo.com/display/ABI20/MachineResource
Modifier and Type | Class and Description |
---|---|
static class |
Machine.Builder |
Modifier and Type | Field and Description |
---|---|
protected Rack |
rack
The rack where the machine belongs.
|
DEFAULT_VCPU_USED, DEFAULT_VRAM_USED, virtualSwitches
context, target
Modifier | Constructor and Description |
---|---|
protected |
Machine(RestContext<AbiquoApi,AbiquoAsyncApi> context,
com.abiquo.server.core.infrastructure.MachineDto target)
Constructor to be used only by the builder.
|
Modifier and Type | Method and Description |
---|---|
static Machine.Builder |
builder(RestContext<AbiquoApi,AbiquoAsyncApi> context,
Rack rack) |
void |
cancelReservationFor(Enterprise enterprise)
Cancels the machine reservation for the given enterprise.
|
com.abiquo.model.enumerator.MachineState |
check() |
Datastore |
findDatastore(String name) |
VirtualMachine |
findRemoteVirtualMachine(com.google.common.base.Predicate<VirtualMachine> filter)
Gets a single virtual machine in the physical machine matching the given filter sinchronizing
virtual machines from remote hypervisor with abiquo's database.
|
VirtualMachine |
findVirtualMachine(com.google.common.base.Predicate<VirtualMachine> filter)
Gets a single virtual machine in the physical machine matching the given filter.
|
List<Datastore> |
getDatastores() |
Enterprise |
getOwnerEnterprise()
Get the enterprise that has reserved the machine or
null if the machine is not
reserved. |
Rack |
getRack()
Retrieve the unmanaged rack where the machine is.
|
VirtualMachine |
getVirtualMachine(Integer virtualMachineId) |
boolean |
isReserved()
Check if the machine is reserved.
|
List<VirtualMachine> |
listRemoteVirtualMachines()
Gets the list of virtual machines in the physical machine sinchronizing virtual machines from
remote hypervisor with abiquo's database.
|
List<VirtualMachine> |
listRemoteVirtualMachines(com.google.common.base.Predicate<VirtualMachine> filter)
Gets the list of virtual machines in the physical machine matching the given filter
sinchronizing virtual machines from remote hypervisor with abiquo's database.
|
List<VirtualMachine> |
listVirtualMachines()
Gets the list of virtual machines in the physical machine.
|
List<VirtualMachine> |
listVirtualMachines(com.google.common.base.Predicate<VirtualMachine> filter)
Gets the list of virtual machines in the physical machine matching the given filter.
|
void |
reserveFor(Enterprise enterprise)
Reserve the machine for the given enterprise.
|
void |
save()
Create a new physical machine in Abiquo.
|
void |
setRack(Rack rack) |
checkIpmi, delete, extractVirtualSwitches, findAvailableVirtualSwitch, getAvailableVirtualSwitches, getDescription, getId, getIp, getIpmiIp, getIpmiPassword, getIpmiPort, getIpmiUser, getIpService, getName, getPassword, getPort, getState, getType, getUser, getVirtualCpuCores, getVirtualCpusUsed, getVirtualRamInMb, getVirtualRamUsedInMb, getVirtualSwitch, setDatastores, setDescription, setIp, setIpmiIp, setIpmiPassword, setIpmiPort, setIpmiUser, setIpService, setName, setPassword, setPort, setState, setType, setUser, setVirtualCpuCores, setVirtualCpusUsed, setVirtualRamInMb, setVirtualRamUsedInMb, setVirtualSwitch, toString, update
getParentId, getTask, getTasks, getURI, join, unwrap, unwrap, updateLink, wrap, wrap
protected Rack rack
protected Machine(RestContext<AbiquoApi,AbiquoAsyncApi> context, com.abiquo.server.core.infrastructure.MachineDto target)
public void save()
Datacenter.discoverSingleMachine(java.lang.String, com.abiquo.model.enumerator.HypervisorType, java.lang.String, java.lang.String)
or Datacenter.discoverMultipleMachines(java.lang.String, java.lang.String, com.abiquo.model.enumerator.HypervisorType, java.lang.String, java.lang.String)
. This
will return a new Machine
. The following steps are: enabling a datastore, selecting a
virtual switch and choosing a rack. Refer link for more information.public com.abiquo.model.enumerator.MachineState check()
check
in class AbstractPhysicalMachine
public Rack getRack()
public List<Datastore> getDatastores()
getDatastores
in class AbstractPhysicalMachine
public Datastore findDatastore(String name)
findDatastore
in class AbstractPhysicalMachine
public List<VirtualMachine> listVirtualMachines()
http://community.abiquo.com/display/ABI20/Machine+Resource#MachineResource-
Retrievethelistofvirtualmachinesbymachine'shypervisor
public List<VirtualMachine> listVirtualMachines(com.google.common.base.Predicate<VirtualMachine> filter)
filter
- The filter to apply.public VirtualMachine findVirtualMachine(com.google.common.base.Predicate<VirtualMachine> filter)
filter
- The filter to apply.null
if none matched the given filter.public List<VirtualMachine> listRemoteVirtualMachines()
http://community.abiquo.com/display/ABI20/Machine+Resource#MachineResource-
Retrievethelistofvirtualmachinesbymachine'shypervisor
public List<VirtualMachine> listRemoteVirtualMachines(com.google.common.base.Predicate<VirtualMachine> filter)
filter
- The filter to apply.public VirtualMachine findRemoteVirtualMachine(com.google.common.base.Predicate<VirtualMachine> filter)
filter
- The filter to apply.null
if none matched the given filter.public void reserveFor(Enterprise enterprise)
When a Machine
is reserved for an Enterprise
, only the users of that
enterprise will be able to deploy VirtualMachine
s in it.
enterprise
- The enterprise reserving the machine.public void cancelReservationFor(Enterprise enterprise)
enterprise
- The enterprise to cancel reservation for.public boolean isReserved()
public Enterprise getOwnerEnterprise()
null
if the machine is not
reserved.null
if the machine is
not reserved.public static Machine.Builder builder(RestContext<AbiquoApi,AbiquoAsyncApi> context, Rack rack)
public void setRack(Rack rack)
public VirtualMachine getVirtualMachine(Integer virtualMachineId)
Copyright © 2009-2013 jclouds. All Rights Reserved.