-
Notifications
You must be signed in to change notification settings - Fork 162
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
Junos script newline normalization #76
Comments
Thank you for your feedback ! Newlines in an HTML textarea should be normalized to CR LF so getting |
@jberger As it turns out, it was slightly worse than what you spotted: there is a discrepancy in the way Napalm handles closing a connection to a device depending on the OS. It's not the same behavior for IOS and Junos, and it impacts eNMS because of the way Napalm integration is currently implemented. I opened napalm-automation/napalm#746, and I fixed eNMS locally in another branch which contains the next version of eNMS, but I cannot commit because this branch is not stable yet. I will publish a new release this week-end with this fix along with many other improvements, so I would suggest you hold off your tests for a couple of days (until next week), then if it works for you, we can close this issue. I usually test for Cisco only, but for this new version, I'll make sure everything works for Juniper too. |
Just to be sure I understand correctly, you are saying that it is not sufficient for your needs to automatically commit once a |
I'm more of a developer than a network engineer so I should leave that comment to my neteng team. I was just trying to make it not rollback and that simple fix caused it to behave as expected. I'm not sure what the right answer would be. Hopefully they'll comment too (I've linked them to this issue on our slack). |
I see. I was asking because I cannot think of a use-case where it would make sense to persist a napalm connection throughout the workflow, and I had the impression that's what you were asking for. We probably fixed it the same way: by commiting right after the |
This fix is fine with us, I meant to hop on Slack today to discuss a little bit but I think the confusion on our end had to do with how multi-device workflows will one day function. After reviewing the logic here, I think this is what we were expecting. |
Mutli-device workflows will also be part of this week-end new release. I remember saying it would be a "surgical" update, but it turned out to be a big refactoring of the workflow system. In the current version, a workflow is a graph of script. You create a script, then you build a workflow with scripts, and you schedule the workflow. In the next version, a workflow will be a graph of tasks instead (the bricks of a workflow will be special "unscheduled" tasks). That changes everything, because a task, by definition, is a set of scripts applied to a set of nodes. That means each node of a workflow will be both multi-script and multi-device. This is a big change in the model, but it is almost transparent for the end-user, because you still create and schedule workflows in the same fashion. |
I have just published a new release that you can find here : https://github.com/afourmy/eNMS/releases/tag/v2.1.0 It includes the fix for Napalm Junos configuration push, multi-target support for workflows as well as the ReST API to remote call a task (i.e a script or a workflow via the task). Note that the logs and editing menu of a task in a workflow can be accessed from the right-click menu in the I created a chapter in the doc for the ReST API (https://enms.readthedocs.io/en/latest/automation/rest.html), but the part of the docs that explains how workflows function is not yet up-to-date (more or less the same, except a workflow is made of tasks instead of script) (future enhancements for the ReST API: #77) Waiting for your feedback to close this issue. |
@jberger @phil21 We had a discussion a while ago about how to see the results of a job triggered with a REST call, this is now possible. When you trigger a task (with a I will close this issue as it was fixed a long time ago, but you can ask on slack if it's not clear. |
bug fix: the text label's new position is overwritten by old positions
While testing eNMS using a Juniper switch, we had to normalize the config script's newlines just before sending the command to napalm. If this wasn't done we kept getting errors about literal "\n" characters in identifiers.
Specifically I changed https://github.com/afourmy/eNMS/blob/master/source/scripts/models.py#L286 from
to
If this is a sufficient fix I can pull it together as a PR, however I am not submitting it as such yet because I suspect there's a more wholistic fix that I'm not seeing.
The text was updated successfully, but these errors were encountered: