Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nornir routeros plugin #11

Merged
merged 6 commits into from
Dec 11, 2023
Merged

Conversation

timeforplanb123
Copy link
Owner

nornir_cli is not compatible with nornir-routeros since 0.3.0 version. nornir-routeros has been removed from nornir_cli 1.2.0.

But starting from new nornir_cli version 1.3.0, you can pass any additional arguments as a json string to Nornir plugin commands. This feature allows you to run any Nornir plugin command without an unique set of parameters. So, now the nornir-routeros plugin can be run like this:

$ nornir_cli nornir-routeros init -c "/home/user/config.yaml" routeros_command '{"path":"/", "command":"ping", "address": "1.1.1.1", "count":4}'

timeforplanb123 and others added 6 commits December 5, 2023 17:39
- Any parameters can be passed to the nornir_cli as json-strings. This will simplify the use of the nornir_cli with jq, jc utilities and in automation pipelines
- The command options are now available in two forms:
  - json-strings (nornir_cli nornir-netmiko init -c  -f '{inventory: {plugin:NetBoxInventory2, ...')
  - json-strings using = (nornir_cli nornir-netmiko init -c  -f 'inventory={plugin:NetBoxInventory2, ...')
- Commands from Nornir plugins now support not only click options, but an click argument in the form of an json-string (nornir_cli nornir-netmiko netmiko_send_command --command_string disp ver '{enable: true}')
- When using options and arguments at the same time, the priority of options will be higher (For example, nornir_cli nornir-netmiko netmiko_send_command --command_string 'disp ver' '{'command_string': 'disp clock'}' will send 'disp ver' command to device). This is convenient when used in automation pipeline
- Add new json syntax for init, filter and Nornir plugin commands
@timeforplanb123 timeforplanb123 merged commit 22b4d00 into master Dec 11, 2023
@timeforplanb123 timeforplanb123 deleted the add_nornir_routeros_plugin branch December 11, 2023 07:37
@timeforplanb123 timeforplanb123 restored the add_nornir_routeros_plugin branch December 11, 2023 07:37
@timeforplanb123 timeforplanb123 deleted the add_nornir_routeros_plugin branch December 11, 2023 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant