-
Notifications
You must be signed in to change notification settings - Fork 107
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
Alcatel-Lucent Enterprise AOS8 integration #759
base: develop
Are you sure you want to change the base?
Alcatel-Lucent Enterprise AOS8 integration #759
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all thanks for the work!
I left some minor comments about styling or linting-related. You can see the reason in the github actions for flake8 and pylint, or just run locally pylint suzieq
and flake8 suzieq
.
Others are related to default values in the cleanup functions in services and about some missing fields for tables entries: arpnd, interfaces, routes.
suzieq/poller/worker/nodes/node.py
Outdated
["show system", | ||
"show version", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep show version
as first command, we don't want to break anything that was previously supported. We would not support auto discovery for Alcatel-Lucent Enterprise for the moment, users could still specify the devtype in the inventory when running the poller.
@ddutt what's your view?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really should be fixed with a durable solution.
There is a problem with the ´only_one´ parameters on the cmd execution in function ´_get_device_type_hostname´ for the device discovery. If an unknown command is sent to the device, status 0 and an error message in standard output get returned. So when the correct command for that type of device is not used first, the device gets discovered as unknown.
The program can also never enter the elif function because only one command from the list is sent if the return status is 0 (even with an error return):
elif (len(output) > 1) and (output[1]["status"] == 0):
devtype = 'unsupported'
data = output[1]["data"]
if data:
if "Cumulus Linux" in data:
devtype = "cumulus"
else:
devtype = "linux"
version_str = data
# Hostname is the last line of the output
if len(data.strip()) > 0:
hostname = data.splitlines()[-1].strip()
Sample terminal output on unknown cli command (with return status code 0):
net-swi-001> show version
^
ERROR: Invalid entry: "version"
Ansible netcommon library plugins have a similar issue fixed with regex search patterns to match the error output. For cases where the return code is 0, but the command is unknown for the nos.
terminal_stderr_re = [
re.compile(rb"[\r\n]ERROR:\s*.*[\r\n]+", re.IGNORECASE),
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really should be fixed with a durable solution.
I agree. What you propose, checking for a command failure using both the return code AND a regex for the output, seems the best way to go.
For this first phase I'd go for supporting Alcatel-Lucent only supplying devtype
as aos
in the inventory, we can implement the new way of determining a failed command separately and then come back to having the automatic discovery.
Sample terminal output on unknown cli command (with return status code 0):
net-swi-001> show version
^
ERROR: Invalid entry: "version"
Does this appear in the stdout or stderr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Terminal output from cli command, so stdout.
Signed-off-by: Claudio Lorina <claudio.lorina@gmail.com> Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com> Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com> Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com> Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: Claudio Lorina <claudio.lorina@gmail.com> Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com> Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com> Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com> Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
|
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: Claudio Lorina <claudio.lorina@stardustsystems.net>
The show version command should be the first one to be executed as IOS* devices close the connection after the first command. While AOS returns 0 in case of an error. To solve this issue we try to match the response agaist a pattern to guess the return code of the command Signed-off-by: Claudio Lorina <claudio.lorina@stardustsystems.net>
Signed-off-by: Claudio Lorina <claudio.lorina@stardustsystems.net>
Signed-off-by: Claudio Lorina <claudio.lorina@stardustsystems.net>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Signed-off-by: jefvantongerloo <jefvantongerloo@gmail.com>
Description
Alcatel-Lucent Enterprise AOS8 (aos) support for the following services:
Type of change
Changes to the Documentation
Index.md
and nostable.md
updated.Proposed Release Note Entry
Support for ALE AOS8: Added support for
Alcatel-Lucent Enterprise AOS8
platform. All testing was done on both 8.6.x and 8.7.x releases. The support includes the following services: arpnd, device, interfaces, inventory, macs, routes and vlans. Contribution by @jefvantongerlooDouble-Check
develop
branch.develop
branch.--signoff
applied