Documentation ¶
Index ¶
- func NewDataFromConfig(ctx context.Context, finder Finder, ...) (d *data.Data, err error)
- func NewSession(ctx context.Context, input *data.Data) (*session.Session, error)
- func NewSessionConfig(ctx context.Context, input *data.Data) (*session.Config, error)
- func VMGroupExists(op trace.Operation, cluster *object.ComputeResource, group string) (bool, error)
- type Finder
- type FirewallStatus
- type Validator
- func (v *Validator) AddDeprecatedFields(ctx context.Context, conf *config.VirtualContainerHostConfigSpec, ...) *data.InstallerData
- func (v *Validator) AssertVersion(ctx context.Context, conf *config.VirtualContainerHostConfigSpec) (err error)
- func (v *Validator) CheckFirewallForTether(ctx context.Context, mgmtIP net.IPNet) FirewallStatus
- func (v *Validator) CheckLicense(ctx context.Context)
- func (v *Validator) ClearIssues()
- func (v *Validator) FirewallCheckOutput(ctx context.Context, status FirewallStatus)
- func (v *Validator) GetIssues() []error
- func (v *Validator) ListIssues(ctx context.Context) error
- func (v *Validator) NoteIssue(err error)
- func (v *Validator) ResourcePoolHelper(ctx context.Context, path string) (*object.ResourcePool, error)
- func (v *Validator) Session() *session.Session
- func (v *Validator) SetDataFromVM(ctx context.Context, vm *vm.VirtualMachine, d *data.Data) error
- func (v *Validator) Validate(ctx context.Context, input *data.Data, allowEmptyDC bool) (*config.VirtualContainerHostConfigSpec, error)
- func (v *Validator) ValidateCompute(ctx context.Context, input *data.Data, computeRequired bool) (*config.VirtualContainerHostConfigSpec, error)
- func (v *Validator) ValidateMigratedConfig(ctx context.Context, conf *config.VirtualContainerHostConfigSpec) (*config.VirtualContainerHostConfigSpec, error)
- func (v *Validator) ValidateStorageQuota(ctx context.Context, quotaGB int, conf *config.VirtualContainerHostConfigSpec, ...) (int64, error)
- func (v *Validator) ValidateTarget(ctx context.Context, input *data.Data, allowEmptyDC bool) (*config.VirtualContainerHostConfigSpec, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataFromConfig ¶
func NewDataFromConfig(ctx context.Context, finder Finder, conf *config.VirtualContainerHostConfigSpec) (d *data.Data, err error)
NewDataFromConfig converts VirtualContainerHostConfigSpec back to data.Data object This method does not touch any configuration for VCH VM or resource pool, which should be retrieved from VM attributes
func NewSession ¶ added in v1.5.0
func NewSessionConfig ¶ added in v1.5.0
func VMGroupExists ¶
Types ¶
type Finder ¶
type Finder interface {
ObjectReference(ctx context.Context, ref types.ManagedObjectReference) (object.Reference, error)
}
Finder is defined for easy to test
type FirewallStatus ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func CreateFromSession ¶ added in v1.5.0
func (*Validator) AddDeprecatedFields ¶
func (v *Validator) AddDeprecatedFields(ctx context.Context, conf *config.VirtualContainerHostConfigSpec, input *data.Data) *data.InstallerData
func (*Validator) AssertVersion ¶
func (*Validator) CheckFirewallForTether ¶
CheckFirewallForTether which host firewalls are configured to allow tether traffic
func (*Validator) CheckLicense ¶
CheckLicense checks license features on the Validator's target
func (*Validator) ClearIssues ¶
func (v *Validator) ClearIssues()
func (*Validator) FirewallCheckOutput ¶
func (v *Validator) FirewallCheckOutput(ctx context.Context, status FirewallStatus)
FirewallCheckOutput outputs firewall status messages associated with the hosts in each of the status categories
func (*Validator) ResourcePoolHelper ¶
func (v *Validator) ResourcePoolHelper(ctx context.Context, path string) (*object.ResourcePool, error)
ResourcePoolHelper finds a resource pool from the input compute path and shows suggestions if unable to do so when the path is ambiguous.
func (*Validator) SetDataFromVM ¶ added in v1.5.0
SetDataFromVM set value based on VCH VM properties
func (*Validator) Validate ¶
func (v *Validator) Validate(ctx context.Context, input *data.Data, allowEmptyDC bool) (*config.VirtualContainerHostConfigSpec, error)
Validate runs through various validations, starting with basics such as naming, moving onto vSphere entities and then the compatibility between those entities. It assembles a set of issues that are found for reporting.
func (*Validator) ValidateCompute ¶
func (*Validator) ValidateMigratedConfig ¶
func (v *Validator) ValidateMigratedConfig(ctx context.Context, conf *config.VirtualContainerHostConfigSpec) (*config.VirtualContainerHostConfigSpec, error)
MigrateConfig migrate old VCH configuration to new version. Currently check required fields only
func (*Validator) ValidateStorageQuota ¶ added in v1.5.0
func (v *Validator) ValidateStorageQuota(ctx context.Context, quotaGB int, conf *config.VirtualContainerHostConfigSpec, vch *vm.VirtualMachine) (int64, error)