public class CreateServerRequest extends AbstractOpenstackRequest<org.openstack4j.model.compute.Server>
| Constructor and Description |
|---|
CreateServerRequest(OSClientFactory clientFactory,
String serverName,
String flavorName,
String imageName,
String keyPair,
List<String> securityGroups,
String encodedUserData,
Map<String,String> metadata)
Creates a new
CreateServerRequest. |
| Modifier and Type | Method and Description |
|---|---|
org.openstack4j.model.compute.Server |
doRequest(org.openstack4j.api.OSClient api)
Carries out the request and returns the response.
|
call, getApiAccessConfig, getClientFactorypublic CreateServerRequest(OSClientFactory clientFactory, String serverName, String flavorName, String imageName, String keyPair, List<String> securityGroups, String encodedUserData, Map<String,String> metadata)
CreateServerRequest.clientFactory - OpenStack API client factory.serverName - The name to assign to the new server.flavorName - The name of the machine type (flavor) to launch.imageName - The identifier of the machine image used to boot the machine.keyPair - The name of the key pair to use for the machine instance. May
be null.securityGroups - The security group(s) to use for the new machine instance. May
be null.encodedUserData - The base64-encoded user data used to contextualize the started
instance. May be null.metadata - Any meta data tags to assign to the new server. May be
null.public org.openstack4j.model.compute.Server doRequest(org.openstack4j.api.OSClient api)
AbstractOpenstackRequestdoRequest in class AbstractOpenstackRequest<org.openstack4j.model.compute.Server>api - An authenticated OpenStack API client that is instructed to
operate against the configured region.Copyright © 2011–2016 elastisys. All rights reserved.