Skip to content

network-unit-testing-system/nornir_nuts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nornir Nuts Plugin

This repository contains Nornir plugins designed for use with Nuts.

CachedThreaded Runner

The CachedThreadedRunner is an extension of the threaded runner from Nornir. Task results are cached in a class variable, and if the cache contains the task result, the cached result is returned. Be aware of the limitations: significant memory consumption is possible, and the results are shared. Therefore, modifying a Result object can lead to side effects.

pip install nornir-nuts
InitNornir(
    runner={
        "plugin": "cachedThreaded",
        "options": {
            "num_workers": 100,
        },
    },
    inventory={
        "plugin": "SimpleInventory",
        "options": {
            "host_file": "tests/demo_inventory/hosts.yaml",
            "group_file": "tests/demo_inventory/groups.yaml",
        },
    },
)

About

Nornir plugins designed for use with Nuts.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages