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
Add Ciena driver #570
Add Ciena driver #570
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.
In general it's not clear to me what this device handler adds. A device handler is typically implemented if there is something special that is needed. For example, the IOS XE device handler adds a save_config
operation:
https://github.com/ncclient/ncclient/blob/master/ncclient/devices/iosxe.py#L36-L39
This Ciena device handler doesn't seem to add any custom behaviour...?
ncclient/devices/ciena.py
Outdated
def get_capabilities(self): | ||
return [ | ||
"urn:ietf:params:netconf:base:1.0", | ||
] |
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 has the effect of restricting what capabilities are offered by ncclient
to a Ciena device. Is that your intention? If so, it is not actually necessary.
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.
Thanks. I will remove.
No additional capabilities are required. The driver is necessary because the device does not support a namespace (nc) on the base namespace. So, this code is necessary: I attempted to use the default driver and override the namespace of the root, but could not figure it out. It seems the implementation of this library in Ansible provides limited ability to override any methods until some driver is specified. |
Several of the drivers in this repo seem to require the namespace modification. |
@jgroom33, apologies for long delay. Having a single base driver that allows a vendor-specific driver to add in just namespace modifications may make sense. But it probably should be a per-vendor class ultimately as non-vendor engineers would likely not know what the vendor-specific namespace tweaks would need to be. |
For reference, The following drivers implement the null namespace for BASE_NS_1_0:
I'm not familiar with the other devices, but the only reason I opened this PR for the Ciena device is to null the BASE_NS_1_0 namespace. I suspect it might be similar for other vendors. What I'm proposing is one of these options:
What would be your preference? I'm good with any of the above. |
@jgroom33, sorry for delay. I will merge this PR. |
Also alphabetize the lists