common

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: 3 Imported by: 9

Documentation

Index

Constants

View Source
const DEFAULT_PUBLIC_KEY_LABEL = "cloug"

Variables

This section is empty.

Functions

func GetMatchingFlavorID

func GetMatchingFlavorID(service compute.FlavorService, flavor *compute.Flavor) (string, error)

func GetMatchingImageID

func GetMatchingImageID(service compute.ImageService, image *compute.Image) (string, error)

func ImportPublicKeyWrapper

func ImportPublicKeyWrapper(key *compute.PublicKey, f func(string, string) (string, error)) (*compute.PublicKey, error)

func KeypairServiceCreateWrapper

func KeypairServiceCreateWrapper(service compute.Service, keypair compute.KeypairService, instance *compute.Instance) (*compute.Instance, error)

Wraps VM creation with a raw SSH key for KeypairServices. Calls ImportPublicKey, then CreateInstance, and finally RemovePublicKey.

func MatchFlavor

func MatchFlavor(target *compute.Flavor, options []*compute.Flavor) string

Attempts to find a flavor in options that is similar to target. Returns flavor ID if successful, or empty string if no suitable flavor found.

Types

This section is empty.

Jump to

Keyboard shortcuts

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