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

Issue using send_config_set() on Juniper devices #3491

Open
MRreddy143 opened this issue Sep 2, 2024 · 1 comment
Open

Issue using send_config_set() on Juniper devices #3491

MRreddy143 opened this issue Sep 2, 2024 · 1 comment

Comments

@MRreddy143
Copy link

Description of Issue/Question
please help to fix i tried all expect_string also ,

to see how to properly format your request.

i tried to configuration in juniper using the netmiko getting error ,

command= 'deactivate protocols isis interface ae5.13 level 2 metric' -------------> this is executing in manual , all delete is not working with the send_config_set
print(dev_connect.find_prompt())
output_Name_server=dev_connect.send_config_set()
output_Name_server=dev_connect.send_config_set(commands,exit_config_mode=False,strip_command=False,strip_prompt=False,read_timeout=100)
output_Name_server=output_Name_server+dev_connect.commit(and_quit=True)

error is :--

Pattern not detected: 'delete\ protocols\ isis\ interface\ ae5.13\ level\ 2\ hello-interval' in output.

Things you might try to fix this:

Adjust the regex pattern to better identify the terminating string. Note, in
many situations the pattern is automatically based on the network device's prompt.
Increase the read_timeout to a larger value.
You can also look at the Netmiko session_log or debug log for more information.

Originally posted by @MRreddy143 in #3476

@ktbyers
Copy link
Owner

ktbyers commented Sep 17, 2024

# -------------> this is executing in manual , all delete is not working with the send_config_set
command= 'deactivate protocols isis interface ae5.13 level 2 metric' 
print(dev_connect.find_prompt())
output_Name_server=dev_connect.send_config_set()
output_Name_server=dev_connect.send_config_set(
    commands,
    exit_config_mode=False,
    strip_command=False,
    strip_prompt=False,
    read_timeout=100
)
output_Name_server=output_Name_server+dev_connect.commit(and_quit=True)

command and commands are not the same variable.

command is set to: 'deactivate protocols isis interface ae5.13 level 2 metric'

But error refers to:

Pattern not detected: 'delete\ protocols\ isis\ interface\ ae5.13\ level\ 2\ hello-interval' in output.

Which aren't the same?

@ktbyers ktbyers changed the title Description of Issue/Question Issue using send_config_set() on Juniper devices Sep 17, 2024
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