java.lang.Iterable<VirtualMachine>
public class VirtualMachinePool extends Pool implements java.lang.Iterable<VirtualMachine>
Modifier and Type | Field | 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 | 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 | 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.
|
OneResponse |
info(int filter,
int startId,
int endId,
int state) |
Retrieves 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_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_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 |
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() |
|
OneResponse |
monitoring(int filter) |
Retrieves the monitoring data for all or part of the Virtual
Machines in the pool.
|
static OneResponse |
monitoring(Client client,
int filter) |
Retrieves the monitoring data for all or part of the Virtual
Machines in the pool.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLength, info, info, info, infoAll, infoGroup, infoGroupPrimary, infoMine, item, processInfo, xmlrpcInfo
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 groupPool.GROUP
: User's primary group Virtual Machinespublic 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 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 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_DONE
public 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_DONE
query
- 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 OneResponse info()
info
in class Pool
info(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.org
Copyright 2002-2019 ©
OpenNebula Project, OpenNebula Systems.