create

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Max permitted length of Virtual Machine name
	MaxVirtualMachineNameLen = 80
	// Max permitted length of Virtual Switch name
	MaxDisplayNameLen = 31
)

Variables

View Source
var EntireOptionHelpTemplate = `` /* 351-byte string literal not displayed */

Functions

This section is empty.

Types

type Create

type Create struct {
	common.Networks
	*data.Data
	Certs common.CertFactory

	Registries common.Registries

	Nameservers common.DNS

	BridgeIPRange string

	Proxies common.Proxies

	SyslogAddr string
	// contains filtered or unexported fields
}

Create has all input parameters for vic-machine create command

func NewCreate

func NewCreate() *Create

func (*Create) Flags

func (c *Create) Flags() []cli.Flag

Flags return all cli flags for create

func (*Create) ProcessBridgeNetwork

func (c *Create) ProcessBridgeNetwork() error

func (*Create) ProcessNetwork

func (c *Create) ProcessNetwork(op trace.Operation, network *data.NetworkConfig, netName, pgName, staticIP, gateway string) error

ProcessNetwork parses network args if present

func (*Create) ProcessParams

func (c *Create) ProcessParams(op trace.Operation) error

func (*Create) ProcessSyslog

func (c *Create) ProcessSyslog() error

func (*Create) Run

func (c *Create) Run(clic *cli.Context) (err error)

func (*Create) SetFields

func (c *Create) SetFields() map[string]struct{}

SetFields iterates through the fields in the Create struct, searching for fields tagged with the `arg` key. If the value of that tag matches the supplied `flag` string, a nil check is performed. If the field is not nil, then the user supplied this flag on the command line and we need to persist it. This is a workaround for cli.Context.IsSet() returning false when the short option for a cli.StringSlice is supplied instead of the long option. See https://github.com/urfave/cli/issues/314

Jump to

Keyboard shortcuts

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