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

unable to detect prompt #3403

Open
ars09 opened this issue Feb 15, 2025 · 3 comments
Open

unable to detect prompt #3403

ars09 opened this issue Feb 15, 2025 · 3 comments

Comments

@ars09
Copy link

ars09 commented Feb 15, 2025

Created an additional one for a separate switch dlink_dgs.rb
add to Supported-OS-Types.md
|D-Link |[dlinkdgs](/lib/oxidized/model/dlink_dgs.rb
gives an error

raised Oxidized::PromptUndetect with msg "unable to detect prompt: (?-mix:[\w.@()/:-]+[#>]\s?$)"

DGS-3612G

@ars09 ars09 changed the title ModelNotFound unable to detect prompt Feb 15, 2025
@renadown
Copy link

I suppose you receive a prompt similar to this:

router# 
router>

according to the manual for your DGS-3612G model, the prompt is https://support.dlink.com/resource/products/DGS-3612G/REVA/DGS-3612G_CLI_MANUAL_1.00_EN.PDF:

Image

if that's the case, try changing the prompt value in the model to:
prompt: /([\w.@()/: -]+[#>]\s?)$/

if you want to try something that matches anything ending with #:
prompt /^([\w.@()/: -]+[#>]\s?)$/

if this is not the case, please send us more details about your CLI and your model.

@ars09
Copy link
Author

ars09 commented Feb 19, 2025

It gives the following error and the service does not start

 <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require': /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/model/dlinkdgs.rb:6: premature end of char-class: />
  /var/lib/gems/3.0.0/gems/oxidized-0.30.1/lib/oxidized/model/dlinkdgs.rb:6: syntax error, unexpected ':', expecting `end'
   prompt /^([\\w.@()/: -]+[#>]\\s?)$/

@ars09
Copy link
Author

ars09 commented Feb 23, 2025

This also shows up in another model
DES-3200-28 Fast Ethernet Switch

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

No branches or pull requests

2 participants