lib

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPER_DOWN = "OPER_DOWN"
	OPER_UP   = "OPER_UP"
)
View Source
const AVISYSTEM = "avi-system"
View Source
const INGRESSAPIVERSION = "networking.k8s.io/v1"
View Source
const PATHTYPE = "Prefix"
View Source
const PORT = 8080
View Source
const SECRETNAME = "ingress-host-tls"
View Source
const SUBDOMAIN = ".avi.internal"

Variables

This section is empty.

Functions

func CheckForUnwantedAPICallsToController

func CheckForUnwantedAPICallsToController(t *testing.T, AviClient *clients.AviClient, start string, end string, Nextpage ...int) bool

func CleanResourceData

func CleanResourceData(data string) string

func CompareHTTPPolicySet

func CompareHTTPPolicySet(t *testing.T, eventLog models.EventLog) bool

func ComparePoolGroupResources

func ComparePoolGroupResources(t *testing.T, eventLog models.EventLog) bool

func ComparePoolResources

func ComparePoolResources(t *testing.T, eventLog models.EventLog) bool

func CompareSSLKeyCertificate

func CompareSSLKeyCertificate(t *testing.T, eventLog models.EventLog) bool

func CompareVirtualServiceResources

func CompareVirtualServiceResources(t *testing.T, eventLog models.EventLog) bool

func CompareVsVipResources

func CompareVsVipResources(t *testing.T, eventLog models.EventLog) bool

func CreateApp

func CreateApp(appName string, namespace string, replica int) error

func CreateInsecureIngress

func CreateInsecureIngress(ingressNamePrefix string, serviceName string, namespace string, numOfPaths int, num int, startIndex ...int) ([]string, []string, error)

func CreateLBService

func CreateLBService(serviceNamePrefix string, appName string, namespace string, num int) ([]string, string, error)

func CreateMultiHostIngress

func CreateMultiHostIngress(ingressNamePrefix string, listOfServices []string, namespace string, numOfPaths int, num int, startIndex ...int) ([]string, []string, []string, error)

func CreatePaths

func CreatePaths(numOfPaths int, serviceName string) []map[string]interface{}

func CreateSecureIngress

func CreateSecureIngress(ingressNamePrefix string, serviceName string, namespace string, numOfPaths int, num int, startIndex ...int) ([]string, []string, error)

func CreateService

func CreateService(serviceNamePrefix string, appName string, namespace string, num int) ([]string, error)

func DeleteApp

func DeleteApp(appName string, namespace string) error

func DeleteIngress

func DeleteIngress(namespace string, listOfIngressToDelete []string) ([]string, error)

func DeletePod

func DeletePod(podName string, namespace string) error

func DeleteService

func DeleteService(serviceNameList []string, namespace string) error

func FetchDNSARecordsFQDN

func FetchDNSARecordsFQDN(t *testing.T, AviClient *clients.AviClient, Nextpage ...int) []string

func FetchPoolGroup

func FetchPoolGroup(t *testing.T, AviClient *clients.AviClient, Nextpage ...int) []models.PoolGroup

func FetchPools

func FetchPools(t *testing.T, AviClient *clients.AviClient, Nextpage ...int) []models.Pool

func FetchVirtualServices

func FetchVirtualServices(t *testing.T, AviClient *clients.AviClient, Nextpage ...int) []models.VirtualService

func KubeInit

func KubeInit(kubeconfig string)

func ListIngress

func ListIngress(t *testing.T, namespace string) ([]string, error)

func NewError

func NewError(text string) error

func SharedAVIClients

func SharedAVIClients(numClients uint32) ([]*clients.AviClient, error)

func UpdateIngress

func UpdateIngress(namespace string, listOfIngressToUpdate []string) ([]string, error)

func WaitForAKOPodReboot

func WaitForAKOPodReboot(t *testing.T, akoPodName string) bool

Types

type AkoParams

type AkoParams struct {
	NumClusters int       `json:"num_clusters"`
	Clusters    []Cluster `json:"clusters"`
}

type AviRestClientPool

type AviRestClientPool struct {
	AviClient []*clients.AviClient
}
var AviClientInstance *AviRestClientPool

func NewAviRestClientPool

func NewAviRestClientPool(num uint32, api_ep string, username string,
	password string) (*AviRestClientPool, error)

type Cluster

