Class ListNetworksRequest

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.util.List<org.openstack4j.model.network.Network>>

    public class ListNetworksRequest
    extends AbstractOpenstackRequest<java.util.List<org.openstack4j.model.network.Network>>
    An OpenStack request task that, when executed, retrieves all available networks.
    • Constructor Summary

      Constructors 
      Constructor Description
      ListNetworksRequest​(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory)
      Constructs a new ListNetworksRequest task.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<org.openstack4j.model.network.Network> doRequest​(org.openstack4j.api.OSClient api)
      Carries out the request and returns the response.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ListNetworksRequest

        public ListNetworksRequest​(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory)
        Constructs a new ListNetworksRequest task.
        Parameters:
        clientFactory - OpenStack API client factory.
    • Method Detail

      • doRequest

        public java.util.List<org.openstack4j.model.network.Network> doRequest​(org.openstack4j.api.OSClient api)
                                                                        throws org.openstack4j.api.exceptions.ResponseException
        Description copied from class: AbstractOpenstackRequest
        Carries out the request and returns the response.
        Specified by:
        doRequest in class AbstractOpenstackRequest<java.util.List<org.openstack4j.model.network.Network>>
        Parameters:
        api - An authenticated OpenStack API client that is instructed to operate against the configured region.
        Returns:
        The response.
        Throws:
        org.openstack4j.api.exceptions.ResponseException - if the request failed.