Skip to main content

NAGATO: Network Automation Gears and Test Orchestrator

Project description

nagato

PyPI - Python Version pypi Code Style License

NAGATO

Network Automation Gears and Test Orchestrator.

Contents

Introduction

NAGATO provides components for network test automation. It is based on Robot Framework.
The project is hosted on GitHub.

NAGATO provides the following:

  • Robot Framework tools for automating infrastructure tests
  • System to automatically generate robot files for tests incorporating the created tools

nagato

Libraries

The RobotFramework Libraries in NAGATO is the following:

LIBRARY NAME DESCRIPTION
IxNetworkLibrary Provide operations on IxNetwork
NetmikoLibrary Provide operations on network devices through ssh/telnet connections
Pcap FileReader Provide packet capture file verification
SNMP Provide operations relevant to SNMP

For general information about using test libraries with Robot Framework, see Robot Framework User Guide.

High-Level Keywords

The RobotFramework resource files in NAGATO is the following:

LIBRARY NAME DESCRIPTION
Cisco_IOS_XR.resource Provides high-level keywords defining the basic operations of Cisco IOS-XR using NetmikoLibrary
Juniper_Junos.resource Provides high-level keywords defining the basic operations of Junos using NetmikoLibrary

Installation

Execute the following command:

pip install nagato-network

The command will also install the following latest-packages:

Usage

To use NAGATO in Robot Framework tests,
import the libraries you want to use in the settings section.

One of the advantages to use Robot Framework
in a form closer to Natural Language,
so write tests as easy-to-understand as possible.

Below is an example of a robot file using NetmikoLibrary and Cisco_IOS_XR.resource.

*** Settings ***
Documentation          This example demonstrates executing a command on a remote machine
...                    and getting its output.
...
...                    Notice how connections are handled as part of the suite setup and
...                    teardown. This saves some time when executing several test cases.

Library                NAGATO.NetmikoLibrary
Resource               NAGATO/Resources/Cisco_IOS_XR.resource
Suite Setup            Connect   &{device}
Suite Teardown         Disconnect All

*** Variables ***
&{device}
...    device_type=cisco_xr
...    host=192.0.2.1
...    alias=test
...    username=test
...    password=test

*** Test Cases ***
Execute Command And Verify Parsed Output
    [Documentation]    Send the command, get the parsed output, and verify that it is as expected
    ...                If parsing is not needed, the use_textfsm argument is not necessary.

    ${parsed_output} =    NAGATO.NetmikoLibrary.Send Command    command_string=show version    use_textfsm=${True}  host=${device}[alias]
    Should Be Equal    ${output}[0][hardware]    ASR9K

Get Normalized Running Config
    [Documentation]    Get only the configuration contents that do not contain date data 
    ...                from the output of show running-config

    ${output} =    NAGATO.NetmikoLibrary.Send Command     command_string=show running-config    host=${device}[alias]
    ${normalized_config} =    Cisco_IOS_XR.Normalize Config Text    ${output}
    Builtin.Log    ${normalized_config}

Reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nagato_network-0.0.5.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

nagato_network-0.0.5-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file nagato_network-0.0.5.tar.gz.

File metadata

  • Download URL: nagato_network-0.0.5.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1024-azure

File hashes

Hashes for nagato_network-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5f3cfc966d86942551ff83b0086cb2af2c63e097e947c7f0db4c012b83895a27
MD5 9ae54067b4fb0ca2a33fbac056db6e05
BLAKE2b-256 58166a97ac51027e077eeeeda1bf2e2cc061b6c3b6ad559e2336306c733446c2

See more details on using hashes here.

File details

Details for the file nagato_network-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: nagato_network-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 52.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1024-azure

File hashes

Hashes for nagato_network-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0afac25ee646b073194e810410c7e1528b984f4d97ccc4d41acd18e265d8f97c
MD5 f56b943b28d532b5655f8481f7100ce0
BLAKE2b-256 b50c3dc9cc83386b8ec7a45e7a9f2d632958ed650be015826cf13a0f972a45ec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page