helper

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsumerToken = ""
	URL           = "https://api.equinix.com/metal/v1/"
	Version       = "metal"
)

Variables

This section is empty.

Functions

func AssertPortCmdOutput added in v0.20.0

func AssertPortCmdOutput(t *testing.T, port *metalv1.Port, out, networkType string, bonded bool)

func CleanTestBgpDynamicNeighbor added in v0.21.0

func CleanTestBgpDynamicNeighbor(t *testing.T, id string)

func CleanTestDevice

func CleanTestDevice(t *testing.T, deviceId string)

func CleanTestGateway added in v0.18.0

func CleanTestGateway(t *testing.T, gatewayId string)

func CleanTestInterConnection added in v0.20.0

func CleanTestInterConnection(t *testing.T, connectionID string)

func CleanTestIps

func CleanTestIps(t *testing.T, ipsId string) error

func CleanTestOrganization added in v0.18.0

func CleanTestOrganization(t *testing.T, orgId string)

func CleanTestProject

func CleanTestProject(t *testing.T, projectId string)

func CleanTestVirtualCircuit added in v0.20.0

func CleanTestVirtualCircuit(t *testing.T, vcId string)

func CleanTestVlan

func CleanTestVlan(t *testing.T, vlanId string)

func CleanTestVrfGateway added in v0.21.0

func CleanTestVrfGateway(t *testing.T, gatewayId string)

func CleanTestVrfIpRequest added in v0.20.0

func CleanTestVrfIpRequest(t *testing.T, IPReservationId string)

func CleanTestVrfRoute added in v0.21.0

func CleanTestVrfRoute(t *testing.T, vrfRouteId string)

func CleanTestVrfs added in v0.20.0

func CleanTestVrfs(t *testing.T, vrfId string)

func CleanupInterconnection added in v0.20.0

func CleanupInterconnection(t *testing.T, connectionId string)

func CleanupInterconnectionVC added in v0.20.0

func CleanupInterconnectionVC(t *testing.T, connectionId string)

func CreateTestBgpDynamicNeighbor added in v0.21.0

func CreateTestBgpDynamicNeighbor(t *testing.T, gatewayId, iprange string, asn int32) *metalv1.BgpDynamicNeighbor

func CreateTestBgpEnableTest added in v0.18.0

func CreateTestBgpEnableTest(projId string) error

func CreateTestDevice

func CreateTestDevice(t *testing.T, projectId, name string) *metalv1.Device

func CreateTestGateway added in v0.18.0

func CreateTestGateway(t *testing.T, projectId, vlanId string, privateIPv4SubnetSize *int32) *metalv1.MetalGateway

func CreateTestInterConnection added in v0.20.0

func CreateTestInterConnection(t *testing.T, projectId, name string) *metalv1.Interconnection

func CreateTestIps

func CreateTestIps(t *testing.T, projectId string, quantity int, ipType string) (string, error)

func CreateTestOrganization added in v0.18.0

func CreateTestOrganization(t *testing.T, name string) *metalv1.Organization

func CreateTestProject

func CreateTestProject(t *testing.T, name string) *metalv1.Project

func CreateTestVLAN added in v0.18.0

func CreateTestVLAN(t *testing.T, projectId, metro string) *metalv1.VirtualNetwork

func CreateTestVirtualCircuit added in v0.20.0

func CreateTestVirtualCircuit(t *testing.T, projectId, connId, portId, vlanId, name string) *metalv1.VirtualCircuit

func CreateTestVlanWithVxLan added in v0.18.0

func CreateTestVlanWithVxLan(t *testing.T, projectId string, Id int, desc string) *metalv1.VirtualNetwork

func CreateTestVrfGateway added in v0.21.0

func CreateTestVrfGateway(t *testing.T, projectId, reservationId, vlanId string) *metalv1.VrfMetalGateway

func CreateTestVrfIpRequest added in v0.20.0

func CreateTestVrfIpRequest(t *testing.T, projectId, vrfId string) *metalv1.RequestIPReservation201Response

func CreateTestVrfRoute added in v0.21.0

func CreateTestVrfRoute(t *testing.T, vrfId string) *metalv1.VrfRoute

func CreateTestVrfs added in v0.20.0

func CreateTestVrfs(t *testing.T, projectId, name string, vlan int32) *metalv1.Vrf

func ExecuteAndCaptureOutput added in v0.20.0

func ExecuteAndCaptureOutput(t *testing.T, root *cobra.Command) []byte

func GenerateRandomString added in v0.18.0

func GenerateRandomString(length int) string

func GetDeviceById added in v0.18.0

func GetDeviceById(t *testing.T, deviceId string) (*metalv1.Device, error)

func GetInterconnPort added in v0.20.0

func GetInterconnPort(t *testing.T, connId string) string

func GetPortById added in v0.18.0

func GetPortById(t *testing.T, portId string) (*metalv1.Port, error)

func IsDeviceStateActive

func IsDeviceStateActive(t *testing.T, deviceId string) (bool, error)

func SetupProjectAndDevice added in v0.18.0

func SetupProjectAndDevice(t *testing.T, projPrefix string) (*metalv1.Project, *metalv1.Device)

func StopTestDevice

func StopTestDevice(t *testing.T, deviceId string) error

func TestClient

func TestClient() *metalv1.APIClient

func UnAssignPortVlan added in v0.18.0

func UnAssignPortVlan(t *testing.T, portId, vlanId string) error

func WaitForAttachVlanToPort added in v0.18.0

func WaitForAttachVlanToPort(t *testing.T, portId string, attach bool) error

func WaitForDeviceState added in v0.20.0

func WaitForDeviceState(t *testing.T, deviceId string, states ...metalv1.DeviceState) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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