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-1.0.0.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

nagato_network-1.0.0-py3-none-any.whl (52.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nagato_network-1.0.0.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.5.0-1025-azure

File hashes

Hashes for nagato_network-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a76dffb9b60730a249becdeafe268aa4c336523f2938eaf55b7bca333495f2d1
MD5 c726e52a6130cf09bb5011e1cec0095c
BLAKE2b-256 3e082c8a3cde5422681a57c50989b287331a198f59852d83c3036dab1b754716

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for nagato_network-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfd913dc4442e37269fce14fdb894730cd695807a17b99c2022031851a9eea36
MD5 0ef4d4adb59405846b36a0c948567936
BLAKE2b-256 3c2cf1d7f017a4a030b4c4c35e3d45b61341ff7b8dea67bd147095097d1d669b

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