Class ListServersWithTagRequest
- java.lang.Object
-
- com.elastisys.scale.cloudpool.openstack.requests.AbstractOpenstackRequest<java.util.List<org.openstack4j.model.compute.Server>>
-
- com.elastisys.scale.cloudpool.openstack.requests.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 allServers 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 newListServersWithTagRequesttask.
-
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 com.elastisys.scale.cloudpool.openstack.requests.AbstractOpenstackRequest
call, getApiAccessConfig, getClientFactory
-
-
-
-
Constructor Detail
-
ListServersWithTagRequest
public ListServersWithTagRequest(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory, java.lang.String tag, java.lang.String tagValue)Constructs a newListServersWithTagRequesttask.- 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.ResponseExceptionDescription copied from class:AbstractOpenstackRequestCarries out the request and returns the response.- Specified by:
doRequestin classAbstractOpenstackRequest<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.
-
-