[For review] - Proposed update to implementation for RESTCONF platforms #145
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While working on a PR to support host / IPv6 addressing on some implementations, I noticed some differences in how implementations handled the same tasks. There were some inconsistencies across supported testbed attributes and some code duplication.
Requesting review of changes to add a new RestconfImplementation class at the top-level - this would permit existing implementations to be migrated as they are updated / tested without impacting current deployments.
After a super().init() call, the calling implementation will have a requests.Session() object and can then perform any request by calling the self.session._request(*args, **kwargs), similar to the familiar requests interface.
In the end - this solves my initial requirements of supporting a 'host:' key for the IOS XE implementation as well as the IPv6 URL support... with some added code.
If this looks usable / feasible, I will update the documentation for the iosxe implementation and will have APIC support following close behind.
Tagging @omehrabi as requested