test

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 39 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TestResourceSwitchesHref = "/switches"
)

Variables

View Source
var (
	DevsimName string

	TestDevsimResources        schema.ResourceLinks
	TestDevsimPrivateResources schema.ResourceLinks
	TestDevsimSecResources     schema.ResourceLinks
)
View Source
var (
	MfgCert                   = loadFileFromEnv("MFG_CRT")
	MfgKey                    = loadFileFromEnv("MFG_KEY")
	RootCACrt                 = loadFileFromEnv("ROOT_CA_CRT")
	RootCAKey                 = loadFileFromEnv("ROOT_CA_KEY")
	IdentityIntermediateCA    = loadFileFromEnv("INTERMEDIATE_CA_CRT")
	IdentityIntermediateCAKey = loadFileFromEnv("INTERMEDIATE_CA_KEY")
)

Functions

func DefaultSwitchResourceLink(id string) schema.ResourceLink

func FindDeviceByName

func FindDeviceByName(ctx context.Context, name string) (deviceID string, _ error)

func FindDeviceIP

func FindDeviceIP(ctx context.Context, deviceName string, ipType IPType) (string, error)

func GenerateIdentityCert

func GenerateIdentityCert(deviceID string) tls.Certificate

func MakeSwitchResourceData

func MakeSwitchResourceData(overrides map[string]interface{}) map[string]interface{}

func MakeSwitchResourceDefaultData

func MakeSwitchResourceDefaultData() map[string]interface{}

func MustFindDeviceByName

func MustFindDeviceByName(name string) (deviceID string)

func MustFindDeviceIP

func MustFindDeviceIP(name string, ipType IPType) (ip string)

func MustGetHostname

func MustGetHostname() string

func NewIdentityCertificateSigner

func NewIdentityCertificateSigner(caCert []*x509.Certificate, caKey crypto.PrivateKey, validNotBefore time.Time, validNotAfter time.Time) core.CertificateSigner

func TestResourceLightInstanceHref

func TestResourceLightInstanceHref(id string) string

func TestResourceSwitchesInstanceHref

func TestResourceSwitchesInstanceHref(id string) string

Types

type IPType

type IPType int
const (
	ANY IPType = 0
	IP4 IPType = 1
	IP6 IPType = 2
)

Directories

Path Synopsis
resource

Jump to

Keyboard shortcuts

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