govmomi: github.com/vmware/govmomi Index | Files | Directories

package govmomi

import "github.com/vmware/govmomi"

This package is the root package of the govmomi library.

The library is structured as follows:

Package vim25

The minimal usable functionality is available through the vim25 package. It contains subpackages that contain generated types, managed objects, and all available methods. The vim25 package is entirely independent of the other packages in the govmomi tree -- it has no dependencies on its peers.

The vim25 package itself contains a client structure that is passed around throughout the entire library. It abstracts a session and its immutable state. See the vim25 package for more information.

Package session

The session package contains an abstraction for the session manager that allows a user to login and logout. It also provides access to the current session (i.e. to determine if the user is in fact logged in)

Package object

The object package contains wrappers for a selection of managed objects. The constructors of these objects all take a *vim25.Client, which they pass along to derived objects, if applicable.

Package govc

The govc package contains the govc CLI. The code in this tree is not intended to be used as a library. Any functionality that govc contains that _could_ be used as a library function but isn't, _should_ live in a root level package.

Other packages

Other packages, such as "event", "guest", or "license", provide wrappers for the respective subsystems. They are typically not needed in normal workflows so are kept outside the object package.

Index

Package Files

client.go

type Client Uses

type Client struct {
    *vim25.Client

    SessionManager *session.Manager
}

func NewClient Uses

func NewClient(ctx context.Context, u *url.URL, insecure bool) (*Client, error)

NewClient creates a new client from a URL. The client authenticates with the server with username/password before returning if the URL contains user information.

func NewClientWithCertificate Uses

func NewClientWithCertificate(ctx context.Context, u *url.URL, insecure bool, cert tls.Certificate) (*Client, error)

NewClientWithCertificate creates a new client from a URL. The client authenticates with the server with the certificate before returning if the URL contains user information.

func (*Client) IsVC Uses

func (c *Client) IsVC() bool

IsVC returns true if we are connected to a vCenter

func (*Client) Login Uses

func (c *Client) Login(ctx context.Context, u *url.Userinfo) error

Login dispatches to the SessionManager.

func (*Client) LoginExtensionByCertificate Uses

func (c *Client) LoginExtensionByCertificate(ctx context.Context, key string, locale string) error

Login dispatches to the SessionManager.

func (*Client) Logout Uses

func (c *Client) Logout(ctx context.Context) error

Logout dispatches to the SessionManager.

func (*Client) PropertyCollector Uses

func (c *Client) PropertyCollector() *property.Collector

PropertyCollector returns the session's default property collector.

func (*Client) Retrieve Uses

func (c *Client) Retrieve(ctx context.Context, objs []types.ManagedObjectReference, p []string, dst interface{}) error

Retrieve dispatches to the Retrieve function on the default property collector.

func (*Client) RetrieveOne Uses

func (c *Client) RetrieveOne(ctx context.Context, obj types.ManagedObjectReference, p []string, dst interface{}) error

RetrieveOne dispatches to the Retrieve function on the default property collector.

func (*Client) Wait Uses

func (c *Client) Wait(ctx context.Context, obj types.ManagedObjectReference, ps []string, f func([]types.PropertyChange) bool) error

Wait dispatches to property.Wait.

Directories

PathSynopsis
event
examples
examples/datastores
examples/hosts
examples/networks
examples/virtualmachines
findPackage find implements inventory listing and searching.
govc
govc/about
govc/cli
govc/cluster
govc/datacenter
govc/datastore
govc/datastore/disk
govc/datastore/vsan
govc/device
govc/device/cdrom
govc/device/floppy
govc/device/scsi
govc/device/serial
govc/device/usb
govc/dvs
govc/dvs/portgroup
govc/env
govc/events
govc/extension
govc/fields
govc/flags
govc/folder
govc/host
govc/host/account
govc/host/autostart
govc/host/cert
govc/host/date
govc/host/esxcli
govc/host/firewall
govc/host/maintenance
govc/host/option
govc/host/portgroup
govc/host/service
govc/host/storage
govc/host/vnic
govc/host/vswitch
govc/importx
govc/license
govc/logs
govc/ls
govc/metric
govc/metric/interval
govc/object
govc/option
govc/permissions
govc/pool
govc/role
govc/session
govc/vapp
govc/version
govc/vm
govc/vm/disk
govc/vm/guest
govc/vm/network
govc/vm/rdm
govc/vm/snapshot
guest
guest/toolbox
license
list
object
ovfPackage ovf provides functionality to unmarshal and inspect the structure of an OVF file.
pbm
pbm/methods
pbm/types
performance
property
session
simulator
simulator/esxPackage esx contains SOAP responses from an ESX server, captured using `govc ...
simulator/vpxPackage vpx contains SOAP responses from a vCenter server, captured using `govc ...
task
testPackage test contains functions that implement common functionality between tests.
test/functional
toolbox
toolbox/hgfs
toolbox/toolbox
toolbox/vix
units
vcsim
view
vim25Package vim25 provides a minimal client implementation to use with other packages in the vim25 tree.
vim25/debug
vim25/methods
vim25/mo
vim25/progress
vim25/soap
vim25/types
vim25/xmlPackage xml implements a simple XML 1.0 parser that understands XML name spaces.

Package govmomi imports 8 packages (graph) and is imported by 83 packages. Updated 2017-07-20. Refresh now. Tools for package owners.