vim25

package module
v0.0.0-...-2461dc6 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2014 License: BSD-3-Clause Imports: 8 Imported by: 0

README

GoDoc

Deprecated in favour of https://github.com/vmware/govmomi

vim25

Experimental Go interface to the VMware vSphere API. The purpose of this project is to create a small set of funcions to provide basic operations to deploy, run and manage virtual machines inside vSphere environment.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug = false

Functions

This section is empty.

Types

type About

type About struct {
	Name       string `xml:"name"`
	FullName   string `xml:"fullName"`
	Vendor     string `xml:"vendor"`
	Version    string `xml:"version"`
	Build      uint64 `xml:"build"`
	ApiVersion string `xml:"apiVersion"`
}

type AnyType

type AnyType struct {
	XsiType string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"`
	Value   string `xml:",innerxml"`
}

xsd:anyType

type Body

type Body struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
	Fault   *Fault

	// SearchIndex
	FindByUuidRequest  *FindByUuid
	FindByUuidResponse *FindByUuidResponse

	// ServiceInstance
	RetrieveServiceContentRequest  *RetrieveServiceContent
	RetrieveServiceContentResponse *RetrieveServiceContentResponse
	CurrentTimeRequest             *CurrentTime
	CurrentTimeResponse            *CurrentTimeResponse

	// SessionManager
	LoginRequest  *Login
	LoginResponse *LoginResponse

	// ViewManager
	CreateContainerViewRequest  *CreateContainerView
	CreateContainerViewResponse *CreateContainerViewResponse

	// PropertyCollector
	RetrievePropertiesExRequest          *RetrievePropertiesEx
	RetrievePropertiesExResponse         *RetrievePropertiesExResponse
	ContinueRetrievePropertiesExRequest  *ContinueRetrievePropertiesEx
	ContinueRetrievePropertiesExResponse *ContinueRetrievePropertiesExResponse
	CancelRetrievePropertiesExRequest    *CancelRetrievePropertiesEx

	// VirtualMachine
	PowerOnVM_Task          *PowerOnVM_Task
	PowerOnVM_TaskResponse  *PowerOnVM_TaskResponse
	PowerOffVM_Task         *PowerOffVM_Task
	PowerOffVM_TaskResponse *PowerOffVM_TaskResponse

	// OvfManager
	CreateImportSpecRequest  *CreateImportSpec
	CreateImportSpecResponse *CreateImportSpecResponse
	ImportVAppRequest        *ImportVApp
	ImportVAppResponse       *ImportVAppResponse
}

SOAP 1.1 Body

type CancelRetrievePropertiesEx

type CancelRetrievePropertiesEx struct {
	XMLName xml.Name           `xml:"urn:vim25 CancelRetrievePropertiesEx"`
	This    *PropertyCollector `xml:"_this"`
	Token   string             `xml:"token"`
}

http://pubs.vmware.com/vsphere-55/topic/com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.html#cancelRetrievePropertiesEx

type ContainerView

type ContainerView ManagedObjectReference

Managed Object Reference Types

type ContinueRetrievePropertiesEx

type ContinueRetrievePropertiesEx struct {
	XMLName xml.Name           `xml:"urn:vim25 ContinueRetrievePropertiesEx"`
	This    *PropertyCollector `xml:"_this"`
	Token   string             `xml:"token"`
}

http://pubs.vmware.com/vsphere-55/topic/com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.html#continueRetrievePropertiesEx

type ContinueRetrievePropertiesExResponse

type ContinueRetrievePropertiesExResponse struct {
	XMLName        xml.Name       `xml:"urn:vim25 ContinueRetrievePropertiesExResponse"`
	RetrieveResult RetrieveResult `xml:"returnval"`
}

type CreateContainerView

type CreateContainerView struct {
	XMLName   xml.Name                `xml:"urn:vim25 CreateContainerView"`
	This      *ViewManager            `xml:"_this"`
	Container *ManagedObjectReference `xml:"container"`
	Type      []string                `xml:"type"`
	Recursive bool                    `xml:"recursive"`
}

