Help us shape the future of Go! Take the 2026 Go Developer Survey

testutils

package
v0.108.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MakeOrFindBlueprintMutex *sync.Mutex

MakeOrFindBlueprintMutex is created by TestMain()

Functions

func BlueprintA

func BlueprintA(t testing.TB, ctx context.Context, name ...string) *apstra.TwoStageL3ClosClient

func BlueprintConfigletA added in v0.35.0

func BlueprintConfigletA(t testing.TB, ctx context.Context, client *apstra.TwoStageL3ClosClient, cid apstra.ObjectId, condition string) apstra.ObjectId

func BlueprintF

BlueprintF creates a blueprint with switches where a single port is represented by two different names: - xe-0/0/0 - transform 1 - ge-0/0/0 - transform 2 and 3

func BlueprintG added in v0.70.0

func BlueprintG(t testing.TB, ctx context.Context, cleanup bool) *apstra.TwoStageL3ClosClient

func BlueprintI added in v0.74.0

func BlueprintJ added in v0.103.0

func BlueprintJ(t testing.TB, ctx context.Context, name ...string) *apstra.TwoStageL3ClosClient

BlueprintJ creates an Apstra 6.1.0+ blueprint with IPv6 VTEP addressing

func CatalogConfigletA added in v0.35.0

func CatalogConfigletA(t testing.TB, ctx context.Context, client *apstra.Client) apstra.ObjectId

func DatacenterConnectivityTemplateA added in v0.93.0

func DatacenterConnectivityTemplateA(t testing.TB, ctx context.Context, bp *apstra.TwoStageL3ClosClient, szID string, tag int) apstra.ObjectId

func DatacenterConnectivityTemplateCustomStaticRoute added in v0.96.0

func DatacenterConnectivityTemplateCustomStaticRoute(t testing.TB, ctx context.Context, bp *apstra.TwoStageL3ClosClient, szID apstra.ObjectId) apstra.ObjectId

func DatacenterIpLinkConnectivityTemplateVlans added in v0.93.0

func DatacenterIpLinkConnectivityTemplateVlans(t testing.TB, ctx context.Context, bp *apstra.TwoStageL3ClosClient, ctId apstra.ObjectId) []int

func FfBlueprintA added in v0.61.0

func FfBlueprintA(t testing.TB, ctx context.Context) *apstra.FreeformClient

func FfBlueprintB added in v0.61.0

func FfBlueprintB(t testing.TB, ctx context.Context, intSystemCount, extSystemCount int) (*apstra.FreeformClient, []apstra.ObjectId, []apstra.ObjectId)

func FfBlueprintC added in v0.64.0

func FfBlueprintC(t testing.TB, ctx context.Context) (*apstra.FreeformClient, apstra.ObjectId)

FfBlueprintC creates a freeform blueprint with a single resource group inside. Returned values are the blueprint client and the resource group ID.

func GetSystemIDs added in v0.104.0

func GetSystemIDs(t testing.TB, ctx context.Context, bp *apstra.TwoStageL3ClosClient, role string) map[string]string

GetSystemIDs returns system node IDs keyed by node label

func GetTestClient

func GetTestClient(t testing.TB, ctx context.Context) *apstra.Client

func Ipv4PoolA

func Ipv4PoolA(t testing.TB, ctx context.Context) *apstra.IpPool

func Ipv4PoolB

func Ipv4PoolB(t testing.TB, ctx context.Context) *apstra.IpPool

func LeafSwitchGenericSystemInterfaces added in v0.93.0

func LeafSwitchGenericSystemInterfaces(t testing.TB, ctx context.Context, client *apstra.TwoStageL3ClosClient) []apstra.ObjectId

func MakeOrFindBlueprint added in v0.35.0

func MakeOrFindBlueprint(t testing.TB, ctx context.Context, name string, f bFunc) *apstra.TwoStageL3ClosClient

func PropertySetA

func PropertySetA(t testing.TB, ctx context.Context) *apstra.PropertySet

func RackTypeA

func RackTypeA(t testing.TB, ctx context.Context) *apstra.RackType

RackTypeA has: - 1 leaf switch with 10G uplink - 1 access switch

func RackTypeB

func RackTypeB(t testing.TB, ctx context.Context) *apstra.RackType

RackTypeB has: - 1 leaf switch ESI pair with 10G uplink - 1 access switch dual-homed to ESI leaf "A" - 1 pair (count = 2) access switches single-homed to ESI leaf "B"

func RackTypeC

func RackTypeC(t testing.TB, ctx context.Context) *apstra.RackType

RackTypeC has: - 1 leaf switch ESI pair with 10G uplink - 1 access switch dual-homed to both ESI leaf switches

func RackTypeD

func RackTypeD(t testing.TB, ctx context.Context) *apstra.RackType

RackTypeD has: - 1 leaf switch ESI pair with 10G uplink - 1 access switch single homed to ESI leaf "A" - 1 access switch ESI pair - 1 access switch single homed to ESI leaf "B"

func RackTypeE

func RackTypeE(t testing.TB, ctx context.Context) *apstra.RackType

RackTypeE has: - 1 leaf switch MLAG pair with 10G uplink - 1 access switch homed to the first MLAG peer - 1 access switch homed to the second MLAG peer - 1 access switch homed to both MLAG peers

func RackTypeF

func RackTypeF(t testing.TB, ctx context.Context) *apstra.RackType

func RoutingPolicyA

func RoutingPolicyA(t testing.TB, ctx context.Context, client *apstra.TwoStageL3ClosClient) apstra.ObjectId

func TagA

func TagA(t testing.TB, ctx context.Context) *apstra.DesignTag

func TelemetryServiceRegistryEntryA added in v0.61.0

func TelemetryServiceRegistryEntryA(t testing.TB, ctx context.Context) *apstra.TelemetryServiceRegistryEntry

func TemplateA

func TemplateA(t testing.TB, ctx context.Context) *apstra.TemplateRackBased

func TemplateB

func TemplateB(t testing.TB, ctx context.Context) *apstra.TemplateRackBased

func TemplateC

func TemplateC(t testing.TB, ctx context.Context) *apstra.TemplateRackBased

func TemplateD

func TemplateD(t testing.TB, ctx context.Context) *apstra.TemplateRackBased

func TemplateE

func TemplateE(t testing.TB, ctx context.Context) *apstra.TemplateRackBased

func TestCfgFileToEnv added in v0.58.0

func TestCfgFileToEnv(t testing.TB)

func VirtualNetworkVxlan added in v0.70.0

func VirtualNetworkVxlan(t testing.TB, ctx context.Context, client *apstra.TwoStageL3ClosClient, cleanup bool) string

func VniPool added in v0.52.4

func VniPool(t testing.TB, ctx context.Context, first, last uint32, cleanup bool) *apstra.VniPool

Types

This section is empty.

Jump to

Keyboard shortcuts

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