com.elastisys.scale.cloudpool.openstack.driver

## Class OpenStackPoolDriver

- java.lang.Object
- - com.elastisys.scale.cloudpool.openstack.driver.OpenStackPoolDriver

All Implemented Interfaces:
  CloudPoolDriver

    public class OpenStackPoolDriver
    extends Object
    implements CloudPoolDriver

A `CloudPoolDriver` implementation that operates against OpenStack.

See Also:
  `BaseCloudPool`

### Constructor Summary

Constructors
Constructor and Description
`OpenStackPoolDriver(OpenstackClient client)` Creates a new `OpenStackPoolDriver`.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `attachMachine(String machineId)`
`void` `configure(DriverConfig configuration)`
`void` `detachMachine(String machineId)`
`CloudPoolMetadata` `getMetadata()`
`String` `getPoolName()`
`List<Machine>` `listMachines()`
`void` `setMembershipStatus(String machineId, MembershipStatus membershipStatus)`
`void` `setServiceState(String machineId, ServiceState serviceState)`
`List<Machine>` `startMachines(int count)`
`void` `terminateMachine(String machineId)`

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

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

### Constructor Detail

#### OpenStackPoolDriver

    public OpenStackPoolDriver(OpenstackClient client)

Creates a new `OpenStackPoolDriver`. Needs to be configured before use.

Parameters:
  `client` - The client to be used to communicate with the OpenStack API.

### Method Detail

#### configure

    public void configure(DriverConfig configuration)
                   throws CloudPoolDriverException

Specified by:
  `configure` in interface `CloudPoolDriver`
Throws:
  `CloudPoolDriverException`

#### listMachines

    public List<Machine> listMachines()
                               throws CloudPoolDriverException

Specified by:
  `listMachines` in interface `CloudPoolDriver`
Throws:
  `CloudPoolDriverException`

#### startMachines

    public List<Machine> startMachines(int count)
                                throws StartMachinesException

Specified by:
  `startMachines` in interface `CloudPoolDriver`
Throws:
  `StartMachinesException`

#### terminateMachine

    public void terminateMachine(String machineId)
                          throws CloudPoolDriverException

Specified by:
  `terminateMachine` in interface `CloudPoolDriver`
Throws:
  `CloudPoolDriverException`

#### attachMachine

    public void attachMachine(String machineId)
                       throws NotFoundException,
                              CloudPoolDriverException

Specified by:
  `attachMachine` in interface `CloudPoolDriver`
Throws:
  `NotFoundException`
  `CloudPoolDriverException`

#### detachMachine

    public void detachMachine(String machineId)
                       throws NotFoundException,
                              CloudPoolDriverException

Specified by:
  `detachMachine` in interface `CloudPoolDriver`
Throws:
  `NotFoundException`
  `CloudPoolDriverException`

#### setServiceState

    public void setServiceState(String machineId,
                                ServiceState serviceState)
                         throws NotFoundException

Specified by:
  `setServiceState` in interface `CloudPoolDriver`
Throws:
  `NotFoundException`

#### setMembershipStatus

    public void setMembershipStatus(String machineId,
                                    MembershipStatus membershipStatus)
                             throws NotFoundException,
                                    CloudPoolDriverException

Specified by:
  `setMembershipStatus` in interface `CloudPoolDriver`
Throws:
  `NotFoundException`
  `CloudPoolDriverException`

#### getPoolName

    public String getPoolName()

Specified by:
  `getPoolName` in interface `CloudPoolDriver`

#### getMetadata

    public CloudPoolMetadata getMetadata()

Specified by:
  `getMetadata` in interface `CloudPoolDriver`