vsphere

package
v0.0.0-...-a19e79c Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2015 License: MIT Imports: 9 Imported by: 0

README

vsphere

Go client for vSphere Web Services API

Documentation

Overview

Package vsphere provides a small set of the vSphere Web Services API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code   string `xml:"Body>Fault>faultcode"`
	String string `xml:"Body>Fault>faultstring"`
	Detail struct {
		Inner string `xml:",innerxml"`
	} `xml:"Body>Fault>detail"`
}

Error can be returned from any call to a Vsphere object, including Connect.

func (Error) Error

func (e Error) Error() string

type Result

type Result struct {
	ID    string `xml:"obj"`
	Props []struct {
		Name string `xml:"name"`
		Val  struct {
			Type  string `xml:"type,attr"`
			Inner string `xml:",innerxml"`
		} `xml:"val"`
	} `xml:"propSet"`
}

Result contains requested data about vSphere objects.

type Vsphere

type Vsphere struct {
	// contains filtered or unexported fields
}

Vsphere holds connection state for a vSphere session.

func Connect

func Connect(host, user, pwd string) (*Vsphere, error)

Connect connects and logs in to a vSphere host.

func (*Vsphere) Info

func (v *Vsphere) Info(Type string, properties []string) ([]*Result, error)

Info queries listed properties of all objects of the specified Type.

Jump to

Keyboard shortcuts

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