Juniper / junos-terraform

Apache License 2.0
70 stars 25 forks source link

Migrate NETCONF junos_helper to provider. #35

Closed aaronchar closed 1 year ago

aaronchar commented 2 years ago

The purpose of this pull request is to migrate the junos_helpers functionality from go-netconf to this project, it is still using the go-netconf library but instead of depending upon the junos_helpers from the library we simply implement it within this repo.

This should allow for easier changes to the NETCONF calls that are being used from this provider while preventing any unwanted changes to the underlying libraries helper such as adding in a bulk/batch mode etc.

To accomplish this I have made the following notable changes.

aaronchar commented 2 years ago

I know from comments made by @davedotdev that the idea is to keep this jtaf library as simple as possible,I think the added flexibility that is gained by moving a core dependency from an external library into the provider library allows greater flexibility as well as potential customization at a user level.

Right now, you are modifying multiple libraries if you want to implement a solution to #31 . This PR will make it so that we only need to alter the single jtaf NETCONF interface.

aaronchar commented 2 years ago

This has been updated to work with the latest sdk changes.

aaronchar commented 2 years ago

The latest changes to the PR clean up the NETCONF helper functions.

I have removed functions that are not needed for the operation of jtaf and I have condensed the destroy operations to a single function instead of destroyNoCommit and destory, this is now a single destroy function that takes a bool commit variables.

aaronchar commented 2 years ago

@ydnath - Just tagging you on this for a review.