Class CreateServerOptions
java.lang.Object
org.jclouds.openstack.nova.v2_0.options.CreateServerOptions
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailabilityZone(String availabilityZone) <R extends HttpRequest>
RbindToRequest(R request, Object input) <R extends HttpRequest>
RbindToRequest(R request, Map<String, Object> postParams) creates and binds the POST payload to the request using parameters specified.blockDeviceMappings(Set<BlockDeviceMapping> blockDeviceMappings) configDrive(boolean configDrive) Set to true to use a config drive for metadata.diskConfig(String diskConfig) booleanprotected StringformatPossiblyGzipped(byte[] data) Block devices that should be attached to the instance at boot time.booleanDetermines if a configuration drive will be attached to the server or not.When you create a server from an image with the diskConfig value set to, the server is built with a single partition that is expanded to the disk size of the flavor selected.invalid reference
Server#DISK_CONFIG_AUTOA keypair name can be defined when creating a server.Get custom networks specified for the server.Get custom networks specified for the server.Security groups the user specified to run servers with.inthashCode()keyPairName(String keyName) A keypair name can be defined when creating a server.Custom cloud server metadata can also be supplied at launch time.novaNetworks(Iterable<Network> networks) securityGroupNames(Iterable<String> securityGroupNames) securityGroupNames(String... securityGroupNames) protected com.google.common.base.MoreObjects.ToStringHelperstring()toString()userData(byte[] userData) Custom user-data can be also be supplied at launch time.writeFileToPath(byte[] contents, String path) You may further customize a cloud server by injecting data into the file system of the cloud server itself.
-
Constructor Details
-
CreateServerOptions
public CreateServerOptions()
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
formatPossiblyGzipped
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string() -
toString
-
bindToRequest
Description copied from interface:MapBindercreates and binds the POST payload to the request using parameters specified.- Specified by:
bindToRequestin interfaceMapBinder- See Also:
-
writeFileToPath
You may further customize a cloud server by injecting data into the file system of the cloud server itself. This is useful, for example, for inserting ssh keys, setting configuration files, or storing data that you want to retrieve from within the instance itself. It is intended to provide a minimal amount of launch-time personalization. If significant customization is required, a custom image should be created. The max size of the file path data is 255 bytes while the max size of the file contents is determined by provider quotas(default size is 10KB). Note that the file contents should be encoded as a Base64 string and the size limit refers to the number of bytes in the decoded data not the number of characters in the encoded data. The maximum number of file path/content pairs that can be supplied is determined by provider quotas(default is 5). Any existing files that match the specified file will be renamed to include the extension bak followed by a time stamp. For example, the file /etc/passwd will be backed up as /etc/passwd.bak.1246036261.5785. All files will have root and the root group as owner and group owner, respectively and will allow user and group read access only (-r--r-----). -
adminPass
-
metadata
Custom cloud server metadata can also be supplied at launch time. This metadata is stored in the API system where it is retrievable by querying the API for server status. The maximum size of the metadata key and value is each 255 bytes. -
userData
Custom user-data can be also be supplied at launch time. It is retrievable by the instance and is often used for launch-time configuration by instance scripts. Pass userData unencoded, as the value will be base64 encoded automatically. -
configDrive
Set to true to use a config drive for metadata. This is a separate configuration drive that can be used separately from the metadata service. This needs to be set to "true" when trying to use user data for cloud-init. -
keyPairName
A keypair name can be defined when creating a server. This key will be linked to the server and used to SSH connect to the machine- See Also:
-
availabilityZone
- See Also:
-
securityGroupNames
- See Also:
-
securityGroupNames
-
diskConfig
- See Also:
-
networks
- See Also:
-
novaNetworks
- See Also:
-
networks
- See Also:
-
blockDeviceMappings
- See Also:
-
getKeyPairName
A keypair name can be defined when creating a server. This key will be linked to the server and used to SSH connect to the machine -
getAvailabilityZone
-
getSecurityGroupNames
Security groups the user specified to run servers with.Note
This requires thatto returninvalid reference
NovaApi#getSecurityGroupExtensionApi(String)invalid reference
present -
getNetworks
Get custom networks specified for the server.- Returns:
- A list of uuids defined by Neutron (previously Quantum)
- See Also:
-
getNovaNetworks
Get custom networks specified for the server.- Returns:
- A list of uuids defined by Neutron (previously Quantum)
- See Also:
-
getDiskConfig
When you create a server from an image with the diskConfig value set to, the server is built with a single partition that is expanded to the disk size of the flavor selected. When you set the diskConfig attribute toinvalid reference
Server#DISK_CONFIG_AUTO, the server is built by using the partition scheme and file system that is in the source image. If the target flavor disk is larger, remaining disk space is left unpartitioned. A server inherits the diskConfig attribute from the image from which it is created. However, you can override the diskConfig value when you create a server. This field is only present if the Disk Config extension is installed in your OpenStack deployment.invalid reference
Server#DISK_CONFIG_MANUAL -
getConfigDrive
public boolean getConfigDrive()Determines if a configuration drive will be attached to the server or not. This can be used for cloud-init or other configuration purposes. -
getBlockDeviceMappings
Block devices that should be attached to the instance at boot time. -
bindToRequest
- Specified by:
bindToRequestin interfaceBinder
-