Documentation ¶
Overview ¶
Package templateresolver provides vsphere template resolution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OVATemplateResult ¶
type OVATemplateResult map[TemplateQuery]*TemplateResult
OVATemplateResult carries the results of OVA template resolution for the control plane or a machine deployment of a cluster.
func (*OVATemplateResult) String ¶
func (r *OVATemplateResult) String() string
type Query ¶
type Query struct { // OVATemplateQueries carries the set of OVA template queries. OVATemplateQueries map[TemplateQuery]struct{} }
Query sets constraints for resolution of vSphere OVA templates. Its structure reflects Cluster API cluster topology.
type Resolver ¶
func NewResolver ¶
func (*Resolver) GetVSphereEndpoint ¶
func (r *Resolver) GetVSphereEndpoint(svrContext *VSphereContext) (vc.Client, error)
GetVSphereEndpoint gets vsphere client based on credentials set in config variables
type Result ¶
type Result struct { // OVATemplates carries the mapping from TemplateQuery to TemplateResult. // It is set to nil if resolving the control plane part was skipped. // The key is the OVA version. OVATemplates OVATemplateResult // UsefulErrorMessage carries the errors resulted in template resolution UsefulErrorMessage string }
Result carries the results of vSphere OVA template resolution. Its structure reflects Cluster API cluster topology.
type TemplateQuery ¶
type TemplateQuery struct { // OVAVersion is a version of the template OVAVersion string // OSInfo is the OS information the template should satisfy OSInfo runv1.OSInfo }
TemplateQuery sets constraints for resolution of vSphere OVA templates for the control plane or a machine deployment of a cluster.
func (*TemplateQuery) String ¶
func (q *TemplateQuery) String() string
type TemplateResolver ¶
type TemplateResolver interface { // Resolve returns VM template path and MOIDs satisfying query constraints. Resolve(ctx context.Context, svrContext *VSphereContext, query Query, vcClient vc.Client) Result GetVSphereEndpoint(svrContext *VSphereContext) (vc.Client, error) }
TemplateResolver resolves vSphere templates
func New ¶
func New(log logr.Logger) TemplateResolver
New returns a newly created instance of the vSphere template resolver implementation.
type TemplateResult ¶
type TemplateResult struct { // TemplatePath is the path of the template. If empty, then no template satisfied the query. TemplatePath string // TemplateMOID is the MOID of the template. If empty, then no template satisfied the query. TemplateMOID string }
TemplateResult carries the resolved template path and MOID.
func (*TemplateResult) String ¶
func (r *TemplateResult) String() string