Skip to content

Update netmiko_drvr.py - #190

Open
hanunes wants to merge 1 commit into
tbotnz:masterfrom
hanunes:allow-multiple-ttp-templates
Open

Update netmiko_drvr.py#190
hanunes wants to merge 1 commit into
tbotnz:masterfrom
hanunes:allow-multiple-ttp-templates

Conversation

@hanunes

@hanunes hanunes commented Sep 16, 2022

Copy link
Copy Markdown

Add the ability to pass an array to "ttp_template" key in netmiko args. It will match any given command in order with the template. If there's a command without a template, it should be put in the end of the command array, and it will get the raw data.

Example 1, will match command with template, in order (command1 -> template1, command2 -> template2) command: [ 'command1', 'command2' ]
ttp_template: [ 'template1', 'template2' ]

Example 2, will match command with template, and command without template will return the raw data (command1 -> template1, command2 -> raw) command: [ 'command1', 'command2' ]
ttp_template: [ 'template1' ]

If command and ttp_template are a string, they will be encapsulated in an array and will be matched as before.

Add the ability to pass an array to "ttp_template" key in netmiko args. It will match any given command in order with the template. If there's a command without a template, it should be put in the end of the command array, and it will get the raw data.

Example 1, will match command with template, in order (command1 -> template1, command2 -> template2)
command: [ 'command1', 'command2' ]
ttp_template: [ 'template1', 'template2' ]

Example 2, will match command with template, and command without template will return the raw data (command1 -> template1, command2 -> raw)
command: [ 'command1', 'command2' ]
ttp_template: [ 'template1' ]

If command and ttp_template are a string, they will be encapsulated in an array and will be matched as before.
@hanunes

hanunes commented Sep 28, 2022

Copy link
Copy Markdown
Author

Where do I see where it failed?

@tbotnz

tbotnz commented Sep 28, 2022

Copy link
Copy Markdown
Owner

Can you try regen the redis cert and include in your pr. I think that may have expired

@hanunes

hanunes commented Sep 28, 2022

Copy link
Copy Markdown
Author

Oh! On my install I actually have removed secure comms to redis (so no cert is being used rn)

@hanunes

hanunes commented Oct 10, 2022

Copy link
Copy Markdown
Author

Is this still failing because of the redis certificate? Or is it something else?

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.

2 participants