public class VirtualMachinePool extends Pool implements java.lang.Iterable<VirtualMachine>
Modifier and Type | Field and Description |
---|---|
static int |
ALL_VM
Flag for Virtual Machines in any state.
|
static int |
NOT_DONE
Flag for Virtual Machines in any state, except for DONE.
|
ALL, client, elementName, infoMethod, MINE, MINE_GROUP, poolElements
Constructor and Description |
---|
VirtualMachinePool(Client client)
Creates a new Virtual Machine pool with the default filter flag value
set to
Pool.MINE_GROUP (Virtual Machines belonging to the connected user,
and the ones in his group) |
VirtualMachinePool(Client client,
int filter)
Creates a new Virtual Machine pool.
|
Modifier and Type | Method and Description |
---|---|
PoolElement |
factory(org.w3c.dom.Node node)
The factory method returns a suitable PoolElement object from
an XML node.
|
VirtualMachine |
getById(int id)
Returns the Virtual Machine with the given Id from the pool.
|
OneResponse |
info()
Loads the xml representation of all or part of the
Virtual Machines in the pool.
|
static OneResponse |
info(Client client,
int filter)
Retrieves all or part of the Virtual Machines in the pool.
|
static OneResponse |
info(Client client,
int filter,
int startId,
int endId,
int state)
Retrieves all or part of the Virtual Machines in the pool.
|
OneResponse |
info(int filter,
int startId,
int endId,
int state)
Retrieves all or part of the Virtual Machines in the pool.
|
OneResponse |
infoAll()
Loads the xml representation of all the Virtual Machines in the pool.
|
static OneResponse |
infoAll(Client client)
Retrieves all the Virtual Machines in the pool.
|
OneResponse |
infoGroup()
Loads the xml representation of all the connected user's Virtual Machines and
the ones in his group.
|
static OneResponse |
infoGroup(Client client)
Retrieves all the connected user's Virtual Machines and the ones in
his group.
|
OneResponse |
infoMine()
Loads the xml representation of all the connected user's Virtual Machines.
|
static OneResponse |
infoMine(Client client)
Retrieves all the connected user's Virtual Machines.
|
java.util.Iterator<VirtualMachine> |
iterator() |
static OneResponse |
monitoring(Client client,
int filter)
Retrieves the monitoring data for all or part of the Virtual
Machines in the pool.
|
OneResponse |
monitoring(int filter)
Retrieves the monitoring data for all or part of the Virtual
Machines in the pool.
|
public static final int ALL_VM
public static final int NOT_DONE
public VirtualMachinePool(Client client)
Pool.MINE_GROUP
(Virtual Machines belonging to the connected user,
and the ones in his group)client
- XML-RPC Client.VirtualMachinePool(Client, int)
public VirtualMachinePool(Client client, int filter)
client
- XML-RPC Client.filter
- Filter flag to use by default in the method
info()
. Possible values:
Pool.ALL
: All Virtual MachinesPool.MINE
: Connected user's Virtual MachinesPool.MINE_GROUP
: Connected user's Virtual Machines, and the ones in
his grouppublic PoolElement factory(org.w3c.dom.Node node)
Pool
public static OneResponse info(Client client, int filter)
client
- XML-RPC Client.filter
- Filter flag to use. Possible values:
Pool.ALL
: All Virtual MachinesPool.MINE
: Connected user's Virtual MachinesPool.MINE_GROUP
: Connected user's Virtual Machines, and the ones in
his grouppublic static OneResponse infoAll(Client client)
client
- XML-RPC Client.public static OneResponse infoMine(Client client)
client
- XML-RPC Client.public static OneResponse infoGroup(Client client)
client
- XML-RPC Client.public static OneResponse info(Client client, int filter, int startId, int endId, int state)
client
- XML-RPC Client.filter
- Filter flag to use. Possible values:
Pool.ALL
: All Virtual MachinesPool.MINE
: Connected user's Virtual MachinesPool.MINE_GROUP
: Connected user's Virtual Machines, and the ones in
his groupstartId
- Lowest Id to retrieveendId
- Biggest Id to retrievestate
- Numeric state of the Virtual Machines wanted, or one
of ALL_VM
or
NOT_DONE
public static OneResponse monitoring(Client client, int filter)
client
- XML-RPC Client.filter
- Filter flag to use. Possible values:
Pool.ALL
: All Virtual MachinesPool.MINE
: Connected user's Virtual MachinesPool.MINE_GROUP
: Connected user's Virtual Machines, and
the ones in his grouppublic OneResponse info()
info
in class Pool
info(Client, int)
public OneResponse infoAll()
public OneResponse infoMine()
public OneResponse infoGroup()
public OneResponse info(int filter, int startId, int endId, int state)
filter
- Filter flag to use. Possible values:
Pool.ALL
: All Virtual MachinesPool.MINE
: Connected user's Virtual MachinesPool.MINE_GROUP
: Connected user's Virtual Machines, and the ones in
his groupstartId
- Lowest Id to retrieveendId
- Biggest Id to retrievestate
- Numeric state of the Virtual Machines wantedpublic OneResponse monitoring(int filter)
filter
- Filter flag to use. Possible values:
Pool.ALL
: All Virtual MachinesPool.MINE
: Connected user's Virtual MachinesPool.MINE_GROUP
: Connected user's Virtual Machines, and
the ones in his grouppublic java.util.Iterator<VirtualMachine> iterator()
iterator
in interface java.lang.Iterable<VirtualMachine>
public VirtualMachine getById(int id)
info()
must be called before.Visit OpenNebula.org
Copyright 2002-2013 ©
OpenNebula Project (OpenNebula.org), C12G Labs.