create

package
v1.5.2-dev Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2019 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

This section is empty.

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