openstack

package
v0.0.0-...-15aa78f Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_NAME = "cloug"

Variables

This section is empty.

Functions

func OpenStackFromJSON

func OpenStackFromJSON(jsonData []byte) (compute.Provider, error)

Types

type OpenStack

type OpenStack struct {
	ComputeClient *gophercloud.ServiceClient
	ImageClient   *gophercloud.ServiceClient
}

func MakeOpenStack

func MakeOpenStack(identityEndpoint string, username string, password string, tenantName string) (*OpenStack, error)

func (*OpenStack) ComputeService

func (os *OpenStack) ComputeService() compute.Service

func (*OpenStack) CreateImage

func (os *OpenStack) CreateImage(imageTemplate *compute.Image) (*compute.Image, error)

func (*OpenStack) CreateInstance

func (os *OpenStack) CreateInstance(instance *compute.Instance) (*compute.Instance, error)

func (*OpenStack) DeleteImage

func (os *OpenStack) DeleteImage(imageID string) error

func (*OpenStack) DeleteInstance

func (os *OpenStack) DeleteInstance(instanceID string) error

func (*OpenStack) FindFlavor

func (os *OpenStack) FindFlavor(flavor *compute.Flavor) (string, error)

func (*OpenStack) FindImage

func (os *OpenStack) FindImage(image *compute.Image) (string, error)

func (*OpenStack) GetImage

func (os *OpenStack) GetImage(imageID string) (*compute.Image, error)

func (*OpenStack) GetInstance

func (os *OpenStack) GetInstance(instanceID string) (*compute.Instance, error)

func (*OpenStack) GetVNC

func (os *OpenStack) GetVNC(instanceID string) (string, error)

func (*OpenStack) ListFlavors

func (os *OpenStack) ListFlavors() ([]*compute.Flavor, error)

func (*OpenStack) ListImages

func (os *OpenStack) ListImages() ([]*compute.Image, error)

func (*OpenStack) ListInstances

func (os *OpenStack) ListInstances() ([]*compute.Instance, error)

func (*OpenStack) RebootInstance

func (os *OpenStack) RebootInstance(instanceID string) error

func (*OpenStack) ReimageInstance

func (os *OpenStack) ReimageInstance(instanceID string, image *compute.Image) error

func (*OpenStack) RenameInstance

func (os *OpenStack) RenameInstance(instanceID string, name string) error

func (*OpenStack) StartInstance

func (os *OpenStack) StartInstance(instanceID string) error

func (*OpenStack) StopInstance

func (os *OpenStack) StopInstance(instanceID string) error

type OpenStackJSONConfig

type OpenStackJSONConfig struct {
	URL        string `json:"url"`
	Username   string `json:"username"`
	Password   string `json:"password"`
	TenantName string `json:"tenant"`
}

Jump to

Keyboard shortcuts

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