utils

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: BSD-3-Clause Imports: 14 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AllocFor5k          = createAlloc(5000)
	ExhaustedAllocFor5k = exhaustAlloc(AllocFor5k)
)

Functions

func CreateHttpRequest

func CreateHttpRequest(oldObj, newObj []byte, isOldMalformed, isNewMalformed bool, opType v1beta1.Operation) (*http.Request, error)

func GetTconf

func GetTconf(tconfName string, tconfSet []danmtypes.TenantConfig) *danmtypes.TenantConfig

func GetTestNet

func GetTestNet(netId string, testNets []danmtypes.DanmNet) *danmtypes.DanmNet

func InitAllocPool

func InitAllocPool(dnet *danmtypes.DanmNet) *danmtypes.DanmNet

func SetupAllocationPools

func SetupAllocationPools(nets []danmtypes.DanmNet) error

func ValidateHttpResponse

func ValidateHttpResponse(writer *httpstub.ResponseWriterStub, isErrorExpected bool, expectedPatches []admit.Patch) error

Types

type MalformedObject

type MalformedObject struct {
	ExtraField string `json:"extraField,omitempty"`
}

type Reservation

type Reservation struct {
	Ip  string
	Set bool
}

type ReservedIpsList

type ReservedIpsList struct {
	NetworkId    string
	Reservations []Reservation
}

func CreateExpectedAllocationsList

func CreateExpectedAllocationsList(ip string, isExpectedToBeSet bool, networkId string) []ReservedIpsList

type ReservedVnisList

type ReservedVnisList struct {
	ProfileName  string
	VniType      string
	Reservations []VniReservation
}

func CreateExpectedVniAllocationsList

func CreateExpectedVniAllocationsList(vni int, vniType, ifaceName string, isExpectedToBeSet bool) []ReservedVnisList

type TestArtifacts

type TestArtifacts struct {
	TestNets     []danmtypes.DanmNet
	TestEps      []danmtypes.DanmEp
	ReservedIps  []ReservedIpsList
	TestTconfs   []danmtypes.TenantConfig
	ReservedVnis []ReservedVnisList
}

type VniReservation

type VniReservation struct {
	Vni int
	Set bool
}

Jump to

Keyboard shortcuts

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