OpenNebula
Cloud API

org.opennebula.client.vnet
Class VirtualNetworkPool

java.lang.Object
  extended by org.opennebula.client.Pool
      extended by org.opennebula.client.vnet.VirtualNetworkPool
All Implemented Interfaces:
java.lang.Iterable<VirtualNetwork>

public class VirtualNetworkPool
extends Pool
implements java.lang.Iterable<VirtualNetwork>

This class represents an OpenNebula Virtual Network pool. It also offers static XML-RPC call wrappers.


Field Summary
 
Fields inherited from class org.opennebula.client.Pool
client, elementName, poolElements
 
Constructor Summary
VirtualNetworkPool(Client client)
          Creates a new VN pool with the default filter flag value set to 0 (VNs belonging to user with UID 0)
VirtualNetworkPool(Client client, int filter)
          Creates a new VN pool.
 
Method Summary
 PoolElement factory(org.w3c.dom.Node node)
          The factory method returns a suitable PoolElement object from an XML node.
 OneResponse info()
          Loads the xml representation of all or part of the VNs in the pool.
static OneResponse info(Client client, int filter)
          Retrieves all or part of the VNs in the pool.
 java.util.Iterator<VirtualNetwork> iterator()
           
 
Methods inherited from class org.opennebula.client.Pool
getLength, item, processInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualNetworkPool

public VirtualNetworkPool(Client client)
Creates a new VN pool with the default filter flag value set to 0 (VNs belonging to user with UID 0)

Parameters:
client - XML-RPC Client.
See Also:
VirtualNetworkPool(Client, int)

VirtualNetworkPool

public VirtualNetworkPool(Client client,
                          int filter)
Creates a new VN pool.

Parameters:
client - XML-RPC Client.
filter - Filter flag used by default in the method info(). Possible values:
  • <= -2: All VNs
  • -1: Connected user's VNs
  • >= 0: UID User's VNs
Method Detail

factory

public PoolElement factory(org.w3c.dom.Node node)
Description copied from class: Pool
The factory method returns a suitable PoolElement object from an XML node. Each Pool must implement the corresponding factory method.

Specified by:
factory in class Pool
Parameters:
node - XML Dom node to build the PoolElement from
Returns:
The corresponding PoolElement

info

public static OneResponse info(Client client,
                               int filter)
Retrieves all or part of the VNs in the pool.

Parameters:
client - XML-RPC Client.
filter - Filter flag. Possible values:
  • <= -2: All VNs
  • -1: Connected user's VNs
  • >= 0: UID User's VNs
Returns:
If successful the message contains the string with the information returned by OpenNebula.

info

public OneResponse info()
Loads the xml representation of all or part of the VNs in the pool. The filter used is the one set in the constructor.

Returns:
If successful the message contains the string with the information returned by OpenNebula.
See Also:
info(Client, int)

iterator

public java.util.Iterator<VirtualNetwork> iterator()
Specified by:
iterator in interface java.lang.Iterable<VirtualNetwork>

OpenNebula
Cloud API

Visit OpenNebula.org
Copyright 2002-2010 © OpenNebula Project Leads (OpenNebula.org).