com.elastisys.scale.cloudpool.openstack.requests

## Class AssignFloatingIpRequest

- java.lang.Object
- - com.elastisys.scale.cloudpool.openstack.requests.AbstractOpenstackRequest<String>
  - - com.elastisys.scale.cloudpool.openstack.requests.AssignFloatingIpRequest

All Implemented Interfaces:
  Callable<String>

    public class AssignFloatingIpRequest
    extends AbstractOpenstackRequest<String>

A request that, when called, tries to assign a floating IP address to a `Server`. The return value of the task is the assigned IP address.

If no IP address could be assigned, a `CloudPoolDriverException` is thrown.

### Constructor Summary

Constructors
Constructor and Description
`AssignFloatingIpRequest(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory, org.openstack4j.model.compute.Server server)` Creates a new `AssignFloatingIpRequest`.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AssignFloatingIpRequest

    public AssignFloatingIpRequest(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory,
                                   org.openstack4j.model.compute.Server server)

Creates a new `AssignFloatingIpRequest`.

Parameters:
  `clientFactory` - OpenStack API client factory.
  `server` -

### Method Detail

#### doRequest

    public String doRequest(org.openstack4j.api.OSClient api)
                     throws CloudPoolDriverException

Description copied from class: `AbstractOpenstackRequest`
Carries out the request and returns the response.

Specified by:
  `doRequest` in class `AbstractOpenstackRequest<String>`
Parameters:
  `api` - An authenticated OpenStack API client that is instructed to operate against the configured region.
Returns:
  The response.
Throws:
  `CloudPoolDriverException`