http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.view.ViewManager.html#createContainerView

type CreateContainerViewResponse

type CreateContainerViewResponse struct {
	XMLName       xml.Name       `xml:"urn:vim25 CreateContainerViewResponse"`
	ContainerView *ContainerView `xml:"urn:vim25 returnval"`
}

type CreateImportSpec

type CreateImportSpec struct {
	XMLName       xml.Name                  `xml:"urn:vim25 CreateImportSpec"`
	This          *OvfManager               `xml:"_this"`
	OvfDescriptor OvfDescriptor             `xml:"ovfDescriptor"`
	ResourcePool  *ResourcePool             `xml:"resourcePool"`
	Datastore     *Datastore                `xml:"datastore"`
	Cisp          OvfCreateImportSpecParams `xml:"cisp"`
}

http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.OvfManager.html&resultof=%22CreateImportSpec%22%20%22createimportspec%22%20

type CreateImportSpecResponse

type CreateImportSpecResponse struct {
	ImportSpec ImportSpec             `xml:"returnval>importSpec"`
	FileItem   []OvfFileItem          `xml:"returnval>fileItem"`
	Warning    []LocalizedMethodFault `xml:"warning"`
	Error      []LocalizedMethodFault `xml:"error"`
}

type CurrentTime

type CurrentTime struct {
	XMLName xml.Name         `xml:"urn:vim25 CurrentTime"`
	This    *ServiceInstance `xml:"urn:vim25 _this"`
}

type CurrentTimeResponse

type CurrentTimeResponse struct {
	CurrentTime time.Time `xml:"urn:vim25 returnval"`
}

type Datastore

type Datastore ManagedObjectReference

Managed Object Reference Types

type Envelope

type Envelope struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Header  *Header  `xml:",omitempty"`
	Body    *Body
}

SOAP 1.1 Envelope

type Fault

type Fault struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
	Code    string   `xml:"faultcode"`
	String  string   `xml:"faultstring"`
	Detail  struct {
		Message string `xml:",innerxml"`
	} `xml:"detail"`
}

SOAP 1.1 Fault

func (*Fault) Error

func (f *Fault) Error() string

type FindByInventoryPath

type FindByInventoryPath struct {
	XMLName       xml.Name     `xml:"urn:vim25 FindByInventoryPath"`
	This          *SearchIndex `xml:"_this"`
	InventoryPath string       `xml:"inventoryPath"`
}

type FindByInventoryPathResponse

type FindByInventoryPathResponse struct {
	Folder *Folder `xml:"returnval"`
}

type FindByUuid

type FindByUuid struct {
	XMLName      xml.Name     `xml:"urn:vim25 FindByUuid"`
	This         *SearchIndex `xml:"_this"`
	Uuid         string       `xml:"uuid"`
	VmSearch     bool         `xml:"vmSearch"`
	InstanceUuid bool         `xml:"instanceUuid,omitempty"`
}

type FindByUuidResponse

type FindByUuidResponse struct {
	VmOrHost *ManagedObjectReference `xml:"returnval"`
}

type Folder

Managed Object Reference Types

type Header struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header"`
}

SOAP 1.1 Header

type HttpNfcLease

type HttpNfcLease ManagedObjectReference

Managed Object Reference Types

type ImportSpec

type ImportSpec struct {
	XsiType string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr,ommitempty"`
	Content string `xml:",innerxml"`
}

type ImportVApp

type ImportVApp struct {
	XMLName xml.Name      `xml:"urn:vim25 ImportVApp"`
	This    *ResourcePool `xml:"_this"`
	Spec    ImportSpec    `xml:"spec"`
	Folder  *Folder       `xml:"folder"`
}

type ImportVAppResponse

type ImportVAppResponse struct {
	HttpNfcLease *HttpNfcLease `xml:"returnval"`
}

type KeyValue

type KeyValue struct{}

type LocalizedMethodFault

type LocalizedMethodFault struct {
	Fault            MethodFault `xml:"fault"`
	LocalizedMessage string      `xml:"localizedMessage"`
}