type Cluster struct {
	ClusterID              string       `json:"cluster_id"`
	ClusterName            string       `json:"cluster_name"`
	KubeConfigFilePath     string       `json:"kubeconfig_file"`
	CniPlugin              string       `json:"cniPlugin"`
	EVHEnabled             bool         `json:"evhEnabled"`
	CloudName              string       `json:"cloudName"`
	DisableStaticRouteSync string       `json:"disableStaticRouteSync"`
	DefaultIngController   string       `json:"defaultIngController"`
	VipNetworkList         []VipNetwork `json:"NetworkName"`
	VRFRefName             string       `json:"vrfRefName"`
	Platform               Platform     `json:"platform"`
	KubeNodes              []Nodes      `json:"kubeNodes"`
}

type Config

type Config struct {
	Name string `json:"name"`
	UUID string `json:"uuid"`
}

type Networks

type Networks struct {
	Mgmt string `json:"mgmt"`
}

type Nodes

type Nodes struct {
	Name     string `json:"name"`
	IP       string `json:"ip"`
	UserName string `json:"username"`
	Password string `json:"password"`
}

type OperStatus

type OperStatus struct {
	State           string                 `json:"state"`
	LastChangedTime map[string]interface{} `json:"last_changed_time"`
}

type Platform

type Platform struct {
	Type                 string               `json:"type"`
	VCenterConfiguration VCenterConfiguration `json:"vcenter_configuration"`
}

type Runtime

type Runtime struct {
	OperStatus   OperStatus               `json:"oper_status"`
	PercentSEUps int                      `json:"percent_ses_up"`
	VIPSummary   []map[string]interface{} `json:"vip_summary"`
}

type TestParams

type TestParams struct {
	AkoPodName        string `json:"akoPodName"`
	Namespace         string `json:"namespace"`
	AppName           string `json:"appName"`
	ServiceNamePrefix string `json:"serviceNamePrefix"`
	IngressNamePrefix string `json:"ingressNamePrefix"`
	DnsVSName         string `json:"dnsVSName"`
}

type TestbedFields

type TestbedFields struct {
	AkoParam   AkoParams  `json:"Ako_params"`
	TestParams TestParams `json:"TestParams"`
	Vm         []Vm       `json:"Vm"`
}

type VCenterConfiguration

type VCenterConfiguration struct {
	UserName   string `json:"user"`
	Password   string `json:"password"`
	VCenterURL string `json:"vcenter_url"`
}

type VipNetwork

type VipNetwork struct {
	NetworkName string `json:"networkName,omitempty"`
}

type VirtualServiceInventory

type VirtualServiceInventory struct {
	Count   int                             `json:"count"`
	Results []VirtualServiceInventoryResult `json:"results"`
}

type VirtualServiceInventoryResult

type VirtualServiceInventoryResult struct {
	Config                  Config                 `json:"config"`
	Runtime                 Runtime                `json:"runtime"`
	UUID                    string                 `json:"uuid"`
	HealthScore             map[string]interface{} `json:"health_score"`
	Alert                   map[string]interface{} `json:"alert"`
	Pools                   []string               `json:"pools"`
	PoolGroups              []string               `json:"poolgroups"`
	ApiProfileType          string                 `json:"app_profile_type"`
	PoolWithRealTimeMetrics bool                   `json:"has_pool_with_realtime_metrics"`
	Faults                  map[string]interface{} `json:"faults"`
	Metrics                 map[string]interface{} `json:"metrics"`
}

type VirtualServiceInventoryRuntime

type VirtualServiceInventoryRuntime struct {
	Name  string
	UUID  string
	State string
}

func FetchOPERDownVirtualService

func FetchOPERDownVirtualService(t *testing.T, AviClient *clients.AviClient) []VirtualServiceInventoryRuntime

func FetchVirtualServiceOperStatus

func FetchVirtualServiceOperStatus(t *testing.T, AviClient *clients.AviClient) []VirtualServiceInventoryRuntime

type Vm

type Vm struct {
	Datacenter string   `json:"datacenter"`
	Name       string   `json:"name"`
	Cluster    string   `json:"cluster"`
	ClusterIP  string   `json:"cluster_ip"`
	IP         string   `json:"ip"`
	Mask       string   `json:"mask"`
	Networks   Networks `json:"networks"`
	CloudName  string   `json:"cloud_name"`
	Host       string   `json:"host"`
	Static     string   `json:"static"`
	Datastore  string   `json:"datastore"`
	Type       string   `json:"type"`
	UserName   string   `json:"username"`
	Password   string   `json:"password"`
	Gateway    string   `json:"gateway"`
}

Jump to

Keyboard shortcuts

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