util

package
v1.5.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageURLPath = "storage"
	ImageURLPath   = StorageURLPath + "/images"
	VolumeURLPath  = StorageURLPath + "/volumes"
)

Variables

View Source
var (
	DefaultHost = Host()
)

Functions

func AppendDir

func AppendDir(u *url.URL, dir string)

func ClientIP

func ClientIP() (net.IP, error)

func DisplayName

func DisplayName(op trace.Operation, cfg *spec.VirtualMachineConfigSpecConfig, namingConvention string) string

Update the VM display name on vSphere UI

func Host

func Host() *url.URL

func ImageDatastoreURL

func ImageDatastoreURL(path *object.DatastorePath) *url.URL

ImageDatastoreURL takes a datastore path object and converts it into a stable URL for with a "ds" scheme

func ImageStoreName

func ImageStoreName(u *url.URL) (string, error)

func ImageStoreNameToURL

func ImageStoreNameToURL(storeName string) (*url.URL, error)

ImageStoreNameToURL parses the image URL in the form /storage/images/<image store>/<image name>

func ImageURL

func ImageURL(storeName, imageName string) (*url.URL, error)

ImageURL converts a store and image name into an URL that is an internal imagestore representation NOTE: this is NOT a datastore URL and cannot be used in any calls that expect a ds:// scheme

func ServiceURL

func ServiceURL(serviceName string) *url.URL

ServiceURL returns the URL for a given service relative to this host

func VolumeStoreName

func VolumeStoreName(u *url.URL) (string, error)

func VolumeStoreNameToURL

func VolumeStoreNameToURL(storeName string) (*url.URL, error)

VolumeStoreNameToURL parses the volume URL in the form /storage/volumes/<volume store>/<volume name>

func VolumeURL

func VolumeURL(storeName, volumeName string) (*url.URL, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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