Overriding comms_prompt_pattern of generic driver #100
-
I have off-brand switches that needs a custom pattern for scrapli to detect the prompt. I tried adding comms_prompt_pattern under connection_options/scrapli/extras in my groups.yaml file, but the generic driver doesn't seem to pick up on it. Here is the debug output (redacted):
The custom SSH ciphers and algorithms are applied but the pattern is not learned and the connection times out. If I set the platform to 'ios', the IOSXE driver is invoked but again my prompt pattern is not merged with the others:
Could you let me know where in the inventory I need to include the prompt pattern? Or maybe it needs to be passed as part of the script? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @lucasmarcel off the top of my head I believe the
HTH! |
Beta Was this translation helpful? Give feedback.
-
The problem was caused by the 'connection_options/scrapli/extras' dictionary not being merged but instead replaced by the last one defined. So only the options defined as part of defaults.yaml were actually present in my case. The comms_promt_pattern was in the groups.yaml file and therefore ignored. I moved it to defaults.yaml and now the prompt is recognized and everything works as expected. I understand that this is by design but never ran into it before. |
Beta Was this translation helpful? Give feedback.
The problem was caused by the 'connection_options/scrapli/extras' dictionary not being merged but instead replaced by the last one defined. So only the options defined as part of defaults.yaml were actually present in my case. The comms_promt_pattern was in the groups.yaml file and therefore ignored. I moved it to defaults.yaml and now the prompt is recognized and everything works as expected.
I understand that this is by design but never ran into it before.
Thanks for your help.