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

Custom scripts #67

Closed
afourmy opened this issue May 27, 2018 · 1 comment
Closed

Custom scripts #67

afourmy opened this issue May 27, 2018 · 1 comment

Comments

@afourmy
Copy link
Member

afourmy commented May 27, 2018

Update the code so that the user can create his own script in Python, in order to add scripts that use some python logic (parsing of an output, conditions, etc...)

Requested from users:

From slack
Is it possible to parse a show command and use the results in a for loop? (show cdp neighbors, identify cisco phones, get ports associated, turn into list and bounce ports)

From reddit:


Like this:

ver = netmiko.send_command("show version")
if ver >= 15.0:
    continue
elif ver <= 15.0:
    netmiko.send_command("request system software add validate newversionofjunos reboot")```
@afourmy
Copy link
Member Author

afourmy commented May 27, 2018

Done

@afourmy afourmy closed this as completed May 27, 2018
@afourmy afourmy modified the milestones: eNMS 3.0, eNMS 2.1.0 Jun 17, 2018
afourmy added a commit that referenced this issue Sep 3, 2023
create & remove "services" tree in service_import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant