validation

package
v0.9.0-master Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateMachinePool

func ValidateMachinePool(p *openstack.MachinePool, fldPath *field.Path) field.ErrorList

ValidateMachinePool checks that the specified machine pool is valid.

func ValidatePlatform

func ValidatePlatform(p *openstack.Platform, fldPath *field.Path, fetcher ValidValuesFetcher) field.ErrorList

ValidatePlatform checks that the specified platform is valid.

Types

type ValidValuesFetcher

type ValidValuesFetcher interface {
	// GetCloudNames gets the valid cloud names.
	GetCloudNames() ([]string, error)
	// GetRegionNames gets the valid region names.
	GetRegionNames(cloud string) ([]string, error)
	// GetImageNames gets the valid image names.
	GetImageNames(cloud string) ([]string, error)
	// GetNetworkNames gets the valid network names.
	GetNetworkNames(cloud string) ([]string, error)
	// GetFlavorNames gets the valid flavor names.
	GetFlavorNames(cloud string) ([]string, error)
}

ValidValuesFetcher is used to retrieve valid values for fields in Platform.

func NewValidValuesFetcher

func NewValidValuesFetcher() ValidValuesFetcher

NewValidValuesFetcher returns a new ValidValuesFetcher.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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