esxcli

package
Version: v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2016 License: Apache-2.0, Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

func NewCommand

func NewCommand(args []string) *Command

func (*Command) Argument

func (*Command) Method

func (c *Command) Method() string

func (*Command) Moid

func (c *Command) Moid() string

func (*Command) Name

func (c *Command) Name() string

func (*Command) Namespace

func (c *Command) Namespace() string

func (*Command) Parse

Parse generates a flag.FlagSet based on the given []CommandInfoParam and returns arguments for use with methods.ExecuteSoap

type CommandInfo

type CommandInfo struct {
	CommandInfoItem
	Method []*CommandInfoMethod `xml:"method"`
}

type CommandInfoHint

type CommandInfoHint struct {
	Key   string `xml:"key"`
	Value string `xml:"value"`
}

type CommandInfoHints

type CommandInfoHints []CommandInfoHint

func (CommandInfoHints) Fields

func (h CommandInfoHints) Fields() []string

func (CommandInfoHints) Formatter

func (h CommandInfoHints) Formatter() string

type CommandInfoItem

type CommandInfoItem struct {
	Name        string `xml:"name"`
	DisplayName string `xml:"displayName"`
	Help        string `xml:"help"`
}

type CommandInfoMethod

type CommandInfoMethod struct {
	CommandInfoItem
	Param []CommandInfoParam `xml:"param"`
	Hints CommandInfoHints   `xml:"hints"`
}

type CommandInfoParam

type CommandInfoParam struct {
	CommandInfoItem
	Aliases []string `xml:"aliases"`
	Flag    bool     `xml:"flag"`
}

type Executor

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

func NewExecutor

func NewExecutor(c *vim25.Client, host *object.HostSystem) (*Executor, error)

func (*Executor) CommandInfo

func (e *Executor) CommandInfo(c *Command) (*CommandInfoMethod, error)

func (*Executor) Execute

func (e *Executor) Execute(req *types.ExecuteSoap, res interface{}) error

func (*Executor) NewRequest

func (e *Executor) NewRequest(args []string) (*types.ExecuteSoap, *CommandInfoMethod, error)

func (*Executor) Run

func (e *Executor) Run(args []string) (*Response, error)

type FirewallInfo

type FirewallInfo struct {
	Loaded        bool
	Enabled       bool
	DefaultAction string
}

func GetFirewallInfo

func GetFirewallInfo(s *object.HostFirewallSystem) (*FirewallInfo, error)

GetFirewallInfo via 'esxcli network firewall get' The HostFirewallSystem type does not expose this data. This helper can be useful in particular to determine if the firewall is enabled or disabled.

type GuestInfo

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

func NewGuestInfo

func NewGuestInfo(c *vim25.Client) *GuestInfo

func (*GuestInfo) IpAddress

func (g *GuestInfo) IpAddress(vm *object.VirtualMachine) (string, error)

IpAddress attempts to find the guest IP address using esxcli. ESX hosts must be configured with the /Net/GuestIPHack enabled. For example: $ govc host.esxcli -- system settings advanced set -o /Net/GuestIPHack -i 1

type Response

type Response struct {
	Info   *CommandInfoMethod
	Values []Values
}

func (*Response) Type

func (r *Response) Type(start xml.StartElement) string

func (*Response) UnmarshalXML

func (r *Response) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Values

type Values map[string][]string

func (Values) UnmarshalXML

func (v Values) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL