Class ListServersWithTagRequest

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

    public class ListServersWithTagRequest
    extends AbstractOpenstackRequest<java.util.List<org.openstack4j.model.compute.Server>>
    An OpenStack request task that, when executed, retrieves all Servers with a certain meta data tag.
    • Constructor Summary

      Constructors 
      Constructor Description
      ListServersWithTagRequest​(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory, java.lang.String tag, java.lang.String tagValue)
      Constructs a new ListServersWithTagRequest task.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<org.openstack4j.model.compute.Server> 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

      • ListServersWithTagRequest

        public ListServersWithTagRequest​(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory,
                                         java.lang.String tag,
                                         java.lang.String tagValue)
        Constructs a new ListServersWithTagRequest task.
        Parameters:
        clientFactory - OpenStack API client factory.
        tag - A meta data tag that must be present on returned servers.
        tagValue - The value for the meta data tag that must be present on returned servers.
    • Method Detail

      • doRequest

        public java.util.List<org.openstack4j.model.compute.Server> 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.compute.Server>>
        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.