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

Updated client.go with newer wapi version 2.7.3 #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rudhron
Copy link

@rudhron rudhron commented Jun 29, 2018

No description provided.

@fanatic
Copy link
Owner

fanatic commented Jul 1, 2018

Thanks for the change! For the reasons I outlined over in #33, I'm hesitant to merge this until I we can verify that it maintains backwards compatibility for the folks using this library today. The infoblox I have access to is still on the much older wapi version, and merging this pull request would break that. Perhaps it can be configurable?

@rudhron
Copy link
Author

rudhron commented Jul 1, 2018 via email

@fanatic
Copy link
Owner

fanatic commented Jul 1, 2018

You should be able to run $ go install github.com/fanatic/go-infoblox and it'll download dependencies and build the binary. Same should work for your fork. Do you have a specific error message?

@sjwl
Copy link

sjwl commented Mar 26, 2019

I have an immediate need to use the newer version WAPI, for example:

curl -k -u admin:infoblox -H "Content-Type: application/json" -X POST https://10.97.65.208/wapi/v2.5/network -d '{"network":"func:nextavailablenetwork:10.10.0.0/16,default,24","comment":"test","comment":"test","comment":"test"est"}'          19-03-26 - 15:07:29
"network/ZG5zLm5ldHdvcmskMTAuMTAuMS4wLzI0LzA:10.10.1.0/24/default"

vs

curl -k -u admin:infoblox -H "Content-Type: application/json" -X POST https://10.97.65.208/wapi/v1.4.1/network -d '{"network":"func:nextavailablenetwork:10.10.0.0/16,default,24","comment":"tes4","comment":"tes4","comment":"tes"test"}'        19-03-26 - 15:11:35
{ "Error": "AdmConProtoError: Bad value for network: 'func:nextavailablenetwork:10.10.0.0/16,default,24'", 
  "code": "Client.Ibap.Proto", 
  "text": "Bad value for network: 'func:nextavailablenetwork:10.10.0.0/16,default,24'"
}

But rather than waiting for an extensive regression test in order to support 2.x, could we instead add a new version parameter to NewClient, where the default version could still be 1.4.1? Otherwise, those who need 2.x functionality will just create forked versions replacing the hard-coded 1.4.1 to 2.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants