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

New NETCONF based IOS-XR driver #1336

Merged
merged 134 commits into from
Apr 30, 2021
Merged

New NETCONF based IOS-XR driver #1336

merged 134 commits into from
Apr 30, 2021

Conversation

ktbyers
Copy link
Contributor

@ktbyers ktbyers commented Dec 16, 2020

No description provided.

neelimapp added 30 commits May 11, 2020 13:41
Implemented class initialization and open methods. In addition, added implementation for private lock and unlock methods. Remaining methods return NotImplementedError. Class makes use of the NETCONF implementation in the ncclient package. The open method establishes a connection using password based authentication and automatically locks the candidate datastore.
Implement get interfaces using the operational data in Cisco-IOS-XR-pfi-im-cmd-oper YANG model. In addition, implement private _find_txt method to retrieve data leaves taking into account the data model namespace. The RPC filter and namespace strings added in constants.py.
Implement get interface counters using the operational data in Cisco-IOS-XR-pfi-im-cmd-oper YANG model. The RPC filter string is different from the filter used for get_interfaces method. Each method relies on data from different subtrees of the same operational data model.
Implement get facts using the operational data in Cisco-IOS-XR-shellutil-oper, Cisco-IOS-XR-pfi-im-cmd-oper and Cisco-IOS-XR-invmgr-oper YANG models. Uses an explicit RPC string with multiple subtree filters to retrieve data from multiple data models in a single call. The RPC and namespace strings added in constants.py.
Implement get NTP peers using the configuration data in Cisco-IOS-XR-ip-ntp-cfg YANG model. The RPC filter and namespace string added in constants.py.
Implement get NTP servers using the configuration data in Cisco-IOS-XR-ip-ntp-cfg YANG model.
Implement get NTP statistics using the operational data in Cisco-IOS-XR-ip-ntp-oper YANG model. The RPC filter and namespace string added in constants.py.
Implement get LLDP neighbors using the operational data in Cisco-IOS-XR-ethernet-lldp-oper YANG model. The RPC filter and namespace string added in constants.py.
Implement get BGP neighbors using the operational data in Cisco-IOS-XR-ipv4-bgp-oper YANG model. The method uses a helper method (get_neighbors) to gather the neighbors of the default(global) VRF first and then the neighbors of the other VRFs. All the required operational data is retrieved from the device in a single RPC call. The RPC filter and namespace string added in constants.py.
Implement get BGP configuration using the configuration data in Cisco-IOS-XR-ipv4-bgp-cfg YANG model. The RPC filter and namespace string added in constants.py.
Implement get BGP neighbors detail using the operational data in Cisco-IOS-XR-ipv4-bgp-oper YANG model. The method uses a helper method (get_vrf_neighbors_detail) to gather the neighbors of the default(global) VRF first and then the neighbors of the other VRFs. All the required operational data is retrieved from the device in a single RPC call.
Implement get MAC address table using the operational data in Cisco-IOS-XR-l2vpn-oper YANG model. The RPC filter and namespace string added in constants.py.
Implement get IP interfaces using the operational data in Cisco-IOS-XR-ipv4-io-oper and Cisco-IOS-XR-ipv6-ma-oper YANG models. Uses an explicit RPC string with multiple subtree filters to retrieve data from multiple data models in a single call. The RPC and namespace strings added in constants.py.
Implement get SNMP information using the configuration data in Cisco-IOS-XR-snmp-agent-cfg YANG model. The RPC and namespace strings added in constants.py. The ipv4 and ipv6 ACL data is now included in the result. The data was missing in the implementation of the IOSXR driver.
Implement get users using the configuration data in Cisco-IOS-XR-aaa-lib-cfg and Cisco-IOS-XR-aaa-locald-cfg YANG models. The RPC and namespace strings added in constants.py.
Return false if the connection is not instantiated or not open. Otherwise, return true.
Return device running and/or candidate configurations. The `full` argument ignored as `with-default` capability is not supported.
Close NETCONF session. Unlock candidate datastore if currently locked.
Load and merge candidate configuration from a file or string. This method relies on a private method (_load_candidate_config) to read the configuration and issue an edit-config RPC with rollback-on-error error-option. If an error is detected on client or server side, a MergeConfigException is raised.
Load and replace candidate configuration from a file or string. This method relies on a private method (_load_candidate_config) to read the configuration and issue an edit-config RPC with rollback-on-error error-option. If an error is detected on client or server side, a ReplaceConfigException is raised.
Commit candidate configuration by issuing a NETCONF commit RPC.
Discard the candidate configuration by issuing a NETCONF discard-changes RPC.
Roll back the last commit to the running configuration by issuing a roll-back-configuration-last RPC as defined in Cisco-IOS-XR-cfgmgr-rollback-act data model.
Reimplement load replace candidate method to use copy-config RPC instead of edit-config RPC. This implementation guarantees an entire replacement of the configuration once a commit RPC is issued on the device. These changes slightly modified the load_merge_candidate implementation, but they don't alter its behaviour.
Compare candidate and running datastores. The output is styled as a diff file. The XML strings for candidate and running configurations are parsed as etrees and re-encoded as strings to make the comparison more reliable.
@ktbyers ktbyers changed the title [Do Not Merge] - New NETCONF based IOS-XR driver New NETCONF based IOS-XR driver Apr 16, 2021
@ktbyers
Copy link
Contributor Author

ktbyers commented Apr 16, 2021

@mirceaulinic This should be ready to go. As per previous communication, I think we should merge this into develop after the NAPALM 3.3.0 release.

@ktbyers
Copy link
Contributor Author

ktbyers commented Apr 23, 2021

@mirceaulinic I think we should just go ahead and merge this (regardless of upcoming release) i.e. it is better to just keep moving forward with this and get feedback on it (so improvements can be made).

If you are okay with this, I will go ahead and merge it in.

Copy link
Member

@mirceaulinic mirceaulinic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 👟 📦

@ktbyers ktbyers merged commit fa3c534 into develop Apr 30, 2021
@mirceaulinic mirceaulinic deleted the iosxr_new2 branch May 4, 2021 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants