vsphere

package
v0.0.0-...-e73b65a Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Network.
	NetStandard    = "Standard"
	NetDvPortGroup = "DvPortGroup"
	NetDvSwitch    = "DvSwitch"
	// Cluster.
	ComputeResource = "ComputeResource"
)

Variants.

View Source
const (
	MaxDetail = base.MaxDetail
)

Variables

View Source
var (
	FolderKind     = libref.ToKind(Folder{})
	DatacenterKind = libref.ToKind(Datacenter{})
	ClusterKind    = libref.ToKind(Cluster{})
	HostKind       = libref.ToKind(Host{})
	NetKind        = libref.ToKind(Network{})
	DsKind         = libref.ToKind(Datastore{})
	VmKind         = libref.ToKind(VM{})
)

Kinds

View Source
var NotFound = libmodel.NotFound

Errors

Functions

func All

func All() []interface{}

Build all models.

Types

type About

type About struct {
	Base
	APIVersion string `sql:""`
	Product    string `sql:""`
}

type Base

type Base struct {
	// Managed object ID.
	ID string `sql:"pk"`
	// Variant
	Variant string `sql:"d0,index(variant)"`
	// Name
	Name string `sql:"d0,index(name)"`
	// Parent
	Parent Ref `sql:"d0,index(parent)"`
	// Revision
	Revision int64 `sql:"incremented,d0,index(revision)"`
}

Base VMWare model.

func (*Base) Equals

func (m *Base) Equals(other libmodel.Model) bool

func (*Base) GetName

func (m *Base) GetName() string

Name.

func (*Base) GetParent

func (m *Base) GetParent() Ref

Parent.

func (*Base) Labels

func (m *Base) Labels() libmodel.Labels

Get labels.

func (*Base) Pk

func (m *Base) Pk() string

Get the PK.

func (*Base) String

func (m *Base) String() string

String representation.

func (*Base) WithRef

func (m *Base) WithRef(ref Ref)

Populate PK using the ref.

type BranchNavigator

type BranchNavigator = base.BranchNavigator

type Cluster

type Cluster struct {
	Base
	Folder      string `sql:"d0,index(folder)"`
	Hosts       []Ref  `sql:""`
	Networks    []Ref  `sql:""`
	Datastores  []Ref  `sql:""`
	DasEnabled  bool   `sql:""`
	DasVms      []Ref  `sql:""`
	DrsEnabled  bool   `sql:""`
	DrsBehavior string `sql:""`
	DrsVms      []Ref  `sql:""`
}

type Concern

type Concern = base.Concern

type DVSHost

type DVSHost struct {
	Host Ref
	PNIC []string
}

type Datacenter

type Datacenter struct {
	Base
	Clusters   Ref `sql:""`
	Networks   Ref `sql:""`
	Datastores Ref `sql:""`
	Vms        Ref `sql:""`
}

type Datastore

type Datastore struct {
	Base
	Type            string `sql:""`
	Capacity        int64  `sql:""`
	Free            int64  `sql:""`
	MaintenanceMode string `sql:""`
}

type Device

type Device struct {
	Kind string `json:"kind"`
}

Virtual Device.

type Disk

type Disk struct {
	Key       int32  `json:"key"`
	File      string `json:"file"`
	Datastore Ref    `json:"datastore"`
	Capacity  int64  `json:"capacity"`
	Shared    bool   `json:"shared"`
	RDM       bool   `json:"rdm"`
}

Virtual Disk.

type Folder

type Folder struct {
	Base
	Datacenter string `sql:"d0,index(datacenter)"`
	Folder     string `sql:"d0,index(folder)"`
	Children   []Ref  `sql:""`
}

type Host

type Host struct {
	Base
	Cluster            string      `sql:"d0,index(cluster)"`
	Status             string      `sql:""`
	InMaintenanceMode  bool        `sql:""`
	ManagementServerIp string      `sql:""`
	Thumbprint         string      `sql:""`
	Timezone           string      `sql:""`
	CpuSockets         int16       `sql:""`
	CpuCores           int16       `sql:""`
	ProductName        string      `sql:""`
	ProductVersion     string      `sql:""`
	Network            HostNetwork `sql:""`
	Networks           []Ref       `sql:""`
	Datastores         []Ref       `sql:""`
}

type HostNetwork

type HostNetwork struct {
	PNICs      []PNIC      `json:"pNICs"`
	VNICs      []VNIC      `json:"vNICs"`
	PortGroups []PortGroup `json:"portGroups"`
	Switches   []Switch    `json:"switches"`
}

func (*HostNetwork) PNIC

func (n *HostNetwork) PNIC(key string) (nic *PNIC, found bool)

func (*HostNetwork) PortGroup

func (n *HostNetwork) PortGroup(name string) (portGroup *PortGroup, found bool)

func (*HostNetwork) Switch

func (n *HostNetwork) Switch(key string) (vSwitch *Switch, found bool)

type InvalidRefError

type InvalidRefError = base.InvalidRefError

type ListOptions

type ListOptions = base.ListOptions

Types

type Model

type Model interface {
	base.Model
	GetParent() Ref
	GetName() string
}

Model.

type NIC

type NIC struct {
	Network Ref    `json:"network"`
	MAC     string `json:"mac"`
}

Virtual ethernet card.

type Network

type Network struct {
	Base
	Tag      string    `sql:""`
	DVSwitch Ref       `sql:""`
	Key      string    `sql:""`
	Host     []DVSHost `sql:""`
}

type PNIC

type PNIC struct {
	Key       string `json:"key"`
	LinkSpeed int32  `json:"linkSpeed"`
}

type ParentNavigator

type ParentNavigator = base.ParentNavigator

type PortGroup

type PortGroup struct {
	Key    string `json:"key"`
	Name   string `json:"name"`
	Switch string `json:"vSwitch"`
}

type Ref

type Ref = base.Ref

type Switch

type Switch struct {
	Key        string   `json:"key"`
	Name       string   `json:"name"`
	PortGroups []string `json:"portGroups"`
	PNICs      []string `json:"pNICs"`
}

type Tree

type Tree = base.Tree

Types.

type TreeNode

type TreeNode = base.TreeNode

type VM

type VM struct {
	Base
	Folder                string    `sql:"d0,index(folder)"`
	Host                  string    `sql:"d0,index(host)"`
	RevisionValidated     int64     `sql:"d0,index(revisionValidated)"`
	PolicyVersion         int       `sql:"d0,index(policyVersion)"`
	UUID                  string    `sql:""`
	Firmware              string    `sql:""`
	PowerState            string    `sql:""`
	ConnectionState       string    `sql:""`
	CpuAffinity           []int32   `sql:""`
	CpuHotAddEnabled      bool      `sql:""`
	CpuHotRemoveEnabled   bool      `sql:""`
	MemoryHotAddEnabled   bool      `sql:""`
	FaultToleranceEnabled bool      `sql:""`
	CpuCount              int32     `sql:""`
	CoresPerSocket        int32     `sql:""`
	MemoryMB              int32     `sql:""`
	GuestName             string    `sql:""`
	GuestID               string    `sql:""`
	BalloonedMemory       int32     `sql:""`
	IpAddress             string    `sql:""`
	NumaNodeAffinity      []string  `sql:""`
	StorageUsed           int64     `sql:""`
	Snapshot              Ref       `sql:""`
	IsTemplate            bool      `sql:""`
	ChangeTrackingEnabled bool      `sql:""`
	Devices               []Device  `sql:""`
	NICs                  []NIC     `sql:""`
	Disks                 []Disk    `sql:""`
	Networks              []Ref     `sql:""`
	Concerns              []Concern `sql:""`
}

func (*VM) Validated

func (m *VM) Validated() bool

Determine if current revision has been validated.

type VNIC

type VNIC struct {
	Key        string `json:"key"`
	PortGroup  string `json:"portGroup"`
	DPortGroup string `json:"dPortGroup"`
	IpAddress  string `json:"ipAddress"`
	SubnetMask string `json:"subnetMask"`
	MTU        int32  `json:"mtu"`
}

Jump to

Keyboard shortcuts

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