client

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package client enables handler code to easily and consistently validate and dispatch calls to lib/install.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	CreateVCH(conf *config.VirtualContainerHostConfigSpec, settings *data.InstallerData, receiver vchlog.Receiver) error
	DeleteVCH(conf *config.VirtualContainerHostConfigSpec, containers *management.DeleteContainers, volumeStores *management.DeleteVolumeStores) error
}

type Finder

type Finder interface {
	Element(context.Context, types.ManagedObjectReference) (*list.Element, error)
}

type HandlerClient

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

func NewHandlerClient

func NewHandlerClient(op trace.Operation, action management.Action, finder *find.Finder, session *session.Session, validator *validate.Validator) (*HandlerClient, error)

func (*HandlerClient) Executor

func (c *HandlerClient) Executor() Executor

func (*HandlerClient) Finder

func (c *HandlerClient) Finder() Finder

func (*HandlerClient) GetAddresses

func (c *HandlerClient) GetAddresses(vchConfig *config.VirtualContainerHostConfigSpec) (string, string, error)

func (*HandlerClient) GetConfigForVCH

func (*HandlerClient) GetDatastoreHelper

func (c *HandlerClient) GetDatastoreHelper(op trace.Operation, d *data.Data) (*datastore.Helper, error)

GetDatastoreHelper validates the VCH and returns the datastore helper for the VCH. It errors when validation fails or when datastore is not ready

func (*HandlerClient) GetVCH

func (c *HandlerClient) GetVCH(op trace.Operation, d *data.Data) (*vm.VirtualMachine, error)

func (*HandlerClient) GetVCHConfig

func (*HandlerClient) GetVCHs

func (c *HandlerClient) GetVCHs(op trace.Operation) ([]*vm.VirtualMachine, error)

func (*HandlerClient) Validator

func (c *HandlerClient) Validator() Validator

type Validator

type Validator interface {
	Validate(ctx context.Context, input *data.Data, allowEmptyDC bool) (*config.VirtualContainerHostConfigSpec, error)
	GetIssues() []error

	// TODO (#6032): This probably doesn't belong here.
	AddDeprecatedFields(ctx context.Context, conf *config.VirtualContainerHostConfigSpec, input *data.Data) *data.InstallerData
}

Jump to

Keyboard shortcuts

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