apache / cloudstack-go

CloudStack Go SDK

Home Page:https://cloudstack.apache.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with ListVirtualMachines

happyalexkg opened this issue · comments

Hi, i tring to get all VMs which belongs to user with this function
ListVirtualMachines

Here is my code:
con := cloudstack.InitCloudStack()
p3 := con.VirtualMachine.NewListVirtualMachinesParams()
//p3.SetAccount("testuser")
p3.SetListall(true)
ret, err := con.VirtualMachine.ListVirtualMachines(p3)
fmt.Println(ret)
if err != nil {
fmt.Println(err.Error())
}
After execution this code I got this error:
json: cannot unmarshal string into Go struct field VirtualMachine.virtualmachine.ostypeid of type int64

How to fix or can you please tell proper way to get all VMs which belongs to user

Thx

issue was inproper version of package