Class VirtualNetworkTemplatePool

  • All Implemented Interfaces:
    java.lang.Iterable<VirtualNetworkTemplate>

    public class VirtualNetworkTemplatePool
    extends Pool
    implements java.lang.Iterable<VirtualNetworkTemplate>
    This class represents an OpenNebula Virtual Network Template pool. It also offers static XML-RPC call wrappers.
    • Constructor Detail

      • VirtualNetworkTemplatePool

        public VirtualNetworkTemplatePool​(Client client)
        Creates a new Virtual Network Template pool with the default filter flag value set to (Template belonging to the connected user, and the ones in his group)
        Parameters:
        client - XML-RPC Client.
      • VirtualNetworkTemplatePool

        public VirtualNetworkTemplatePool​(Client client,
                                          int filter)
        Creates a new Virtuan Network Template pool.
        Parameters:
        client - XML-RPC Client.
        filter - Filter flag to use by default in the method
    • 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 VNTemplates in the pool.
        Parameters:
        client - XML-RPC Client.
        filter - Filter flag to use. Possible values:
        Returns:
        If successful the message contains the string with the information returned by OpenNebula.
      • infoAll

        public static OneResponse infoAll​(Client client)
        Retrieves all the VNTemplates in the pool.
        Parameters:
        client - XML-RPC Client.
        Returns:
        If successful the message contains the string with the information returned by OpenNebula.
      • infoMine

        public static OneResponse infoMine​(Client client)
        Retrieves all the connected user's VNTemplates.
        Parameters:
        client - XML-RPC Client.
        Returns:
        If successful the message contains the string with the information returned by OpenNebula.
      • infoGroup

        public static OneResponse infoGroup​(Client client)
        Retrieves all the connected user's VNTemplates and the ones in his group.
        Parameters:
        client - XML-RPC Client.
        Returns:
        If successful the message contains the string with the information returned by OpenNebula.
      • info

        public static OneResponse info​(Client client,
                                       int filter,
                                       int startId,
                                       int endId)
        Retrieves all or part of the VNTemplates in the pool. The VNTemplates to retrieve can be also filtered by Id, specifying the first and last Id to include.
        Parameters:
        client - XML-RPC Client.
        filter - Filter flag to use. Possible values:
        startId - Lowest Id to retrieve
        endId - Biggest Id to retrieve
        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 VNTemplates in the pool. The filter used is the one set in the constructor.
        Overrides:
        info in class Pool
        Returns:
        If successful the message contains the string with the information returned by OpenNebula.
      • infoAll

        public OneResponse infoAll()
        Loads the xml representation of all the VNTemplates in the pool.
        Overrides:
        infoAll in class Pool
        Returns:
        If successful the message contains the string with the information returned by OpenNebula.
      • infoMine

        public OneResponse infoMine()
        Loads the xml representation of all the connected user's VNTemplates.
        Overrides:
        infoMine in class Pool
        Returns:
        If successful the message contains the string with the information returned by OpenNebula.
      • infoGroup

        public OneResponse infoGroup()
        Loads the xml representation of all the connected user's VNTemplates and the ones in his group.
        Overrides:
        infoGroup in class Pool
        Returns:
        If successful the message contains the string with the information returned by OpenNebula.
      • info

        public OneResponse info​(int filter,
                                int startId,
                                int endId)
        Retrieves all or part of the Templates in the pool. The Templates to retrieve can be also filtered by Id, specifying the first and last Id to include.
        Overrides:
        info in class Pool
        Parameters:
        filter - Filter flag to use. Possible values:
        startId - Lowest Id to retrieve
        endId - Biggest Id to retrieve
        Returns:
        If successful the message contains the string with the information returned by OpenNebula.
      • getById

        public VirtualNetworkTemplate getById​(int id)
        Returns the VNTemplate 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 ACl rule to retrieve
        Returns:
        The VNTemplate with the given Id, or null if it was not found.