Documentation ¶
Index ¶
- Constants
- type Action
- type DeleteContainers
- type DeleteVolumeStores
- type Dispatcher
- func (d *Dispatcher) CheckAccessToVCAPI(vch *vm.VirtualMachine, target string) (int64, error)
- func (d *Dispatcher) CheckDockerAPI(conf *config.VirtualContainerHostConfigSpec, clientCert *tls.Certificate) error
- func (d *Dispatcher) CheckServiceReady(ctx context.Context, conf *config.VirtualContainerHostConfigSpec, ...) error
- func (d *Dispatcher) CollectDiagnosticLogs()
- func (d *Dispatcher) Configure(conf *config.VirtualContainerHostConfigSpec, settings *data.InstallerData) (err error)
- func (d *Dispatcher) CreateVCH(conf *config.VirtualContainerHostConfigSpec, settings *data.InstallerData, ...) error
- func (d *Dispatcher) DebugVCH(vch *vm.VirtualMachine, conf *config.VirtualContainerHostConfigSpec, ...) error
- func (d *Dispatcher) DeleteVCH(conf *config.VirtualContainerHostConfigSpec, containers *DeleteContainers, ...) error
- func (d *Dispatcher) DeleteVCHInstances(conf *config.VirtualContainerHostConfigSpec, containers *DeleteContainers) error
- func (d *Dispatcher) DisableFirewallRuleset() error
- func (d *Dispatcher) EnableFirewallRuleset() error
- func (d *Dispatcher) FetchAndMigrateVCHConfig(vm *vm.VirtualMachine) (*config.VirtualContainerHostConfigSpec, error)
- func (d *Dispatcher) GetDockerAPICommand(conf *config.VirtualContainerHostConfigSpec, key string, cert string, ...) (cmd, env string)
- func (d *Dispatcher) GetNoSecretVCHConfig(vm *vm.VirtualMachine) (*config.VirtualContainerHostConfigSpec, error)
- func (d *Dispatcher) GetTLSFriendlyHostIP(clientIP net.IP, cert *x509.Certificate, certificateAuthorities []byte) string
- func (d *Dispatcher) GetVCHConfig(vm *vm.VirtualMachine) (*config.VirtualContainerHostConfigSpec, error)
- func (d *Dispatcher) GuestInfoSecret(vchName, vmPath string, ds *object.Datastore) (*extraconfig.SecretKey, error)
- func (d *Dispatcher) InitDiagnosticLogsFromConf(conf *config.VirtualContainerHostConfigSpec)
- func (d *Dispatcher) InitDiagnosticLogsFromVCH(vch *vm.VirtualMachine)
- func (d *Dispatcher) InspectVCH(vch *vm.VirtualMachine, conf *config.VirtualContainerHostConfigSpec, ...) error
- func (d *Dispatcher) NewVCHFromComputePath(computePath string, name string, v *validate.Validator) (*vm.VirtualMachine, error)
- func (d *Dispatcher) NewVCHFromID(id string) (*vm.VirtualMachine, error)
- func (d *Dispatcher) Rollback(conf *config.VirtualContainerHostConfigSpec, settings *data.InstallerData) error
- func (d *Dispatcher) SearchVCHs(computePath string) ([]*vm.VirtualMachine, error)
- func (d *Dispatcher) ShowVCH(conf *config.VirtualContainerHostConfigSpec, key string, cert string, ...)
- type State
Constants ¶
const ( // deprecated snapshot name prefix UpgradePrefix = "upgrade for" // new snapshot name for upgrade and configure are using same process ConfigurePrefix = "reconfigure for" )
const RulesetID string = "vSPC"
ruleset ID from /etc/vmware/firewall/service.xml
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action int
Action is the current action being performed
type DeleteContainers ¶
type DeleteContainers int
const ( AllContainers DeleteContainers = iota PoweredOffContainers )
type DeleteVolumeStores ¶
type DeleteVolumeStores int
const ( AllVolumeStores DeleteVolumeStores = iota NoVolumeStores )
type Dispatcher ¶
type Dispatcher struct { Action DockerPort string HostIP string // contains filtered or unexported fields }
func NewDispatcher ¶
NewDispatcher creates a dispatcher that can act upon VIC management operations. clientCert is an optional client certificate to allow interaction with the Docker API for verification force will ignore some errors
func (*Dispatcher) CheckAccessToVCAPI ¶
func (d *Dispatcher) CheckAccessToVCAPI(vch *vm.VirtualMachine, target string) (int64, error)
func (*Dispatcher) CheckDockerAPI ¶
func (d *Dispatcher) CheckDockerAPI(conf *config.VirtualContainerHostConfigSpec, clientCert *tls.Certificate) error
CheckDockerAPI checks if the appliance components are initialized by issuing `docker info` to the appliance
func (*Dispatcher) CheckServiceReady ¶
func (d *Dispatcher) CheckServiceReady(ctx context.Context, conf *config.VirtualContainerHostConfigSpec, clientCert *tls.Certificate) error
CheckServiceReady checks if service is launched correctly, including ip address, service initialization, VC connection and Docker API Should expand this method for any more VCH service checking
func (*Dispatcher) CollectDiagnosticLogs ¶
func (d *Dispatcher) CollectDiagnosticLogs()
func (*Dispatcher) Configure ¶
func (d *Dispatcher) Configure(conf *config.VirtualContainerHostConfigSpec, settings *data.InstallerData) (err error)
Configure will try to reconfigure vch appliance. If failed will try to roll back to original status.
func (*Dispatcher) CreateVCH ¶
func (d *Dispatcher) CreateVCH(conf *config.VirtualContainerHostConfigSpec, settings *data.InstallerData, receiver vchlog.Receiver) error
func (*Dispatcher) DebugVCH ¶
func (d *Dispatcher) DebugVCH(vch *vm.VirtualMachine, conf *config.VirtualContainerHostConfigSpec, password, authorizedKey string) error
func (*Dispatcher) DeleteVCH ¶
func (d *Dispatcher) DeleteVCH(conf *config.VirtualContainerHostConfigSpec, containers *DeleteContainers, volumeStores *DeleteVolumeStores) error
func (*Dispatcher) DeleteVCHInstances ¶
func (d *Dispatcher) DeleteVCHInstances(conf *config.VirtualContainerHostConfigSpec, containers *DeleteContainers) error
DeleteVCHInstances will delete all containers in the target resource pool or folder. Additionally, it will detach disks of the target VCH
func (*Dispatcher) DisableFirewallRuleset ¶
func (d *Dispatcher) DisableFirewallRuleset() error
DisableFirewallRuleset disables the ruleset on the target, denying VIC backchannel traffic
func (*Dispatcher) EnableFirewallRuleset ¶
func (d *Dispatcher) EnableFirewallRuleset() error
EnableFirewallRuleset enables the ruleset on the target, allowing VIC backchannel traffic
func (*Dispatcher) FetchAndMigrateVCHConfig ¶
func (d *Dispatcher) FetchAndMigrateVCHConfig(vm *vm.VirtualMachine) (*config.VirtualContainerHostConfigSpec, error)
FetchAndMigrateVCHConfig queries VCH guestinfo, and try to migrate older version data to latest if the data is old
func (*Dispatcher) GetDockerAPICommand ¶
func (d *Dispatcher) GetDockerAPICommand(conf *config.VirtualContainerHostConfigSpec, key string, cert string, cacert string, certpath string) (cmd, env string)
GetDockerAPICommand generates values to display for usage of a deployed VCH
func (*Dispatcher) GetNoSecretVCHConfig ¶
func (d *Dispatcher) GetNoSecretVCHConfig(vm *vm.VirtualMachine) (*config.VirtualContainerHostConfigSpec, error)
GetNoSecretVCHConfig queries vch configure from vm configuration, without decrypting secret information this method is used to accommodate old vch version without secret information
func (*Dispatcher) GetTLSFriendlyHostIP ¶
func (d *Dispatcher) GetTLSFriendlyHostIP(clientIP net.IP, cert *x509.Certificate, certificateAuthorities []byte) string
func (*Dispatcher) GetVCHConfig ¶
func (d *Dispatcher) GetVCHConfig(vm *vm.VirtualMachine) (*config.VirtualContainerHostConfigSpec, error)
GetVCHConfig queries VCH configuration and decrypts secret information
func (*Dispatcher) GuestInfoSecret ¶
func (d *Dispatcher) GuestInfoSecret(vchName, vmPath string, ds *object.Datastore) (*extraconfig.SecretKey, error)
GuestInfoSecret downloads the VCH's .vmx file and returns the GuestInfoSecretKey value.
func (*Dispatcher) InitDiagnosticLogsFromConf ¶
func (d *Dispatcher) InitDiagnosticLogsFromConf(conf *config.VirtualContainerHostConfigSpec)
Get the current log header LineEnd of the hostd/vpxd logs based on VCH configuration With this we avoid collecting log file data that existed prior to install.
func (*Dispatcher) InitDiagnosticLogsFromVCH ¶
func (d *Dispatcher) InitDiagnosticLogsFromVCH(vch *vm.VirtualMachine)
Get the current log header LineEnd of the hostd/vpxd logs based on vch VM hardwares, cause VCH configuration might not be available at this time With this we avoid collecting log file data that existed prior to install.
func (*Dispatcher) InspectVCH ¶
func (d *Dispatcher) InspectVCH(vch *vm.VirtualMachine, conf *config.VirtualContainerHostConfigSpec, certPath string) error
func (*Dispatcher) NewVCHFromComputePath ¶
func (d *Dispatcher) NewVCHFromComputePath(computePath string, name string, v *validate.Validator) (*vm.VirtualMachine, error)
func (*Dispatcher) NewVCHFromID ¶
func (d *Dispatcher) NewVCHFromID(id string) (*vm.VirtualMachine, error)
func (*Dispatcher) Rollback ¶
func (d *Dispatcher) Rollback(conf *config.VirtualContainerHostConfigSpec, settings *data.InstallerData) error
func (*Dispatcher) SearchVCHs ¶
func (d *Dispatcher) SearchVCHs(computePath string) ([]*vm.VirtualMachine, error)
SearchVCHs searches for VCHs in one of the following areas:
computePath: if a compute resource is provided then the search will be limited to the resource pools of the compute resources found at the path
datacenter: if no compute resource is provided then search across all compute resources in the sessions datacenter. This requires the user to specify the datacenter via the target flag
all datacenters: if the other options aren't available then search across every compute resource in each vSphere datacenter
func (*Dispatcher) ShowVCH ¶
func (d *Dispatcher) ShowVCH(conf *config.VirtualContainerHostConfigSpec, key string, cert string, cacert string, envfile string, certpath string)