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, GROUP, infoMethod, MINE, MINE_GROUP, poolElements, xpath| 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_extended()
Loads the xml representation of all the
Virtual Machines in the pool.
|
static OneResponse |
info_extended(Client client,
int filter)
Retrieves all of the Virtual Machines in the pool.
|
static OneResponse |
info_extended(Client client,
int vm_ids,
boolean extended)
Retrieves all of the Virtual Machines in the vm_ids list.
|
static OneResponse |
info_search(Client client,
int filter,
int startId,
int endId,
int state,
java.lang.String query)
Retrieves all or part of the Virtual Machines in 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.
|
static OneResponse |
monitoring(Client client,
int filter,
int num)
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.
|
getLength, info, info, info, infoAll, infoGroup, infoGroupPrimary, infoMine, item, processInfo, xmlrpcInfopublic 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 groupPool.GROUP: User's primary group Virtual Machinespublic PoolElement factory(org.w3c.dom.Node node)
Poolpublic 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 groupPool.GROUP: User's primary group Virtual Machinespublic static OneResponse info_extended(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 groupPool.GROUP: User's primary group Virtual Machinespublic static OneResponse info_extended(Client client, int vm_ids, boolean extended)
client - XML-RPC Client.vm_ids - Comma separated list of VM IDs.extended - If true the extended body is retrieved.public 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 groupPool.GROUP: User's primary group Virtual MachinesstartId - Lowest Id to retrieveendId - Biggest Id to retrievestate - Numeric state of the Virtual Machines wanted, or one
of ALL_VM or
NOT_DONEpublic static OneResponse info_search(Client client, int filter, int startId, int endId, int state, java.lang.String query)
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 groupPool.GROUP: User's primary group Virtual MachinesstartId - Lowest Id to retrieveendId - Biggest Id to retrievestate - Numeric state of the Virtual Machines wanted, or one
of ALL_VM or
NOT_DONEquery - query for FTSpublic 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 groupPool.GROUP: User's primary group Virtual Machinespublic static OneResponse monitoring(Client client, int filter, int num)
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 groupPool.GROUP: User's primary group Virtual Machinesnum: - Retrieve monitor records in the last num seconds.
0 just the last record, -1 all records.public OneResponse info()
info in class Poolinfo(Client, int)public OneResponse info_extended()
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 groupPool.GROUP: User's primary group Virtual MachinesstartId - 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 groupPool.GROUP: User's primary group Virtual Machinespublic java.util.Iterator<VirtualMachine> iterator()
iterator in interface java.lang.Iterable<VirtualMachine>public VirtualMachine getById(int id)
info() must be called before.Visit OpenNebula.io
Copyright 2002-2021 ©
OpenNebula Project, OpenNebula Systems.