public interface OpenstackClient
OpenStackPoolDriver.
The configure(com.elastisys.scale.cloudpool.openstack.driver.config.CloudApiSettings) method must be called before calling any other
methods.| Modifier and Type | Method and Description |
|---|---|
String |
assignFloatingIp(String serverId)
Allocate a floating IP address and associate it with a given server.
|
void |
configure(CloudApiSettings config)
Configures this
OpenstackClient with cloud API access credentials
and settings. |
org.openstack4j.model.compute.Server |
getServer(String serverId)
Return meta data about a particular
Server instance. |
List<org.openstack4j.model.compute.Server> |
getServers(String tag,
String tagValue)
Retrieves all servers that match a given tag.
|
org.openstack4j.model.compute.Server |
launchServer(String name,
ProvisioningTemplate provisioningDetails,
Map<String,String> tags)
Launch a new server.
|
void |
tagServer(String serverId,
Map<String,String> tags)
Adds meta data tags to a given server.
|
void |
terminateServer(String serverId)
Terminates a particular server.
|
void |
untagServer(String serverId,
List<String> tagKeys)
Removes a collection of meta data tags from a given server.
|
void configure(CloudApiSettings config)
OpenstackClient with cloud API access credentials
and settings.config - API access credentials and settings.List<org.openstack4j.model.compute.Server> getServers(String tag, String tagValue) throws org.openstack4j.api.exceptions.ResponseException
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.Servers matching the filters.org.openstack4j.api.exceptions.ResponseException - On communication errors.org.openstack4j.model.compute.Server getServer(String serverId) throws NotFoundException, org.openstack4j.api.exceptions.ResponseException
Server instance.serverId - The identifier of the requested server.Server meta data.NotFoundException - if the server doesn't exist.org.openstack4j.api.exceptions.ResponseException - On communication errors.org.openstack4j.model.compute.Server launchServer(String name, ProvisioningTemplate provisioningDetails, Map<String,String> tags) throws org.openstack4j.api.exceptions.ResponseException
name - The name to assign to the created server.provisioningDetails - The provisioning details on how to launch the new server.tags - Meta data tags to set on the launched server.Server.org.openstack4j.api.exceptions.ResponseException - On communication errors.String assignFloatingIp(String serverId) throws org.openstack4j.api.exceptions.ResponseException
serverId - The identifier of the server that will be assigned a floating
IP address.org.openstack4j.api.exceptions.ResponseException - On communication errors.void terminateServer(String serverId) throws NotFoundException, org.openstack4j.api.exceptions.ResponseException
serverId - Identifier of the server to be terminated.NotFoundException - if the server doesn't exist.org.openstack4j.api.exceptions.ResponseException - On communication errors.void tagServer(String serverId, Map<String,String> tags) throws NotFoundException, org.openstack4j.api.exceptions.ResponseException
serverId - Identifier of the server to be tagged.tags - Meta data tags to set on the server.NotFoundException - if the server doesn't exist.org.openstack4j.api.exceptions.ResponseException - On communication errors.void untagServer(String serverId, List<String> tagKeys) throws NotFoundException, org.openstack4j.api.exceptions.ResponseException
serverId - Identifier of the server to be untagged.tags - The meta data tag keys to remove from the server.NotFoundException - if the server doesn't exist.org.openstack4j.api.exceptions.ResponseException - On communication errors.Copyright © 2011–2017 Elastisys. All rights reserved.