Class OpenStackPoolDriver
- java.lang.Object
-
- com.elastisys.scale.cloudpool.openstack.driver.OpenStackPoolDriver
-
- All Implemented Interfaces:
CloudPoolDriver
public class OpenStackPoolDriver extends java.lang.Object implements CloudPoolDriver
ACloudPoolDriverimplementation that operates against OpenStack.- See Also:
BaseCloudPool
-
-
Constructor Summary
Constructors Constructor Description OpenStackPoolDriver(OpenstackClient client, java.lang.String cloudProvider)Creates a newOpenStackPoolDriver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattachMachine(java.lang.String machineId)voidconfigure(DriverConfig configuration)voiddetachMachine(java.lang.String machineId)java.lang.StringgetPoolName()java.util.List<Machine>listMachines()voidsetMembershipStatus(java.lang.String machineId, MembershipStatus membershipStatus)voidsetServiceState(java.lang.String machineId, ServiceState serviceState)java.util.List<Machine>startMachines(int count)voidterminateMachines(java.util.List<java.lang.String> machineIds)
-
-
-
Constructor Detail
-
OpenStackPoolDriver
public OpenStackPoolDriver(OpenstackClient client, java.lang.String cloudProvider)
Creates a newOpenStackPoolDriver. Needs to be configured before use.- Parameters:
client- The client to be used to communicate with the OpenStack API.cloudProvider- The name of the cloud provider that the cloud pool operates against. For example,RackSpace. This will only be used to set theMachine.getCloudProvider()field of pool members.
-
-
Method Detail
-
configure
public void configure(DriverConfig configuration) throws CloudPoolDriverException
- Specified by:
configurein interfaceCloudPoolDriver- Throws:
CloudPoolDriverException
-
listMachines
public java.util.List<Machine> listMachines() throws CloudPoolDriverException
- Specified by:
listMachinesin interfaceCloudPoolDriver- Throws:
CloudPoolDriverException
-
startMachines
public java.util.List<Machine> startMachines(int count) throws StartMachinesException, CloudPoolDriverException
- Specified by:
startMachinesin interfaceCloudPoolDriver- Throws:
StartMachinesExceptionCloudPoolDriverException
-
terminateMachines
public void terminateMachines(java.util.List<java.lang.String> machineIds) throws java.lang.IllegalStateException, TerminateMachinesException, CloudPoolDriverException- Specified by:
terminateMachinesin interfaceCloudPoolDriver- Throws:
java.lang.IllegalStateExceptionTerminateMachinesExceptionCloudPoolDriverException
-
attachMachine
public void attachMachine(java.lang.String machineId) throws NotFoundException, CloudPoolDriverException- Specified by:
attachMachinein interfaceCloudPoolDriver- Throws:
NotFoundExceptionCloudPoolDriverException
-
detachMachine
public void detachMachine(java.lang.String machineId) throws NotFoundException, CloudPoolDriverException- Specified by:
detachMachinein interfaceCloudPoolDriver- Throws:
NotFoundExceptionCloudPoolDriverException
-
setServiceState
public void setServiceState(java.lang.String machineId, ServiceState serviceState) throws NotFoundException- Specified by:
setServiceStatein interfaceCloudPoolDriver- Throws:
NotFoundException
-
setMembershipStatus
public void setMembershipStatus(java.lang.String machineId, MembershipStatus membershipStatus) throws NotFoundException, CloudPoolDriverException- Specified by:
setMembershipStatusin interfaceCloudPoolDriver- Throws:
NotFoundExceptionCloudPoolDriverException
-
getPoolName
public java.lang.String getPoolName()
- Specified by:
getPoolNamein interfaceCloudPoolDriver
-
-