evetest

package module
v0.0.0-...-3d4f773 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 51 Imported by: 0

README

EVETest Framework

EVETest (or simply "evetest") is a next-generation integration testing framework for EVE-OS, designed to replace Eden. It enables comprehensive integration testing using virtualization, supports complex network scenarios via a programmable SDN, and provides a simplified developer experience.

Tests are standard Go tests that live in the EVE repository alongside the code they test. Running a test requires a single command:

make evetest NAME=<test-name>

Prerequisites

  • GNU Make
  • Docker (or compatible container runtime)
  • EVE container image already built (make eve from the EVE repo root), or a published lfedge/eve image matching the version you want to test
  • Go 1.25+ (only needed if installing the evetest CLI locally)
  • Nested virtualization support in your CPU/hypervisor (for all-in-one mode)

macOS note: the test container is a Linux container and runs normally under Docker Desktop. However, Docker Desktop's Linux VM does not support nested virtualization, so /dev/kvm is never available inside containers on macOS. QEMU falls back to TCG software emulation, which is significantly slower than KVM -- tests may take much longer to complete or time out. On Apple Silicon, EVE must be built for arm64 (make eve produces the correct architecture automatically).

Quick Start

# From the EVE repository root

# 1. Build the EVE image (if testing local changes)
make eve                                 # from repo root

# 2. List available tests and test suites (with their configurable parameters)
make list-tests                          # from evetest/
make evetest-list-tests                  # from repo root

# 3. Run the test
#    Execution can be customized using EVETEST_* environment variables.
#    The NAME variable (or EVETEST_NAME) is mandatory and must reference
#    the name of a test or test suite in the ./tests directory.
EVETEST_LOG_LEVEL=debug make evetest NAME=TestBootstrapWithLastResort  # from repo root or inside evetest/

# 3. (Optional) Pipe through gotestfmt for pretty output
go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
EVETEST_LOG_LEVEL=debug EVETEST_OUTPUT_FORMAT=json make evetest NAME=TestBootstrapWithLastResort | gotestfmt

Writing Tests

Test Structure

Every test follows the same pattern:

func TestMyFeature(test *testing.T) {
    // 1. Initialize the framework and obtain a wrapped test handle for assertions.
    //    Use this handle instead of the original test object.
    //    Ensure resources are released at the end.
    evetestT := evetest.Init(test)
    defer evetest.Close()

    // 2. (Optional) Define configurable parameters.
    //    You can use existing parameters (e.g., HypervisorParameter) or define
    //    new test-specific parameters via TestParameterDefinition.
    //    Parameters can be set through environment variables
    //    (`EVETEST_<param-key>`) or assigned directly within a test suite.
    evetest.DefineTestParameters(
        evetest.HypervisorParameter(),
        evetest.TestParameterDefinition{
            Key:          "MY_BOOL_PARAM",
            DefaultValue: false,
            Description: evetest.TestParameterDescription{
                Summary: "Enable some feature",
                Default: "false",
            },
        },
        evetest.TestParameterDefinition{
            Key:          "MY_ENUM_PARAM",
            DefaultValue: MyEnumValueA,
            Description: evetest.TestParameterDescription{
                Summary:       "Select operating mode",
                Default:       "mode-a",
                AllowedValues: "mode-a|mode-b|mode-c",
            },
        },
    )

    // 3. (Optional) Get parameter values set for this test execution.
    hypervisor := evetest.GetHypervisorParameterValue()
    myParamValue := evetest.GetTestParameter[string]("MY_PARAM")

    // 4. Specify required devices and network model, then call Setup.
    //    Test is skipped if requirements cannot be satisfied.
    evetest.Setup(
        evetest.RequireEdgeDevice{
            Name:           "dev1",
            MinCPUs:        4,
            WithHypervisor: evetest.GetHypervisorParameterValue(),
        },
        evetest.RequireNetworkModel{
            NetworkModel: netmodels.SingleEthWithDHCP,
        },
        evetest.RequireInternetConnectivity{}
    )

    // 5. Obtain a handle to the device and interact with it.
    //    Multiple devices can also be requested and used (e.g., for clustering tests).
    device := evetest.GetEdgeDevice("dev1")
    devUpdates, stopDevWatch := device.WatchDeviceInfo()
    defer stopDevWatch()

    // 6. Build and apply the device configuration.
    devConfig := evetest.NewEdgeDeviceConfig("dev1")
    dhcpNet := devConfig.AddNetwork(evetest.DHCPNetworkConfig{
        NetworkType: evecommon.NetworkType_V4,
    })
    devConfig.AddNetworkAdapter(evetest.NetworkAdapterConfig{
        LogicalLabel:  "eth0",
        PhysicalLabel: "eth0",
        InterfaceName: "eth0",
        NetworkUUID:   dhcpNet,
        Usage:         evecommon.PhyIoMemberUsage_PhyIoUsageMgmtAndApps,
    })
    device.ApplyConfig(devConfig, true, true)

    // 7. (Optional) Insert checkpoints at key points in the test to aid debugging
    //    and inspection. You can stop the test at a checkpoint to examine the
    //    EVE device state and other runtime information through evetest CLI.
    evetest.Checkpoint("config-applied")

    // 8. Perform assertions against EVE API messages published to the controller.
    // Any assertion framework can be used; Gomega is shown as an example.
    t := NewGomegaWithT(evetestT)
    timeout := 3 * time.Minute
    t.Eventually(devUpdates, timeout).Should(Receive(matchers.SatisfyPredicate(
        "Device has applied and reported expected network configuration",
        func(dinfo *eveinfo.ZInfoDevice) bool {
            // Check that the controller-pushed DPC ("zedagent") is active.
            sa := dinfo.GetSystemAdapter()
            return sa != nil && sa.GetCurrentIndex() == 0 &&
                len(sa.GetStatus()) == 1 && sa.GetStatus()[0].GetKey() == "zedagent"
        })))

    // Continue repeating steps 6–8 as needed to test the desired scenario.
}
Init and Close

evetest.Init(t) initializes the framework: it starts the Adam controller, connects to the broker, and launches the gRPC server. It returns a wrapped test handle that should be used for assertions instead of the original testing.T. It must be called first in every test.

evetest.Close() tears down all resources. Always defer it immediately after Init. When running inside a test suite, Close is a no-op for intermediate tests -- resources are reused across the suite and torn down only after the last test.

Test Parameters

Parameters make tests configurable without code changes. They are resolved in order:

  1. Value set by the test suite (if running in a suite)
  2. Environment variable EVETEST_<KEY> (e.g., EVETEST_HYPERVISOR=kvm)
  3. Default value from the parameter definition
evetest.DefineTestParameters(
    evetest.HypervisorParameter(),           // pre-defined: key "HYPERVISOR"
    evetest.FilesystemParameter(),           // pre-defined: key "FILESYSTEM"
    evetest.TPMParameter(),                  // pre-defined: key "TPM"
    evetest.TestParameterDefinition{         // custom parameter
        Key:          "MY_PARAM",
        DefaultValue: true,
        Description: evetest.TestParameterDescription{
            Summary: "Enable some feature",
            Default: "true",
        },
    },
)

hypervisor := evetest.GetHypervisorParameterValue()
myParam := evetest.GetTestParameter[bool]("MY_PARAM")

Custom enum-like types can implement the FromStringer interface (FromString(string) error) to be used as parameter types. See HypervisorParameter for an example.

Test Requirements and Setup

evetest.Setup(requirements...) declares what the test needs. The framework handles all the behind-the-scenes work: building EVE images, creating VMs, configuring networks, waiting for devices to boot and onboard, and establishing tunnels for seamless connectivity between EVE devices, Adam controller and the test framework itself.

RequireEdgeDevice -- deploy an EVE device VM:

evetest.RequireEdgeDevice{
    Name:              "dev1",          // logical name to reference the device
    MinCPUs:           4,               // default: 4
    MinRAMInMB:        8192,            // default: 8192
    MinDiskSizeInMB:   28576,           // default: 28576
    WithHypervisor:    evetest.HypervisorKVM,
    WithFilesystem:    evetest.FilesystemZFS,
    WithTPM:           true,
    DeviceReusePolicy: evetest.CreateFromScratchWithLiveImage,
}

The DeviceReusePolicy controls how existing devices from a previous test (in a suite) are handled. Devices are only reused if they also satisfy the requirements of the next test; those that do not match the next test’s requirements are torn down and not reused.

Policy Behavior
UseAsIs Keep existing state
RebootEdgeDevice Reboot the device
ResetDeviceConfig Clear app settings, preserve network config
ResetDeviceConfigAndReboot Clear settings and reboot
ReonboardEdgeDevice Force re-onboarding
CreateFromScratchWithLiveImage Recreate VM with live image
CreateFromScratchWithInstaller Recreate VM using installer image

RequireNetworkModel -- configure the SDN network environment:

evetest.RequireNetworkModel{
    NetworkModel: netmodels.SingleEthWithDHCP,
}

Network models are declarative descriptions of the network topology: ports, bridges, VLANs, DHCP/DNS servers, firewalls, proxies, and more. See the evetest/tests/netmodels/ directory for examples, and sdn/README.md for the full network model reference.

RequireInternetConnectivity -- verify and require Internet access:

evetest.RequireInternetConnectivity{
    RequireIPv6: true,  // optional: also require IPv6
}

If any requirement cannot be satisfied, the test is marked as skipped.

Building and Applying Configuration

After Setup returns, all required devices are powered on and onboarded. Next, build the device configuration programmatically:

// Add networks
dhcpNet := devConfig.AddNetwork(evetest.DHCPNetworkConfig{...})
staticNet := devConfig.AddNetwork(evetest.StaticNetworkConfig{...})

// Add network adapters
devConfig.AddNetworkAdapter(evetest.NetworkAdapterConfig{...})

// Set device-wide config properties
devConfig.SetConfigProperties(cfgProps)

// Apply and wait for the device to fetch and confirm the config.
// waitUntilFetched=true: wait for EVE to request the config from the controller.
// waitUntilConfirmed=true: also wait for EVE to report LastProcessedConfig >= configTimestamp.
device := evetest.GetEdgeDevice("dev1")
device.ApplyConfig(devConfig, true, true)

You can modify and re-apply the configuration multiple times during a test to verify how EVE reacts to configuration changes.

Interacting with Devices

The EdgeDevice object provides methods for interacting with the running EVE device:

device := evetest.GetEdgeDevice("dev1")

// Run commands via SSH
stdout, stderr, err := device.RunShellScript("uptime", timeout, stdoutWatchdogTimeout)

// Read EVE's internal published state (pubsub)
var dpcl pillartypes.DevicePortConfigList
evetest.ReadPublication(device, "nim", true, "global", &dpcl)

// Read all publications of a type
items := evetest.ReadAllPublications[pillartypes.AppInstanceStatus](
    device, "zedmanager", false)

// Get the latest device info/metrics (or nil if not yet received)
info := device.GetDeviceInfo()
metrics := device.GetDeviceMetrics()

// Watch for info/metrics updates in real-time
updates, stop := device.WatchDeviceInfo()
defer stop()
for msg := range updates { ... }

// Apply configuration changes
device.ApplyConfig(newConfig, true, true)

// Reboot (pass true to wait until the device comes back up)
device.SoftReboot(true)
device.HardReboot(true)
Checkpoints

Insert named checkpoints to create pause points for interactive debugging:

evetest.Checkpoint("setup-done")
// ... more test logic ...
evetest.Checkpoint("config-applied")
// ... more test logic ...
evetest.Checkpoint("another-import-point-of-tested-scenario")

When EVETEST_PAUSE_ON_CHECKPOINT matches a checkpoint name, the test pauses there. Use the CLI to inspect state, then run evetest continue to resume.

Guidelines
  • Document the test in its function comment: state the objective, the network model used and why, the device configuration, the test phases (numbered), and any parameters. Look at existing fully-implemented tests for the expected structure.

  • Focus on important use cases, not on maximizing code-line coverage. A test that exercises a realistic end-to-end scenario is more valuable than one that reaches a high line count by poking at internal helpers.

  • Assert against the EVE API (device info, metrics, publications) rather than implementation details that may change between EVE versions. Avoid SSH-ing into EVE to read internal state files. The exception is Linux-standard files that do not change between EVE versions (e.g., /etc/resolv.conf).

  • Shorten timers by setting config properties (e.g., timer.*) to smaller values wherever EVE allows it, to reduce overall test duration. Be aware that some timers have a hard minimum floor that cannot be overridden.

  • Use Eventually for all device-state assertions. Everything in EVE is processed asynchronously. For example, an acknowledgment from Adam that config was received does not mean it has been fully applied — it still has to trickle through multiple microservices. Similarly, an app reaching the ONLINE state does not mean it has fully booted, received an IP address, or is reachable over SSH.

  • Prefer channel-based watches (WatchDeviceInfo, WatchAppInfo, WatchNetworkInstanceInfo, etc.) over periodic polling with short intervals. Each polling call reloads all previously published messages of that type from Adam, which is both slow and redundant; channel-based watches deliver only new messages as they arrive.

  • For set/list comparisons use pkg/pillar/utils/generics (e.g., generics.EqualSets); for network address comparisons use pkg/pillar/utils/netutils/ip.go.

  • Reuse existing network models from evetest/netmodels/. When adding a new model, keep it general-purpose — describe it in terms of topology, not the specific test that first needed it, so it can be reused across scenarios.

  • Order tests in a suite to maximize device reuse: group tests that share device and network requirements so the framework can reuse existing VMs instead of recreating them between tests.

  • Place a checkpoint after every significant configuration or state change. This creates a named pause point targetable with EVETEST_PAUSE_ON_CHECKPOINT for interactive inspection.

  • Use parameters instead of copy-pasting tests. When two variants differ only in a few values/steps, define a TestParameterDefinition and register suite variants with different TestParameterValue entries instead of duplicating the entire test body.

  • Use evetest.Logger() for all log output inside tests; its formatting is consistent with the rest of the framework.

  • Register the new test in the suite. After writing a test function, add it to the appropriate RunTestSuite call in testsuite_test.go in the same package.

  • Reuse existing package-level helpers before writing new ones. Each test package has shared helpers for common patterns — for example the networking package has getDevicePort, getCurrentDPC, appHasError, niHasError. Check the other _test.go files in the package before duplicating logic.

  • Do not mutate shared global state. If a test needs to modify a package-level variable (e.g. a network model defined in evetest/netmodels/), operate on a deep copy, or make sure to revert the change before the test returns. Unreverted mutations will silently affect subsequent tests in the same suite.

  • Use Gomega for assertions. The framework does not impose an assertion library, but Gomega is recommended — all existing tests use it and the evetest/matchers/ package provides evetest-specific Gomega matchers. In particular, use matchers.SatisfyPredicate when passing a predicate to Eventually: it attaches a human-readable description to the predicate and supports .StopIf(fn) to fail fast on unrecoverable errors instead of waiting out the full timeout.

Test Suites

Test suites group multiple tests for sequential execution with resource reuse. When tests in a suite share similar requirements, the framework reuses existing VMs instead of recreating them for each test.

func TestBootstrapSuite(test *testing.T) {
    evetest.Init(test)
    defer evetest.Close()

    // Suite-wide parameters (override individual test defaults)
    evetest.DefineTestParameters(
        evetest.HypervisorParameter(),
    )

    evetest.RunTestSuite(
        evetest.TestCase{
            Test: TestBootstrapWithLastResort,
            Variants: []evetest.TestVariant{
                {
                    Name: "LastResortDisabled",
                    Parameters: []evetest.TestParameterValue{
                        {Key: "LAST_RESORT_ENABLED", Value: false},
                    },
                },
                {
                    Name: "LastResortEnabled",
                    Parameters: []evetest.TestParameterValue{
                        {Key: "LAST_RESORT_ENABLED", Value: true},
                    },
                },
            },
        },
        evetest.TestCase{
            Test: TestDHCPIPv4Only,  // no variants: runs once with defaults
        },
    )
}

Each variant runs as a Go subtest (t.Run). The EVETEST_SUITE_MAX_FAILURES variable controls early termination: 1 (default) aborts after the first failure, -1 runs all tests regardless of failures.

Run a suite like any other test:

make evetest NAME=TestBootstrapSuite

Running Tests

Basic Usage
# Run a single test
make evetest NAME=TestBootstrapWithLastResort

# Run a test suite
make evetest NAME=TestBootstrapSuite

# With debug logging and formatted output
EVETEST_LOG_LEVEL=debug make evetest NAME=TestBootstrapSuite | gotestfmt

# With a specific EVE version
EVETEST_EVE_VERSION=0.0.0-my-branch-abc123 \
    make evetest NAME=TestDHCPIPv4Only

# Collect artifacts (logs, Adam DB snapshot, collect-info from each device on failure, etc.)
EVETEST_COLLECT_ARTIFACTS=/tmp/evetest-artifacts \
    make evetest NAME=TestDHCPIPv4Only
Code Coverage

When EVE is built with COVER=y, the zedbox binary is instrumented for Go coverage. Setting EVETEST_COLLECT_COVERAGE=true (together with EVETEST_COLLECT_ARTIFACTS) tells the framework to collect coverage data:

  • Before every device reboot (HardReboot, SoftReboot, RequestReboot, and the CLI evetest eve hard-reboot / evetest eve soft-reboot).
  • At test completion (inside Close()).

For each collection the framework:

  1. Sends SIGUSR2 to zedbox, which flushes in-memory counters to /persist/coverage without terminating the process.
  2. Polls for new .covcounters files (up to 30 s).
  3. SCP-copies the files to ${EVETEST_COLLECT_ARTIFACTS}/<test-name>/coverage/<device-name>/.

Because Go names counter files as covcounters.<hash>.<pid>.<nanotime>, all collections for a device accumulate in the same directory without conflicts.

Building EVE with coverage
# Build coverage-instrumented pillar first (required):
make COVER=y pkg/pillar

# Then build the eve image.
make COVER=y eve
Running with coverage collection
EVETEST_COLLECT_ARTIFACTS=/tmp/evetest-artifacts \
EVETEST_COLLECT_COVERAGE=true \
    make evetest NAME=TestDHCPIPv4Only

Coverage files land in ${EVETEST_COLLECT_ARTIFACTS}/TestDHCPIPv4Only-<timestamp>/coverage/edge-dev/.

Merging and viewing results

After the test, merge all counter files with the Go toolchain and convert to a human-readable HTML report:

COVDIR=${EVETEST_COLLECT_ARTIFACTS}/<testname>-<timestamp>/coverage/<device-name>

# Merge all counter files into a single dataset
mkdir -p /tmp/merged-coverage
go tool covdata merge -i "$COVDIR" -o /tmp/merged-coverage

# Show per-package coverage percentages
go tool covdata percent -i /tmp/merged-coverage

# Convert to the legacy text profile format
go tool covdata textfmt -i /tmp/merged-coverage -o /tmp/coverage.txt

# Show overall total coverage
go tool cover -func=/tmp/coverage.txt | tail -1

# Open an HTML report in the browser
go tool cover -html=/tmp/coverage.txt

To merge across all sub-tests and all devices, use find to collect every per-device directory that lives under any coverage/ tree:

mkdir -p /tmp/merged-coverage
go tool covdata merge \
    -i "$(find ${EVETEST_COLLECT_ARTIFACTS} -path '*/coverage/*' -type d | paste -sd,)" \
    -o /tmp/merged-coverage

The -path '*/coverage/*' pattern matches directories one level below any coverage/ directory, which are the per-device subdirectories.

Debugging with Pause

Pause on failure -- when a test fails, the environment stays up for inspection:

EVETEST_PAUSE_ON_FAILURE=true make evetest NAME=TestDHCPIPv4Only

# In another terminal:
evetest status            # see what happened
evetest eve ssh           # SSH into the EVE device
evetest eve logs -f       # tail logs
evetest continue          # let the test tear down
# or
evetest exit              # tear down and exit immediately

Pause on checkpoint -- stop at a specific point in the test:

EVETEST_PAUSE_ON_CHECKPOINT=config-applied \
    make evetest NAME=TestBootstrapWithLastResort

# In another terminal:
evetest eve config        # inspect the submitted config
evetest eve info          # check device status
evetest continue          # resume the test
# or
evetest continue --until setup-done  # resume until a different checkpoint

Command Line Interface

The CLI provides runtime interaction with a running evetest instance. It communicates via gRPC with the evetest container.

Install it on your host:

make install-cli

Or use it from inside the container (docker exec -it evetest-<API-port> bash).

The CLI can also be used from a remote machine (e.g. a developer's laptop while the test runs inside a self-hosted CI runner). Set EVETEST_API_ADDRESS to the IP or hostname of the machine running the evetest container, and EVETEST_API_PORT if a non-default port is used:

export EVETEST_API_ADDRESS=192.168.1.50   # IP of the machine running evetest
export EVETEST_API_PORT=50021             # omit if using the default

evetest status
evetest eve ssh
evetest eve console

All CLI commands work in remote mode, including interactive ones (ssh, scp, console, portfwd), which are tunneled over the gRPC connection, thus no additional ports need to be reachable.

Shell Auto-Completion
# bash
evetest completion bash > evetest-completion.bash
sudo mv evetest-completion.bash /etc/bash_completion.d/evetest

# zsh
evetest completion zsh > ~/.zsh/completions/_evetest

# fish
evetest completion fish > ~/.config/fish/completions/evetest.fish
Test Control
evetest status                          # current test status
evetest continue                        # resume a paused test
evetest continue --until <checkpoint>   # resume until a specific checkpoint
evetest exit                            # tear down and exit
EVE Device Commands

All EVE commands accept --devicename <name> (defaults to the first device).

evetest eve info [-f]                   # device info (follow with -f)
evetest eve metrics [-f]                # device metrics
evetest eve logs [-f]                   # device logs
evetest eve config                      # get current device config
evetest eve console-output              # full console/boot log

evetest eve app-info <app> [-f]         # application info
evetest eve app-metrics <app> [-f]      # application metrics
evetest eve app-logs <app> [-f]         # application logs
evetest eve flow-logs <app> [-f]        # application flow logs
evetest eve ni-info <ni> [-f]           # network instance info
evetest eve ni-metrics <ni> [-f]        # network instance metrics

evetest eve ssh [command...]            # SSH into EVE device
evetest eve scp --from-device src dst   # copy files from EVE
evetest eve scp --to-device src dst     # copy files to EVE
evetest eve console                     # enter interactive console (telnet)
evetest eve collect-info                # collect diagnostic tarball

evetest eve hard-reboot                 # hard reboot
evetest eve soft-reboot                 # soft reboot
SDN Commands
evetest sdn status                      # SDN status and config errors
evetest sdn net-model                   # current network model
evetest sdn graph                       # config graph (Graphviz dot)
evetest sdn logs                        # stream SDN logs
evetest sdn ssh [command...]            # SSH into SDN VM
Cluster Commands
evetest cluster info [-f]               # Kubernetes cluster info
evetest cluster metrics [-f]            # Kubernetes cluster metrics

Configuration

All configuration is done through environment variables; there are no configuration files. The framework provides sensible defaults; you only need to set variables when you want non-default behavior.

Essential Variables
Variable Description Default
EVETEST_NAME Test or suite name to run (required) --
EVETEST_OUTPUT_FORMAT go test output format: json (machine-readable, for gotestfmt) or quiet (compact, no -v); default is verbose (-v). Do not combine quiet with EVETEST_PAUSE_ON_FAILURE or EVETEST_PAUSE_ON_CHECKPOINT — without -v, go test buffers all output until the test completes, so a pause appears frozen with no visible output. --
EVETEST_EVE_VERSION EVE version to test current repo HEAD
EVETEST_PREFERRED_ARCH Preferred CPU architecture (amd64, arm64) amd64
EVETEST_LOG_LEVEL Framework log level (debug, info, warn) info
EVETEST_COLLECT_ARTIFACTS Host path for artifacts (logs, collect-info) --
EVETEST_COLLECT_COVERAGE Collect Go coverage profiles (requires EVETEST_COLLECT_ARTIFACTS and EVE built with COVER=y) false
EVETEST_REGISTRY_MIRROR_DOCKER Pull-through cache URL ([scheme://]host:port[/path]) for docker.io --
EVETEST_REGISTRY_MIRROR_GHCR Pull-through cache URL for ghcr.io --
EVETEST_REGISTRY_MIRROR_QUAY Pull-through cache URL for quay.io --
EVETEST_REGISTRY_MIRROR_K8S Pull-through cache URL for registry.k8s.io --
EVETEST_REGISTRY_MIRROR_GCR Pull-through cache URL for gcr.io --
EVETEST_REGISTRY_MIRROR_MCR Pull-through cache URL for mcr.microsoft.com --
Debugging Variables
Variable Description Default
EVETEST_PAUSE_ON_FAILURE Pause when a test fails false
EVETEST_PAUSE_ON_CHECKPOINT Pause at the named checkpoint --
EVETEST_SUITE_MAX_FAILURES Max failures before aborting suite (-1 = unlimited) 1
Deployment Variables
Variable Description Default
EVETEST_BROKER_ADDRESS Broker IP (unset = embedded broker) --
EVETEST_BROKER_PORT Broker gRPC port 50221
EVETEST_BROKER_DEVICE_PROVIDER libvirt or qemu libvirt
EVETEST_API_PORT gRPC API port exposed by evetest container 50021
EVETEST_API_ADDRESS IP/hostname of the machine running the evetest container, used by the CLI to connect remotely (unset = localhost) --

When running multiple evetests in parallel on the same host, each test must use a different EVETEST_API_PORT to avoid port conflicts. When running the evetest CLI against an instance using a non-default API port or on a remote machine, set EVETEST_API_PORT and/or EVETEST_API_ADDRESS in the same terminal session beforehand.

Version Overrides
Variable Description Default
EVETEST_ORG Docker Hub organization for evetest and evetest-broker images lfedge
EVETEST_EVE_REPO EVE image repository lfedge/eve
EVETEST_ADAM_VERSION Adam controller version 0.0.75
EVETEST_SDN_VERSION SDN emulator version v0.0.1
Broker Variables (for distributed mode)
Variable Description Default
EVETEST_BROKER_LIBVIRT_URI Libvirt connection URI qemu:///system
EVETEST_BROKER_IMAGE_DIR VM image storage directory $HOME/.evetest (all-in-one / qemu provider), /home/eve-broker/images (libvirt provider; created and configured by make setup-broker-user)
EVETEST_SDN_UPLINK_IPV4_SUBNET IPv4 subnet for SDN uplink 192.168.170.0/24
EVETEST_SDN_UPLINK_IPV6_SUBNET IPv6 subnet for SDN uplink fd11:778b:03dd:2222::/64
EVETEST_BROKER_PROXY_CA_CHAIN Proxy CA certificate chain file --

Deployment Modes

All-in-One Mode

In all-in-one mode, everything runs within a single Docker container: the test runner, Adam controller, an embedded broker, and all VMs (EVE + SDN) are created using QEMU inside the container.

This is the default mode when EVETEST_BROKER_ADDRESS is not set.

All-in-One evetest setup

make evetest NAME=TestDHCPIPv4Only

The container is started with NET_ADMIN capability and access to the Docker socket. /dev/kvm is passed through when available (on Linux with KVM support; not available on macOS, where Docker Desktop's Linux VM does not support nested virtualization). Without KVM, QEMU falls back to TCG software emulation. The embedded broker uses QEMU directly to start and manage EVE and SDN VMs.

Best for:

  • Local development on laptops
  • Learning the framework and experimenting with tests
  • Quick iteration during test development
  • Scenarios where you don't have access to a remote hypervisor

Requires nested virtualization support.

Distributed Mode

In distributed mode, the evetest container runs on one machine (a CI runner or your laptop) while the broker runs on a separate, (typically more powerful) hypervisor server. EVE VMs run directly on the host hypervisor, avoiding nested virtualization (which would occur in All-in-One Mode when executed inside a virtualized CI runner).

The broker uses its device provider (typically libvirt) to create VMs and acts as a tunnel proxy, forwarding IP packets between the evetest container and the SDN VM. From the test's perspective, this is transparent -- the same test code works in both modes.

Distributed evetest setup

# One-time setup on the hypervisor server:
sudo make setup-broker-user
make run-broker-container

# On the runner/laptop (192.168.1.100 is example of the server IP address):
EVETEST_BROKER_ADDRESS=192.168.1.100 make evetest NAME=TestDHCPIPv4Only

Best for:

  • CI/CD pipelines (small runners, powerful hypervisors)
  • Multiple developers/CI jobs sharing the same hypervisor infrastructure
  • Resource-intensive tests (multi-device, cluster testing)

Multiple evetest instances can connect to the same broker concurrently. The broker tracks resources per client and ensures isolation between concurrent tests.

Example: Running Evetest on a CI Server

Continuous integration server example

Architecture

EVETest consists of several components that communicate over gRPC:

EVETest Container

The container is the execution environment where tests run. Inside it you'll find:

  • The Go test binary executing your test code
  • The Adam controller -- EVE's open-source controller implementation
  • The evetest CLI for interactive debugging (if you prefer not to install it directly on your host)
  • Optionally, an embedded broker (in all-in-one mode)

The container has the evetest framework and its dependencies baked in. Only evetest/tests/ is mounted at runtime (allowing live test edits without rebuilding the image). Optionally, /artifacts is mounted for collecting outputs. It runs with NET_ADMIN capability for network configuration and tunnel management.

Running tests inside a container ensures a consistent, isolated, and reproducible environment. All dependencies (including QEMU) are encapsulated within the container, eliminating version mismatch problems and preventing interference with the host system.

Broker (evetest-broker)

The broker is the resource management and hypervisor abstraction layer. It translates test requirements ("I need an EVE device with 4GB RAM and 2 network interfaces") into actual VMs on a hypervisor.

Device management is implemented through a provider interface, allowing different hypervisor backends to be plugged in and enabling future implementations for additional platforms.

The broker currently supports the following device providers:

  • QEMU — direct QEMU invocation, used in all-in-one mode
  • libvirt — uses libvirt APIs, used in distributed mode

It manages the VM lifecycle (create, power on/off, reboot, destroy), caches EVE images for reuse across tests, and acts as a tunnel proxy forwarding IP packets between the evetest container and the SDN VM. This tunneling allows the evetest container to operate without direct network connectivity to the VMs -- it only needs access to the broker.

SDN (Software Defined Network)

The SDN is a lightweight LinuxKit-based VM that models physical network infrastructure in software. It provides the network environment that EVE devices connect to.

Tests define a declarative network model specifying the topology: ports, bridges, bonds, VLANs, DHCP servers, DNS servers, firewalls, HTTP proxies, SCEP servers, and 802.1X authentication. The SDN applies this model using standard Linux networking tools (bridges, namespaces, iptables, dnsmasq, hostapd, etc.) and provides a realistic environment for network testing.

The SDN is implemented as a VM (rather than a container) because it needs multiple network namespaces for complex topologies and L2 connectivity with EVE VMs.

For a detailed description of the SDN architecture, network model reference, predefined models, CLI commands, and build instructions, see sdn/README.md.

EVETest CLI

A Cobra-based command-line tool for interacting with running test instances. It communicates with the evetest container via gRPC and provides commands for inspecting device state, viewing logs, SSH access, console access, and test flow control.

The CLI can run inside the container or on the host. Remote access commands (ssh, scp, console) work transparently regardless of deployment mode -- the framework handles tunnel and proxy setup automatically.

Adam Controller

Adam is EVE's open-source controller implementation. It runs inside the evetest container and handles device onboarding, configuration distribution, and collection of device info, metrics, and logs. Tests interact with EVE devices through Adam, and the framework subscribes to Adam's data streams to keep device state up to date.

Makefile Targets

Target Description
make list-tests List all available tests and test suites with their configurable parameters
make evetest Run a test (requires NAME=...)
make build-container Build the evetest container; set DOCKER_PLATFORM=linux/<arch> to cross-compile for a different architecture (Go build stage runs natively on the host, no QEMU emulation); use DOCKER_TARGET=push to publish to a registry instead of loading locally
make build-broker-container Build broker Docker image only; set DOCKER_PLATFORM=linux/<arch> to build for a different architecture (the builder runs under QEMU emulation since the broker requires CGO for libvirt); use DOCKER_TARGET=push to publish to a registry instead of loading locally
make build-sdn-container Build SDN VM container (requires linuxkit, with the LINUXKIT variable pointing to the binary); set DOCKER_PLATFORM=linux/<arch> to cross-compile for a different architecture (Go build stage runs natively on the host, no QEMU emulation); use DOCKER_TARGET=push to publish to a registry instead of loading locally
make build-test-apps Build all test apps under testapps/ by invoking each app's build target; supports the same DOCKER_PLATFORM, DOCKER_TARGET, and EVETEST_ORG variables
make install-cli Install the evetest CLI binary
make proto Regenerate protobuf Go code from .proto files (Docker-based)
make setup-broker-user One-time setup for libvirt broker (requires sudo)
make run-broker-container Start the broker container (distributed mode)

Advanced Host Setup

Pull-Through Cache (Registry Mirror)

By default, EVE pulls container images directly from the upstream registries (docker.io, ghcr.io, quay.io, etc.). This can be slow or fail due to rate limits, especially in CI environments or when running many tests. The EVETEST_REGISTRY_MIRROR_* variables route image pulls for specific registries through a local pull-through cache.

Each variable accepts a full mirror URL including scheme and, if needed, a path (e.g. a Harbor proxy-cache project): [scheme://]host:port[/path].

The mirror is applied in two places automatically:

  • Application docker-datastore config: EVE is configured to pull app images from the per-registry mirror URL instead of the upstream registry. This applies to any registry that has a mirror configured.
  • Containerd mirror config: for kubevirt devices, per-registry hosts.toml files are written under /etc/containerd/certs.d/ inside the kube container before containerd starts, and config_path is added to /etc/containerd/config-k3s.toml. EVE's K3s setup uses an externally-managed containerd (not K3s-managed), so K3s's own registries.yaml is ineffective; configuring containerd directly is the correct approach. Only registries that have a mirror configured get a hosts.toml entry. This is a temporary solution until EVE is enhanced to allow configuring a registry mirror for K3s/containerd through device config.
Deploying Docker Registry as a Docker Hub Mirror

The official registry:2 image can act as a pull-through cache for Docker Hub. It is lightweight and requires no additional setup beyond a single docker run.

docker run -d --restart=always --name docker-hub-mirror \
  -p 5000:5000 \
  -e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io \
  -e REGISTRY_PROXY_USERNAME=<your-dockerhub-username> \
  -e REGISTRY_PROXY_PASSWORD=<your-dockerhub-token> \
  registry:2

Replace <your-dockerhub-username> and <your-dockerhub-token> with a Docker Hub personal access token (create one at hub.docker.com → Account Settings → Personal Access Tokens). Credentials are required to avoid Docker Hub rate limits.

Run evetest with only the docker.io mirror set:

HOST_IP=$(ip route get 8.8.8.8 | awk '{for(i=1;i<=NF;i++) if($i=="src") print $(i+1); exit}')
EVETEST_REGISTRY_MIRROR_DOCKER=http://$HOST_IP:5000 make evetest NAME=MyTest

To check what images have been cached so far:

curl http://$HOST_IP:5000/v2/_catalog

Note: registry:2 only mirrors one upstream registry per instance. For other registries (ghcr.io, quay.io, etc.) use Harbor (see below) or separate instances on different ports.

Deploying Harbor as a Local Pull-Through Cache

Harbor is an OCI-compliant registry that supports pull-through proxy caching. The steps below deploy it locally using its Docker Compose installer.

  1. Download and extract the installer

    wget https://github.com/goharbor/harbor/releases/latest/download/harbor-online-installer-v2.15.0.tgz
    tar xzvf harbor-online-installer-v2.15.0.tgz
    cd harbor
    

    Replace v2.15.0 with the latest release from the Harbor releases page.

  2. Find your host IP

    Use the host's LAN IP so both the evetest container and EVE VMs can reach Harbor:

    # IP used for outbound traffic (reliable on most setups)
    HOST_IP=$(ip route get 8.8.8.8 | awk '{for(i=1;i<=NF;i++) if($i=="src") print $(i+1); exit}')
    echo $HOST_IP
    
  3. Configure Harbor

    cp harbor.yml.tmpl harbor.yml
    

    Edit harbor.yml:

    • Set hostname to $HOST_IP
    • Comment out the https: block entirely (for a simple HTTP-only internal deployment)
    • Set a strong harbor_admin_password
    hostname: 192.168.1.100        # replace with your $HOST_IP
    
    # https:                       # comment out for HTTP-only
    #   port: 443
    #   certificate: ...
    #   private_key: ...
    
    harbor_admin_password: MySecretPassword
    
  4. Install and start Harbor

    sudo ./install.sh
    

    Harbor is now accessible at http://$HOST_IP.

  5. Configure proxy cache projects in Harbor

    For each upstream registry you want to mirror, create a proxy cache project in Harbor's UI (http://$HOST_IP → Projects → New Project → check "Proxy Cache"):

    Project name Registry endpoint
    docker-io-proxy https://hub.docker.com
    ghcr-io-proxy https://ghcr.io
    quay-io-proxy https://quay.io
    registry-k8s-io-proxy https://registry.k8s.io
    gcr-io-proxy https://gcr.io
    mcr-proxy https://mcr.microsoft.com

    For each one:

    • Go to Administration → Registries → New Endpoint, enter the endpoint URL, and save.
    • Go to Projects → New Project, check Proxy Cache, select the endpoint.
    • Set the project Access Level to Public so containerd can pull without authentication.
  6. Run evetest with the mirror

    EVETEST_REGISTRY_MIRROR_DOCKER=http://$HOST_IP:80/docker-io-proxy \
    EVETEST_REGISTRY_MIRROR_GHCR=http://$HOST_IP:80/ghcr-io-proxy \
    EVETEST_REGISTRY_MIRROR_QUAY=http://$HOST_IP:80/quay-io-proxy \
    EVETEST_REGISTRY_MIRROR_K8S=http://$HOST_IP:80/registry-k8s-io-proxy \
    EVETEST_REGISTRY_MIRROR_GCR=http://$HOST_IP:80/gcr-io-proxy \
    EVETEST_REGISTRY_MIRROR_MCR=http://$HOST_IP:80/mcr-proxy \
    make evetest NAME=MyTest
    

    Each value includes the http:// scheme and the Harbor project path. Only the registries you need to mirror must be set; the others pull directly from their origin.

Note: For app image pulls (docker-datastore config), the scheme is stripped before being passed to EVE — EVE's docker:// FQDN prefix is a registry-type marker, not a transport scheme. If the mirror requires authentication, add its credentials to your Docker credential store on the host so the evetest container can read and forward them to EVE.

NetworkManager Interference (libvirt provider)

In the distributed deployment mode, you must prevent NetworkManager (if present) from managing the xconnect bridges created by libvirt provider. This configuration must be applied on the host running the broker; it is not required on the test-runner host system or in the all-in-one deployment mode.

sudo vim /etc/NetworkManager/conf.d/99-evetest-unmanaged.conf
[device-evetest-xconnect-unmanaged]
match-device=interface-name:evetest-x-*
managed=0

These bridges are created to interconnect EVE VMs with the SDN VM and must not be managed by the host.

sudo systemctl restart NetworkManager
Enabling IPv6 Connectivity Tests

In all-in-one deployment mode, IPv6 connectivity between EVE devices and the controller works out of the box and does not require any special host setup, even if the host system itself does not have IPv6 connectivity.

However, tests that require IPv6 Internet access (RequireInternetConnectivity{RequireIPv6: true}) will be skipped if the host does not have IPv6 connectivity.

For tests requiring IPv6 Internet access, you must also:

  1. Enable IPv6 in Docker

    # Add to the docker daemon config (generate subnet using https://unique-local-ipv6.com/):
    cat /etc/docker/daemon.json
    {
        "ipv6": true,
        "fixed-cidr-v6": "fdbd:e2c4:bec9:8249::/64"
    }
    # Then restart docker daemon:
    sudo systemctl restart docker
    
  2. Enable IPv6 forwarding and NAT66 on the host

    sudo sysctl -w net.ipv6.conf.all.forwarding=1
    sudo modprobe ip6table_nat
    sudo ip6tables -t nat -A POSTROUTING -o <egress-interface> -j MASQUERADE
    

    Replace <egress-interface> with the host interface used for external connectivity.

Contributing

Directory Structure
evetest/
├── broker/             # Broker binary (VM lifecycle, tunnel proxy)
│   └── provider/       # Device provider implementations (QEMU, libvirt)
├── cli/                # evetest CLI binary
├── constants/          # Shared constants and Viper config
├── controller/         # Adam controller client (Go wrapper around Adam REST API)
├── grpcapi/
│   ├── proto/          # Protobuf service definitions (broker.proto, sdn.proto, ...)
│   ├── go/             # Generated Go code (do not edit manually)
│   └── eve-api/        # git submodule: lf-edge/eve-api (pinned; proto/ used for imports)
├── logger/             # Logging utilities
├── protobuilder/       # Helpers for building protobuf config messages
├── sdn/
│   ├── vm/             # SDN agent (separate Go module, built into LinuxKit VM)
│   │   └── pkg/configitems/  # Network config item implementations
│   └── VERSION         # SDN version
├── tests/              # Integration tests (mounted into container at runtime)
│   ├── networking/     # Network-related tests and test suites
│   ├── cluster/        # Kubernetes cluster tests
│   └── lps/            # Local Profile Server tests
├── netmodels/          # Reusable network model definitions for tests (mounted into container at runtime)
├── utils/              # Shared utilities (crypto, networking, etc.)
├── VERSION             # Evetest + broker version
├── Makefile
├── Dockerfile.evetest  # Evetest container image
└── Dockerfile.broker   # Broker container image
Go Modules

The project consists of two Go modules:

Module Path Description
github.com/lf-edge/eve/evetest evetest/ Main framework (harness, EdgeDevice API, gRPC server, broker, CLI) and integration tests
github.com/lf-edge/eve/evetest/sdn/vm evetest/sdn/vm/ SDN agent built into the LinuxKit VM

Dependency graph:

evetest  ◀──depends on──  sdn/vm
(tests are packaged within the evetest module)

When you change dependencies, run go mod tidy in the affected module's directory.

Version Files

Two VERSION files track component versions. Increment them when making changes to the corresponding component:

File Covers Used by
evetest/VERSION Evetest framework, broker, CLI lfedge/evetest and lfedge/evetest-broker Docker image tags
evetest/sdn/VERSION SDN agent and VM image lfedge/evetest-sdn Docker image tag

Changes to tests (evetest/tests/) do not require bumping evetest/VERSION — tests are compiled inside the container at runtime from the mounted source, so no image rebuild is needed. The exception is when test changes also introduce new dependencies (i.e., go.mod changes): in that case bump the version and rebuild the container so the pre-downloaded module cache in the image stays current.

What to Rebuild When

Different changes require different rebuild steps. The table below summarizes what needs to happen after each type of change:

What changed What to do
Test code (tests/) Nothing -- tests are mounted into the container and compiled there. Just re-run make evetest. Exception: if go.mod changed (new dependencies added), rebuild the evetest container (make build-container) so the new deps are pre-downloaded in the image; otherwise they will be downloaded on every test run.
Evetest framework (root package: harness.go, edgedevice.go, devconfig.go, ...) If the change also affects sdn/vm (e.g., a shared package it imports), run go mod tidy in sdn/vm/. Rebuild the evetest container (make build-container). Bump VERSION.
gRPC API (grpcapi/proto/) Regenerate Go code (make proto). Then rebuild whichever containers consume the changed API -- typically the evetest container and potentially the broker container and SDN VM. Bump VERSION and/or sdn/VERSION as appropriate.
eve-api submodule (grpcapi/eve-api/) Checkout the desired commit inside the submodule (git -C grpcapi/eve-api checkout <commit>), then git add grpcapi/eve-api from within evetest/ and commit. Regenerate Go code afterwards (make proto).
Broker (broker/) Rebuild the broker container (make build-broker-container) and the evetest container (make build-container, since all-in-one mode embeds the broker). Bump VERSION.
CLI (cli/) Reinstall the CLI on the host (make install-cli). Rebuild the evetest container (make build-container) to update the CLI inside it. Bump VERSION.
SDN agent (sdn/vm/) Rebuild the SDN container (make build-sdn-container, requires linuxkit). Bump sdn/VERSION. To use the new version, either set EVETEST_SDN_VERSION when running tests or update DefaultSDNVersion in constants/ so the new version is used by default.
Controller client (controller/) Rebuild the evetest container (make build-container). Bump VERSION.
Constants (constants/) May affect all components. Rebuild the evetest container and, if the SDN imports the changed constant, rebuild the SDN container. Bump VERSION and/or sdn/VERSION.
Shared utilities (utils/) Rebuild the evetest container. If sdn/vm imports the changed utility, also rebuild the SDN container. Bump VERSION and/or sdn/VERSION.

As a rule of thumb: if you change anything under evetest/ (other than tests and sdn/vm/), bump evetest/VERSION. If you change anything under evetest/sdn/vm/, bump evetest/sdn/VERSION.

Documentation

Index

Constants

View Source
const (

	// KB is the number of bytes in a kilobyte.
	KB uint64 = 1 << (10 * iota)
	// MB is the number of bytes in a megabyte.
	MB
	// GB is the number of bytes in a gigabyte.
	GB
	// TB is the number of bytes in a terabyte.
	TB
)
View Source
const FilesystemParameterKey = "FILESYSTEM"

FilesystemParameterKey is the key used for the Filesystem parameter.

View Source
const HypervisorParameterKey = "HYPERVISOR"

HypervisorParameterKey is the key used for the Hypervisor parameter.

View Source
const TPMParameterKey = "TPM"

TPMParameterKey is the key used for the TPM parameter.

Variables

View Source
var NilUUID = uuid.UUID{}

NilUUID is special form of UUID that is specified to have all 128 bits set to zero.

Functions

func ChangeSigningCert

func ChangeSigningCert(newSignCertPEM string) error

ChangeSigningCert replaces the controller signing certificate with the provided one.

func Checkpoint

func Checkpoint(name string)

Checkpoint marks a significant execution point in a test.

Each checkpoint is identified by a name. If the environment variable EVETEST_PAUSE_ON_CHECKPOINT is set to the same name, test execution will pause when this checkpoint is reached.

The test can be resumed via the CLI command:

evetest continue [--until <next-checkpoint>]

This mechanism is primarily intended for interactive debugging and step-by-step inspection of long-running or complex tests.

func Close

func Close() error

Close gracefully shuts down the test harness and releases all resources created during Init and Setup.

If the test is running as part of a suite, Close performs no teardown and returns immediately, allowing shared resources (such as VMs and network infrastructure) to be reused by subsequent test cases.

Otherwise, Close stops all background goroutines, shuts down the internal gRPC server, disconnects from the broker (triggering cleanup of all associated EVE and SDN devices), removes any SDN tunnel interfaces created by the test, and stops the Adam controller.

func DefineTestParameters

func DefineTestParameters(params ...TestParameterDefinition)

DefineTestParameters defines the set of parameters available to the currently executing test or test suite.

func GetControllerHostname

func GetControllerHostname() string

GetControllerHostname returns the controller hostname (stored inside /config/server)

func GetControllerIPv4

func GetControllerIPv4() net.IP

GetControllerIPv4 returns the controller (Adam) IPv4 address.

func GetControllerIPv6

func GetControllerIPv6() net.IP

GetControllerIPv6 returns the controller (Adam) IPv6 address and subnet associated with the container's default IPv6 route, if present.

func GetControllerPort

func GetControllerPort() uint16

GetControllerPort returns the port number on which the controller listens.

func GetSrcIPv4ForEVEAccess

func GetSrcIPv4ForEVEAccess() net.IP

GetSrcIPv4ForEVEAccess returns the IPv4 address used as the source IP when a test communicates with EVE management services or EVE applications. This is exposed to allow network-model firewall rules (when enabled) to permit traffic between the test environment and EVE/app endpoints.

func GetSrcIPv4ForInternetAccess

func GetSrcIPv4ForInternetAccess() net.IP

GetSrcIPv4ForInternetAccess returns the first non-link-local IPv4 address of the interface connecting container with the docker network. This IP should be used as the source IP when tests need to access the Internet from the evetest container.

func GetSrcIPv6ForEVEAccess

func GetSrcIPv6ForEVEAccess() net.IP

GetSrcIPv6ForEVEAccess returns the IPv6 address used as the source IP when a test communicates with EVE management services or EVE applications. This is exposed to allow network-model firewall rules (when enabled) to permit traffic between the test environment and EVE/app endpoints.

func GetSrcIPv6ForInternetAccess

func GetSrcIPv6ForInternetAccess() net.IP

GetSrcIPv6ForInternetAccess returns the first global unicast IPv6 address assigned to the interface connecting container with the docker network. This IP should be used as the source address when tests need IPv6 Internet access from the evetest container.

func GetTPMParameterValue

func GetTPMParameterValue() (useTPM bool)

GetTPMParameterValue returns the value set for the TPM parameter.

func GetTestParameter

func GetTestParameter[T any](key string) T

GetTestParameter returns the value of a test parameter with the given key, resolved in the following order:

  1. Value set explicitly by the test-suite
  2. Value provided via environment variable EVETEST_<KEY>
  3. Default value from the parameter definition

The type parameter T must match the parameter’s declared type, otherwise the test will fail.

func IPAddress

func IPAddress(ipAddr string) net.IP

IPAddress converts IP address from string to net.IP

func IPAddressWithPrefix

func IPAddressWithPrefix(cidr string) *net.IPNet

IPAddressWithPrefix parses an IP address with a prefix length (e.g. "172.22.12.10/24") and returns it as *net.IPNet, preserving the host address. Unlike IPSubnet, the host bits are not masked.

func IPSubnet

func IPSubnet(ipSubnet string) *net.IPNet

IPSubnet converts IP subnet from string to *net.IPNet

func Logger

func Logger() *logrus.Logger

Logger returns the logrus logger associated with the current test harness.

Tests should use this logger for all test-related logging so that output is consistently formatted and integrated with the harness lifecycle (artifacts, verbosity settings, etc.)

func MACAddress

func MACAddress(macAddr string) net.HardwareAddr

MACAddress converts MAC address from string to net.HardwareAddr

func ReadAllPublications

func ReadAllPublications[T any](d *EdgeDevice, fromAgent string, persistent bool) []T

ReadAllPublications retrieves all messages from a pub-sub topic published by the specified device and agent (microservice).

Parameters:

  • d: the EdgeDevice handle to read from
  • fromAgent: the name of the agent/microservice publishing the topic

Returns a slice of values of type T representing all messages from the topic, or an error if reading or unmarshaling fails.

func ReadPublication

func ReadPublication[T any](d *EdgeDevice, fromAgent string, persistent bool,
	key string, output *T)

ReadPublication retrieves a single message from a pub-sub topic published by the specified device and agent (microservice).

Parameters:

  • d: the EdgeDevice handle to read from
  • fromAgent: the name of the agent/microservice publishing the topic
  • key: identifies the specific message within the topic to fetch
  • output: pointer to a value of type T to unmarshal the message into

Returns an error if the topic or message does not exist, cannot be read, or fails to unmarshal into the provided output type.

func RunParallel

func RunParallel(numOfWorkers int, workerFunc func(workerIdx int))

RunParallel runs workerFunc concurrently in numOfWorkers goroutines. workerFunc is invoked once per worker and is passed a zero-based workerIdx in the range [0, numOfWorkers). The function blocks until either:

  • all workers complete successfully, or
  • the test is marked as failed, in which case it returns immediately without waiting for the remaining workers.

This enables fail-fast behavior for parallel test execution.

func RunTestSuite

func RunTestSuite(cases ...TestCase)

RunTestSuite executes all variants of all test cases using t.Run. Each variant is executed as a subtest with its own parameter values.

Environment variables such as EVETEST_SUITE_MAX_FAILURES may be used to control suite-wide execution behavior (e.g., early termination on excessive failures).

func Setup

func Setup(requirements ...Requirement)

Setup evaluates and enforces the provided test requirements and prepares the test environment accordingly.

The function first validates all supplied requirements. Next, it prepares (or generates) a network model, provisions and configures the required EVE device(s), and ensures that the SDN and broker infrastructure are running and reachable.

Depending on the test context, Setup will start or reuse existing EVE and SDN virtual machines, establish connectivity to the SDN gRPC service using a broker-proxied IP-over-TCP tunnel, and apply the requested network model.

When Setup returns successfully, all requirements are satisfied and the EVE device(s) is/are powered on and onboarded into the controller. Any failure during setup results in the test being failed or skipped.

func SkipIfHypervisorKubevirt

func SkipIfHypervisorKubevirt()

SkipIfHypervisorKubevirt skips the current test if the resolved HYPERVISOR parameter is HypervisorKubevirt. Kubevirt is only supported by tests under `evetest/tests/cluster`; non-cluster tests should call this helper right after defining the HypervisorParameter to ensure they are not accidentally exercised on a Kubevirt-flavored EVE build.

func UpdateNetworkModel

func UpdateNetworkModel(netModel *api.NetworkModel)

UpdateNetworkModel updates the current network model, enforcing that device network ports cannot change at runtime.

Types

type ACLAllowRule

type ACLAllowRule struct {
	Protocol NetworkProtocol
	// Specify either remote subnet or hostname, not both.
	RemoteSubnet   *net.IPNet
	RemoteHostname string
	RemotePort     uint16 // 0 means any
}

ACLAllowRule is a ACL ALLOW rule.

type AppNetworkAdapter

type AppNetworkAdapter interface {
	// contains filtered or unexported methods
}

AppNetworkAdapter identifies types that represent application network adapter configurations.

type ApplicationImageStorage

type ApplicationImageStorage interface {
	// contains filtered or unexported methods
}

ApplicationImageStorage defines a generic interface for datastore configurations that can be converted into EVE protobuf representation.

type ApplicationInstanceConfig

type ApplicationInstanceConfig struct {
	DisplayName         string
	Activate            bool
	ProfileList         []string
	Image               ApplicationImageStorage
	VirtualizationMode  eveconfig.VmMode
	CPUs                uint
	MemoryBytes         uint64
	DiskBytes           uint64
	EnableVNC           bool
	VNCDisplay          uint
	VNCPassword         string
	DisableLogs         bool
	UserData            string
	NetworkAdapters     []AppNetworkAdapter
	EnforceNetIntfOrder bool
}

ApplicationInstanceConfig wraps configuration for a single application deployed on EVE.

type AuthMethod

type AuthMethod interface {
	// contains filtered or unexported methods
}

AuthMethod is a marker interface for application authentication methods.

type AwsS3Bucket

type AwsS3Bucket struct {
	ImageFormat       eveconfig.Format
	ImageSHA256       string
	MaxDownloadBytes  uint64
	ImageRelativePath string
	Region            string
	Bucket            string
	AccessKeyID       string
	SecretAccessKey   string
}

AwsS3Bucket defines path to application image stored inside AWS S3. https://<Bucket>.s3.<Region>.amazonaws.com/<ImageRelativePath>

type AzureBlob

type AzureBlob struct {
	ImageFormat       eveconfig.Format
	ImageSHA256       string
	MaxDownloadBytes  uint64
	ImageRelativePath string
	AccountName       string
	AccountKey        string
	Container         string
}

AzureBlob defines path to application image stored inside Azure Blob. https://<AccountName>.blob.core.windows.net/<Container>/<ImageRelativePath>

type BondConfig

type BondConfig struct {
	LogicalLabel  string
	InterfaceName string
	MemberLabels  []string // Logical labels of aggregated PhysicalIO adapters.
	BondMode      evecommon.BondMode
	MIIMonitor    *eveconfig.MIIMonitor
	ARPMonitor    *eveconfig.ArpMonitor
	LACPRate      evecommon.LacpRate
	Cost          uint8
	NetworkUUID   uuid.UUID
	StaticIP      net.IP // use only in combination with StaticNetworkConfig
	SharedLabels  []string
	Usage         evecommon.PhyIoMemberUsage
}

BondConfig represents a bond (link aggregation) interface.

type CSRProfile

type CSRProfile struct {
	// X.509 Distinguished Name (DN) attributes.
	CommonName         string // CN
	Organization       string // O
	OrganizationalUnit string // OU
	Country            string // C
	State              string // ST
	Locality           string // L

	// X.509 Subject Alternative Name (SAN) attributes.
	SanDNS    []string
	SanIPs    []net.IP
	SanURIs   []string
	SANEmails []string

	// Certificate renewal settings.
	// Percentage of the certificate validity period after which
	// the device should attempt renewal (e.g., 80 = renew after 80%).
	RenewPeriodPercent uint8

	KeyType       eveconfig.KeyType
	HashAlgorithm eveconfig.HashAlgorithm
}

CSRProfile : Certificate Signing Request (CSR) configuration profile. Defines subject identity, extensions, cryptographic parameters, and renewal behavior for certificate enrollment.

type CellularNetworkConfig

type CellularNetworkConfig struct {
	// "DHCP" is not quite accurate here since most of the time we get IP configuration
	// from the cellular network via PDP context activation, not traditional DHCP.
	// But other than that, all the configuration parameters are the same, so we reuse
	// DHCPNetworkConfig
	DHCPNetworkConfig
	// SIM card slot to which this configuration applies.
	// 0 - unspecified (apply to currently activated or the only available)
	// 1 - config for SIM card in the first slot
	// 2 - config for SIM card in the second slot
	// etc.
	SIMSlot uint8
	// Access Point Network for the default bearer.
	APN string
	// The IP addressing type to use for the default bearer.
	IPType evecommon.CellularIPType
	// Authentication protocol used for the default bearer.
	AuthProtocol evecommon.CellularAuthProtocol
	// User credentials for the default bearer (when required).
	UserCredentials UsernamePasswordAuth
	// The set of cellular network operators that modem should preferably try to register
	// and connect into.
	// Network operator should be referenced by PLMN (Public Land Mobile Network) code.
	PreferredPLMNs []string
	// The list of preferred Radio Access Technologies (RATs) to use for connecting
	// to the network.
	PreferredRATs []evecommon.RadioAccessTechnology
	// If true, then modem will avoid connecting to networks with roaming.
	ForbidRoaming bool
	// Access Point Network for the attach (aka initial) bearer.
	AttachAPN string
	// The IP addressing type to use for the attach bearer.
	AttachIPType evecommon.CellularIPType
	// Authentication protocol used for the attach bearer.
	AttachAuthProtocol evecommon.CellularAuthProtocol
	// User credentials for the attach bearer (when required).
	AttachUserCredentials UsernamePasswordAuth
	// Enable probing to detect broken connection.
	EnableProbing bool
	// User-defined connectivity probing method.
	UserDefinedProbe pillartypes.ConnectivityProbe
	// Some LTE modems have GNSS receiver integrated and can be used
	// for device location tracking.
	// Enable this option to have location info periodically obtained
	// from this modem and published by wwan microservice via topic WwanLocationInfo.
	LocationTracking bool
}

CellularNetworkConfig represents a cellular network configuration.

type ClientCertAuth

type ClientCertAuth struct {
	KeyPEM string
}

ClientCertAuth represents client certificate–based authentication.

type ClusterApplicationInstanceConfig

type ClusterApplicationInstanceConfig struct {
	ApplicationInstanceConfig

	// DesignatedNodeName is the device name of the cluster node where
	// the application should be placed. This field is mandatory.
	DesignatedNodeName string

	// Affinity determines how strictly the designated node preference
	// is enforced. The default zero value is AFFINITY_TYPE_PREFERRED.
	Affinity eveconfig.AffinityType
}

ClusterApplicationInstanceConfig wraps ApplicationInstanceConfig with cluster-specific fields required when deploying an application across a cluster of edge nodes.

type ClusterNode

type ClusterNode struct {
	DevName          string
	ClusterIP        *net.IPNet
	ClusterInterface string
	BootstrapNode    bool
}

ClusterNode identifies one node participating in the cluster. ClusterIP is the IP address (with prefix) assigned to this node on the cluster interface. ClusterInterface is the logical label of the physical port used for intra-cluster communication on this node. Exactly one node should have BootstrapNode set to true — its ClusterIP is used as the join server IP for all nodes.

type DHCPNetworkConfig

type DHCPNetworkConfig struct {
	NetworkType       evecommon.NetworkType
	MTU               uint16
	NTPServers        []string
	IgnoreNTPFromDHCP bool
	// DNSServers are static DNS server IPs to configure in addition to (or
	// instead of) the DHCP-provided DNS servers. When IgnoreDNSFromDHCP is
	// false (the default), these are appended to the DHCP-provided servers.
	// When IgnoreDNSFromDHCP is true, only these are used.
	DNSServers []net.IP
	// IgnoreDNSFromDHCP controls whether DHCP-provided DNS servers are ignored.
	// When true, only the statically configured DNSServers are used.
	// Corresponds to DhcpOptionsIgnore.DnsConfigExclusively in the EVE API.
	IgnoreDNSFromDHCP bool
	ProxyConfig       ProxyConfig
}

DHCPNetworkConfig represents a network configuration for Ethernet interface, with DHCP used for IP assignment.

type DNSLogMatch

type DNSLogMatch struct {
	VirtualNetAdapter string // logical label
	NetworkInstance   uuid.UUID
	// NotBefore and NotAfter relates to DnsRequest.requestTime
	NotBefore time.Time
	NotAfter  time.Time
}

DNSLogMatch defines filtering criteria for matching application DNS logs.

type DirectlyAssignedNetworkAdapter

type DirectlyAssignedNetworkAdapter struct {
	LogicalLabel string
}

DirectlyAssignedNetworkAdapter represents network adapter directly assigned to an application (e.g. using PCI passthrough).

type DockerContainer

type DockerContainer struct {
	Domain    string // default: "index.docker.io"
	ImageName string
	Tag       string
}

DockerContainer defines path to application image stored inside a docker image registry.

type EdgeCluster

type EdgeCluster struct {
	// contains filtered or unexported fields
}

EdgeCluster represents a cluster of edge devices and provides operations that span across all cluster nodes (e.g. applying config, waiting for application deployment, running scripts inside cluster-scheduled apps).

func NewEdgeCluster

func NewEdgeCluster(clusterName string) *EdgeCluster

NewEdgeCluster creates an EdgeCluster handle for the given cluster name. The typical workflow is to create the handle, then call ApplyConfig to push the cluster configuration to all devices, and finally interact with the cluster (e.g. WaitUntilNodesAreReady, deploy applications, etc.).

func (*EdgeCluster) ActivateApplication

func (ec *EdgeCluster) ActivateApplication(appUUID uuid.UUID, waitUntilActivated bool,
	timeout time.Duration)

ActivateApplication activates the specified application across the cluster. The activate flag is set on all devices, but the wait (if requested) is performed only on the device hosting the application.

func (*EdgeCluster) ApplyConfig

func (ec *EdgeCluster) ApplyConfig(
	clusterConfig *EdgeClusterConfig, waitUntilFetched bool, waitUntilConfirmed bool)

ApplyConfig applies the configuration from the given EdgeClusterConfig to all cluster devices in parallel. The waitUntilFetched and waitUntilConfirmed arguments are forwarded to each device's ApplyConfig; see EdgeDevice.ApplyConfig for their semantics. The set of cluster devices is collected from the EdgeClusterConfig nodes and stored for use by subsequent methods.

func (*EdgeCluster) DeactivateApplication

func (ec *EdgeCluster) DeactivateApplication(appUUID uuid.UUID, waitUntilDeactivated bool,
	timeout time.Duration)

DeactivateApplication deactivates the specified application across the cluster. The activate flag is cleared on all devices, but the wait (if requested) is performed only on the device hosting the application.

func (*EdgeCluster) FindDeviceHostingApp

func (ec *EdgeCluster) FindDeviceHostingApp(
	appUUID uuid.UUID, timeout time.Duration) *EdgeDevice

FindDeviceHostingApp finds the cluster device that hosts the given application. It watches ZInfoKubeCluster updates from all devices and returns the device whose cluster info reports the app (matched by display name) in EveApps or EveVmApps with a non-empty NodeName.

func (*EdgeCluster) GetAppLogs

func (ec *EdgeCluster) GetAppLogs(appUUID uuid.UUID, match LogMsgMatch) []LogMsg

GetAppLogs collects log messages for the specified application from all cluster devices (since the app may have migrated between nodes during its lifespan) and returns them sorted by timestamp.

func (*EdgeCluster) PurgeApplication

func (ec *EdgeCluster) PurgeApplication(appUUID uuid.UUID, waitUntilPurged bool,
	timeout time.Duration)

PurgeApplication purges the specified application across the cluster. The purge counter is incremented on all devices, but the wait (if requested) is performed only on the device hosting the application.

func (*EdgeCluster) RebootApplication

func (ec *EdgeCluster) RebootApplication(appUUID uuid.UUID, waitUntilRebooted bool,
	timeout time.Duration)

RebootApplication reboots the specified application across the cluster. The reboot counter is incremented on all devices, but the wait (if requested) is performed only on the device hosting the application.

func (*EdgeCluster) RunShellScriptInsideApp

func (ec *EdgeCluster) RunShellScriptInsideApp(appUUID uuid.UUID, auth AuthMethod,
	script string, timeout time.Duration,
	stdoutWatchdogTimeout time.Duration) (stdout, stderr string, err error)

RunShellScriptInsideApp locates the cluster node hosting the specified application and executes a shell script inside it over SSH.

func (*EdgeCluster) WaitUntilAppIsRunning

func (ec *EdgeCluster) WaitUntilAppIsRunning(
	appUUID uuid.UUID, timeoutExcludingDownload time.Duration)

WaitUntilAppIsRunning waits until the specified application is running on one of the cluster nodes. It first locates the destination device via cluster info, then delegates to that device's WaitUntilAppIsRunning.

func (*EdgeCluster) WaitUntilNodesAreReady

func (ec *EdgeCluster) WaitUntilNodesAreReady(timeout time.Duration)

WaitUntilNodesAreReady waits until any device in the cluster reports all cluster nodes as Ready via ZInfoKubeCluster. Only the elected leader node publishes cluster info, so the function succeeds as soon as any single device reports all nodes ready. It fails if the timeout expires before that happens.

type EdgeClusterConfig

type EdgeClusterConfig struct {
	ClusterID uuid.UUID
	Token     string // plaintext join token
	// contains filtered or unexported fields
}

EdgeClusterConfig manages device configurations for a cluster of edge nodes. Methods that create UUID-identified objects (networks, network instances, applications, etc.) generate the UUID once and apply the same object to every node. Encrypted data (e.g. cluster join token, datastore credentials) is encrypted individually per device because each device has its own encryption key. For per-device customization, use GetDeviceConfig.

func NewEdgeClusterConfig

func NewEdgeClusterConfig(
	clusterType eveconfig.ClusterType, nodes ...ClusterNode) *EdgeClusterConfig

NewEdgeClusterConfig constructs an EdgeClusterConfig. It creates an EdgeDeviceConfig for each node, generates a shared cluster UUID and join token, and sets the cluster configuration on every device. The join token is encrypted individually per device.

func (*EdgeClusterConfig) AddApplication

func (cc *EdgeClusterConfig) AddApplication(
	config ClusterApplicationInstanceConfig) uuid.UUID

AddApplication adds an application to all devices. The same UUIDs (app, volume, content tree, datastore) are used across all devices. DesignatedNodeName is resolved to the device UUID and set on the AppInstanceConfig, Volume and ContentTree, along with the Affinity field on the app.

func (*EdgeClusterConfig) AddNetwork

func (cc *EdgeClusterConfig) AddNetwork(netConfig NetworkConfig) uuid.UUID

AddNetwork adds a network configuration to all devices. The same UUID is used across all devices.

func (*EdgeClusterConfig) AddNetworkAdapter

func (cc *EdgeClusterConfig) AddNetworkAdapter(config NetworkAdapterConfig)

AddNetworkAdapter adds a network adapter to all devices.

func (*EdgeClusterConfig) AddNetworkInstance

func (cc *EdgeClusterConfig) AddNetworkInstance(config NetworkInstanceConfig) uuid.UUID

AddNetworkInstance adds a network instance to all devices. The same UUID is used across all devices.

func (*EdgeClusterConfig) AddSCEPProfile

func (cc *EdgeClusterConfig) AddSCEPProfile(profile SCEPProfile)

AddSCEPProfile adds a SCEP profile to all devices. Encryption is performed individually per device.

func (*EdgeClusterConfig) AddVLANSubinterface

func (cc *EdgeClusterConfig) AddVLANSubinterface(config VLANSubinterfaceConfig)

AddVLANSubinterface adds a VLAN sub-interface to all devices.

func (*EdgeClusterConfig) DeleteApplication

func (cc *EdgeClusterConfig) DeleteApplication(appUUID uuid.UUID)

DeleteApplication removes an application from all devices.

func (*EdgeClusterConfig) DeleteNetwork

func (cc *EdgeClusterConfig) DeleteNetwork(networkUUID uuid.UUID)

DeleteNetwork removes a network from all devices.

func (*EdgeClusterConfig) DeleteNetworkAdapter

func (cc *EdgeClusterConfig) DeleteNetworkAdapter(logicalLabel string)

DeleteNetworkAdapter removes a network adapter from all devices.

func (*EdgeClusterConfig) DeleteNetworkInstance

func (cc *EdgeClusterConfig) DeleteNetworkInstance(niUUID uuid.UUID)

DeleteNetworkInstance removes a network instance from all devices.

func (*EdgeClusterConfig) DeleteSCEPProfile

func (cc *EdgeClusterConfig) DeleteSCEPProfile(profileName string)

DeleteSCEPProfile removes a SCEP profile from all devices.

func (*EdgeClusterConfig) DeleteVLANSubinterface

func (cc *EdgeClusterConfig) DeleteVLANSubinterface(logicalLabel string)

DeleteVLANSubinterface removes a VLAN sub-interface from all devices.

func (*EdgeClusterConfig) GetDeviceConfig

func (cc *EdgeClusterConfig) GetDeviceConfig(devName string) *EdgeDeviceConfig

GetDeviceConfig returns the EdgeDeviceConfig for a specific device, allowing per-device customization.

func (*EdgeClusterConfig) SetConfigProperties

func (cc *EdgeClusterConfig) SetConfigProperties(configProps *pillartypes.ConfigItemValueMap)

SetConfigProperties sets configuration properties on all devices.

func (*EdgeClusterConfig) SetLPS

func (cc *EdgeClusterConfig) SetLPS(config LPSConfig)

SetLPS sets the Local Profile Server configuration on all devices.

func (*EdgeClusterConfig) UpdateApplication

func (cc *EdgeClusterConfig) UpdateApplication(
	appUUID uuid.UUID, newConfig ClusterApplicationInstanceConfig)

UpdateApplication updates an application on all devices. DesignatedNodeName is resolved to the device UUID and updated on the AppInstanceConfig, Volume and ContentTree, along with the Affinity field.

func (*EdgeClusterConfig) UpdateNetwork

func (cc *EdgeClusterConfig) UpdateNetwork(networkUUID uuid.UUID, newConfig NetworkConfig)

UpdateNetwork updates an existing network on all devices.

func (*EdgeClusterConfig) UpdateNetworkAdapter

func (cc *EdgeClusterConfig) UpdateNetworkAdapter(config NetworkAdapterConfig)

UpdateNetworkAdapter updates a network adapter on all devices.

func (*EdgeClusterConfig) UpdateNetworkInstance

func (cc *EdgeClusterConfig) UpdateNetworkInstance(
	niUUID uuid.UUID, newConfig NetworkInstanceConfig)

UpdateNetworkInstance updates a network instance on all devices.

func (*EdgeClusterConfig) UpdateSCEPProfile

func (cc *EdgeClusterConfig) UpdateSCEPProfile(profile SCEPProfile)

UpdateSCEPProfile updates a SCEP profile on all devices.

func (*EdgeClusterConfig) UpdateVLANSubinterface

func (cc *EdgeClusterConfig) UpdateVLANSubinterface(config VLANSubinterfaceConfig)

UpdateVLANSubinterface updates a VLAN sub-interface on all devices.

type EdgeDevice

type EdgeDevice struct {
	// contains filtered or unexported fields
}

EdgeDevice represents a single onboarded EVE device and provides operations to manage its lifecycle, configuration, applications, and runtime state.

func GetAllEdgeDevices

func GetAllEdgeDevices() (devices []*EdgeDevice)

GetAllEdgeDevices returns handles for all EdgeDevices currently known to the test th.

func GetEdgeDevice

func GetEdgeDevice(devName string) *EdgeDevice

GetEdgeDevice returns a handle to an onboarded EdgeDevice identified by devName.

func (*EdgeDevice) ActivateApplication

func (d *EdgeDevice) ActivateApplication(appUUID uuid.UUID, waitUntilActivated bool,
	timeout time.Duration)

ActivateApplication activates the specified application instance.

func (*EdgeDevice) ApplyConfig

func (d *EdgeDevice) ApplyConfig(config *EdgeDeviceConfig, waitUntilFetched bool, waitUntilConfirmed bool)

ApplyConfig applies a device configuration and optionally waits for confirmation that it was received and/or processed by the device.

If waitUntilFetched is true, the function blocks until EVE fetches the new config from the controller. This is reliable even when the config changes the management port, because EVE downloads the config before activating the new port — the wait completes while connectivity is still intact.

If waitUntilConfirmed is true, the function additionally waits until EVE reports LastProcessedConfig >= the config's timestamp in device metrics, which indicates that zedagent has parsed the config and distributed it to other microservices. Do not combine this with configs that change the management port: the device may lose controller connectivity right after applying the change, delaying the metrics publish indefinitely.

The two flags are evaluated in order: fetch first, then confirm.

func (*EdgeDevice) DeactivateApplication

func (d *EdgeDevice) DeactivateApplication(appUUID uuid.UUID, waitUntilDeactivated bool,
	timeout time.Duration)

DeactivateApplication deactivates the specified application instance.

func (*EdgeDevice) DeleteFile

func (d *EdgeDevice) DeleteFile(fileName string)

DeleteFile removes a file from the device.

func (*EdgeDevice) FileExists

func (d *EdgeDevice) FileExists(fileName string) bool

FileExists checks whether a file exists on the device.

func (*EdgeDevice) GetAppDNSLogs

func (d *EdgeDevice) GetAppDNSLogs(
	appUUID uuid.UUID, match DNSLogMatch) []eveflowlog.DnsRequest

GetAppDNSLogs returns DNS request logs for the specified application matching the provided criteria.

func (*EdgeDevice) GetAppFlowLogs

func (d *EdgeDevice) GetAppFlowLogs(
	appUUID uuid.UUID, match FlowLogMatch) []eveflowlog.FlowRecord

GetAppFlowLogs returns flow records for the specified application matching the provided criteria.

func (*EdgeDevice) GetAppInfo

func (d *EdgeDevice) GetAppInfo(appUUID uuid.UUID) *eveinfo.ZInfoApp

GetAppInfo returns the last recorded runtime information for the specified application, or nil if no info message for that app has been received yet.

func (*EdgeDevice) GetAppLogs

func (d *EdgeDevice) GetAppLogs(appUUID uuid.UUID, match LogMsgMatch) []LogMsg

GetAppLogs returns application log messages matching the provided criteria.

func (*EdgeDevice) GetAppMetadata

func (d *EdgeDevice) GetAppMetadata(appUUID uuid.UUID) *eveinfo.ZInfoAppInstMetaData

GetAppMetadata returns the last recorded metadata associated with the specified application instance, or nil if none has been received yet.

func (*EdgeDevice) GetAppMetrics

func (d *EdgeDevice) GetAppMetrics(appUUID uuid.UUID) *evemetrics.AppMetric

GetAppMetrics returns the last recorded metrics for the specified application, or nil if no metrics message for that app has been received yet.

func (*EdgeDevice) GetBlobInfo

func (d *EdgeDevice) GetBlobInfo() *eveinfo.ZInfoBlobList

GetBlobInfo returns the last recorded information about stored blobs on the device, or nil if no blob info message has been received yet.

func (*EdgeDevice) GetClusterInfo

func (d *EdgeDevice) GetClusterInfo() *eveinfo.ZInfoKubeCluster

GetClusterInfo returns the last recorded information about the Kubernetes cluster, or nil if no such info message has been received yet.

func (*EdgeDevice) GetClusterMetrics

func (d *EdgeDevice) GetClusterMetrics() *evemetrics.KubeClusterMetrics

GetClusterMetrics returns the last recorded metrics for the Kubernetes cluster, or nil if no cluster metrics message has been received yet.

func (*EdgeDevice) GetClusterUpdateInfo

func (d *EdgeDevice) GetClusterUpdateInfo() *eveinfo.ZInfoKubeClusterUpdateStatus

GetClusterUpdateInfo returns the last recorded information regarding the Kubernetes cluster update, or nil if no such info message has been received yet.

func (*EdgeDevice) GetConfig

func (d *EdgeDevice) GetConfig() *EdgeDeviceConfig

GetConfig returns the current device configuration.

func (*EdgeDevice) GetContentTreeInfo

func (d *EdgeDevice) GetContentTreeInfo(ctUUID uuid.UUID) *eveinfo.ZInfoContentTree

GetContentTreeInfo returns the last recorded information about the specified content tree, or nil if no info message for it has been received yet.

func (*EdgeDevice) GetDeviceIPAddress

func (d *EdgeDevice) GetDeviceIPAddress(netAdapterLogicalLabel string) []net.IP

GetDeviceIPAddress returns IP addresses assigned to the specified network adapter. If netAdapterLogicalLabel is empty, IP addresses from all adapters are returned.

func (*EdgeDevice) GetDeviceInfo

func (d *EdgeDevice) GetDeviceInfo() *eveinfo.ZInfoDevice

GetDeviceInfo returns the last recorded device information, or nil if no info message has been received yet.

func (*EdgeDevice) GetDeviceMetrics

func (d *EdgeDevice) GetDeviceMetrics() *evemetrics.DeviceMetric

GetDeviceMetrics returns the last recorded device-level metrics, or nil if no metrics message has been received yet.

func (*EdgeDevice) GetHardwareInfo

func (d *EdgeDevice) GetHardwareInfo() *eveinfo.ZInfoHardware

GetHardwareInfo returns the last recorded hardware inventory information, or nil if no hardware info message has been received yet.

func (*EdgeDevice) GetLocationInfo

func (d *EdgeDevice) GetLocationInfo() *eveinfo.ZInfoLocation

GetLocationInfo returns the last recorded device location information, or nil if no location info message has been received yet.

func (*EdgeDevice) GetLogs

func (d *EdgeDevice) GetLogs(match LogMsgMatch) []LogMsg

GetLogs returns device log messages matching the provided criteria.

func (*EdgeDevice) GetNTPSources

func (d *EdgeDevice) GetNTPSources() *eveinfo.ZInfoNTPSources

GetNTPSources returns the last recorded NTP sources configured on the device, or nil if no NTP sources info message has been received yet.

func (*EdgeDevice) GetNetworkInstanceInfo

func (d *EdgeDevice) GetNetworkInstanceInfo(niUUID uuid.UUID) *eveinfo.ZInfoNetworkInstance

GetNetworkInstanceInfo returns the last recorded information about the specified network instance, or nil if no info message for it has been received yet.

func (*EdgeDevice) GetNetworkInstanceMetrics

func (d *EdgeDevice) GetNetworkInstanceMetrics(
	niUUID uuid.UUID) *evemetrics.ZMetricNetworkInstance

GetNetworkInstanceMetrics returns the last recorded metrics for the specified network instance, or nil if no metrics message for it has been received yet.

func (*EdgeDevice) GetState

func (d *EdgeDevice) GetState() api.EVEDeviceState

GetState returns the current lifecycle state of the device.

func (*EdgeDevice) GetVolumeInfo

func (d *EdgeDevice) GetVolumeInfo(volumeUUID uuid.UUID) *eveinfo.ZInfoVolume

GetVolumeInfo returns the last recorded information about the specified storage volume, or nil if no info message for it has been received yet.

func (*EdgeDevice) GetVolumeMetrics

func (d *EdgeDevice) GetVolumeMetrics(volumeUUID uuid.UUID) *evemetrics.ZMetricVolume

GetVolumeMetrics returns the last recorded metrics for the specified storage volume, or nil if no metrics message for it has been received yet.

func (*EdgeDevice) HardReboot

func (d *EdgeDevice) HardReboot(waitUntilRebooted bool)

HardReboot triggers device reboot through the broker.

func (*EdgeDevice) PurgeApplication

func (d *EdgeDevice) PurgeApplication(appUUID uuid.UUID, waitUntilPurged bool,
	timeout time.Duration)

PurgeApplication purges the specified application instance and its state.

func (*EdgeDevice) ReadFile

func (d *EdgeDevice) ReadFile(fileName string) []byte

ReadFile reads the contents of a file from the device.

func (*EdgeDevice) RebootApplication

func (d *EdgeDevice) RebootApplication(appUUID uuid.UUID, waitUntilRebooted bool,
	timeout time.Duration)

RebootApplication requests a reboot of the specified application instance.

func (*EdgeDevice) RequestReboot

func (d *EdgeDevice) RequestReboot(waitUntilRebooted bool)

RequestReboot requests a device reboot via configuration and optionally waits until the reboot completes.

func (*EdgeDevice) RunShellScript

func (d *EdgeDevice) RunShellScript(script string, timeout time.Duration,
	stdoutWatchdogTimeout time.Duration) (stdout, stderr string, err error)

RunShellScript executes the provided shell script on the device over SSH and returns its standard output and standard error as strings.

If timeout is non-zero, execution is bounded by the given duration and will be canceled if the timeout expires. If timeout is zero, no explicit deadline is applied.

If stdoutWatchdogTimeout is non-zero, the script will be terminated if it produces no output on stdout for longer than the specified duration. This acts as a "watchdog" to detect stalled scripts.

func (*EdgeDevice) RunShellScriptInsideApp

func (d *EdgeDevice) RunShellScriptInsideApp(appUUID uuid.UUID, auth AuthMethod,
	script string, timeout time.Duration,
	stdoutWatchdogTimeout time.Duration) (stdout, stderr string, err error)

RunShellScriptInsideApp executes a shell script inside an application instance over SSH and returns its standard output and standard error.

The method discovers SSH endpoints for the application by inspecting:

  1. Port-forwarding ACL rules (port 22 mapped through a local network instance) -- the device IP on the uplink adapter plus the external port.
  2. Switch network instance interfaces -- the app IP at port 22 (directly bridged, reachable on the SDN network).
  3. RoutesTowardsEve entries in the SDN network model -- if any SDN network's router has a route towards the EVE device that covers a VIF's IP, that IP:22 is tried. This makes air-gap NI apps reachable once the app acting as their gateway has IP forwarding enabled.

auth specifies how to authenticate with the application's SSH server (username/password or client certificate). timeout and stdoutWatchdogTimeout behave the same as in RunShellScript.

func (*EdgeDevice) SoftReboot

func (d *EdgeDevice) SoftReboot(waitUntilRebooted bool)

SoftReboot reboots the device from the console/SSH.

func (*EdgeDevice) UpgradeEVE

func (d *EdgeDevice) UpgradeEVE(eveVersion string, waitUntilUpgraded bool)

UpgradeEVE upgrades the EVE OS to the specified version and optionally waits until the upgrade completes.

func (*EdgeDevice) WaitUntilAppIsRunning

func (d *EdgeDevice) WaitUntilAppIsRunning(
	appUUID uuid.UUID, timeoutExcludingDownload time.Duration)

WaitUntilAppIsRunning waits until the specified application reaches the running state or fails.

timeoutExcludingDownload is the maximum time to wait excluding any period spent actively downloading (i.e. in DOWNLOAD_STARTED state with advancing progress). If a download stalls for downloadStalledTimeout the function fails immediately regardless of this timeout.

func (*EdgeDevice) WatchAppInfo

func (d *EdgeDevice) WatchAppInfo(
	appUUID uuid.UUID) (updates <-chan *eveinfo.ZInfoApp, stop func())

WatchAppInfo subscribes to info updates for the specified application and returns a buffered channel that receives each new ZInfoApp as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchAppMetadata

func (d *EdgeDevice) WatchAppMetadata(
	appUUID uuid.UUID) (updates <-chan *eveinfo.ZInfoAppInstMetaData, stop func())

WatchAppMetadata subscribes to metadata updates for the specified application instance and returns a buffered channel that receives each new ZInfoAppInstMetaData as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchAppMetrics

func (d *EdgeDevice) WatchAppMetrics(
	appUUID uuid.UUID) (updates <-chan *evemetrics.AppMetric, stop func())

WatchAppMetrics subscribes to metrics updates for the specified application and returns a buffered channel that receives each new AppMetric as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchBlobInfo

func (d *EdgeDevice) WatchBlobInfo() (updates <-chan *eveinfo.ZInfoBlobList, stop func())

WatchBlobInfo subscribes to blob info updates and returns a buffered channel that receives each new ZInfoBlobList as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchClusterInfo

func (d *EdgeDevice) WatchClusterInfo() (
	updates <-chan *eveinfo.ZInfoKubeCluster, stop func())

WatchClusterInfo subscribes to Kubernetes cluster info updates and returns a buffered channel that receives each new ZInfoKubeCluster as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchClusterMetrics

func (d *EdgeDevice) WatchClusterMetrics() (
	updates <-chan *evemetrics.KubeClusterMetrics, stop func())

WatchClusterMetrics subscribes to Kubernetes cluster metrics updates and returns a buffered channel that receives each new KubeClusterMetrics as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchClusterUpdateInfo

func (d *EdgeDevice) WatchClusterUpdateInfo() (
	updates <-chan *eveinfo.ZInfoKubeClusterUpdateStatus, stop func())

WatchClusterUpdateInfo subscribes to Kubernetes cluster-update info messages and returns a buffered channel that receives each new ZInfoKubeClusterUpdateStatus as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchContentTreeInfo

func (d *EdgeDevice) WatchContentTreeInfo(
	ctUUID uuid.UUID) (updates <-chan *eveinfo.ZInfoContentTree, stop func())

WatchContentTreeInfo subscribes to info updates for the specified content tree and returns a buffered channel that receives each new ZInfoContentTree as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchDeviceInfo

func (d *EdgeDevice) WatchDeviceInfo() (updates <-chan *eveinfo.ZInfoDevice, stop func())

WatchDeviceInfo subscribes to device info updates and returns a buffered channel that receives each new ZInfoDevice as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchDeviceMetrics

func (d *EdgeDevice) WatchDeviceMetrics() (
	updates <-chan *evemetrics.DeviceMetric, stop func())

WatchDeviceMetrics subscribes to device-level metrics updates and returns a buffered channel that receives each new DeviceMetric as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchHardwareInfo

func (d *EdgeDevice) WatchHardwareInfo() (
	updates <-chan *eveinfo.ZInfoHardware, stop func())

WatchHardwareInfo subscribes to hardware info updates and returns a buffered channel that receives each new ZInfoHardware as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchLocationInfo

func (d *EdgeDevice) WatchLocationInfo() (
	updates <-chan *eveinfo.ZInfoLocation, stop func())

WatchLocationInfo subscribes to location info updates and returns a buffered channel that receives each new ZInfoLocation as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchNTPSources

func (d *EdgeDevice) WatchNTPSources() (
	updates <-chan *eveinfo.ZInfoNTPSources, stop func())

WatchNTPSources subscribes to NTP sources updates and returns a buffered channel that receives each new ZInfoNTPSources as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchNetworkInstanceInfo

func (d *EdgeDevice) WatchNetworkInstanceInfo(
	niUUID uuid.UUID) (updates <-chan *eveinfo.ZInfoNetworkInstance, stop func())

WatchNetworkInstanceInfo subscribes to info updates for the specified network instance and returns a buffered channel that receives each new ZInfoNetworkInstance as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchNetworkInstanceMetrics

func (d *EdgeDevice) WatchNetworkInstanceMetrics(
	niUUID uuid.UUID) (updates <-chan *evemetrics.ZMetricNetworkInstance, stop func())

WatchNetworkInstanceMetrics subscribes to metrics updates for the specified network instance and returns a buffered channel that receives each new ZMetricNetworkInstance as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchVolumeInfo

func (d *EdgeDevice) WatchVolumeInfo(volumeUUID uuid.UUID) (
	updates <-chan *eveinfo.ZInfoVolume, stop func())

WatchVolumeInfo subscribes to info updates for the specified storage volume and returns a buffered channel that receives each new ZInfoVolume as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WatchVolumeMetrics

func (d *EdgeDevice) WatchVolumeMetrics(
	volumeUUID uuid.UUID) (updates <-chan *evemetrics.ZMetricVolume, stop func())

WatchVolumeMetrics subscribes to metrics updates for the specified storage volume and returns a buffered channel that receives each new ZMetricVolume as it arrives. Call the returned close function to stop watching and close the channel.

func (*EdgeDevice) WriteFile

func (d *EdgeDevice) WriteFile(fileName string, content []byte)

WriteFile writes content to a file on the device.

type EdgeDeviceConfig

type EdgeDeviceConfig struct {
	*eveconfig.EdgeDevConfig
	// contains filtered or unexported fields
}

EdgeDeviceConfig allows to build EdgeDevConfig. It provides some helper functions, but it is also possible to access the EdgeDevConfig directly (to maybe create and test invalid device config).

func NewEdgeDeviceConfig

func NewEdgeDeviceConfig(devName string) *EdgeDeviceConfig

NewEdgeDeviceConfig constructs an EdgeDeviceConfig. When creating a configuration prior to Setup (e.g. for bootstrap), do not include secrets that require encryption in a CipherBlock (such as datastore credentials or application cloud-init metadata). These values must be added only after evetest.Setup completes and the device is onboarded, when cryptographic material for object-level encryption becomes available.

func (*EdgeDeviceConfig) AddApplication

func (dc *EdgeDeviceConfig) AddApplication(config ApplicationInstanceConfig) uuid.UUID

AddApplication adds a new application instance to the device configuration and returns its generated UUID.

func (*EdgeDeviceConfig) AddBond

func (dc *EdgeDeviceConfig) AddBond(config BondConfig)

AddBond adds a bond (link aggregation) interface to the device configuration.

func (*EdgeDeviceConfig) AddNetwork

func (dc *EdgeDeviceConfig) AddNetwork(netConfig NetworkConfig) uuid.UUID

AddNetwork : add new network configuration. This can be then referenced from NetworkAdapterConfig.

func (*EdgeDeviceConfig) AddNetworkAdapter

func (dc *EdgeDeviceConfig) AddNetworkAdapter(config NetworkAdapterConfig)

AddNetworkAdapter adds a new physical network adapter to the device configuration.

func (*EdgeDeviceConfig) AddNetworkInstance

func (dc *EdgeDeviceConfig) AddNetworkInstance(config NetworkInstanceConfig) uuid.UUID

AddNetworkInstance adds a new network instance to the device configuration and returns its generated UUID.

func (*EdgeDeviceConfig) AddSCEPProfile

func (dc *EdgeDeviceConfig) AddSCEPProfile(profile SCEPProfile)

AddSCEPProfile adds a new SCEP profile into the device configuration.

func (*EdgeDeviceConfig) AddVLANSubinterface

func (dc *EdgeDeviceConfig) AddVLANSubinterface(config VLANSubinterfaceConfig)

AddVLANSubinterface adds a VLAN subinterface to the device configuration.

func (*EdgeDeviceConfig) Clone

func (dc *EdgeDeviceConfig) Clone() *EdgeDeviceConfig

Clone creates a deep copy of the EdgeDeviceConfig.

func (*EdgeDeviceConfig) DeleteApplication

func (dc *EdgeDeviceConfig) DeleteApplication(appUUID uuid.UUID)

DeleteApplication removes an application instance identified by its UUID and cleans up all associated resources.

func (*EdgeDeviceConfig) DeleteBond

func (dc *EdgeDeviceConfig) DeleteBond(logicalLabel string)

DeleteBond removes a bond identified by its logical label from the device configuration.

func (*EdgeDeviceConfig) DeleteNetwork

func (dc *EdgeDeviceConfig) DeleteNetwork(networkUUID uuid.UUID)

DeleteNetwork : remove previously added network configuration.

func (*EdgeDeviceConfig) DeleteNetworkAdapter

func (dc *EdgeDeviceConfig) DeleteNetworkAdapter(logicalLabel string)

DeleteNetworkAdapter removes a network adapter identified by its logical label from the device configuration.

func (*EdgeDeviceConfig) DeleteNetworkInstance

func (dc *EdgeDeviceConfig) DeleteNetworkInstance(niUUID uuid.UUID)

DeleteNetworkInstance removes a network instance identified by its UUID from the device configuration.

func (*EdgeDeviceConfig) DeleteSCEPProfile

func (dc *EdgeDeviceConfig) DeleteSCEPProfile(profileName string)

DeleteSCEPProfile removes SCEP profile from the device configuration.

func (*EdgeDeviceConfig) DeleteVLANSubinterface

func (dc *EdgeDeviceConfig) DeleteVLANSubinterface(logicalLabel string)

DeleteVLANSubinterface removes a VLAN subinterface identified by its logical label from the device configuration.

func (*EdgeDeviceConfig) MakeBootstrapConfig

func (dc *EdgeDeviceConfig) MakeBootstrapConfig() *eveconfig.BootstrapConfig

MakeBootstrapConfig : wrap device configuration into BootstrapConfig, which is used to carry the initial device configuration and gets installed into the /config partition.

func (*EdgeDeviceConfig) SetConfigProperties

func (dc *EdgeDeviceConfig) SetConfigProperties(configProps *pillartypes.ConfigItemValueMap)

SetConfigProperties : add configuration properties into the device configuration.

func (*EdgeDeviceConfig) SetLPS

func (dc *EdgeDeviceConfig) SetLPS(config LPSConfig)

SetLPS configures the Local Profile Server (LPS) settings for the device.

func (*EdgeDeviceConfig) UpdateApplication

func (dc *EdgeDeviceConfig) UpdateApplication(
	appUUID uuid.UUID, newConfig ApplicationInstanceConfig)

UpdateApplication updates an existing application instance identified by its UUID.

func (*EdgeDeviceConfig) UpdateBond

func (dc *EdgeDeviceConfig) UpdateBond(config BondConfig)

UpdateBond updates an existing bond identified by its logical label.

func (*EdgeDeviceConfig) UpdateNetwork

func (dc *EdgeDeviceConfig) UpdateNetwork(networkUUID uuid.UUID, newConfig NetworkConfig)

UpdateNetwork : update already added network configuration.

func (*EdgeDeviceConfig) UpdateNetworkAdapter

func (dc *EdgeDeviceConfig) UpdateNetworkAdapter(config NetworkAdapterConfig)

UpdateNetworkAdapter updates an existing network adapter identified by its logical label.

func (*EdgeDeviceConfig) UpdateNetworkInstance

func (dc *EdgeDeviceConfig) UpdateNetworkInstance(
	niUUID uuid.UUID, newConfig NetworkInstanceConfig)

UpdateNetworkInstance updates an existing network instance identified by its UUID.

func (*EdgeDeviceConfig) UpdateSCEPProfile

func (dc *EdgeDeviceConfig) UpdateSCEPProfile(profile SCEPProfile)

UpdateSCEPProfile updates an existing SCEP profile.

func (*EdgeDeviceConfig) UpdateVLANSubinterface

func (dc *EdgeDeviceConfig) UpdateVLANSubinterface(config VLANSubinterfaceConfig)

UpdateVLANSubinterface updates an existing VLAN subinterface identified by its logical label.

type ExistingEdgeDeviceReusePolicy

type ExistingEdgeDeviceReusePolicy int

ExistingEdgeDeviceReusePolicy defines how to reuse an existing EdgeDevice that already satisfies test requirements. Only one strategy can be selected. This helps control whether to reuse as-is, reset, or recreate the edge device before test execution.

const (
	// UseAsIs : do nothing special, keep existing state.
	UseAsIs ExistingEdgeDeviceReusePolicy = iota
	// RebootEdgeDevice : just reboot edge device matching the requirements.
	RebootEdgeDevice
	// ResetDeviceConfig : reset the device configuration by clearing all
	// application-related settings while preserving the device network configuration.
	ResetDeviceConfig
	// ResetDeviceConfigAndReboot : combines ResetDeviceConfig with RebootEdgeDevice.
	ResetDeviceConfigAndReboot
	// ReonboardEdgeDevice forces re-onboarding of the device, even if it was previously
	// onboarded.
	// It removes the OnboardingStatus and edge device certificate, clears TPM, recreates
	// the device entry in the controller, resets device configuration (see ResetDeviceConfig)
	// and then reboots the device.
	ReonboardEdgeDevice
	// CreateFromScratchWithInstaller : re-create VM even if already exists using
	// EVE installer image.
	CreateFromScratchWithInstaller
	// CreateFromScratchWithLiveImage : re-create VM even if already exists using
	// EVE live image.
	CreateFromScratchWithLiveImage
)

type Filesystem

type Filesystem int

Filesystem identifies the filesystem type required or detected on an EVE device.

const (
	// FilesystemUndefined indicates no specific filesystem is required or detected.
	FilesystemUndefined Filesystem = iota
	// FilesystemEXT4 represents the ext4 filesystem.
	FilesystemEXT4
	// FilesystemZFS represents the ZFS filesystem.
	FilesystemZFS
)

func GetFilesystemParameterValue

func GetFilesystemParameterValue() Filesystem

GetFilesystemParameterValue returns the value set for the Filesystem parameter.

func (*Filesystem) FromString

func (f *Filesystem) FromString(s string) error

FromString parses a filesystem name string and sets the Filesystem value.

func (Filesystem) String

func (f Filesystem) String() string

type FlowLogMatch

type FlowLogMatch struct {
	Flow              *eveflowlog.IpFlow // match every non-zero value from the 5-tuple
	Inbound           bool
	VirtualNetAdapter string // logical label
	NetworkInstance   uuid.UUID
	// NotBefore and NotAfter relates to FlowRecord.startTime
	NotBefore time.Time
	NotAfter  time.Time
}

FlowLogMatch defines filtering criteria for matching application flow logs.

type FromStringer

type FromStringer interface {
	FromString(string) error
}

FromStringer should be implemented by a test parameter if its type is not a basic Go type.

type HTTPStorage

type HTTPStorage struct {
	ImageFormat            eveconfig.Format
	ImageSHA256            string
	MaxDownloadBytes       uint64
	ImageRelativePath      string
	ServerAddress          string
	ServerPort             uint16 // if not defined, we assume port 80 (HTTP) / 443 (HTTPS)
	UseHTTPS               bool   // true = HTTPS, false = HTTP
	HTTPSTrustedCACertsPEM []string
}

HTTPStorage defines the location of an application image stored on an HTTP datastore.

type Hypervisor

type Hypervisor int

Hypervisor identifies the hypervisor type required or detected on an EVE device.

const (
	// HypervisorUndefined indicates no specific hypervisor is required or detected.
	HypervisorUndefined Hypervisor = iota
	// HypervisorKVM represents the KVM hypervisor.
	HypervisorKVM
	// HypervisorXen represents the Xen hypervisor.
	HypervisorXen
	// HypervisorKubevirt represents the KubeVirt hypervisor.
	HypervisorKubevirt
)

func GetHypervisorParameterValue

func GetHypervisorParameterValue() Hypervisor

GetHypervisorParameterValue returns the value set for the Hypervisor parameter.

func (*Hypervisor) FromString

func (h *Hypervisor) FromString(s string) error

FromString parses a hypervisor name string and sets the Hypervisor value.

func (Hypervisor) String

func (h Hypervisor) String() string

type LPSConfig

type LPSConfig struct {
	GlobalProfile string
	Address       string // IP[:port] or hostname[:port]
	AuthToken     string
}

LPSConfig contains configuration for the Local Profile Server.

type LocalNetworkInstanceConfig

type LocalNetworkInstanceConfig struct {
	DisplayName              string
	Port                     string // logical label or shared label
	Subnet                   *net.IPNet
	DHCPRange                pillartypes.IPRange
	Gateway                  net.IP
	Domain                   string
	NTPServers               []string
	DNSServers               []net.IP
	StaticDNSEntries         []pillartypes.DNSNameToIP
	PropagateConnectedRoutes bool
	StaticRoutes             []pillartypes.IPRouteConfig
	EnableFlowlog            bool
	MTU                      uint16
	ForwardLLDP              bool
}

LocalNetworkInstanceConfig represents Local (L3, NAT-ed) Network Instance.

type LogMsg

type LogMsg struct {
	Severity  string
	Source    string
	Filename  string
	Message   string
	Timestamp time.Time
}

LogMsg represents a single log message emitted by the device or an application.

type LogMsgMatch

type LogMsgMatch struct {
	Severity         string
	Source           string
	Filename         string
	MsgHasSubstring  string
	MsgMatchesRegexp regexp.Regexp
	NotBefore        time.Time
	NotAfter         time.Time
}

LogMsgMatch defines filtering criteria for matching log messages.

type ManualProxyConfig

type ManualProxyConfig struct {
	Proxies       []ProxyServer
	ProxyCertsPEM []string
	Exceptions    []string // IP address or hostname or wildcard domain (e.g. *.local)
}

ManualProxyConfig represents a manually specified proxy configuration.

type NetworkAdapterConfig

type NetworkAdapterConfig struct {
	LogicalLabel  string
	PhysicalLabel string
	InterfaceName string
	PCIAddress    string
	USBAddress    string
	WirelessType  evecommon.WirelessType
	Usage         evecommon.PhyIoMemberUsage
	PNAC          PNAC

	// AllowLocalModifications enables the Local Profile Server (LPS) to modify
	// the network configuration of this adapter.
	AllowLocalModifications bool

	// Parameters below should be left empty if:
	//   - Usage is PhyIoUsageDedicated or PhyIoUsageDisabled, or
	//   - the (ethernet) adapter is used in VLANs-only mode
	//   - the (ethernet) adapter is a member of a bond
	Cost         uint8
	NetworkUUID  uuid.UUID
	StaticIP     net.IP // use only in combination with StaticNetworkConfig
	SharedLabels []string
}

NetworkAdapterConfig represents configuration for NIC (ethernet or wireless)

type NetworkConfig

type NetworkConfig interface {
	// contains filtered or unexported methods
}

NetworkConfig defines a generic interface for converting a network config into its corresponding EVE protobuf representation.

type NetworkInstanceConfig

type NetworkInstanceConfig interface {
	// contains filtered or unexported methods
}

NetworkInstanceConfig defines a generic interface for network-instance configurations that can be converted into EVE protobuf representation.

type NetworkProtocol

type NetworkProtocol uint8

NetworkProtocol defined for ACL rules.

const (
	// NetworkProtocolAny indicates that an ACL rule matches any network protocol.
	NetworkProtocolAny NetworkProtocol = iota
	// NetworkProtocolICMP indicates that an ACL rule matches ICMP traffic.
	NetworkProtocolICMP
	// NetworkProtocolTCP indicates that an ACL rule matches TCP traffic.
	NetworkProtocolTCP
	// NetworkProtocolUDP indicates that an ACL rule matches UDP traffic.
	NetworkProtocolUDP
)

func (NetworkProtocol) String

func (p NetworkProtocol) String() string

String returns string representation of the network protocol.

type NoIPNetworkConfig

type NoIPNetworkConfig struct {
	MTU uint16
}

NoIPNetworkConfig represents configuration for an Ethernet interface without assigning an IP address (no static IP and no DHCP client). It is typically used for L2-only setups (e.g., bridge members) or for cluster networks, where IP addresses are assigned from the cluster configuration.

type PCIDevice

type PCIDevice struct {
	VendorID uint16
	DeviceID uint16
}

PCIDevice identifies a PCI device by vendor and device ID.

type PNAC

type PNAC struct {
	Enable      bool
	EAPIdentity string
	EAPMethod   eveconfig.EAPMethod
	// Name of the certificate enrollment profile used for authentication
	// (for example, a SCEP profile). Applicable only if the selected EAP
	// method requires a client certificate (e.g., EAP-TLS).
	CertEnrollmentProfileName string
}

PNAC : configuration for Port-based Network Access Control.

type PortFwdRule

type PortFwdRule struct {
	Protocol     NetworkProtocol
	EdgeNodePort uint16
	AppPort      uint16
	// AdapterLabel, when non-empty, restricts this port-forwarding rule to
	// ports that carry this shared label (generates an "adapter" ACE match).
	AdapterLabel string
}

PortFwdRule is a port forwarding rule.

type ProxyAutoDiscoveryConfig

type ProxyAutoDiscoveryConfig struct {
	ProxyCertsPEM []string
}

ProxyAutoDiscoveryConfig represents a proxy configuration that enables automatic discovery of network proxy settings using WPAD & PAC.

type ProxyConfig

type ProxyConfig interface {
	// contains filtered or unexported methods
}

ProxyConfig defines a generic interface for proxy configuration types that can be converted into EVE protobuf representation.

type ProxyServer

type ProxyServer struct {
	Proto   evecommon.ProxyProto
	Address string // IP or hostname
	Port    uint16
}

ProxyServer defines a single proxy server with protocol, address, and port.

type RequireEdgeDevice

type RequireEdgeDevice struct {
	// Logical name used to reference the device within the evetest framework.
	Name string

	// Zero values mean that the test does not care about the particular resource size.
	// None of these will be ever created with zero count - not even ethernet interfaces.
	MinCPUs         uint8  // Default will be 4.
	MinRAMInMB      uint32 // Default will be 8192 MB.
	MinDiskSizeInMB uint32 // Default will be 28576 MB.

	WithEVEVersion string
	WithHypervisor Hypervisor
	WithTPM        bool

	WithFilesystem Filesystem
	// Mount the vault (or the entire persist partition when using ext4) with the
	// DIRSYNC flag, which makes all directory-entry updates synchronous.
	// This incurs significant I/O overhead in virtualized environments,
	// most noticeably during container image unpacking, so it is disabled by
	// default. Enable it only when the test explicitly exercises durability under
	// sudden failure conditions such as power loss or kernel crashes.
	WithDirSync bool

	// Configuration injected into the /config partition.
	WithSoftSerial              string
	WithGrubOptions             []string
	WithInjectedBootstrapConfig *EdgeDeviceConfig
	WithInjectedNetworkOverride *pillartypes.DevicePortConfig
	// framework automatically adds SSH key and enables console
	WithInjectedConfigProperties *pillartypes.ConfigItemValueMap

	// USB/PCI devices to passthrough into the edge device VM.
	WithUSBPassthrough []USBDevice // TODO
	WithPCIPassthrough []PCIDevice // TODO

	// What to do if EdgeDevice is already available (and still manageable)
	// from the previous test:
	DeviceReusePolicy ExistingEdgeDeviceReusePolicy
}

RequireEdgeDevice : requirement to deploy single EVE device.

type RequireInternetConnectivity

type RequireInternetConnectivity struct {
	RequireIPv6 bool
}

RequireInternetConnectivity : requirement to provide IPv4/IPv6 Internet connectivity.

type RequireNetworkModel

type RequireNetworkModel struct {
	// NetworkModel.ControllerConfig is filled by the framework, do not set from the test.
	*api.NetworkModel
}

RequireNetworkModel : required Evetest-SDN network model.

type Requirement

type Requirement interface {
	// contains filtered or unexported methods
}

Requirement is a marker interface for all test requirements (e.g. device, hypervisor, filesystem).

type SCEPProfile

type SCEPProfile struct {
	Name string
	// Full SCEP server URL, including scheme, host, and path.
	// Example: https://ca.example.com/scep
	SCEPServerURL string
	// If true, SCEP requests are sent via the controller-provided SCEP proxy.
	// If false, the device connects directly to the SCEP server.
	UseControllerProxy bool
	ChallengePassword  string
	CACertsPEM         []string
	CSR                CSRProfile
}

SCEPProfile : SCEP (Simple Certificate Enrollment Protocol) configuration profile. Defines how a device enrolls for X.509 certificates using SCEP, including server connectivity, trust anchors, and CSR parameters.

type SFTPStorage

type SFTPStorage struct {
	ImageFormat       eveconfig.Format
	ImageSHA256       string
	MaxDownloadBytes  uint64
	ImageRelativePath string
	ServerAddress     string
	ServerPort        uint16 // if not defined, we assume port 22
	Username          string
	Password          string
}

SFTPStorage defines the location and access parameters for an application image stored on an SFTP datastore

type StaticNetworkConfig

type StaticNetworkConfig struct {
	NetworkType evecommon.NetworkType
	MTU         uint16
	Subnet      *net.IPNet
	Gateway     net.IP
	Domain      string
	NTPServers  []string
	DNSServers  []net.IP
	ProxyConfig ProxyConfig
}

StaticNetworkConfig represents a statically assigned IP configuration to an Ethernet interface.

type SwitchNetworkInstanceConfig

type SwitchNetworkInstanceConfig struct {
	DisplayName     string
	Port            string // logical label or shared label
	EnableFlowlog   bool
	STPConfig       pillartypes.STPConfig // only applied for Switch NI with multiple ports
	MTU             uint16                // used only for airgap switch NI
	ForwardLLDP     bool
	VlanAccessPorts []pillartypes.VlanAccessPort // VLAN access port assignments; empty = no VLAN filtering
}

SwitchNetworkInstanceConfig represents Switch (L2, bridged) Network Instance.

type T

type T struct {
	*testing.T
	// contains filtered or unexported fields
}

T wraps testing.T and adds evetest-specific failure handling.

The wrapper augments test failures with:

  • automatic stacktrace logging
  • optional pause-on-failure support (controlled by EVETEST_PAUSE_ON_FAILURE)

T is returned by evetest.Init(*testing.T) and MUST be used instead of the original *testing.T. Calling failure methods on the original *testing.T bypasses this additional behavior.

func Init

func Init(t *testing.T) *T

Init initializes the test harness and must be called exactly once per test. When used inside a test suite, Init may be called multiple times, once per test case, but only a single harness instance will be created.

func (*T) Error

func (t *T) Error(args ...interface{})

Error logs the provided arguments, marks the test as failed, and continues execution.

This is equivalent to Log + Fail, with additional stacktrace logging and optional pause-on-failure behavior.

func (*T) Errorf

func (t *T) Errorf(format string, args ...interface{})

Errorf formats the message, marks the test as failed, and continues execution.

This is equivalent to Logf + Fail, with additional stacktrace logging and optional pause-on-failure behavior.

func (*T) Fail

func (t *T) Fail()

Fail marks the test as failed but allows execution to continue.

This mirrors testing.T.Fail, with the addition of stacktrace logging and optional pause-on-failure behavior.

func (*T) FailNow

func (t *T) FailNow()

FailNow marks the test as failed and stops execution immediately.

Like testing.T.FailNow, this only stops the test in the goroutine from which it is called.

func (*T) Fatal

func (t *T) Fatal(args ...interface{})

Fatal logs the provided arguments, marks the test as failed, and stops execution immediately.

Like testing.T.Fatal, this only stops the test in the goroutine from which it is called.

func (*T) Fatalf

func (t *T) Fatalf(format string, args ...interface{})

Fatalf formats the message, marks the test as failed, and stops execution immediately.

In addition to testing.T.Fatalf behavior, this logs the current stacktrace and optionally pauses test execution if EVETEST_PAUSE_ON_FAILURE is enabled.

type TestCase

type TestCase struct {
	// Test is the test function to execute.
	Test func(t *testing.T)

	// Variants defines multiple configurations under which the test
	// should be executed. Each variant is run as a subtest.
	Variants []TestVariant
}

TestCase represents a single logical test along with optional variants. If no variants are provided, the test is executed once with default parameters.

type TestHarness

type TestHarness struct {
	api.UnimplementedEvetestServer
	// contains filtered or unexported fields
}

TestHarness is the central runtime state for executing tests and test suites. It owns the gRPC server lifecycle and tracks the currently executing test and optional test-suite context.

func (*TestHarness) CollectInfo

func (th *TestHarness) CollectInfo(
	ctx context.Context, req *api.EVEDeviceRequest) (*api.CollectInfoResponse, error)

CollectInfo retrieves debug information from a device (eve-info tarball).

func (*TestHarness) ConnectConsoleToEVE

func (th *TestHarness) ConnectConsoleToEVE(
	stream api.Evetest_ConnectConsoleToEVEServer) error

ConnectConsoleToEVE carries an interactive serial-console session over gRPC. The client sends an EVEDeviceRequest as the first message; the server opens a broker console stream, forwards ConsoleProperties, then relays raw bytes bidirectionally between the CLI and the broker.

func (*TestHarness) ConnectTunnelToEVE

func (th *TestHarness) ConnectTunnelToEVE(
	stream api.Evetest_ConnectTunnelToEVEServer) error

ConnectTunnelToEVE carries a single TCP connection to an EVE device port over gRPC. The client sends an EVETunnelConnect as the first message; the server dials EVE, replies with TunnelConnected, then relays raw bytes bidirectionally.

func (*TestHarness) ConnectTunnelToSDN

func (th *TestHarness) ConnectTunnelToSDN(
	stream api.Evetest_ConnectTunnelToSDNServer) error

ConnectTunnelToSDN carries a TCP connection to the SDN SSH port over gRPC. The client sends an SDNRequest as the first message; the server dials the SDN SSH endpoint, replies with TunnelConnected, then relays raw bytes bidirectionally.

func (*TestHarness) Continue

func (th *TestHarness) Continue(
	ctx context.Context, req *api.ContinueRequest) (*api.ContinueResponse, error)

Continue test execution until the end/failure or another checkpoint.

func (*TestHarness) Exit

func (th *TestHarness) Exit(
	ctx context.Context, req *api.ExitRequest) (*api.ExitResponse, error)

Exit the test early. If the test is paused at a checkpoint or on failure, it will be marked as skipped. Otherwise, the process is terminated with os.Exit(0).

func (*TestHarness) GetAppFlowLogs

func (th *TestHarness) GetAppFlowLogs(
	req *api.AppRequest, stream api.Evetest_GetAppFlowLogsServer) error

GetAppFlowLogs streams flow logs and DNS request logs for an application.

func (*TestHarness) GetAppInfo

func (th *TestHarness) GetAppInfo(
	req *api.AppRequest, stream api.Evetest_GetAppInfoServer) error

GetAppInfo streams application-specific info from a device (ZInfoApp).

func (*TestHarness) GetAppLogs

func (th *TestHarness) GetAppLogs(
	req *api.AppRequest, stream api.Evetest_GetAppLogsServer) error

GetAppLogs streams logs from an EVE-managed application.

func (*TestHarness) GetAppMetrics

func (th *TestHarness) GetAppMetrics(
	req *api.AppRequest, stream api.Evetest_GetAppMetricsServer) error

GetAppMetrics streams application-level metrics from a device (appMetric).

func (*TestHarness) GetClusterInfo

func (th *TestHarness) GetClusterInfo(
	req *api.ClusterRequest, stream api.Evetest_GetClusterInfoServer) error

GetClusterInfo streams summary information for the entire Kubernetes cluster from all devices.

func (*TestHarness) GetClusterMetrics

func (th *TestHarness) GetClusterMetrics(
	req *api.ClusterRequest, stream api.Evetest_GetClusterMetricsServer) error

GetClusterMetrics streams metrics for the Kubernetes cluster (KubeClusterMetrics) from all devices.

func (*TestHarness) GetClusterUpdateInfo

func (th *TestHarness) GetClusterUpdateInfo(
	req *api.ClusterRequest, stream api.Evetest_GetClusterUpdateInfoServer) error

GetClusterUpdateInfo streams information about ongoing cluster updates.

func (*TestHarness) GetEVEConfig

func (th *TestHarness) GetEVEConfig(
	ctx context.Context, req *api.EVEDeviceRequest) (*api.EVEConfigResponse, error)

GetEVEConfig fetches the current configuration submitted to the EVE device.

func (*TestHarness) GetEVEConsoleOutput

func (th *TestHarness) GetEVEConsoleOutput(
	ctx context.Context, req *api.EVEDeviceRequest) (*api.ConsoleOutputResponse, error)

GetEVEConsoleOutput returns the full console output from the EVE device.

func (*TestHarness) GetEVEInfo

GetEVEInfo streams real-time system info from EVE device (ZInfoDevice).

func (*TestHarness) GetEVELogs

GetEVELogs streams logs from EVE device (agent logs, kernel logs, etc).

func (*TestHarness) GetEVEMetrics

GetEVEMetrics streams real-time metrics from EVE device (deviceMetric).

func (*TestHarness) GetNIInfo

func (th *TestHarness) GetNIInfo(
	req *api.NIRequest, stream api.Evetest_GetNIInfoServer) error

GetNIInfo streams info (ZInfoNetworkInstance) about a network instance (NI).

func (*TestHarness) GetNIMetrics

func (th *TestHarness) GetNIMetrics(
	req *api.NIRequest, stream api.Evetest_GetNIMetricsServer) error

GetNIMetrics streams metrics (ZMetricNetworkInstance) for a network instance.

func (*TestHarness) GetSDNConfigGraph

func (th *TestHarness) GetSDNConfigGraph(
	ctx context.Context, req *api.SDNRequest) (*api.SDNConfigGraphResponse, error)

GetSDNConfigGraph returns the SDN configuration visualized as a Graphviz dot-formatted graph.

func (*TestHarness) GetSDNNetworkModel

func (th *TestHarness) GetSDNNetworkModel(
	ctx context.Context, req *api.SDNRequest) (*api.SDNGetNetworkModelResponse, error)

GetSDNNetworkModel returns the SDN's abstract model of the network.

func (*TestHarness) GetSDNStatus

func (th *TestHarness) GetSDNStatus(
	ctx context.Context, req *api.SDNRequest) (*api.SDNStatusResponse, error)

GetSDNStatus returns the overall SDN (network emulator) status.

func (*TestHarness) HardRebootEVEDevice

func (th *TestHarness) HardRebootEVEDevice(
	ctx context.Context, req *api.EVEDeviceRequest) (*api.EVERebootResponse, error)

HardRebootEVEDevice forces immediate power cycle of the EVE device.

func (*TestHarness) SoftRebootEVEDevice

func (th *TestHarness) SoftRebootEVEDevice(
	ctx context.Context, req *api.EVEDeviceRequest) (*api.EVERebootResponse, error)

SoftRebootEVEDevice request a clean OS-level reboot on the EVE device.

func (*TestHarness) Status

func (th *TestHarness) Status(
	ctx context.Context, req *api.StatusRequest) (*api.StatusResponse, error)

Status returns current test execution state and active devices.

func (*TestHarness) StreamSDNLogs

func (th *TestHarness) StreamSDNLogs(
	req *api.SDNRequest, stream api.Evetest_StreamSDNLogsServer) error

StreamSDNLogs streams logs from the SDN VM to the gRPC client. This method acts as a simple forwarder: it subscribes to the SDN log stream and relays all received log messages to the caller over the gRPC stream. If the SDN client is not initialized, an error is returned. The stream will terminate when either the SDN closes the stream (EOF) or the context is canceled.

type TestParameterDefinition

type TestParameterDefinition struct {
	// Key is the unique identifier of the parameter.
	Key string

	// DefaultValue is the value used if the parameter is not explicitly set.
	DefaultValue interface{}

	// Description provides human-readable metadata about the parameter.
	Description TestParameterDescription
}

TestParameterDefinition describes a parameter that a test or test-suite can accept. Parameters may have a default value, can be overridden by test-suites, or via environment variables.

func FilesystemParameter

func FilesystemParameter() TestParameterDefinition

FilesystemParameter is a predefined TestParameterDefinition for the Filesystem parameter.

func HypervisorParameter

func HypervisorParameter() TestParameterDefinition

HypervisorParameter is a predefined TestParameterDefinition for the Hypervisor parameter.

func TPMParameter

func TPMParameter() TestParameterDefinition

TPMParameter is a predefined TestParameterDefinition for the TPM parameter.

type TestParameterDescription

type TestParameterDescription struct {
	// Summary is a human-readable explanation of what the parameter controls.
	Summary string
	// Default is the default value expressed as a human-readable string
	// (e.g. "kvm", "false", "42").
	// IMPORTANT: this field must be set to a string literal so that
	// list-tests can extract it via static AST analysis. Do not use
	// computed expressions such as method calls or variable references.
	Default string
	// AllowedValues describes the set of accepted values in human-readable form.
	// For enum parameters the recommended format is "<val1>|<val2>|<val3>".
	// For numeric ranges you might write "<minval>-<maxval>".
	// Leave empty if unrestricted (any value of the given type is allowed).
	// Same constraint as Default: must be a string literal.
	AllowedValues string
}

TestParameterDescription provides metadata for a test parameter, used when listing available tests (see "make list-tests").

type TestParameterValue

type TestParameterValue struct {
	// Key is the identifier of the parameter.
	Key string

	// Value is the concrete value assigned to the parameter.
	Value interface{}
}

TestParameterValue represents a concrete value assigned to a test parameter, typically by a test-suite when running parameterized tests.

type TestVariant

type TestVariant struct {
	// Name is the name of the test variant.
	Name string

	// Parameters contains the concrete parameter values applied for this variant.
	Parameters []TestParameterValue
}

TestVariant represents a named variation of a test case with a specific set of parameter values. Variants are typically used to run the same test logic under different configurations.

type TransparentProxyConfig

type TransparentProxyConfig struct {
	ProxyCertsPEM []string
}

TransparentProxyConfig represents configuration for transparent proxying.

type USBDevice

type USBDevice struct {
	VendorID  uint16
	ProductID uint16
}

USBDevice identifies a USB device by vendor and product ID.

type UsernamePasswordAuth

type UsernamePasswordAuth struct {
	Username string
	Password string
}

UsernamePasswordAuth represents username/password authentication.

type VLANSubinterfaceConfig

type VLANSubinterfaceConfig struct {
	LogicalLabel       string
	InterfaceName      string
	ParentLogicalLabel string
	VlanID             uint16
	Cost               uint8
	NetworkUUID        uuid.UUID
	StaticIP           net.IP // use only in combination with StaticNetworkConfig
	SharedLabels       []string
	Usage              evecommon.PhyIoMemberUsage
}

VLANSubinterfaceConfig represents a single VLAN sub-interface.

type VirtualNetworkAdapter

type VirtualNetworkAdapter struct {
	LogicalLabel        string
	NetworkInstanceUUID uuid.UUID
	StaticIP            net.IP
	MAC                 net.HardwareAddr
	AccessVLAN          uint16
	PortFwdRules        []PortFwdRule
	ACLAllowRules       []ACLAllowRule
}

VirtualNetworkAdapter represents application virtual network adapters (e.g., virtio, e1000).

type WiFiNetworkConfig

type WiFiNetworkConfig struct {
	// WiFi with static IP config is rather uncommon
	DHCPNetworkConfig
	SSID      string
	KeyScheme evecommon.WiFiKeyScheme
	Identity  string
	// The password must be supplied in pre-hashed form, as generated by `wpa_passphrase`.
	// (`PBKDF2-HMAC-SHA1` hash derived from the plaintext password and the SSID).
	Password string
	Priority int32
}

WiFiNetworkConfig represents a Wi-Fi configuration.

Directories

Path Synopsis
cmd
list-tests command
list-tests scans the evetest test suite under ./tests and prints all available test functions grouped into two sections:
list-tests scans the evetest test suite under ./tests and prints all available test functions grouped into two sections:
grpcapi
go
revive:disable -- this file lives alongside protobuf-generated code in a directory named "go"
revive:disable -- this file lives alongside protobuf-generated code in a directory named "go"

Jump to

Keyboard shortcuts

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