Skip to main content

Robot Framework RADKit Library

A Robot Framework library for interacting with Cisco RADKit-connected devices, providing keywords for authentication, device inventory, parallel command execution, port forwarding, and Genie-based structured parsing.

Python versions License

Installation

RADKit client packages are hosted on a Cisco-internal PyPI index. Configure pip accordingly:

pip install --extra-index-url https://radkit.cisco.com/pip robotframework-radkit

For Genie parsing support (optional):

pip install --extra-index-url https://radkit.cisco.com/pip robotframework-radkit[genie]

Prerequisites

  • Python 3.10+
  • A RADKit identity with enrolled certificates (see RADKit documentation)
  • Access to a RADKit service (remote service instance)

Quick Start

*** Settings ***
Library    RADKitLibrary

*** Variables ***
${SERVICE_SN}    abcd-1234-efgh

*** Test Cases ***
Query Device Inventory
    # identity can also be set via RADKIT_IDENTITY env var
    RADKit Certificate Login    identity=user@cisco.com
    RADKit Select Service    ${SERVICE_SN}
    @{devices}=    RADKit Device Inventory
    Log Many    @{devices}

Execute Show Version
    RADKit Certificate Login    identity=user@cisco.com
    RADKit Select Service    ${SERVICE_SN}
    ${result}=    RADKit Execute    show version    devices=router1
    Log    ${result}[router1]

Keywords

Connection Management

Keyword Description
RADKit Client Version Return installed radkit_client version
RADKit Certificate Login Authenticate to RADKit cloud via certificates
RADKit Disconnect Disconnect from RADKit cloud (all or specific identity)
RADKit Select Service Connect to a RADKit service by serial
RADKit Timeout Set execution timeout (default: 300s)

Device Management

Keyword Description
RADKit Device Inventory Retrieve device inventory (with optional filter)
RADKit Select Devices Select default devices for subsequent execute calls

Command Execution

Keyword Description
RADKit Execute Execute CLI commands on one or more devices in parallel

Port Forwarding

Keyword Description
RADKit Port Forward to Device Set up TCP port forwarding to a remote device
RADKit Stop Port Forward Stop an active port forwarder

Genie Parsing (optional, requires robotframework-radkit[genie])

Keyword Description
RADKit Genie Parse Parse command output using Genie parsers
RADKit Genie Learn Learn device models (structured data) via Genie
RADKit Genie Fingerprint Auto-detect device OS for subsequent Genie operations

Authentication

The library uses certificate-based authentication. Credentials can be provided as keyword arguments or through environment variables:

Environment Variable Description
RADKIT_IDENTITY Your Cisco email address
RADKIT_CERT_PATH Path to your RADKit certificate
RADKIT_KEY_PATH Path to your private key
RADKIT_CA_PATH Path to CA certificate chain
RADKIT_CLIENT_PRIVATE_KEY_PASSWORD_BASE64 Base64-encoded private key passphrase
RADKIT_CLIENT_PRIVATE_KEY_PASSWORD Cleartext private key passphrase

Optional pyATS Integration

When pyats.robot.pyATSRobot is loaded in the test suite, the RADKit Port Forward to Device keyword can optionally update testbed device connection entries via the testbed_device and testbed_conn parameters. This feature is automatically available when pyATS is installed; no additional configuration is needed.

*** Settings ***
Library    pyats.robot.pyATSRobot
Library    RADKitLibrary

*** Test Cases ***
Port Forward With Testbed Update
    RADKit Certificate Login    identity=user@cisco.com
    RADKit Select Service    ${SERVICE_SN}
    RADKit Port Forward to Device    linuxdevice    local_port=0
    ...    destination_port=22    testbed_device=linux_server    testbed_conn=cli
    connect to device "linux_server" via "cli"

Usage Examples

Execute Commands on Multiple Devices

RADKit Select Service    ${SERVICE_SN}
@{devices}=    Create List    router1    router2    router3
${result}=    RADKit Execute    show version    devices=${devices}
# Access output: ${result}[router1], ${result}[router2], etc.

Execute Multiple Commands

@{commands}=    Create List    show version    show clock
${result}=    RADKit Execute    ${commands}    devices=router1;router2
# Access: ${result}[router1][show version], ${result}[router1][show clock], etc.

Use Inventory Filters

${inventory}=    RADKit Device Inventory    raw=True
${subset}=    Evaluate    $inventory.filter("name", "PE*").filter("device_type", "IOSXE")
${result}=    RADKit Execute    show version    devices=${subset}

Parse Output with Genie

@{devices}=    Create List    router1    router2
RADKit Genie Fingerprint    ${devices}
${parsed}=    RADKit Genie Parse    commands=show version    devices=${devices}
# Access parsed data: ${parsed}[router1][show version][version]

Development

Setup Development Environment

git clone https://github.com/Cisco-RADKit/robotframework-radkit.git
cd robotframework-radkit

# Install in development mode (includes genie dependencies)
uv sync --extra dev --extra genie

# Install pre-commit hooks
pre-commit install

Running Tests

# Run all tests
pytest tests/

# Run unit tests only
pytest tests/unit/test_unit_*.py

# Run with coverage
pytest --cov=RADKitLibrary tests/

# Run linters
ruff check .
mypy .
bandit -r RADKitLibrary/

Code Quality

This project uses:

  • ruff for linting and formatting
  • mypy for type checking
  • bandit for security analysis
  • pytest for testing
  • pre-commit for git hooks

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Run the test suite
  5. Submit a pull request

Resources

License

This project is licensed under the Mozilla Public License 2.0 - see the LICENSE file for details.

Authors

Release files for robotframework-radkit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-radkit 0.1.0
File Size Uploaded
robotframework_radkit-0.1.0.tar.gz 277.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-radkit 0.1.0
File Interpreter ABI Platform
robotframework_radkit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 305.1 kB

Release files / robotframework_radkit-0.1.0.tar.gz

Download URL robotframework_radkit-0.1.0.tar.gz
Size 277.1 kB
Tags Source
SHA-256 checksum
How to use checksums
258660c2a4deb0bd94d91328fc5cf153591e2e027c285b1b81af1a67d6fb0176
BLAKE2b-256 checksum
How to use checksums
01ac24654c63890d2b9050db76a4ba1f0ec81db6efc968dff237f23edba5fcec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / robotframework_radkit-0.1.0-py3-none-any.whl

Download URL robotframework_radkit-0.1.0-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53b9e4209bade1bb1a999731926ddf835691d3dc6ab3d8f8370820bf78f7c906
BLAKE2b-256 checksum
How to use checksums
2edfa107f4e6441d917801194a9bfdfa806793c26d9d800a5fad2c49f2b9aec0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page