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

Updating to single command to parse 'set output mode' #3248

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

msozer-dn
Copy link
Contributor

Current method which sends config system console , show full-configuration , end commands in order to parse the set output mode has a limitation to run the commands with a user which has a global configuration permission.

When a RO user tries to create a connection "show full-configuration" commands run without entering the console section and displays full configuration of the system. prompt_pattern which was used to find the end of the output is not suitable to parse the set output mode from full device configuration. In this situation netmiko raises below error.

ValueError("Unable to determine the output mode on the Fortinet device.")

show full-configuration system console command produces the expected result as the original commands as RO user can create a successful connection.

@ktbyers
Copy link
Owner

ktbyers commented Jul 14, 2023

@msozer-dn Are there any restrictions on user permissions or Fortinet OS version on where these should work (or should this work generally).

Obviously the current solution as the referenced problems i.e. it doesn't work for RO users (as referenced in linked issue).

@msozer-dn
Copy link
Contributor Author

msozer-dn commented Jul 19, 2023

@ktbyers Current user is a RO user and having difficulties to collect output mode. Updated commands works in RW and RO users.
I am able to collect the output mode when I use a RW user.

@ktbyers ktbyers merged commit 286cdd7 into ktbyers:develop Jul 19, 2023
5 checks passed
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