gophercloud: github.com/rackspace/gophercloud/openstack/compute/v2/extensions/diskconfig Index | Files

package diskconfig

import "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/diskconfig"

Package diskconfig provides information and interaction with the Disk Config extension that works with the OpenStack Compute service.

Index

Package Files

doc.go requests.go results.go

Variables

var ErrInvalidDiskConfig = errors.New("DiskConfig must be either diskconfig.Auto or diskconfig.Manual.")

ErrInvalidDiskConfig is returned if an invalid string is specified for a DiskConfig option.

type CreateOptsExt Uses

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 Uses

func (opts CreateOptsExt) ToServerCreateMap() (map[string]interface{}, error)

ToServerCreateMap adds the diskconfig option to the base server creation options.

type DiskConfig Uses

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"
)

func ExtractDiskConfig Uses

func ExtractDiskConfig(page pagination.Page, index int) (*DiskConfig, error)

ExtractDiskConfig returns the DiskConfig setting for a specific server acquired from an servers.ExtractServers call, while iterating through a Pager.

func ExtractGet Uses

func ExtractGet(result servers.GetResult) (*DiskConfig, error)

ExtractGet returns the disk configuration from a servers.Get call.

func ExtractRebuild Uses

func ExtractRebuild(result servers.RebuildResult) (*DiskConfig, error)

ExtractRebuild returns the disk configuration from a servers.Rebuild call.

func ExtractUpdate Uses

func ExtractUpdate(result servers.UpdateResult) (*DiskConfig, error)

ExtractUpdate returns the disk configuration from a servers.Update call.

type RebuildOptsExt Uses

type RebuildOptsExt struct {
    servers.RebuildOptsBuilder

    // DiskConfig [optional] controls how the rebuilt server's disk is partitioned.
    DiskConfig DiskConfig
}

RebuildOptsExt adds a DiskConfig option to the base RebuildOpts.

func (RebuildOptsExt) ToServerRebuildMap Uses

func (opts RebuildOptsExt) ToServerRebuildMap() (map[string]interface{}, error)

ToServerRebuildMap adds the diskconfig option to the base server rebuild options.

type ResizeOptsExt Uses

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 Uses

func (opts ResizeOptsExt) ToServerResizeMap() (map[string]interface{}, error)

ToServerResizeMap adds the diskconfig option to the base server creation options.

Package diskconfig imports 5 packages (graph) and is imported by 1 packages. Updated 2016-07-23. Refresh now. Tools for package owners.