Class DeleteServerRequest

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.lang.Void>

    public class DeleteServerRequest
    extends AbstractOpenstackRequest<java.lang.Void>
    OpenStack task that, when executed, deletes a Server, releases any allocated floating IP addresses and waits for the server to be terminated (since this may not be immediate due to eventual consistency).
    • Constructor Detail

      • DeleteServerRequest

        public DeleteServerRequest​(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory,
                                   java.lang.String victimId)
        Creates a new DeleteServerRequest.
        Parameters:
        clientFactory - OpenStack API client factory.
        victimId - The identifier (UUID) of the server instance to delete.
    • Method Detail

      • doRequest

        public java.lang.Void doRequest​(org.openstack4j.api.OSClient api)
                                 throws NotFoundException,
                                        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.lang.Void>
        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.
        NotFoundException