connectivity

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintNetworkPolicy added in v0.1.0

func PrintNetworkPolicy(p *networkingv1.NetworkPolicy) string

Types

type Comparison added in v0.2.0

type Comparison string
const (
	SameComparison      Comparison = "same"
	DifferentComparison Comparison = "different"
	IgnoredComparison   Comparison = "ignored"
)

func (Comparison) ShortString added in v0.2.0

func (c Comparison) ShortString() string

type ComparisonTable added in v0.2.0

type ComparisonTable struct {
	Wrapped *probe.TruthTable
}

func NewComparisonTable added in v0.2.0

func NewComparisonTable(items []string) *ComparisonTable

func NewComparisonTableFrom added in v0.2.0

func NewComparisonTableFrom(kubeProbe *probe.Table, simulatedProbe *probe.Table) *ComparisonTable

func (*ComparisonTable) Get added in v0.2.0

func (c *ComparisonTable) Get(from string, to string) bool

func (*ComparisonTable) RenderTable added in v0.2.0

func (c *ComparisonTable) RenderTable() string

func (*ComparisonTable) Set added in v0.2.0

func (c *ComparisonTable) Set(from string, to string, value bool)

func (*ComparisonTable) ValueCounts added in v0.2.0

func (c *ComparisonTable) ValueCounts(ignoreLoopback bool) map[Comparison]int

type Interpreter added in v0.1.0

type Interpreter struct {
	// contains filtered or unexported fields
}

func NewInterpreter added in v0.1.0

func NewInterpreter(kubernetes *kube.Kubernetes, resources *probe.Resources, resetClusterBeforeTestCase bool, kubeProbeRetries int, perturbationWaitSeconds int, verifyClusterStateBeforeTestCase bool) (*Interpreter, error)

func (*Interpreter) ExecuteTestCase added in v0.1.0

func (t *Interpreter) ExecuteTestCase(testCase *generator.TestCase) *Result

type Printer added in v0.1.0

type Printer struct {
	Noisy          bool
	IgnoreLoopback bool
	Results        []*Result
}

func (*Printer) PrintStep added in v0.1.0

func (t *Printer) PrintStep(i int, step *generator.TestStep, stepResult *StepResult)

func (*Printer) PrintSummary added in v0.1.0

func (t *Printer) PrintSummary()

func (*Printer) PrintTestCaseResult added in v0.1.0

func (t *Printer) PrintTestCaseResult(result *Result)

type Result added in v0.1.0

type Result struct {
	TestCase *generator.TestCase
	Steps    []*StepResult
	Err      error
}

type StepResult added in v0.1.0

type StepResult struct {
	SimulatedProbe *probe.Probe
	KubeProbes     []*probe.Table
	Policy         *matcher.Policy
	KubePolicies   []*networkingv1.NetworkPolicy
}

func (*StepResult) LastKubeProbe added in v0.2.0

func (s *StepResult) LastKubeProbe() *probe.Table

type TestCaseState added in v0.1.0

type TestCaseState struct {
	Kubernetes *kube.Kubernetes
	Resources  *probe.Resources
	Policies   []*networkingv1.NetworkPolicy
}

func (*TestCaseState) CreatePolicy added in v0.1.0

func (t *TestCaseState) CreatePolicy(policy *networkingv1.NetworkPolicy) error

func (*TestCaseState) DeletePolicy added in v0.1.0

func (t *TestCaseState) DeletePolicy(ns string, name string) error

func (*TestCaseState) ReadPolicies added in v0.1.0

func (t *TestCaseState) ReadPolicies(namespaces []string) error

func (*TestCaseState) SetNamespaceLabels added in v0.1.0

func (t *TestCaseState) SetNamespaceLabels(ns string, labels map[string]string) error

func (*TestCaseState) SetPodLabels added in v0.1.0

func (t *TestCaseState) SetPodLabels(ns string, pod string, labels map[string]string) error

func (*TestCaseState) UpdatePolicy added in v0.1.0

func (t *TestCaseState) UpdatePolicy(policy *networkingv1.NetworkPolicy) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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