type Login

type Login struct {
	XMLName  xml.Name        `xml:"urn:vim25 Login"`
	This     *SessionManager `xml:"_this"`
	Username string          `xml:"userName"`
	Password string          `xml:"password"`
}

type LoginResponse

type LoginResponse struct {
	UserSession UserSession `xml:"urn:vim25 returnval"`
}

type ManagedObjectReference

type ManagedObjectReference struct {
	Type  string `xml:"type,attr"`
	Value string `xml:",chardata"`
}

http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vmodl.ManagedObjectReference.html

type MethodFault

type MethodFault struct {
	DynamicType     string            `xml:"dynamicType"`
	DynamicProperty []DynamicProperty `xml:"dynamicProperty"`
}

type MissingProperty

type MissingProperty struct {
	// Fault LocalizedMethodFault `xml:"fault"` // TODO(igm)
	Path string `xml:"path"`
}

http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvmodl.query.PropertyCollector.MissingProperty.html

type ObjectSpec

type ObjectSpec struct {
	XsiType   string                  `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr,ommitempty"`
	Obj       *ManagedObjectReference `xml:"obj"`
	Skip      bool                    `xml:"skip"`
	SelectSet []interface{}           `xml:"selectSet"`
}

http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.ObjectSpec.html

type OptionManager

type OptionManager ManagedObjectReference

Managed Object Reference Types

type OvfConsumerOstNode

type OvfConsumerOstNode struct{}

TODO

type OvfCreateImportSpecParams

type OvfCreateImportSpecParams struct {
	OvfManagerCommonParams
	DiskProvisioning   string                  `xml:"diskProvisioning,omitempty"`
	EntityName         string                  `xml:"entityName"`
	HostSystem         *ManagedObjectReference `xml:"hostSystem,omitempty"`
	InstantiationOst   *OvfConsumerOstNode     `xml:"instantiationOst,omitempty"`
	IpAllocationPolicy string                  `xml:"ipAllocationPolicy,omitempty"`
	ImProtocol         string                  `xml:"ipProtocol,omitempty"`
	NetworkMapping     []*OvfNetworkMapping    `xml:"networkMapping,omitempty"`
	PropertyMapping    []*KeyValue             `xml:"propertyMapping,omitempty"`
	ResourceMapping    []*OvfResourceMap       `xml:"resourceMapping,omitempty"`
}

type OvfDescriptor

type OvfDescriptor struct {
	Value string `xml:",chardata"`
}

type OvfFileItem

type OvfFileItem struct {
	DeviceID          string `xml:"deviceId"`
	Path              string `xml:"path"`
	CompressionMethod string `xml:"compressionMethod"`
	ChunkSize         int64  `xml:"chunkSize"`
	Size              int64  `xml:"size"`
	CimType           int32  `xml:"cimType"`
	Create            bool   `xml:"create"`
}

type OvfManager

type OvfManager ManagedObjectReference

Managed Object Reference Types

type OvfManagerCommonParams

type OvfManagerCommonParams struct {
	Locale           string      `xml:"locale"`
	DeploymentOption string      `xml:"deploymentOption"`
	MsgBundle        []*KeyValue `xml:"msgBundle,omitempty"`
	ImportOption     []string    `xml:"importOption,omitempty"`
}

type OvfNetworkMapping

type OvfNetworkMapping struct{}

type OvfResourceMap

type OvfResourceMap struct{}

type PowerOffVM_Task

type PowerOffVM_Task struct {
	XMLName xml.Name        `xml:"urn:vim25 PowerOffVM_Task"`
	This    *VirtualMachine `xml:"_this"`
}

http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.VirtualMachine.html

type PowerOffVM_TaskResponse

type PowerOffVM_TaskResponse struct {
	Task *Task `xml:"returnval"`
}

type PowerOnVM_Task

type PowerOnVM_Task struct {
	XMLName xml.Name        `xml:"urn:vim25 PowerOnVM_Task"`
	This    *VirtualMachine `xml:"_this"`
}

type PowerOnVM_TaskResponse

