data

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	*common.Target
	common.Debug
	common.Compute
	common.VCHID
	common.ContainerConfig

	OpsCredentials common.OpsCredentials

	CertPEM     []byte
	KeyPEM      []byte
	ClientCAs   []byte
	RegistryCAs []byte
	common.Images

	ImageDatastorePath string              `cmd:"image-store"`
	VolumeLocations    map[string]*url.URL `cmd:"volume-store" label:"value-key"`

	BridgeNetworkName string        `cmd:"bridge-network"`
	ClientNetwork     NetworkConfig `cmd:"client-network"`
	PublicNetwork     NetworkConfig `cmd:"public-network"`
	ManagementNetwork NetworkConfig `cmd:"management-network"`
	DNS               []net.IP      `cmd:"dns-server"`

	common.ContainerNetworks `cmd:"container-network"`
	common.ResourceLimits

	BridgeIPRange *net.IPNet `cmd:"bridge-network-range"`

	InsecureRegistries  []string `cmd:"insecure-registry"`
	WhitelistRegistries []string `cmd:"whitelist-registry"`

	HTTPSProxy *url.URL `cmd:"https-proxy"`
	HTTPProxy  *url.URL `cmd:"http-proxy"`
	ProxyIsSet bool

	NumCPUs  int `cmd:"endpoint-cpu"`
	MemoryMB int `cmd:"endpoint-memory"`

	Timeout time.Duration

	Force               bool
	ResetInProgressFlag bool

	AsymmetricRouting bool `cmd:"asymmetric-routes"`

	ScratchSize string `cmd:"base-image-size"`
	Rollback    bool

	SyslogConfig SyslogConfig `cmd:"syslog"`
}

Data wraps all parameters required by value validation

func NewData

func NewData() *Data

func (*Data) CopyNonEmpty

func (d *Data) CopyNonEmpty(src *Data) error

CopyNonEmpty will shallow copy src value to override existing value if the value is set. This copy will take care of relationship between variables, that means if any variable in NetworkConfig is not empty, the whole NetworkConfig will be copied. However, for container networks, changes to existing networks will not be overwritten.

type InstallerData

type InstallerData struct {
	// Virtual Container Host capacity
	VCHSize      config.Resources
	VCHSizeIsSet bool

	// Appliance capacity
	ApplianceSize config.Resources

	KeyPEM  string
	CertPEM string

	//FIXME: remove following attributes after port-layer-server read config from guestinfo
	DatacenterName         string
	ClusterPath            string
	ResourcePoolPath       string
	ApplianceInventoryPath string

	Datacenter types.ManagedObjectReference
	Cluster    types.ManagedObjectReference

	ImageFiles map[string]string

	ApplianceISO      string
	BootstrapISO      string
	ISOVersion        string
	PreUpgradeVersion string
	Timeout           time.Duration

	HTTPSProxy *url.URL
	HTTPProxy  *url.URL

	// Used only for configure, so that the current state can be validated relative to the requested changes
	CreateVMGroup bool
	DeleteVMGroup bool
}

InstallerData is used to hold the transient installation configuration that shouldn't be serialized

type NetworkConfig

type NetworkConfig struct {
	Name         string `cmd:"parent"`
	Destinations []net.IPNet
	Gateway      net.IPNet
	IP           net.IPNet `cmd:"ip"`
}

NetworkConfig is used to set IP addr for each network

func (*NetworkConfig) Empty

func (n *NetworkConfig) Empty() bool

Empty determines if ip and gateway are unset

func (*NetworkConfig) IsSet

func (n *NetworkConfig) IsSet() bool

type SyslogConfig

type SyslogConfig struct {
	Addr *url.URL `cmd:"address"`
	Tag  string
}

Jump to

Keyboard shortcuts

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