pyats_genie_api

This task can call one of Genie device api methods.

Full list of api methods available for your device platform can be found in Genie docs

Dependencies:

Sample Usage

Code to invoke pyats_genie_api task:

from nornir_salt.plugins.tasks import pyats_genie_api

output = nr.run(
    task=pyats_genie_api,
    api="ping",
    address="127.0.0.1",
    timeout=1,
    count=1,
)

pyats_genie_api returns Nornir results object with results containing api call output.

API Reference

nornir_salt.plugins.tasks.pyats_genie_api.pyats_genie_api(task: nornir.core.task.Task, api: str, **kwargs)

Salt-nornir task function to call Genie device’s api methods.

Parameters
  • api – (str) api name to call

  • kwargs – (dict) any additional arguments to use with api call

Return result

Nornir result object with task execution results