type PowerOnVM_TaskResponse struct {
	Task *Task `xml:"returnval"`
}

type PropertyCollector

type PropertyCollector ManagedObjectReference

Managed Object Reference Types

type PropertyFilterSpec

type PropertyFilterSpec struct {
	PropSet                       []*PropertySpec `xml:"propSet"`
	ObjectSet                     []*ObjectSpec   `xml:"objectSet"`
	ReportMissingObjectsInResults bool            `xml:"reportMissingObjectsInResults"`
}

http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.FilterSpec.html

type PropertySpec

type PropertySpec struct {
	Type    string   `xml:"type"`
	PathSet []string `xml:"pathSet"`
	All     bool     `xml:"all,omitempty"`
}

http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.PropertySpec.html

type ResourcePool

type ResourcePool ManagedObjectReference

Managed Object Reference Types

type RetrievePropertiesEx

type RetrievePropertiesEx struct {
	XMLName xml.Name              `xml:"urn:vim25 RetrievePropertiesEx"`
	This    *PropertyCollector    `xml:"_this"`
	SpecSet []*PropertyFilterSpec `xml:"specSet"`
	Options RetrieveOptions       `xml:"options"`
}

http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.html?path=7_0_0_2_6_17_8#retrievePropertiesEx

type RetrievePropertiesExResponse

type RetrievePropertiesExResponse struct {
	XMLName        xml.Name       `xml:"urn:vim25 RetrievePropertiesExResponse"`
	RetrieveResult RetrieveResult `xml:"returnval"`
}

type RetrieveServiceContent

type RetrieveServiceContent struct {
	XMLName xml.Name         `xml:"urn:vim25 RetrieveServiceContent"`
	This    *ServiceInstance `xml:"urn:vim25 _this"`
}

type RetrieveServiceContentResponse

type RetrieveServiceContentResponse struct {
	XMLName   xml.Name        `xml:"urn:vim25 RetrieveServiceContentResponse"`
	Returnval *ServiceContent `xml:"urn:vim25 returnval"`
}

type SearchIndex

type SearchIndex ManagedObjectReference

Managed Object Reference Types

type Service

type Service struct {
	Url string

	HttpClient *http.Client
	// contains filtered or unexported fields
}

func (*Service) SoapRequest

func (s *Service) SoapRequest(body *Body) (*Body, error)

type ServiceContent

type ServiceContent struct {
	RootFolder        *Folder            `xml:"urn:vim25 rootFolder"`
	PropertyCollector *PropertyCollector `xml:"urn:vim25 propertyCollector"`
	ViewManager       *ViewManager       `xml:"urn:vim25 viewManager"`
	About             About              `xml:"urn:vim25 about"`
	Setting           *OptionManager     `xml:"urn:vim25 setting"`
	SessionManager    *SessionManager    `xml:"urn:vim25 sessionManager"`
	SearchIndex       *SearchIndex       `xml:"urn:vim25 searchIndex"`
	OvfManager        *OvfManager        `xml:"ovfManager"`
}

type ServiceInstance

type ServiceInstance ManagedObjectReference

Managed Object Reference Types

type SessionManager

type SessionManager ManagedObjectReference

Managed Object Reference Types

type Task

Managed Object Reference Types

type TraversalSpec

type TraversalSpec struct {
	SelectionSpec
	XsiType string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"`
	Type    string `xml:"type"`
	Path    string `xml:"path"`
	Skip    bool   `xml:"skip"`
}

http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.TraversalSpec.html

type UserSession

type UserSession struct {
	Key            string    `xml:"key"`
	UserName       string    `xml:"userName"`
	FullName       string    `xml:"fullName"`
	CallCount      uint32    `xml:"callCount"`
	LoginTime      time.Time `xml:"loginTime"`
	LastActiveTime time.Time `xml:"lastActiveTime"`
	Locate         string    `xml:"locale"`
}

type ViewManager

type ViewManager ManagedObjectReference

Managed Object Reference Types

type VirtualMachine

type VirtualMachine ManagedObjectReference

Managed Object Reference Types

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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