package bootfromvolume
import "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/bootfromvolume"
Index ¶
- func Create(client *gophercloud.ServiceClient, opts servers.CreateOptsBuilder) servers.CreateResult
- type BlockDevice
- type CreateOptsExt
- type CreateResult
- type SourceType
Functions ¶
func Create ¶
func Create(client *gophercloud.ServiceClient, opts servers.CreateOptsBuilder) servers.CreateResult
Create requests the creation of a server from the given block device mapping.
Types ¶
type BlockDevice ¶
type BlockDevice struct { // BootIndex [optional] is the boot index. It defaults to 0. BootIndex int `json:"boot_index"` // DeleteOnTermination [optional] specifies whether or not to delete the attached volume // when the server is deleted. Defaults to `false`. DeleteOnTermination bool `json:"delete_on_termination"` // DestinationType [optional] is the type that gets created. Possible values are "volume" // and "local". DestinationType string `json:"destination_type"` // SourceType [required] must be one of: "volume", "snapshot", "image". SourceType SourceType `json:"source_type"` // UUID [required] is the unique identifier for the volume, snapshot, or image (see above) UUID string `json:"uuid"` // VolumeSize [optional] is the size of the volume to create (in gigabytes). VolumeSize int `json:"volume_size"` }
BlockDevice is a structure with options for booting a server instance from a volume. The volume may be created from an image, snapshot, or another volume.
type CreateOptsExt ¶
type CreateOptsExt struct { servers.CreateOptsBuilder BlockDevice []BlockDevice `json:"block_device_mapping_v2,omitempty"` }
CreateOptsExt is a structure that extends the server `CreateOpts` structure by allowing for a block device mapping.
func (CreateOptsExt) ToServerCreateMap ¶
func (opts CreateOptsExt) ToServerCreateMap() (map[string]interface{}, error)
ToServerCreateMap adds the block device mapping option to the base server creation options.
type CreateResult ¶
type CreateResult struct { os.CreateResult }
CreateResult temporarily contains the response from a Create call.
type SourceType ¶
type SourceType string
SourceType represents the type of medium being used to create the volume.
const ( Volume SourceType = "volume" Snapshot SourceType = "snapshot" Image SourceType = "image" )
Source Files ¶
requests.go results.go urls.go
- Version
- v1.0.0 (latest)
- Published
- Oct 28, 2014
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 10 hours ago –
Tools for package owners.