You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/10/12 05:38:08 UTC
[GitHub] [cloudstack-go] nishiokay opened a new issue #15: Error retrieving ID of template: json: cannot unmarshal object into Go struct field alias.childtemplates of type []interface {}
nishiokay opened a new issue #15:
URL: https://github.com/apache/cloudstack-go/issues/15
This issue is a follow-up of https://github.com/xanzy/terraform-provider-cloudstack/issues/72
This issue is still exist.
So cloudstack-terraform-provider cannot be used for older versions of CloudStack and CloudPlatform.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack-go] synergiator commented on issue #15: Error retrieving ID of template: json: cannot unmarshal object into Go struct field alias.childtemplates of type []interface {}
Posted by GitBox <gi...@apache.org>.
synergiator commented on issue #15:
URL: https://github.com/apache/cloudstack-go/issues/15#issuecomment-981060224
Strange enough, VM deployment using a unit test works, can't reproduce this error with this SDK itself.
Based on the [mock test ](https://github.com/apache/cloudstack-go/blob/v2.11.0/cloudstack/VirtualMachineService_test.go)kindly provided by @Pearl1594 (just removed the HTTP mock server and hardcoded required params/values) I've tried the following against an instance with API level 4.11:
```
func TestVirtualMachineService_DeployVirtualMachineReal(t *testing.T) {
var URL="https://<DOMAIN>/client/api"
var APIKEY = ...
var SECRETKEY = ...
var zoneid = "23ec4069-ede9-46b4-9236-d8e373a4ef59"
var templateid = "450ec62f-16b1-4d04-a00b-a6fd4933e429"
var networkids = []string{"690ef536-3996-4aaf-b45d-5501f079d6eb"}
var serviceofferingid = "171aa1ff-3c93-4030-946a-d16e34774a76"
client := NewAsyncClient(URL, APIKEY, SECRETKEY, true)
params := client.VirtualMachine.NewDeployVirtualMachineParams(serviceofferingid, templateid, zoneid)
params.SetName("testDummyVM")
params.SetNetworkids(networkids)
resp, err := client.VirtualMachine.DeployVirtualMachine(params)
if err != nil {
t.Errorf("Failed to deploy VM with given specs due to %v", err)
return
}
if resp == nil || resp.Name != "testDummyVM" {
t.Errorf("Failed to deploy VM with given specs")
}
}
```
Run single unit test:
```
go test -v -run TestVirtualMachineService_DeployVirtualMachineReal
```
Result: VM appears in the management UI and the test reports success.
```
=== RUN TestVirtualMachineService_DeployVirtualMachineReal
--- PASS: TestVirtualMachineService_DeployVirtualMachineReal (79.34s)
```
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack-go] synergiator commented on issue #15: Error retrieving ID of template: json: cannot unmarshal object into Go struct field alias.childtemplates of type []interface {}
Posted by GitBox <gi...@apache.org>.
synergiator commented on issue #15:
URL: https://github.com/apache/cloudstack-go/issues/15#issuecomment-1001541205
In the [test asset](https://github.com/apache/cloudstack-go/blob/v2.11.0/cloudstack/TemplateService_test.go), there is no method to test listing templates.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack-go] rhtyd commented on issue #15: Error retrieving ID of template: json: cannot unmarshal object into Go struct field alias.childtemplates of type []interface {}
Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #15:
URL: https://github.com/apache/cloudstack-go/issues/15#issuecomment-981494227
Perhaps this is no longer an issue now, can you check and confirm @nishiokay @synergiator ? Thanks.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack-go] davidjumani commented on issue #15: Error retrieving ID of template: json: cannot unmarshal object into Go struct field alias.childtemplates of type []interface {}
Posted by GitBox <gi...@apache.org>.
davidjumani commented on issue #15:
URL: https://github.com/apache/cloudstack-go/issues/15#issuecomment-981553649
This appears to be an issue with parsing the listTemplate API response, @nishiokay could you provide the response to the listTemplate response with the templateid 450ec62f-16b1-4d04-a00b-a6fd4933e429 (or whichever one you're having issues with on terraform)
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack-go] davidjumani edited a comment on issue #15: Error retrieving ID of template: json: cannot unmarshal object into Go struct field alias.childtemplates of type []interface {}
Posted by GitBox <gi...@apache.org>.
davidjumani edited a comment on issue #15:
URL: https://github.com/apache/cloudstack-go/issues/15#issuecomment-981553649
This appears to be an issue with parsing the listTemplate API response, @nishiokay could you :
- List the template (which has child templates) via the sdk
- Provide the response to the listTemplate response with the templateid 450ec62f-16b1-4d04-a00b-a6fd4933e429 (or whichever one you're having issues with on terraform)
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org