validation

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateDefaultAddresses

func ValidateDefaultAddresses(ic *v1alpha1.Interconnect, c framework.ContextData, pods []v1.Pod)

ValidateDefaultAddresses verifies that the created addresses match expected ones

func ValidateDefaultConnectors

func ValidateDefaultConnectors(interconnect *v1alpha1.Interconnect, c framework.ContextData, pods []v1.Pod)

ValidateDefaultConnectors asserts that the inter-router connectors are defined in [deployment plan size - 1] routers (as the initial pod only provides listeners). It returns number of connectors found.

func ValidateDefaultListeners

func ValidateDefaultListeners(ic *v1alpha1.Interconnect, c framework.ContextData, pods []v1.Pod)

ValidateDefaultListeners ensures that the default listeners (if no others specified) have been created

func ValidateDefaultSslProfiles

func ValidateDefaultSslProfiles(ic *v1alpha1.Interconnect, c framework.ContextData, pods []v1.Pod)

ValidateDefaultSslProfiles asserts that the default sslProfile entities have been defined, based on given Interconnect's role.

func ValidateEntityValues

func ValidateEntityValues(entity entities.Entity, fieldValues map[string]interface{})

ValidateEntityValues uses reflect to compare values from a given entity's field with the provided value from fieldValues map.

This way you do not need to compare the whole entity, but just the fields that are relevant to match.

func ValidateSpecAutoLink(ic *v1alpha1.Interconnect, c framework.ContextData, alMap AutoLinkMapByAddress)

ValidateSpecAutoLink asserts that the autoLink models provided through the alMap are present across all pods from the given ic instance.

func ValidateSpecConnector

func ValidateSpecConnector(ic *v1alpha1.Interconnect, c framework.ContextData, cMap ConnectorMapByPort)

ValidateSpecConnector asserts that the connector models provided through the cMap are present across all pods from the given ic instance.

func ValidateSpecLinkRoute

func ValidateSpecLinkRoute(ic *v1alpha1.Interconnect, c framework.ContextData, lrMap LinkRouteMapByPrefixPattern)

ValidateSpecLinkRoute asserts that the linkRoute models provided through the lrMap are present across all pods from the given ic instance.

func ValidateSpecListener

func ValidateSpecListener(ic *v1alpha1.Interconnect, c framework.ContextData, lsMap ListenerMapByPort)

ValidateSpecListener asserts that the listener models provided through the lsMap are present across all pods from the given ic instance.

func ValidateSslProfileModels

func ValidateSslProfileModels(ic *v1alpha1.Interconnect, c framework.ContextData, sslProfMap SslProfileMapByName)

ValidateSslProfileModels retrieves the Interconnect instance and iterates through all its pods, querying management API for sslProfiles. Next it ensure that all sslProfile definitions fro the sslProfMap are defined on each pod.

Types

type AutoLinkMapByAddress

type AutoLinkMapByAddress map[string]map[string]interface{}

AutoLinkMapByAddress represents a map whose keys are the addresses and the values are maps of AutoLink (Entity) models with properties (string) and respective values that can be used to compare expected results with an AutoLink entity instance.

type ConnectorMapByPort

type ConnectorMapByPort map[string]map[string]interface{}

ConnectorMapByPort represents a map that contains ports as keys and keys/values that represents a Connector entity (for comparison).

type LinkRouteMapByPrefixPattern

type LinkRouteMapByPrefixPattern map[string]map[string]interface{}

LinkRouteMapByPrefixPattern represents a map that contains a map of string keys that can be either a prefix or a pattern.

type ListenerMapByPort

type ListenerMapByPort map[string]map[string]interface{}

ListenerMapByPort represents a map that contains

type SslProfileMapByName

type SslProfileMapByName map[string]map[string]interface{}

SslProfileMapByName represents a map indexed by sslProfile Name storing another map with the property names and respective values for the SslProfile entity that will be validated.

Jump to

Keyboard shortcuts

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