Class ClusterPool

java.lang.Object
org.opennebula.client.Pool
org.opennebula.client.cluster.ClusterPool
All Implemented Interfaces:
Iterable<Cluster>

public class ClusterPool extends Pool implements Iterable<Cluster>
This class represents an OpenNebula cluster pool. It also offers static XML-RPC call wrappers.
  • Field Details

  • Constructor Details

    • ClusterPool

      public ClusterPool(Client client)
      Creates a new cluster pool
      Parameters:
      client - XML-RPC Client.
  • Method Details

    • factory

      public PoolElement factory(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)
      Retrieves all the clusters in the pool.
      Parameters:
      client - XML-RPC Client.
      Returns:
      If successful the message contains the string with the information returned by OpenNebula.
    • info

      public OneResponse info()
      Loads the xml representation of the cluster pool.
      Overrides:
      info in class Pool
      See Also:
    • iterator

      public Iterator<Cluster> iterator()
      Specified by:
      iterator in interface Iterable<Cluster>
    • getById

      public Cluster getById(int id)
      Returns the Cluster with the given Id from the pool. If it is not found, then returns null. The method info() must be called before.
      Overrides:
      getById in class Pool
      Parameters:
      id - of the Cluster to retrieve
      Returns:
      The Image with the given Id, or null if it was not found.