Documentation ¶
Overview ¶
Package diskconfig provides information and interaction with the Disk Config extension that works with the OpenStack Compute service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOptsExt ¶
type CreateOptsExt struct { servers.CreateOptsBuilder // DiskConfig [optional] controls how the created server's disk is partitioned. DiskConfig DiskConfig `json:"OS-DCF:diskConfig,omitempty"` }
CreateOptsExt adds a DiskConfig option to the base CreateOpts.
func (CreateOptsExt) ToServerCreateMap ¶
func (opts CreateOptsExt) ToServerCreateMap() (map[string]interface{}, error)
ToServerCreateMap adds the diskconfig option to the base server creation options.
type CreateServerResultBuilder ¶
type CreateServerResultBuilder interface {
ToServerCreateResult() map[string]interface{}
}
type DiskConfig ¶
type DiskConfig string
DiskConfig represents one of the two possible settings for the DiskConfig option when creating, rebuilding, or resizing servers: Auto or Manual.
const ( // Auto builds a server with a single partition the size of the target flavor disk and // automatically adjusts the filesystem to fit the entire partition. Auto may only be used with // images and servers that use a single EXT3 partition. Auto DiskConfig = "AUTO" // Manual builds a server using whatever partition scheme and filesystem are present in the source // image. If the target flavor disk is larger, the remaining space is left unpartitioned. This // enables images to have non-EXT3 filesystems, multiple partitions, and so on, and enables you // to manage the disk configuration. It also results in slightly shorter boot times. Manual DiskConfig = "MANUAL" )
type RebuildOptsExt ¶
type RebuildOptsExt struct { servers.RebuildOptsBuilder // DiskConfig controls how the rebuilt server's disk is partitioned. DiskConfig DiskConfig `json:"OS-DCF:diskConfig,omitempty"` }
RebuildOptsExt adds a DiskConfig option to the base RebuildOpts.
func (RebuildOptsExt) ToServerRebuildMap ¶
func (opts RebuildOptsExt) ToServerRebuildMap() (map[string]interface{}, error)
ToServerRebuildMap adds the diskconfig option to the base server rebuild options.
type ResizeOptsExt ¶
type ResizeOptsExt struct { servers.ResizeOptsBuilder // DiskConfig [optional] controls how the resized server's disk is partitioned. DiskConfig DiskConfig }
ResizeOptsExt adds a DiskConfig option to the base server resize options.
func (ResizeOptsExt) ToServerResizeMap ¶
func (opts ResizeOptsExt) ToServerResizeMap() (map[string]interface{}, error)
ToServerResizeMap adds the diskconfig option to the base server creation options.
type ServerWithDiskConfig ¶
type ServerWithDiskConfig struct { servers.Server DiskConfig DiskConfig `json:"OS-DCF:diskConfig"` }
func (ServerWithDiskConfig) ToServerCreateResult ¶
func (s ServerWithDiskConfig) ToServerCreateResult() (m map[string]interface{})