public class StandardOpenstackClient extends Object implements OpenstackClient
OpenstackClient interface.| Constructor and Description |
|---|
StandardOpenstackClient() |
| Modifier and Type | Method and Description |
|---|---|
String |
assignFloatingIp(String serverId)
Allocate a floating IP address and associate it with a given server.
|
com.elastisys.scale.commons.openstack.OSClientFactory |
clientFactory() |
void |
configure(CloudApiSettings configuration)
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 serverName,
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.
|
public void configure(CloudApiSettings configuration)
OpenstackClientOpenstackClient with cloud API access credentials
and settings.configure in interface OpenstackClientconfiguration - API access credentials and settings.public List<org.openstack4j.model.compute.Server> getServers(String tag, String tagValue)
OpenstackClientgetServers in interface OpenstackClienttag - 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.public org.openstack4j.model.compute.Server getServer(String serverId) throws NotFoundException
OpenstackClientServer instance.getServer in interface OpenstackClientserverId - The identifier of the requested server.Server meta data.NotFoundException - if the server doesn't exist.public org.openstack4j.model.compute.Server launchServer(String serverName, ProvisioningTemplate provisioningDetails, Map<String,String> tags)
OpenstackClientlaunchServer in interface OpenstackClientserverName - 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.public String assignFloatingIp(String serverId) throws NotFoundException
OpenstackClientassignFloatingIp in interface OpenstackClientserverId - The identifier of the server that will be assigned a floating
IP address.NotFoundExceptionpublic void terminateServer(String serverId) throws NotFoundException
OpenstackClientterminateServer in interface OpenstackClientserverId - Identifier of the server to be terminated.NotFoundException - if the server doesn't exist.public void tagServer(String serverId, Map<String,String> tags)
OpenstackClienttagServer in interface OpenstackClientserverId - Identifier of the server to be tagged.tags - Meta data tags to set on the server.public void untagServer(String serverId, List<String> tagKeys)
OpenstackClientuntagServer in interface OpenstackClientserverId - Identifier of the server to be untagged.public com.elastisys.scale.commons.openstack.OSClientFactory clientFactory()
Copyright © 2011–2017 Elastisys. All rights reserved.