iscontainerrunning

October 31, 2022 ยท View on GitHub

  • Overview
  • Examples
  • Arguments
  • Expected Output

Overview

Checks whether a docker container is running.

Example

def test_fun(duthosts, rand_one_dut_hostname):
    duthost = duthosts[rand_one_dut_hostname]

    is_cont_running = duthost.is_container_running({DOCKER_CONTAINER_NAME})

Arguments

  • service - Name of docker container
    • Required: True
    • Type: String

Expected Output

True if container is running, False otherwise

Contents

  1. 1Overview
  2. 2Example
  3. 3Arguments
  4. 4Expected Output