util

package
v1.5.2-dev Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2019 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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