Ping

Run a ping on any host.

AttributeTypeRequiredDefaultDescription
cmdconstYespingCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
optionsOptionsObjectNoAdditional command options
parametersPingOptionsYesOptions passed into the ping cmd

Ping Options

AttributeTypeRequiredDefaultDescription
hoststringYesHostname or IP address used for the ping.
portintegerNo22Port to use for the ping.
proxyPingProxyOptionsNoOptional proxy configuration for connecting through an intermediate host.
expectPingExpectOptionsNoExpected result of the ping.

Ping Proxy Options

AttributeTypeRequiredDefaultDescription
typestringYesType of proxy to use. Currently only ssh is supported.
hoststringYesHostname or IP address of the proxy server.
portintegerNo22Port to connect to on the proxy server.
sshPingProxySSHOptionsYes (when type is ssh)SSH-specific proxy configuration.

Ping Proxy SSH Options

AttributeTypeRequiredDefaultDescription
userstringYesUsername for SSH authentication to the proxy.
passwordstringNoPassword for SSH authentication (optional if using key-based auth).
identity_filestringNoPath to private key file for SSH authentication.
timeoutstringNo30sTimeout for SSH connection (e.g., ’30s’, ‘5m’).

Ping Expect Options

AttributeTypeRequiredDefaultDescription
should_failbooleanNofalseExpect the port to stay closed for the whole step timeout. The step fails at the first connection that the port accepts. Through a proxy that is never reachable, the state of the port is unknown, so the step fails.

Ping Examples

Basic Ping

cmd: ping
name: Wait for the device to become online.
options:
  timeout: 4m
parameters:
  host: "[[attributes.Host]]"

Port stays closed

options.timeout sets how long the port must stay closed:

- cmd: ping
  name: The raw VNC port is closed to the network
  options:
    timeout: 30s
  parameters:
    host: "[[attributes.BMC]]"
    port: 5900
    expect:
      should_fail: true

The log reads Port 5900 on '...' stayed closed for 30s.

Ping with SSH Proxy

- cmd: ping
  name: Wait for the device to become online.
  options:
    timeout: 4m
  parameters:
    host: "[[attributes.host]]"
    port: 22
    proxy:
      type: ssh
      host: "[[attributes.dutctl]]"
      port: 22
      ssh:
        user: oscar
        identity_file: "[[ssh-keys.proxy_key]]" # Or omit for auto-discovery