Help us shape the future of Go! Take the 2026 Go Developer Survey

cloudservers

package
v1.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionResult

type ActionResult struct {
	gophercloud.ErrResult
}

ActionResult represents the result of server action operations, like reboot. Call its ExtractErr method to determine if the action succeeded or failed.

func ResetPassword

func ResetPassword(client *gophercloud.ServiceClient, serverID, newPassword string) (r ActionResult)

type ChangeOpts

type ChangeOpts struct {
	AdminPass string    `json:"adminpass,omitempty"`
	KeyName   string    `json:"keyname,omitempty"`
	UserID    string    `json:"userid,omitempty"`
	ImageID   string    `json:"imageid" required:"true"`
	MetaData  *MetaData `json:"metadata,omitempty"`
}

func (ChangeOpts) ToServerChangeMap

func (opts ChangeOpts) ToServerChangeMap() (map[string]interface{}, error)

type ChangeOptsBuilder

type ChangeOptsBuilder interface {
	// Returns value that can be passed to json.Marshal
	ToServerChangeMap() (map[string]interface{}, error)
}

type ChangeResult

type ChangeResult struct {
	gophercloud.Result
}

func ChangeOS

func ChangeOS(client *gophercloud.ServiceClient, serverID string, opts ChangeOptsBuilder) (r ChangeResult)

func ReinstallOS added in v1.0.21

func ReinstallOS(client *gophercloud.ServiceClient, serverID string, opts ReinstallOptsBuilder) (r ChangeResult)

func (ChangeResult) ExtractJob

func (r ChangeResult) ExtractJob() (*Job, error)

type ExtraSpecs added in v1.0.21

type ExtraSpecs struct {
	EcsPerformancetype string `json:"ecs:performancetype"`
	ResourceType       string `json:"resource_type"`
}

type Flavor added in v1.0.21

type Flavor struct {
	Name                   string     `json:"name"`
	Links                  []Link     `json:"links"`
	RAM                    int        `json:"ram"`
	OSFLVDISABLEDDisabled  bool       `json:"OS-FLV-DISABLED:disabled"`
	Vcpus                  int        `json:"vcpus"`
	ExtraSpecs             ExtraSpecs `json:"extra_specs"`
	Swap                   string     `json:"swap"`
	OsFlavorAccessIsPublic bool       `json:"os-flavor-access:is_public"`
	RxtxFactor             float64    `json:"rxtx_factor"`
	OSFLVEXTDATAEphemeral  int        `json:"OS-FLV-EXT-DATA:ephemeral"`
	Disk                   int        `json:"disk"`
	ID                     string     `json:"id"`
}

type FlavorResult added in v1.0.21

type FlavorResult struct {
	gophercloud.Result
}

func (FlavorResult) Extract added in v1.0.21

func (r FlavorResult) Extract() (*[]Flavor, error)

type Job

type Job struct {
	ID string `json:"job_id"`
}
type Link struct {
	Href string `json:"href"`
	Rel  string `json:"rel"`
}

type MetaData

type MetaData struct {
	UserData string `json:"user_data,omitempty"`
}

type ReinstallOpts added in v1.0.21

type ReinstallOpts struct {
	AdminPass string    `json:"adminpass,omitempty"`
	KeyName   string    `json:"keyname,omitempty"`
	UserID    string    `json:"userid,omitempty"`
	MetaData  *MetaData `json:"metadata,omitempty"`
}

func (ReinstallOpts) ToServerReinstallMap added in v1.0.21

func (opts ReinstallOpts) ToServerReinstallMap() (map[string]interface{}, error)

type ReinstallOptsBuilder added in v1.0.21

type ReinstallOptsBuilder interface {
	ToServerReinstallMap() (map[string]interface{}, error)
}

type ResizeOpts added in v1.0.21

type ResizeOpts struct {
	// Limit limits the number of Images to return.
	Limit int `q:"limit"`

	// Mark is an Image UUID at which to set a marker.
	Marker string `q:"marker"`

	InstanceUUID string `q:"instance_uuid"`

	SourceFlavorID string `q:"source_flavor_id"`

	SourceFlavorName string `q:"source_flavor_name"`

	SortKey string `q:"sort_key"`

	SortDir string `q:"sort_dir"`
}

func (ResizeOpts) ToResizeQuery added in v1.0.21

func (opts ResizeOpts) ToResizeQuery() (string, error)

type ResizeOptsBuilder added in v1.0.21

type ResizeOptsBuilder interface {
	ToResizeQuery() (string, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL