psycofdj commented on pull request #21:
URL: https://github.com/apache/cloudstack-go/pull/21#issuecomment-967039125


   I still don't totally understand what your suggestion is (please pardon me 
for this ^^). Allow me to try a different interpretation and tell me if I'm 
getting closer:
   
   - I need to modify my golang application that are using `cloudstack-go's` 
bindings to support `strings` instead of `long` in my code for the fields for 
which I have problems. 
     - the problem is not the type representation in my applications. The 
problem is the json parsing of cloudstack's responses coded in `cloudstack-go`. 
     - In golang, the json parser requires a perfect match between types given 
in the json object and the types described in the receiving json structure. 
     - In my case, cloudstack 4.11.3 if giving me `managementserverid` field as 
a json string `{"managementserverid":  123456789}`, and the `cloudstack-go` sdk 
[wants it as a 
string](https://github.com/apache/cloudstack-go/blob/main/cloudstack/HostService.go#L360),
 which lead to a parsing error that cannot be recovered by my application using 
the sdk.
   
   I'm using this sdk in various golang applications related to deploying 
running Cloudfoundry on cloudstack:
   - 
[orange-cloudfoundry/bosh-cpi-cloudstack](https://github.com/orange-cloudfoundry/bosh-cpi-cloudstack)
 : cloudstack driver for [BOSH](http://bosh.io/)
   - 
[orange-cloudfoundry/terraform-provider-cloudstack](https://github.com/orange-cloudfoundry/terraform-provider-cloudstack):
 cloudstack driver for [terraform](https://www.terraform.io/)
   - other small close-source projects


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to